From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] flex: fix reported executable name caused by OE wrapper
Date: Thu, 9 May 2013 16:31:12 +0200 [thread overview]
Message-ID: <1368109872-4273-1-git-send-email-Martin.Jansa@gmail.com> (raw)
In-Reply-To: <20130509130319.GE3188@jama>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
meta/recipes-devtools/flex/flex.inc | 15 ++++++++++++++-
.../flex/flex/drop.suffix.from.wrapper.patch | 21 +++++++++++++++++++++
2 files changed, 35 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-devtools/flex/flex/drop.suffix.from.wrapper.patch
diff --git a/meta/recipes-devtools/flex/flex.inc b/meta/recipes-devtools/flex/flex.inc
index 517db16..344b716 100644
--- a/meta/recipes-devtools/flex/flex.inc
+++ b/meta/recipes-devtools/flex/flex.inc
@@ -6,10 +6,23 @@ HOMEPAGE = "http://sourceforge.net/projects/flex/"
SECTION = "devel"
LICENSE = "BSD"
-SRC_URI = "${SOURCEFORGE_MIRROR}/flex/flex-${PV}.tar.bz2 "
+SRC_URI = "${SOURCEFORGE_MIRROR}/flex/flex-${PV}.tar.bz2 \
+ file://drop.suffix.from.wrapper.patch \
+"
inherit autotools gettext
+# drop building doc, there is openembedded-core/scripts/help2man
+# but that just returns exit 1 and flex.1 is immediately removed:
+# openembedded-core/scripts/help2man --name='the fast lexical analyser generator' \
+# --section=`echo $i | sed -e 's/.*\.\([^.]*\)$/\1/'` \
+# ../flex > $i || rm -f $i ; \
+# and do_install fails, it wasn't failing before, because flex.1 included in
+# release tarbal was valid until we patched main.c in drop.suffix.from.wrapper.patch
+do_configure_prepend() {
+ sed -i "/^\s*doc /d" Makefile.am
+}
+
M4 = "${bindir}/m4"
M4_class-native = "${STAGING_BINDIR_NATIVE}/m4"
diff --git a/meta/recipes-devtools/flex/flex/drop.suffix.from.wrapper.patch b/meta/recipes-devtools/flex/flex/drop.suffix.from.wrapper.patch
new file mode 100644
index 0000000..9bbd088
--- /dev/null
+++ b/meta/recipes-devtools/flex/flex/drop.suffix.from.wrapper.patch
@@ -0,0 +1,21 @@
+Upstream probably doesn't expect wrappers like we create for flex.
+
+This also fixes disabled C_plus_plus functions in flex++ if we ever create wrapper for flex++.
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+--- flex-2.5.35/main.c.orig 2013-05-09 15:19:34.619281743 +0200
++++ flex-2.5.35/main.c 2013-05-09 15:19:10.216280868 +0200
+@@ -984,6 +984,10 @@
+ /* Enable C++ if program name ends with '+'. */
+ program_name = basename2 (argv[0], 0);
+
++ /* Drop trailing .real suffix if it's there */
++ if (strstr(program_name, ".real") != NULL && strstr(program_name, ".real") - program_name == strlen(program_name) - 5)
++ program_name[strlen (program_name) - 5] = '\0';
++
+ if (program_name[0] != '\0' &&
+ program_name[strlen (program_name) - 1] == '+')
+ C_plus_plus = true;
--
1.8.2.1
next prev parent reply other threads:[~2013-05-09 14:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-09 13:03 flex wrapper returns wrong version Martin Jansa
2013-05-09 14:31 ` Martin Jansa [this message]
2013-05-09 17:55 ` [PATCH] flex: fix reported executable name caused by OE wrapper Saul Wold
2013-05-10 10:21 ` [PATCHv2] " Martin Jansa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1368109872-4273-1-git-send-email-Martin.Jansa@gmail.com \
--to=martin.jansa@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox