Browse Source

fix uClibc build, update bison to latest upstream

Waldemar Brodkorb 10 years ago
parent
commit
0f77fa26b8

+ 7 - 3
package/bison/Makefile

@@ -4,15 +4,17 @@
 include ${TOPDIR}/rules.mk
 
 PKG_NAME:=		bison
-PKG_VERSION:=		2.4.3
-PKG_RELEASE:=		2
-PKG_MD5SUM:=		ea45c778b36bdc7a720096819e292a73
+PKG_VERSION:=		3.0.1
+PKG_RELEASE:=		1
+PKG_MD5SUM:=		032a7b7b9f1a6e278ccde73f82cec5c2
 PKG_DESCR:=		GNU parser generator
 PKG_SECTION:=		lang
 PKG_BUILDDEP:=		flex-host bison-host
 PKG_URL:=		http://www.gnu.org/software/bison/
 PKG_SITES:=		${MASTER_SITE_GNU:=${PKG_NAME}/}
 
+DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tar.xz
+
 include ${TOPDIR}/mk/host.mk
 include ${TOPDIR}/mk/package.mk
 
@@ -20,6 +22,8 @@ $(eval $(call HOST_template,BISON,bison,${PKG_VERSION}-${PKG_RELEASE}))
 $(eval $(call PKG_template,BISON,bison,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
 HOST_STYLE:=		auto
+TARGET_LDFLAGS+=	-lrt
+XAKE_FLAGS+=		M4=m4
 
 bison-install:
 	${INSTALL_DIR} ${IDIR_BISON}/usr/bin ${IDIR_BISON}/usr/share/bison

+ 27 - 11
package/bison/patches/patch-Makefile_in

@@ -1,11 +1,27 @@
---- bison-2.4.3.orig/Makefile.in	2010-08-06 03:00:27.000000000 +0200
-+++ bison-2.4.3/Makefile.in	2012-09-28 20:42:50.000000000 +0200
-@@ -909,7 +909,7 @@ top_build_prefix = @top_build_prefix@
- top_builddir = @top_builddir@
- top_srcdir = @top_srcdir@
- ACLOCAL_AMFLAGS = -I m4
--SUBDIRS = build-aux po runtime-po lib data src doc examples tests etc
-+SUBDIRS = build-aux po runtime-po lib data src etc
- aclocal_DATA = m4/bison-i18n.m4
- EXTRA_DIST = .prev-version .version cfg.mk \
-   OChangeLog PACKAGING \
+--- bison-3.0.1.orig/Makefile.in	2013-11-12 14:57:09.000000000 +0100
++++ bison-3.0.1/Makefile.in	2013-11-27 18:46:46.000000000 +0100
+@@ -5134,22 +5134,12 @@ $(CROSS_OPTIONS_TEXI): doc/bison.help $(
+ doc/refcard.pdf: doc/refcard.tex
+ 	$(AM_V_GEN) cd doc && pdftex $(abs_top_srcdir)/doc/refcard.tex
+ $(top_srcdir)/doc/bison.help: src/bison$(EXEEXT)
+-	$(AM_V_GEN)src/bison$(EXEEXT) --version >doc/bison.help.tmp
+-	$(AM_V_at) src/bison$(EXEEXT) --help   >>doc/bison.help.tmp
++	bison$(EXEEXT) --version >doc/bison.help.tmp
++	bison$(EXEEXT) --help   >>doc/bison.help.tmp
+ 	$(AM_V_at)$(top_srcdir)/build-aux/move-if-change doc/bison.help.tmp $@
+ 
+ # Depend on configure to get version number changes.
+ $(top_srcdir)/doc/bison.1: doc/bison.help doc/bison.x $(top_srcdir)/configure
+-	$(AM_V_GEN)$(HELP2MAN)			\
+-	    --include=$(top_srcdir)/doc/bison.x	\
+-	    --output=$@.t src/bison$(EXEEXT)
+-	$(AM_V_at)if $(remove_time_stamp) $@ >$@a.t 2>/dev/null &&	 \
+-	   $(remove_time_stamp) $@.t | cmp $@a.t - >/dev/null 2>&1; then \
+-	  touch $@;							 \
+-	else								 \
+-	  mv $@.t $@;							 \
+-	fi
+-	$(AM_V_at)rm -f $@*.t
+ 
+ .gv.eps:
+ 	$(AM_V_GEN) $(MKDIR_P) `echo "./$@" | sed -e 's,/[^/]*$$,,'`

+ 13 - 0
package/bison/patches/patch-Makefile_in.orig

@@ -0,0 +1,13 @@
+--- bison-3.0.1.orig/Makefile.in	2013-11-12 14:57:09.000000000 +0100
++++ bison-3.0.1/Makefile.in	2013-11-27 18:39:58.000000000 +0100
+@@ -5134,8 +5134,8 @@ $(CROSS_OPTIONS_TEXI): doc/bison.help $(
+ doc/refcard.pdf: doc/refcard.tex
+ 	$(AM_V_GEN) cd doc && pdftex $(abs_top_srcdir)/doc/refcard.tex
+ $(top_srcdir)/doc/bison.help: src/bison$(EXEEXT)
+-	$(AM_V_GEN)src/bison$(EXEEXT) --version >doc/bison.help.tmp
+-	$(AM_V_at) src/bison$(EXEEXT) --help   >>doc/bison.help.tmp
++	bison$(EXEEXT) --version >doc/bison.help.tmp
++	bison$(EXEEXT) --help   >>doc/bison.help.tmp
+ 	$(AM_V_at)$(top_srcdir)/build-aux/move-if-change doc/bison.help.tmp $@
+ 
+ # Depend on configure to get version number changes.

+ 11 - 0
package/bison/patches/patch-doc_bison_help

@@ -0,0 +1,11 @@
+--- bison-3.0.1.orig/doc/bison.help	2013-11-12 14:57:56.000000000 +0100
++++ bison-3.0.1/doc/bison.help	2013-11-27 18:41:48.000000000 +0100
+@@ -4,7 +4,7 @@ Written by Robert Corbett and Richard St
+ Copyright (C) 2013 Free Software Foundation, Inc.
+ This is free software; see the source for copying conditions.  There is NO
+ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+-Usage: src/bison [OPTION]... FILE
++Usage: bison [OPTION]... FILE
+ Generate a deterministic LR or generalized LR (GLR) parser employing
+ LALR(1), IELR(1), or canonical LR(1) parser tables.  IELR(1) and
+ canonical LR(1) support is experimental.

+ 0 - 12
package/bison/patches/patch-lib_config_hin

@@ -1,12 +0,0 @@
---- bison-2.4.3.orig/lib/config.hin	2010-08-06 03:00:25.000000000 +0200
-+++ bison-2.4.3/lib/config.hin	2012-09-28 20:44:10.000000000 +0200
-@@ -1350,6 +1350,9 @@
-    accessed atomically even in the presence of asynchnonous signals. */
- #undef sig_atomic_t
- 
-+/* Define to `unsigned int' if <sys/types.h> does not define. */
-+#undef size_t
-+
- /* Define to `int' if <sys/types.h> doesn't define. */
- #undef uid_t
- 

+ 0 - 18
package/bison/patches/patch-lib_spawn_in_h

@@ -1,18 +0,0 @@
---- bison-2.4.2.orig/lib/spawn.in.h	2010-03-17 20:17:04.000000000 +0100
-+++ bison-2.4.2/lib/spawn.in.h	2010-07-30 17:23:46.000000000 +0200
-@@ -29,13 +29,8 @@
- #ifndef _GL_SPAWN_H
- #define _GL_SPAWN_H
- 
--/* Get definitions of 'struct sched_param' and 'sigset_t'.
--   But avoid namespace pollution on glibc systems.  */
--#ifndef __GLIBC__
--# include <sched.h>
--# include <signal.h>
--#endif
--
-+#include <sched.h>
-+#include <signal.h>
- #include <sys/types.h>
- 
- #ifndef __THROW

+ 0 - 10
package/bison/patches/patch-lib_stdio_in_h

@@ -1,10 +0,0 @@
---- bison-2.4.3.orig/lib/stdio.in.h	2010-08-06 03:00:04.000000000 +0200
-+++ bison-2.4.3/lib/stdio.in.h	2012-09-29 09:34:19.000000000 +0200
-@@ -143,7 +143,6 @@ _GL_WARN_ON_USE (fflush, "fflush is not 
-    so any use of gets warrants an unconditional warning.  Assume it is
-    always declared, since it is required by C89.  */
- #undef gets
--_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
- 
- #if @GNULIB_FOPEN@
- # if @REPLACE_FOPEN@

+ 0 - 11
package/bison/patches/patch-src_Makefile_in

@@ -1,11 +0,0 @@
---- bison-2.4.3.orig/src/Makefile.in	2010-08-06 03:00:29.000000000 +0200
-+++ bison-2.4.3/src/Makefile.in	2012-09-28 20:42:50.000000000 +0200
-@@ -1352,7 +1352,7 @@ uninstall-am: uninstall-binPROGRAMS unin
- 
- yacc:
- 	echo '#! /bin/sh' >$@
--	echo "exec '$(bindir)/bison' -y "'"$$@"' >>$@
-+	echo "exec bison -y "'"$$@"' >>$@
- 	chmod a+x $@
- 
- echo:

+ 3 - 0
package/m4/Makefile

@@ -20,6 +20,9 @@ $(eval $(call HOST_template,M4,m4,${PKG_VERSION}-${PKG_RELEASE}))
 $(eval $(call PKG_template,M4,m4,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
 HOST_STYLE:=		auto
+CONFIGURE_ENV+=		ac_cv_func_posix_spawn=yes \
+			ac_cv_func_posix_spawn_works=yes
+TARGET_LDFLAGS+=	-lrt
 
 m4-install:
 	${INSTALL_DIR} ${IDIR_M4}/usr/bin