From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9078C139695 for ; Thu, 23 Mar 2017 12:20:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5A035E0C38; Thu, 23 Mar 2017 12:20:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 22067E0C38 for ; Thu, 23 Mar 2017 12:20:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8D8A1341130 for ; Thu, 23 Mar 2017 12:20:11 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2690A7228 for ; Thu, 23 Mar 2017 12:20:10 +0000 (UTC) From: "Lars Wendler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Lars Wendler" Message-ID: <1490271606.b4f455b89cd6fd4b72ee4ec1626ed7a20bd5f28a.polynomial-c@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/flex/, sys-devel/flex/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-devel/flex/files/flex-2.6.3-reentrant.patch sys-devel/flex/flex-2.6.3-r1.ebuild X-VCS-Directories: sys-devel/flex/files/ sys-devel/flex/ X-VCS-Committer: polynomial-c X-VCS-Committer-Name: Lars Wendler X-VCS-Revision: b4f455b89cd6fd4b72ee4ec1626ed7a20bd5f28a X-VCS-Branch: master Date: Thu, 23 Mar 2017 12:20:10 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: acecb9a0-ce98-4c3d-8c9d-b0b4914dbd05 X-Archives-Hash: 8f3bff409b81e70dac1ea2e5b02b83dd commit: b4f455b89cd6fd4b72ee4ec1626ed7a20bd5f28a Author: Lars Wendler gentoo org> AuthorDate: Thu Mar 23 12:19:46 2017 +0000 Commit: Lars Wendler gentoo org> CommitDate: Thu Mar 23 12:20:06 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4f455b8 sys-devel/flex: Added upstream reentrant patch to fix wine breakage. See https://bugs.winehq.org/show_bug.cgi?id=42132 Package-Manager: Portage-2.3.5, Repoman-2.3.2 sys-devel/flex/files/flex-2.6.3-reentrant.patch | 82 ++++++++++++++++++++++++ sys-devel/flex/flex-2.6.3-r1.ebuild | 84 +++++++++++++++++++++++++ 2 files changed, 166 insertions(+) diff --git a/sys-devel/flex/files/flex-2.6.3-reentrant.patch b/sys-devel/flex/files/flex-2.6.3-reentrant.patch new file mode 100644 index 00000000000..f2f5eb8374b --- /dev/null +++ b/sys-devel/flex/files/flex-2.6.3-reentrant.patch @@ -0,0 +1,82 @@ +From 078b46c69d063aef1715b11348a2871d6036f253 Mon Sep 17 00:00:00 2001 +From: Christos Zoulas +Date: Sun, 22 Jan 2017 18:34:30 +0100 +Subject: [PATCH] Add more defines in the non-reentrant part. + +Fix the reentrant part; don't "#define yyfoo yyfoo" because it breaks +code that does #ifndef yywrap .. +--- + src/flex.skl | 16 ++++++++++++++-- + 1 file changed, 14 insertions(+), 2 deletions(-) + +diff --git a/src/flex.skl b/src/flex.skl +index 190700f..6a7cde4 100644 +--- a/src/flex.skl ++++ b/src/flex.skl +@@ -61,11 +61,17 @@ m4_changequote([[, ]]) + m4_ifelse(M4_YY_PREFIX,yy,, + #define yy_create_buffer M4_YY_PREFIX[[_create_buffer]] + #define yy_delete_buffer M4_YY_PREFIX[[_delete_buffer]] +-#define yy_flex_debug M4_YY_PREFIX[[_flex_debug]] ++#define yy_scan_buffer M4_YY_PREFIX[[_scan_buffer]] ++#define yy_scan_string M4_YY_PREFIX[[_scan_string]] ++#define yy_scan_bytes M4_YY_PREFIX[[_scan_bytes]] + #define yy_init_buffer M4_YY_PREFIX[[_init_buffer]] + #define yy_flush_buffer M4_YY_PREFIX[[_flush_buffer]] + #define yy_load_buffer_state M4_YY_PREFIX[[_load_buffer_state]] + #define yy_switch_to_buffer M4_YY_PREFIX[[_switch_to_buffer]] ++#define yypush_buffer_state M4_YY_PREFIX[[push_buffer_state]] ++#define yypop_buffer_state M4_YY_PREFIX[[pop_buffer_state]] ++#define yyensure_buffer_stack M4_YY_PREFIX[[ensure_buffer_stack]] ++#define yy_flex_debug M4_YY_PREFIX[[_flex_debug]] + #define yyin M4_YY_PREFIX[[in]] + #define yyleng M4_YY_PREFIX[[leng]] + #define yylex M4_YY_PREFIX[[lex]] +@@ -107,7 +113,7 @@ m4_ifdef( [[M4_YY_PREFIX]],, [[m4_define([[M4_YY_PREFIX]], [[yy]])]]) + + m4preproc_define(`M4_GEN_PREFIX', + ``[[#define yy$1 ]]M4_YY_PREFIX[[$1]] +-m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'') ++%# m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'') + + %if-c++-only + /* The c++ scanner is a mess. The FlexLexer.h header file relies on the +@@ -120,6 +126,7 @@ m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'') + %endif + + %if-c-only ++m4_ifelse(M4_YY_PREFIX,yy,, + M4_GEN_PREFIX(`_create_buffer') + M4_GEN_PREFIX(`_delete_buffer') + M4_GEN_PREFIX(`_scan_buffer') +@@ -155,6 +162,7 @@ m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'') + M4_GEN_PREFIX(`set_column') + ]]) + M4_GEN_PREFIX(`wrap') ++) + %endif + + m4_ifdef( [[M4_YY_BISON_LVAL]], +@@ -170,11 +178,14 @@ m4_ifdef( [[]], + ]]) + + ++m4_ifelse(M4_YY_PREFIX,yy,, + M4_GEN_PREFIX(`alloc') + M4_GEN_PREFIX(`realloc') + M4_GEN_PREFIX(`free') ++) + + %if-c-only ++m4_ifelse(M4_YY_PREFIX,yy,, + m4_ifdef( [[M4_YY_NOT_REENTRANT]], + [[ + M4_GEN_PREFIX(`text') +@@ -184,6 +195,7 @@ m4_ifdef( [[M4_YY_NOT_REENTRANT]], + M4_GEN_PREFIX(`_flex_debug') + M4_GEN_PREFIX(`lineno') + ]]) ++) + %endif + + diff --git a/sys-devel/flex/flex-2.6.3-r1.ebuild b/sys-devel/flex/flex-2.6.3-r1.ebuild new file mode 100644 index 00000000000..2cd53fc6b2f --- /dev/null +++ b/sys-devel/flex/flex-2.6.3-r1.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit eutils flag-o-matic libtool multilib-minimal + +DESCRIPTION="The Fast Lexical Analyzer" +HOMEPAGE="https://flex.sourceforge.net/ https://github.com/westes/flex" +SRC_URI="https://github.com/westes/${PN}/releases/download/v${PV}/${P}.tar.gz" + +LICENSE="FLEX" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="nls static test" + +# We want bison explicitly and not yacc in general #381273 +RDEPEND="sys-devel/m4" +DEPEND="${RDEPEND} + app-arch/xz-utils + nls? ( sys-devel/gettext ) + test? ( sys-devel/bison )" + +PATCHES=( + "${FILESDIR}/${P}-reentrant.patch" +) + +src_prepare() { + epatch "${PATCHES[@]}" + + # Disable running in the tests/ subdir as it has a bunch of built sources + # that cannot be made conditional (automake limitation). #568842 + if ! use test ; then + sed -i \ + -e '/^SUBDIRS =/,/^$/{/tests/d}' \ + Makefile.in || die + fi + elibtoolize # Prefix always needs this +} + +src_configure() { + use static && append-ldflags -static + + multilib-minimal_src_configure +} + +multilib_src_configure() { + # Do not install shared libs #503522 + ECONF_SOURCE=${S} \ + econf \ + --disable-shared \ + $(use_enable nls) \ + --docdir='$(datarootdir)/doc/'${PF} +} + +multilib_src_compile() { + if multilib_is_native_abi; then + default + else + cd src || die + emake -f Makefile -f - lib <<< 'lib: $(lib_LTLIBRARIES)' + fi +} + +multilib_src_test() { + multilib_is_native_abi && emake check +} + +multilib_src_install() { + if multilib_is_native_abi; then + default + else + cd src || die + emake DESTDIR="${D}" install-libLTLIBRARIES install-includeHEADERS + fi +} + +multilib_src_install_all() { + einstalldocs + dodoc ONEWS + prune_libtool_files --all + rm "${ED}"/usr/share/doc/${PF}/COPYING || die + dosym flex /usr/bin/lex +}