summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/flex
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2014-10-16 03:05:19 +0200
committerTudor Florea <tudor.florea@enea.com>2014-10-16 03:05:19 +0200
commitc527fd1f14c27855a37f2e8ac5346ce8d940ced2 (patch)
treebb002c1fdf011c41dbd2f0927bed23ecb5f83c97 /meta/recipes-devtools/flex
downloadpoky-daisy-140929.tar.gz
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-devtools/flex')
-rw-r--r--meta/recipes-devtools/flex/files/do_not_create_pdf_doc.patch17
-rwxr-xr-xmeta/recipes-devtools/flex/files/run-ptest29
-rw-r--r--meta/recipes-devtools/flex/flex.inc44
-rw-r--r--meta/recipes-devtools/flex/flex_2.5.38.bb9
4 files changed, 99 insertions, 0 deletions
diff --git a/meta/recipes-devtools/flex/files/do_not_create_pdf_doc.patch b/meta/recipes-devtools/flex/files/do_not_create_pdf_doc.patch
new file mode 100644
index 0000000000..02ececb0b4
--- /dev/null
+++ b/meta/recipes-devtools/flex/files/do_not_create_pdf_doc.patch
@@ -0,0 +1,17 @@
1Upstream-Status: Inapropriate (embedded specific)
2
3Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
4
5Index: flex-2.5.37/doc/Makefile.am
6===================================================================
7--- flex-2.5.37.orig/doc/Makefile.am 2012-07-21 04:18:27.000000000 +0300
8+++ flex-2.5.37/doc/Makefile.am 2013-07-30 17:57:09.834834531 +0300
9@@ -2,7 +2,7 @@
10
11 info_TEXINFOS = flex.texi
12 dist_man_MANS = flex.1
13-dist_doc_DATA= flex.pdf
14+EXTRA_DIST= flex.pdf
15
16 CLEANFILES = \
17 flex.hks \
diff --git a/meta/recipes-devtools/flex/files/run-ptest b/meta/recipes-devtools/flex/files/run-ptest
new file mode 100755
index 0000000000..bffba16f70
--- /dev/null
+++ b/meta/recipes-devtools/flex/files/run-ptest
@@ -0,0 +1,29 @@
1#!/bin/sh
2
3test1="test-alloc-extra test-array-nr test-array-r test-basic-nr test-basic-r test-extended test-quotes \
4test-bison-nr test-bison-yylloc test-bison-yylval test-c++-basic test-c-cpp-nr test-prefix-nr test-ccl \
5test-c-cpp-r test-c++-multiple-scanners test-mem-r test-mem-nr test-debug-nr test-linedir-r test-noansi-r \
6test-yyextra test-header-r test-noansi-nr test-debug-r TEMPLATE test-top test-header-nr test-prefix-r"
7test2="test-multiple-scanners-nr test-posixly-correct test-posix test-string-r test-string-nr"
8test3="test-pthread test-include-by-push test-include-by-buffer test-include-by-reentrant"
9test4="test-lineno-nr test-lineno-r test-lineno-trailing"
10test5="test-c++-yywrap test-rescan-r test-rescan-nr"
11test6="test-reject-nr test-reject-r"
12test7="test-reject-ser test-reject-ver"
13test8="test-multiple-scanners-r"
14
15output() {
16 if [ $? -eq 0 ]; \
17 then echo "PASS: $i"; \
18 else echo "FAIL: $i"; \
19 fi;
20}
21
22for i in $test1; do $i/$i < $i/test.input >/dev/null; output; done
23for i in $test2; do $i/$i >/dev/null; output; done
24for i in $test3; do cd $i; ./$i test-1.input >/dev/null; output; cd ..; done
25for i in $test4; do test `$i/$i < $i/test.input` -eq `$i/$i 1 < $i/test.input` >/dev/null; output; done
26for i in $test5; do $i/$i $i/test.input >/dev/null; output; done
27for i in $test6; do test-reject/$i < test-reject/test.input >/dev/null; output; done
28for i in $test7; do test-reject/$i test-reject/$i.tables < test-reject/test.input >/dev/null; output; done
29cd $test8; ./$test8 >/dev/null; i=$test8 output
diff --git a/meta/recipes-devtools/flex/flex.inc b/meta/recipes-devtools/flex/flex.inc
new file mode 100644
index 0000000000..75c10ef340
--- /dev/null
+++ b/meta/recipes-devtools/flex/flex.inc
@@ -0,0 +1,44 @@
1SUMMARY = "Flex (The Fast Lexical Analyzer)"
2DESCRIPTION = "Flex is a fast lexical analyser generator. Flex is a tool for generating programs that recognize \
3lexical patterns in text."
4HOMEPAGE = "http://sourceforge.net/projects/flex/"
5
6SECTION = "devel"
7LICENSE = "BSD"
8
9SRC_URI = "${SOURCEFORGE_MIRROR}/flex/flex-${PV}.tar.bz2 \
10 file://run-ptest \
11"
12
13inherit autotools gettext ptest
14
15
16M4 = "${bindir}/m4"
17M4_class-native = "${STAGING_BINDIR_NATIVE}/m4"
18
19EXTRA_OECONF += "ac_cv_path_M4=${M4}"
20EXTRA_OEMAKE += "m4=${STAGING_BINDIR_NATIVE}/m4"
21
22do_install_append_class-native() {
23 create_wrapper ${D}/${bindir}/flex M4=${M4}
24}
25
26do_install_append_class-nativesdk() {
27 create_wrapper ${D}/${bindir}/flex M4=${M4}
28}
29
30RDEPENDS_${PN} += "m4"
31DEPENDS_${PN}-ptest += "bison-native flex-native"
32
33do_compile_ptest() {
34 for i in `find ${S}/tests/ -type d |grep -Ev "concatenated-options|reject|table-opts" | awk -F/ '{print $NF}'`; \
35 do oe_runmake -C ${S}/tests/$i -f ${B}/tests/$i/Makefile top_builddir=${B} FLEX=flex $i; \
36 done
37 oe_runmake -C ${S}/tests/test-reject -f ${B}/tests/test-reject/Makefile top_builddir=${B} FLEX=flex test-reject-nr test-reject-r test-reject-ser test-reject-ver
38}
39
40do_install_ptest() {
41 for i in `find ${S}/tests/ -type d | awk -F/ '{print $NF}'`; \
42 do cp -r ${S}/tests/$i ${D}${PTEST_PATH}; \
43 done
44}
diff --git a/meta/recipes-devtools/flex/flex_2.5.38.bb b/meta/recipes-devtools/flex/flex_2.5.38.bb
new file mode 100644
index 0000000000..226e469e9b
--- /dev/null
+++ b/meta/recipes-devtools/flex/flex_2.5.38.bb
@@ -0,0 +1,9 @@
1require flex.inc
2LICENSE = "BSD"
3LIC_FILES_CHKSUM = "file://COPYING;md5=e4742cf92e89040b39486a6219b68067"
4BBCLASSEXTEND = "native nativesdk"
5
6SRC_URI += "file://do_not_create_pdf_doc.patch"
7
8SRC_URI[md5sum] = "b230c88e65996ff74994d08a2a2e0f27"
9SRC_URI[sha256sum] = "d42a67ce11b649ce977c8e239d04b2ef1bdbffebb8a79f4f65211ad295f274ec"