commit:     0ca92815271c88de49c6f061e9ac81e7ed2b6108
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 27 23:45:27 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Oct 27 23:45:34 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ca92815

sys-devel/flex: fix build w/o flex

We touch a file which has a generated derivative, so regenerate that.

Closes: https://bugs.gentoo.org/878339
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-devel/flex/Manifest                            |  1 +
 .../flex/files/flex-2.6.4-implicit-func-decl.patch | 50 ----------------------
 sys-devel/flex/flex-2.6.4-r3.ebuild                |  3 +-
 3 files changed, 3 insertions(+), 51 deletions(-)

diff --git a/sys-devel/flex/Manifest b/sys-devel/flex/Manifest
index 327f0405ede2..0e5c2985d561 100644
--- a/sys-devel/flex/Manifest
+++ b/sys-devel/flex/Manifest
@@ -1 +1,2 @@
+DIST flex-2.6.4-implicit-func-decl.patch.xz 6572 BLAKE2B 
7b2eb1d240e46470c4899b667fc6fbb1d0f91d784d67bb47f351c35683bda4d3c5d59479a8a26f1d9250fd9f6ce9e8b77ee7c53183c09735e898b48cd74bcb88
 SHA512 
cf7e5ac35b617b40ac3ca3dcf5c5ec5e81a1a48b99348c646aa68f61f3a83cbda3c9a6e820ad275f994220a6290518c4f56bdba9c0ed303cf27e60a75f4eb88c
 DIST flex-2.6.4.tar.gz 1419096 BLAKE2B 
c003d4f764f7f4d41e33af7ee28c2af272a9f0aee6ba7c2494ba96722d8d0b18f7a3f745217e9a2cecb43b6863328267a810280670c04464156b3eb3d7ee9d62
 SHA512 
e9785f3d620a204b7d20222888917dc065c2036cae28667065bf7862dfa1b25235095a12fd04efdbd09bfd17d3452e6b9ef953a8c1137862ff671c97132a082e

diff --git a/sys-devel/flex/files/flex-2.6.4-implicit-func-decl.patch 
b/sys-devel/flex/files/flex-2.6.4-implicit-func-decl.patch
deleted file mode 100644
index 1900ae0529b9..000000000000
--- a/sys-devel/flex/files/flex-2.6.4-implicit-func-decl.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-https://github.com/westes/flex/commit/4b5111d9772b5c160340ca96f08d30d7f6db5cda
-https://github.com/westes/flex/issues/436
-https://bugs.gentoo.org/705800
-https://developers.redhat.com/blog/2019/04/22/implicit-function-declarations-flexs-use-of-reallocarray
-
-From 4b5111d9772b5c160340ca96f08d30d7f6db5cda Mon Sep 17 00:00:00 2001
-From: Explorer09 <[email protected]>
-Date: Mon, 4 Sep 2017 08:28:53 +0800
-Subject: [PATCH] scanner: Include flexdef.h at %top block of scan.l
-
-config.h may define macros that alter the API of the standard library
-funtions, and so it should be included before any other standard
-header, even before the skeleton's standard header inclusion.
-
-For example: config.h may #define _GNU_SOURCE that would expose the
-reallocarray() prototype from <stdlib.h> on glibc 2.26+ systems. If we
-include <stdlib.h> before config.h, reallocarray() would not be
-available for use in lex file since the second include doesn't help
-due to header guard.
-
-For now our config.h might `#define malloc rpl_malloc` -- this
-substitution must work before including stdlib.h, or else the compiler
-will complain about missing prototypes, and may result in incorrect
-code in scan.l (gcc warning: return makes pointer from integer without
-a cast [-Wint-conversion]).
-
-Fixes #247.
---- a/src/scan.l
-+++ b/src/scan.l
-@@ -1,5 +1,11 @@
- /* scan.l - scanner for flex input -*-C-*- */
- 
-+%top{
-+/* flexdef.h includes config.h, which may contain macros that alter the API */
-+/* of libc functions. Must include first before any libc header. */
-+#include "flexdef.h"
-+}
-+
- %{
- /*  Copyright (c) 1990 The Regents of the University of California. */
- /*  All rights reserved. */
-@@ -32,7 +38,6 @@
- /*  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
- /*  PURPOSE. */
- 
--#include "flexdef.h"
- #include "parse.h"
- extern bool tablesverify, tablesext;
- extern int trlcontxt; /* Set in  parse.y for each rule. */
-

diff --git a/sys-devel/flex/flex-2.6.4-r3.ebuild 
b/sys-devel/flex/flex-2.6.4-r3.ebuild
index 1f1ebfe61893..1fe2eb9549ec 100644
--- a/sys-devel/flex/flex-2.6.4-r3.ebuild
+++ b/sys-devel/flex/flex-2.6.4-r3.ebuild
@@ -8,6 +8,7 @@ inherit flag-o-matic libtool multilib-minimal toolchain-funcs
 DESCRIPTION="The Fast Lexical Analyzer"
 HOMEPAGE="https://github.com/westes/flex";
 SRC_URI="https://github.com/westes/${PN}/releases/download/v${PV}/${P}.tar.gz";
+SRC_URI+=" 
https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-implicit-func-decl.patch.xz";
 
 LICENSE="FLEX"
 SLOT="0"
@@ -24,7 +25,7 @@ BDEPEND="${RDEPEND}
 PATCHES=(
        "${FILESDIR}"/${PN}-2.6.4-libobjdir.patch
        "${FILESDIR}"/${PN}-2.6.4-fix-build-with-glibc2.6+.patch
-       "${FILESDIR}"/${P}-implicit-func-decl.patch
+       "${WORKDIR}"/${P}-implicit-func-decl.patch
 )
 
 src_prepare() {

Reply via email to