CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
flex: updated to 2.6.3
authorVictor Martinez <pitillo@ono.com>
Tue, 14 Feb 2017 20:23:59 +0000 (20:23 +0000)
committerVictor Martinez <pitillo@ono.com>
Tue, 14 Feb 2017 20:23:59 +0000 (20:23 +0000)
flex/.footprint
flex/.md5sum
flex/Pkgfile
flex/flex-2.6.3-add_defines.patch [new file with mode: 0644]

index f7aa39f6dd08fd8a1b06001ec20eebf9894e5cfd..5e874fddb59d6df1b84096ac9f75137b2a200b97 100644 (file)
@@ -11,11 +11,6 @@ drwxr-xr-x   root/root       usr/lib/
 lrwxrwxrwx     root/root       usr/lib/libfl.so -> libfl.so.2.0.0
 lrwxrwxrwx     root/root       usr/lib/libfl.so.2 -> libfl.so.2.0.0
 -rwxr-xr-x     root/root       usr/lib/libfl.so.2.0.0
--rw-r--r--     root/root       usr/lib/libfl_pic.a
--rwxr-xr-x     root/root       usr/lib/libfl_pic.la
-lrwxrwxrwx     root/root       usr/lib/libfl_pic.so -> libfl_pic.so.2.0.0
-lrwxrwxrwx     root/root       usr/lib/libfl_pic.so.2 -> libfl_pic.so.2.0.0
--rwxr-xr-x     root/root       usr/lib/libfl_pic.so.2.0.0
 drwxr-xr-x     root/root       usr/share/
 drwxr-xr-x     root/root       usr/share/man/
 drwxr-xr-x     root/root       usr/share/man/man1/
index ec61826c79c80c8190cfe1ac418e6f2dfc9ce406..eba40b02c2448d34fe4cef7e279d8eca7c3d319e 100644 (file)
@@ -1 +1,2 @@
-77d44c6bb8c0705e0017ab9a84a1502b  flex-2.5.39.tar.bz2
+46620c53d99157a506cfdd183c999dd6  flex-2.6.3-add_defines.patch
+a5f65570cd9107ec8a8ec88f17b31bb1  flex-2.6.3.tar.gz
index e7534fb3afaa7b5f73566627cbcc62daa0af7cc8..805f3318b4b891be892e8a6c5c4601609d200b44 100644 (file)
@@ -5,9 +5,10 @@
 # Depends on:
 
 name=flex
-version=2.5.39
+version=2.6.3
 release=2
