summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorSehong Na <sehong.na@samsung.com>2014-05-31 12:40:18 +0900
committerSehong Na <sehong.na@samsung.com>2014-05-31 12:40:18 +0900
commitf26ae5dce708cf4896a13cd65307c905f8365546 (patch)
treeb0e1a9836782fbe6133836f1e687d10c165f55f5 /packaging
downloadflex-f26ae5dce708cf4896a13cd65307c905f8365546.tar.gz
flex-f26ae5dce708cf4896a13cd65307c905f8365546.tar.bz2
flex-f26ae5dce708cf4896a13cd65307c905f8365546.zip
Diffstat (limited to 'packaging')
-rw-r--r--packaging/flex-2.5.35-gcc44.patch22
-rw-r--r--packaging/flex-2.5.35-hardening.patch36
-rw-r--r--packaging/flex-2.5.35-sign.patch11
-rw-r--r--packaging/flex.changes13
-rw-r--r--packaging/flex.manifest5
-rw-r--r--packaging/flex.spec61
6 files changed, 148 insertions, 0 deletions
diff --git a/packaging/flex-2.5.35-gcc44.patch b/packaging/flex-2.5.35-gcc44.patch
new file mode 100644
index 0000000..7929fc0
--- /dev/null
+++ b/packaging/flex-2.5.35-gcc44.patch
@@ -0,0 +1,22 @@
+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 -urNp flex-2.5.35.orig/skel.c flex-2.5.35/skel.c
+--- flex-2.5.35.orig/skel.c 2009-04-20 03:09:46.000000000 +0530
++++ flex-2.5.35/skel.c 2009-04-20 07:46:40.000000000 +0530
+@@ -284,6 +284,7 @@ const char *skel[] = {
+ "/* begin standard C++ headers. */",
+ "#include <iostream> ",
+ "#include <errno.h>",
++ "#include <cstdio>",
+ "#include <cstdlib>",
+ "#include <cstring>",
+ "/* end standard C++ headers. */",
diff --git a/packaging/flex-2.5.35-hardening.patch b/packaging/flex-2.5.35-hardening.patch
new file mode 100644
index 0000000..7d608ea
--- /dev/null
+++ b/packaging/flex-2.5.35-hardening.patch
@@ -0,0 +1,36 @@
+diff -u flex-2.5.35/scan.c flex-2.5.35/scan.c
+--- flex-2.5.35/scan.c
++++ flex-2.5.35/scan.c
+@@ -2096,7 +2096,7 @@
+ /* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+-#define ECHO fwrite( yytext, yyleng, 1, yyout )
++#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
+ #endif
+
+ /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
+diff -u flex-2.5.35/flex.skl flex-2.5.35/flex.skl
+--- flex-2.5.35/flex.skl
++++ flex-2.5.35/flex.skl
+@@ -1075,7 +1075,7 @@
+ /* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+-#define ECHO fwrite( yytext, yyleng, 1, yyout )
++#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
+ %endif
+ %if-c++-only C++ definition
+ #define ECHO LexerOutput( yytext, yyleng )
+diff -u flex-2.5.35/skel.c flex-2.5.35/skel.c
+--- flex-2.5.35/skel.c
++++ flex-2.5.35/skel.c
+@@ -1142,7 +1142,7 @@
+ "/* This used to be an fputs(), but since the string might contain NUL's,",
+ " * we now use fwrite().",
+ " */",
+- "#define ECHO fwrite( yytext, yyleng, 1, yyout )",
++ "#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)",
+ "%endif",
+ "%if-c++-only C++ definition",
+ "#define ECHO LexerOutput( yytext, yyleng )",
diff --git a/packaging/flex-2.5.35-sign.patch b/packaging/flex-2.5.35-sign.patch
new file mode 100644
index 0000000..fbee18b
--- /dev/null
+++ b/packaging/flex-2.5.35-sign.patch
@@ -0,0 +1,11 @@
+--- flex-2.5.35/gen.c-orig 2008-04-30 22:51:08.000000000 +0200
++++ flex-2.5.35/gen.c 2008-04-30 22:51:14.000000000 +0200
+@@ -1890,7 +1890,7 @@
+ outn ("\tif ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \\");
+ outn ("\t\t{ \\");
+ outn ("\t\tint c = '*'; \\");
+- outn ("\t\tint n; \\");
++ outn ("\t\tunsigned n; \\");
+ outn ("\t\tfor ( n = 0; n < max_size && \\");
+ outn ("\t\t\t (c = getc( yyin )) != EOF && c != '\\n'; ++n ) \\");
+ outn ("\t\t\tbuf[n] = (char) c; \\");
diff --git a/packaging/flex.changes b/packaging/flex.changes
new file mode 100644
index 0000000..9984948
--- /dev/null
+++ b/packaging/flex.changes
@@ -0,0 +1,13 @@
+* Wed May 30 2012 Anas Nashif <anas.nashif@intel.com> 30489d0
+- Do not use macro for installation
+[ Ryan Ware ]
+- Add default Smack manifest for flex.spec
+
+* Wed May 30 2012 Anas Nashif <anas.nashif@intel.com> 2bb52a0
+- Do not use macro for installation
+
+* Mon May 21 2012 Kim Kibum <kb0929.kim@samsung.com> 2ae147a
+- Upload Tizen:Base source
+[ Hyesook Choi ]
+- Initial empty repository
+
diff --git a/packaging/flex.manifest b/packaging/flex.manifest
new file mode 100644
index 0000000..017d22d
--- /dev/null
+++ b/packaging/flex.manifest
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/flex.spec b/packaging/flex.spec
new file mode 100644
index 0000000..de071cf
--- /dev/null
+++ b/packaging/flex.spec
@@ -0,0 +1,61 @@
+Name: flex
+Version: 2.5.35
+Release: 3
+License: BSD
+Summary: A tool for creating scanners (text pattern recognizers)
+Url: http://flex.sourceforge.net/
+Group: Development/Tools
+Source: http://prdownloads.sourceforge.net/flex/flex-%{version}.tar.bz2
+Source1001: flex.manifest
+Patch0: flex-2.5.35-sign.patch
+# borrowed from fc12
+Patch1: flex-2.5.35-hardening.patch
+Patch2: flex-2.5.35-gcc44.patch
+BuildRequires: bison
+BuildRequires: m4
+Requires: m4
+
+%description
+The flex program generates scanners. Scanners are programs which can
+recognize lexical patterns in text. Flex takes pairs of regular
+expressions and C code as input and generates a C source file as
+output. The output file is compiled and linked with a library to
+produce an executable. The executable searches through its input for
+occurrences of the regular expressions. When a match is found, it
+executes the corresponding C code. Flex was designed to work with
+both Yacc and Bison, and is used by many programs as part of their
+build process.
+
+You should install flex if you are going to use your system for
+application development.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+%build
+cp %{SOURCE1001} .
+%configure --disable-dependency-tracking CFLAGS="-fPIC %{optflags}" --disable-nls
+make %{?_smp_mflags}
+
+%install
+make install DESTDIR=%{buildroot}
+rm -f %{buildroot}/%{_infodir}/*
+
+( cd %{buildroot}
+ ln -sf flex .%{_bindir}/lex
+ ln -sf flex .%{_bindir}/flex++
+ ln -s libfl.a .%{_libdir}/libl.a
+)
+
+%remove_docs
+
+%files
+%manifest flex.manifest
+%doc COPYING
+%{_bindir}/*
+%{_libdir}/*.a
+%{_includedir}/FlexLexer.h
+