summaryrefslogtreecommitdiff
path: root/dev-perl
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2025-05-26 08:57:15 +0100
committerSam James <sam@gentoo.org>2025-05-26 09:06:02 +0100
commit10708b8f345e68000e07c38e58c8ecd9d7bbcf45 (patch)
tree868f51f61e61aed3030bf79a92ce7568ef6c1035 /dev-perl
parent640054173a7994c28e3fa12fa922522568e88d03 (diff)
downloadgentoo-10708b8f345e68000e07c38e58c8ecd9d7bbcf45.tar.gz
gentoo-10708b8f345e68000e07c38e58c8ecd9d7bbcf45.tar.bz2
gentoo-10708b8f345e68000e07c38e58c8ecd9d7bbcf45.zip
dev-perl/Bit-Vector: fix build w/ C23
Closes: https://bugs.gentoo.org/944355 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-perl')
-rw-r--r--dev-perl/Bit-Vector/Bit-Vector-7.400.0-r4.ebuild29
-rw-r--r--dev-perl/Bit-Vector/files/Bit-Vector-7.400.0-c23.patch28
2 files changed, 57 insertions, 0 deletions
diff --git a/dev-perl/Bit-Vector/Bit-Vector-7.400.0-r4.ebuild b/dev-perl/Bit-Vector/Bit-Vector-7.400.0-r4.ebuild
new file mode 100644
index 000000000000..524196d2481e
--- /dev/null
+++ b/dev-perl/Bit-Vector/Bit-Vector-7.400.0-r4.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DIST_AUTHOR=STBEY
+DIST_VERSION=7.4
+inherit perl-module
+
+DESCRIPTION="Efficient bit vector, set of integers and big int math library"
+
+# License note: upstream mess, bug #721222, upstream is fine with "perl"
+# https://rt.cpan.org/Public/Bug/Display.html?id=132512
+
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~m68k ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+
+RDEPEND="
+ >=dev-perl/Carp-Clan-5.300.0
+ >=virtual/perl-Storable-2.210.0
+"
+BDEPEND="
+ ${RDEPEND}
+ virtual/perl-ExtUtils-MakeMaker
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-7.400.0-c23.patch
+)
diff --git a/dev-perl/Bit-Vector/files/Bit-Vector-7.400.0-c23.patch b/dev-perl/Bit-Vector/files/Bit-Vector-7.400.0-c23.patch
new file mode 100644
index 000000000000..a51e7d221fe1
--- /dev/null
+++ b/dev-perl/Bit-Vector/files/Bit-Vector-7.400.0-c23.patch
@@ -0,0 +1,28 @@
+https://bugs.gentoo.org/944355
+https://rt.cpan.org/Public/Bug/Display.html?id=165142
+--- a/ToolBox.h
++++ b/ToolBox.h
+@@ -93,10 +93,19 @@ typedef Z_longword *Z_longwordp
+ #elif PERL_DARWIN
+ #define boolean bool
+ #else
+- typedef int boolean;
+- #ifndef I_STDBOOL
+- enum { false, true };
+- #endif
++ typedef int boolean;
++ #ifndef I_STDBOOL
++ #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
++ #include <stdbool.h>
++ #else
++ #ifndef false
++ #define false 0
++ #endif
++ #ifndef true
++ #define true 1
++ #endif
++ #endif
++ #endif
+ #endif
+ #endif
+