sys-devel/flex: Sync with Gentoo

It's from Gentoo commit 7059477384130421a2c4c1eaefc5047dcf3c4e7d.
This commit is contained in:
Flatcar Buildbot 2025-06-16 07:14:17 +00:00 committed by Krzesimir Nowak
parent 14e7e88630
commit a84bfd65e0
2 changed files with 31 additions and 3 deletions

View File

@ -0,0 +1,26 @@
Bug: https://bugs.gentoo.org/956581
https://github.com/westes/flex/pull/674
https://github.com/westes/flex/commit/4b142954b54a57a9b0af0a9661056a9c39a8fa95
From bf254c75b1e0d2641ebbd7fc85fb183f36a62ea7 Mon Sep 17 00:00:00 2001
From: Richard Barnes <rbarnes@umn.edu>
Date: Wed, 2 Oct 2024 10:35:09 -0700
Subject: [PATCH] Match `malloc` signature to its use
---
lib/malloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/malloc.c b/lib/malloc.c
index 75e8ef97c..701b9b39d 100755
--- a/lib/malloc.c
+++ b/lib/malloc.c
@@ -3,7 +3,7 @@
#include <sys/types.h>
- void *malloc ();
+ void *malloc (size_t n);
/* Allocate an N-byte block of memory from the heap.
If N is zero, allocate a 1-byte block. */

View File

@ -1,9 +1,9 @@
# Copyright 1999-2023 Gentoo Authors # Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=8 EAPI=8
inherit flag-o-matic libtool multilib-minimal toolchain-funcs inherit dot-a flag-o-matic libtool multilib-minimal toolchain-funcs
DESCRIPTION="The Fast Lexical Analyzer" DESCRIPTION="The Fast Lexical Analyzer"
HOMEPAGE="https://github.com/westes/flex" HOMEPAGE="https://github.com/westes/flex"
@ -29,6 +29,7 @@ PATCHES=(
"${FILESDIR}"/${P}-libobjdir.patch "${FILESDIR}"/${P}-libobjdir.patch
"${FILESDIR}"/${P}-fix-build-with-glibc2.26.patch "${FILESDIR}"/${P}-fix-build-with-glibc2.26.patch
"${FILESDIR}"/${P}-fix-apple-m1-crash-by-explicit-pointer-cast.patch "${FILESDIR}"/${P}-fix-apple-m1-crash-by-explicit-pointer-cast.patch
"${FILESDIR}"/${P}-fix-malloc-prototype.patch
"${WORKDIR}"/${P}-autotools-regenerate.patch "${WORKDIR}"/${P}-autotools-regenerate.patch
) )
@ -53,7 +54,7 @@ src_prepare() {
src_configure() { src_configure() {
use static && append-ldflags -static use static && append-ldflags -static
lto-guarantee-fat
multilib-minimal_src_configure multilib-minimal_src_configure
} }
@ -86,6 +87,7 @@ multilib_src_install() {
} }
multilib_src_install_all() { multilib_src_install_all() {
strip-lto-bytecode
einstalldocs einstalldocs
dodoc ONEWS dodoc ONEWS
find "${ED}" -name '*.la' -type f -delete || die find "${ED}" -name '*.la' -type f -delete || die