commit c60e819b350cf48294e7681703117a1c2017e67e
Author: Jakub Bogusz <[email protected]>
Date:   Sat Feb 15 12:00:12 2014 +0100

    - updated to 2.5.38 (but stick to static libfl for the reasons specified at 
the top of spec)
    - removed obsolete locale,gcc44 patches
    - added pic patch to make sure libfl_pic.a is built as PIC

 flex-gcc44.patch  | 11 -----------
 flex-locale.patch | 10 ----------
 flex-pic.patch    | 10 ++++++++++
 flex.spec         | 41 +++++++++++++++++++++++++++++++----------
 4 files changed, 41 insertions(+), 31 deletions(-)
---
diff --git a/flex.spec b/flex.spec
index 2791082..9843bc4 100644
--- a/flex.spec
+++ b/flex.spec
@@ -1,5 +1,11 @@
 # NOTE: 2.5.35+ can't deal with "[[" "]]" strings in sources, needs 
workarounds like space separation
-#       (or update of m4-quotes patch)
+#      (or non-trivial update of m4-quotes patch)
+# NOTE on shared libfl:
+#      It exports two functions, yywrap() and main();
+#      - because of the latter, unnecessary linking with shared -lfl would 
harm,
+#        so it would require large cleanup of other projects;
+#      - when some code wants yywrap(), but no main(), using shared libfl is 
NOT POSSIBLE.
+#      Thus, shared libfl would be of little use.
 Summary:       GNU fast lexical analyzer generator
 Summary(de.UTF-8):     GNU - schneller lexikalischer Analysegenerator
 Summary(es.UTF-8):     Generador rápido de analizadores léxicos de la GNU
@@ -10,20 +16,19 @@ Summary(ru.UTF-8):  Быстрый генератор лексических ан
 Summary(tr.UTF-8):     GNU sözdizim çözümleyici
 Summary(uk.UTF-8):     Швидкий генератор лексичних аналізаторів GNU
 Name:          flex
-Version:       2.5.37
+Version:       2.5.38
 Release:       1
 License:       BSD-like
 Group:         Development/Tools
 Source0:       http://downloads.sourceforge.net/flex/%{name}-%{version}.tar.bz2
-# Source0-md5: c75940e1fc25108f2a7b3ef42abdae06
+# Source0-md5: b230c88e65996ff74994d08a2a2e0f27
 Source1:       
http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
 # Source1-md5: fd79ee2834b290e74c626f0bbfc8942f
 Patch0:                %{name}-info.patch
-Patch1:                %{name}-locale.patch
-Patch2:                %{name}-gcc44.patch
+Patch1:                %{name}-pic.patch
 # patch #869230 (second version of bug #720983 fix - from flex BTS)
 # outdated as for 2.5.34+, but contains testcase
-Patch3:                %{name}-m4-quotes.diff
+Patch2:                %{name}-m4-quotes.diff
 URL:           http://flex.sourceforge.net/
 BuildRequires: autoconf >= 2.54
 BuildRequires: automake >= 1:1.10
@@ -128,8 +133,7 @@ Przykłady dla fleksa.
 %setup -q
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
-#%patch3 -p1
+#%patch2 -p1
 
 # force regeneration (just in case make didn't want to)
 %{__rm} skel.c
@@ -140,13 +144,13 @@ Przykłady dla fleksa.
 %{__autoconf}
 %{__autoheader}
 %{__automake}
-%configure
+%configure \
+       --disable-shared
 
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 
 %{__make} install \
@@ -165,6 +169,9 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir
 
 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 
+# no external dependencies
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
+
 %find_lang %{name}
 
 %clean
@@ -193,6 +200,20 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libfl_pic.a
 %{_includedir}/FlexLexer.h
 
+%if 0
+%files libs
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libfl.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libfl.so.2
+%attr(755,root,root) %{_libdir}/libfl_pic.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libfl_pic.so.2
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libfl.so
+%attr(755,root,root) %{_libdir}/libfl_pic.so
+%endif
+
 %files examples
 %defattr(644,root,root,755)
 %{_examplesdir}/%{name}-%{version}
diff --git a/flex-gcc44.patch b/flex-gcc44.patch
deleted file mode 100644
index 22340b5..0000000
--- a/flex-gcc44.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -urNp flex-2.5.35.orig/flex.skl flex-2.5.35/flex.skl
---- flex-2.5.35.orig/flex.skl  2009-04-20 03:09:46.000000000 +0530
-+++ flex-2.5.35/flex.skl       2009-04-20 07:46:58.000000000 +0530
-@@ -217,6 +217,7 @@ m4preproc_include(`flexint.h')
- /* begin standard C++ headers. */
- #include <iostream> 
- #include <errno.h>
-+#include <cstdio>
- #include <cstdlib>
- #include <cstring>
- /* end standard C++ headers. */
diff --git a/flex-locale.patch b/flex-locale.patch
deleted file mode 100644
index 95300f6..0000000
--- a/flex-locale.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- flex-2.5.33/main.c.orig    2006-02-14 19:55:42.000000000 +0100
-+++ flex-2.5.33/main.c 2006-03-07 23:18:01.213336000 +0100
-@@ -210,6 +210,7 @@
- {
- #if ENABLE_NLS
- #if HAVE_LOCALE_H
-+      setlocale (LC_CTYPE, "");
-       setlocale (LC_MESSAGES, "");
-       textdomain (PACKAGE);
-       bindtextdomain (PACKAGE, LOCALEDIR);
diff --git a/flex-pic.patch b/flex-pic.patch
new file mode 100644
index 0000000..fa9db26
--- /dev/null
+++ b/flex-pic.patch
@@ -0,0 +1,10 @@
+--- flex-2.5.38/Makefile.am.orig       2013-05-28 23:56:49.000000000 +0200
++++ flex-2.5.38/Makefile.am    2014-02-15 11:43:17.418862008 +0100
+@@ -80,6 +80,7 @@
+       libyywrap.c
+ 
+ libfl_pic_la_LDFLAGS = -no-undefined -version-info @SHARED_VERSION_INFO@
++libfl_pic_la_CFLAGS = -fPIC
+ 
+ noinst_HEADERS = \
+       flexdef.h \
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/flex.git/commitdiff/c60e819b350cf48294e7681703117a1c2017e67e

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to