From 60f9d69e016b11c468c98ea75ba0a60c44afbbc4 Mon Sep 17 00:00:00 2001 From: Patrick Williams Date: Wed, 17 Aug 2016 14:31:25 -0500 Subject: yocto-poky: Move to import-layers subdir We are going to import additional layers, so create a subdir to hold all of the layers that we import with git-subtree. Change-Id: I6f732153a22be8ca663035c518837e3cc5ec0799 Signed-off-by: Patrick Williams --- ...-target-for-building-tests-without-runnin.patch | 28 +++++++++++ .../recipes-devtools/flex/flex/disable-tests.patch | 19 ++++++++ .../flex/flex/do_not_create_pdf_doc.patch | 17 +++++++ .../meta/recipes-devtools/flex/flex/run-ptest | 5 ++ .../meta/recipes-devtools/flex/flex_2.6.0.bb | 55 ++++++++++++++++++++++ 5 files changed, 124 insertions(+) create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/flex/flex/0001-tests-add-a-target-for-building-tests-without-runnin.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/flex/flex/disable-tests.patch create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch create mode 100755 import-layers/yocto-poky/meta/recipes-devtools/flex/flex/run-ptest create mode 100644 import-layers/yocto-poky/meta/recipes-devtools/flex/flex_2.6.0.bb (limited to 'import-layers/yocto-poky/meta/recipes-devtools/flex') diff --git a/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/0001-tests-add-a-target-for-building-tests-without-runnin.patch b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/0001-tests-add-a-target-for-building-tests-without-runnin.patch new file mode 100644 index 000000000..556c240b2 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/0001-tests-add-a-target-for-building-tests-without-runnin.patch @@ -0,0 +1,28 @@ +From b4aa18d939fc0c8825fa584dfcee1a7da61099cf Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Thu, 10 Dec 2015 16:09:26 +0200 +Subject: [PATCH] tests: add a target for building tests without running them + +Upstream-Status: Inappropriate [oe specific] +Signed-off-by: Alexander Kanavin +--- + tests/Makefile.am | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 4ac3c17..0025cfe 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -21,6 +21,9 @@ + + TESTS = $(check_PROGRAMS) options.cn + ++# This allows building tests without running them ++buildtests: $(TESTS) ++ + # The script testwrapper.sh will run most tests as is. A couple tests + # in the suite end in .reject, .table and the like so that we can pass + # different arguments to the test runner. We list those extensions so +-- +2.6.2 + diff --git a/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/disable-tests.patch b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/disable-tests.patch new file mode 100644 index 000000000..4dc801d72 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/disable-tests.patch @@ -0,0 +1,19 @@ +Due to automake stupidity the Makefile in tests/ has an 'all' target that +depends on $(BUILD_SOURCES), which means when building flex parts of the test +suite are built even if they're not needed, resulting in flex needing +flex-native and bison-native to build. + +This patch removes the tests directory from SUBDIRS and will be conditionally +applied by the recipe. + +Upstream-Status: Inappropriate +Signed-off-by: Ross Burton + +diff --git a/Makefile.am b/Makefile.am +index 076ccad..0574d7b 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -55,3 +55,2 @@ SUBDIRS = \ + po \ +- tests \ + tools diff --git a/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch new file mode 100644 index 000000000..032833ae7 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch @@ -0,0 +1,17 @@ +Upstream-Status: Inappropriate (embedded specific) + +Signed-off-by: Laurentiu Palcu + +Index: flex-2.5.37/doc/Makefile.am +=================================================================== +--- flex-2.5.37.orig/doc/Makefile.am 2012-07-21 04:18:27.000000000 +0300 ++++ flex-2.5.37/doc/Makefile.am 2013-07-30 17:57:09.834834531 +0300 +@@ -2,7 +2,7 @@ + + info_TEXINFOS = flex.texi + dist_man_MANS = flex.1 +-dist_doc_DATA= flex.pdf ++EXTRA_DIST= flex.pdf + + CLEANFILES = \ + flex.hks \ diff --git a/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/run-ptest b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/run-ptest new file mode 100755 index 000000000..19db33790 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex/run-ptest @@ -0,0 +1,5 @@ +#!/bin/sh + +# make would want to rebuild some files with a compiler otherwise :-/ +make FLEX=/usr/bin/flex -t check-TESTS || true +make FLEX=/usr/bin/flex check-TESTS diff --git a/import-layers/yocto-poky/meta/recipes-devtools/flex/flex_2.6.0.bb b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex_2.6.0.bb new file mode 100644 index 000000000..8285426d4 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/flex/flex_2.6.0.bb @@ -0,0 +1,55 @@ +SUMMARY = "Flex (The Fast Lexical Analyzer)" +DESCRIPTION = "Flex is a fast lexical analyser generator. Flex is a tool for generating programs that recognize \ +lexical patterns in text." +HOMEPAGE = "http://sourceforge.net/projects/flex/" +SECTION = "devel" +LICENSE = "BSD" + +DEPENDS = "${@bb.utils.contains('PTEST_ENABLED', '1', 'bison-native flex-native', '', d)}" +BBCLASSEXTEND = "native nativesdk" + +LIC_FILES_CHKSUM = "file://COPYING;md5=e4742cf92e89040b39486a6219b68067" + +SRC_URI = "${SOURCEFORGE_MIRROR}/flex/flex-${PV}.tar.bz2 \ + file://run-ptest \ + file://do_not_create_pdf_doc.patch \ + file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \ + ${@bb.utils.contains('PTEST_ENABLED', '1', '', 'file://disable-tests.patch', d)} \ + " + +SRC_URI[md5sum] = "266270f13c48ed043d95648075084d59" +SRC_URI[sha256sum] = "24e611ef5a4703a191012f80c1027dc9d12555183ce0ecd46f3636e587e9b8e9" + +UPSTREAM_CHECK_REGEX = "flex-(?P\d+(\.\d+)+)\.tar" + +inherit autotools gettext texinfo ptest + +M4 = "${bindir}/m4" +M4_class-native = "${STAGING_BINDIR_NATIVE}/m4" +EXTRA_OECONF += "ac_cv_path_M4=${M4}" +EXTRA_OEMAKE += "m4=${STAGING_BINDIR_NATIVE}/m4" + +EXTRA_OEMAKE += "${@bb.utils.contains('PTEST_ENABLED', '1', 'FLEX=${STAGING_BINDIR_NATIVE}/flex', '', d)}" + +do_install_append_class-native() { + create_wrapper ${D}/${bindir}/flex M4=${M4} +} + +do_install_append_class-nativesdk() { + create_wrapper ${D}/${bindir}/flex M4=${M4} +} + +RDEPENDS_${PN} += "m4" +RDEPENDS_${PN}-ptest += "bash gawk" + +do_compile_ptest() { + oe_runmake -C ${B}/tests -f ${B}/tests/Makefile top_builddir=${B} INCLUDES=-I${S}/src buildtests +} + +do_install_ptest() { + mkdir -p ${D}${PTEST_PATH}/build-aux/ + cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/ + cp -r ${S}/tests/* ${D}${PTEST_PATH} + cp -r ${B}/tests/* ${D}${PTEST_PATH} + sed -e 's/^Makefile:/_Makefile:/' -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/^top_srcdir = \(.*\)/top_srcdir = ./' -i ${D}${PTEST_PATH}/Makefile +} -- cgit v1.2.1