-source=(http://downloads.sourceforge.net/project/$name/$name-$version.tar.bz2)
+source=(https://github.com/westes/flex/releases/download/v$version/$name-$version.tar.gz
+        $name-$version-add_defines.patch)
 
 build() {
   cd $name-$version
@@ -15,13 +16,32 @@ build() {
   echo "ac_cv_func_malloc_0_nonnull=yes" > config.cache 
   echo "ac_cv_func_realloc_0_nonnull=yes" >> config.cache
 
+  patch -p1 -i $SRC/$name-$version-add_defines.patch
+  touch doc/flex.1
+
+  # Don't build tests
+  sed '51d' -i Makefile.am
+
+  # Build stage1flex for current host
+  CC=gcc CFLAGS="" ./configure --disable-nls \
+                               --prefix=/tools \
+                               --enable-shared 
+
+  make -C lib
+  make -C src stage1flex
+  mv src/stage1flex src/stage1flex.host
+  make distclean
+
   ./configure --build=$CHOST \
               --host=$CTARGET \
               --prefix=/usr \
               --disable-nls \
               --cache-file=config.cache
 
-  make
+  make -C lib
+  # Use stage1flex built for host
+  sed 's|./stage1flex$(EXEEXT) $(AM_LFLAGS)|./stage1flex.host$(EXEEXT) $(AM_LFLAGS)|g' -i src/Makefile
+  make -C src 
   make DESTDIR=$PKG install
 
   ln -sf flex $PKG/usr/bin/lex
diff --git a/flex/flex-2.6.3-add_defines.patch b/flex/flex-2.6.3-add_defines.patch
new file mode 100644 (file)
index 0000000..f2f5eb8
--- /dev/null
@@ -0,0 +1,82 @@
+From 078b46c69d063aef1715b11348a2871d6036f253 Mon Sep 17 00:00:00 2001
+From: Christos Zoulas <christos@zoulas.com>
+Date: Sun, 22 Jan 2017 18:34:30 +0100
+Subject: [PATCH] Add more defines in the non-reentrant part.
+
+Fix the reentrant part; don't "#define yyfoo yyfoo" because it breaks
+code that does #ifndef yywrap ..
+---
+ src/flex.skl | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/src/flex.skl b/src/flex.skl
+index 190700f..6a7cde4 100644
+--- a/src/flex.skl
++++ b/src/flex.skl
+@@ -61,11 +61,17 @@ m4_changequote([[, ]])
+ m4_ifelse(M4_YY_PREFIX,yy,,
+ #define yy_create_buffer M4_YY_PREFIX[[_create_buffer]]
+ #define yy_delete_buffer M4_YY_PREFIX[[_delete_buffer]]
+-#define yy_flex_debug M4_YY_PREFIX[[_flex_debug]]
++#define yy_scan_buffer M4_YY_PREFIX[[_scan_buffer]]
++#define yy_scan_string M4_YY_PREFIX[[_scan_string]]
++#define yy_scan_bytes M4_YY_PREFIX[[_scan_bytes]]
+ #define yy_init_buffer M4_YY_PREFIX[[_init_buffer]]
+ #define yy_flush_buffer M4_YY_PREFIX[[_flush_buffer]]
+ #define yy_load_buffer_state M4_YY_PREFIX[[_load_buffer_state]]
+ #define yy_switch_to_buffer M4_YY_PREFIX[[_switch_to_buffer]]
++#define yypush_buffer_state M4_YY_PREFIX[[push_buffer_state]]
++#define yypop_buffer_state M4_YY_PREFIX[[pop_buffer_state]]
++#define yyensure_buffer_stack M4_YY_PREFIX[[ensure_buffer_stack]]
++#define yy_flex_debug M4_YY_PREFIX[[_flex_debug]]
+ #define yyin M4_YY_PREFIX[[in]]
+ #define yyleng M4_YY_PREFIX[[leng]]
+ #define yylex M4_YY_PREFIX[[lex]]
+@@ -107,7 +113,7 @@ m4_ifdef( [[M4_YY_PREFIX]],, [[m4_define([[M4_YY_PREFIX]], [[yy]])]])
+ m4preproc_define(`M4_GEN_PREFIX',
+     ``[[#define yy$1 ]]M4_YY_PREFIX[[$1]]
+-m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'')
++%# m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'')
+ %if-c++-only
+     /* The c++ scanner is a mess. The FlexLexer.h header file relies on the
+@@ -120,6 +126,7 @@ m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'')
+ %endif
+ %if-c-only
++m4_ifelse(M4_YY_PREFIX,yy,,
+     M4_GEN_PREFIX(`_create_buffer')
+     M4_GEN_PREFIX(`_delete_buffer')
+     M4_GEN_PREFIX(`_scan_buffer')
+@@ -155,6 +162,7 @@ m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'')
+         M4_GEN_PREFIX(`set_column')
+     ]])
+     M4_GEN_PREFIX(`wrap')
++)
+ %endif
+ m4_ifdef( [[M4_YY_BISON_LVAL]],
+@@ -170,11 +178,14 @@ m4_ifdef( [[<M4_YY_BISON_LLOC>]],
+ ]])
++m4_ifelse(M4_YY_PREFIX,yy,,
+     M4_GEN_PREFIX(`alloc')
+     M4_GEN_PREFIX(`realloc')
+     M4_GEN_PREFIX(`free')
++)
+ %if-c-only
++m4_ifelse(M4_YY_PREFIX,yy,,
+ m4_ifdef( [[M4_YY_NOT_REENTRANT]],
+ [[
+     M4_GEN_PREFIX(`text')
+@@ -184,6 +195,7 @@ m4_ifdef( [[M4_YY_NOT_REENTRANT]],
+     M4_GEN_PREFIX(`_flex_debug')
+     M4_GEN_PREFIX(`lineno')
+ ]])
++)
+ %endif