]> git.draconx.ca Git - gentoo-draconx.git/commitdiff
dev-util/cdecl99: Fix 1.3 build when /bin/sh is bash-5. master
authorNick Bowler <nbowler@draconx.ca>
Fri, 3 May 2024 02:05:22 +0000 (22:05 -0400)
committerNick Bowler <nbowler@draconx.ca>
Fri, 3 May 2024 02:06:37 +0000 (22:06 -0400)
dev-util/cdecl99/Manifest
dev-util/cdecl99/cdecl99-1.3.ebuild [new file with mode: 0644]
dev-util/cdecl99/files/cdecl99-1.3-bash5-fix.patch [new file with mode: 0644]

index 05fbec0cf65bf714d84474f11f1c982346397b5f..3628ea59747ed03bc173229485ceb2e0495d82ac 100644 (file)
@@ -1,6 +1,9 @@
+AUX cdecl99-1.3-bash5-fix.patch 1923 BLAKE2B c2b7c83a6fffa7a34c5628dc35025d80b86d97b60e82145c572f280ab9a0e98a2e838f639492ade8c02c4927178db98fc6c323e497821f72329a2adab7451892 SHA512 c1deee1a9500cd9aff8de3d9927a040c1e7bf030a4c37b1235c7908085a8bceb08dc6dea261dcf4710b3ebb617376a23b3497ddace4a8300ac83d1d338755b5c
 DIST cdecl99-1.1.tar.xz 625328 BLAKE2B a5d3c0a418e236fec79c638ed718c441b4fa082de605ce9d700ce53901f4facc1f23e15f178f6e729e5a602078e7206782caa32691dfee154bb9a0853761390d SHA512 24ecfceacf8b2bdc8bd7376e5762cebf78c04a390374fd476c09d7bbc6add2adbc511ca5c7ce5dcd6da8910a4ffef93c7b318a21e93a32a42f0837cc6fc4b913
 DIST cdecl99-1.2.tar.xz 634148 BLAKE2B a611f9fce2d0acac394d8ad721172eddd3f608095832aa2988e15416f8c4c69aa1482da51025833cc21a825579e90f9162d0ad42d4fae0b1507850af3a5d5754 SHA512 a24f095fd66e0c7fceb1b089de92d5a96d8d21c2c59d5f91da8374ca1465f65041d806bcd5cd1299778dd4d25204390f437b481f8cb07b9fa0a88cecf19185c2
+DIST cdecl99-1.3.tar.lz 591522 BLAKE2B 4b702a7b25666e6b4b3c5c044c2ae183b4c74e0471afa237a46a1edf011997223486916a99ca653af13c264a95d5acde8824ddd4bb31be1bc1c6d89e78465e83 SHA512 11f04eeda91ef127f6e3d5ef5e2cbb135e6a1f46a138640decbe80ed687c9fd2110a94b2fd883d8d0125704b36760c89cf41aeb5005f7965721b85fb55826b6c
 DIST cdecl99-1.tar.xz 561024 BLAKE2B 06529720aaa5956158798f43c3a0bd416916a35c58d37ec0552dee7a09881cfde07147d700808636a80babcdf3b69852ee63000c1102afb856e36daf5273aa80 SHA512 6cf7a6570862ab2b6fcc992a50732a3d198f55b92be2524983755ae492fffb9f00146f5866415c23a17e806ff99b0825a3d92ee27935aef07b8069a543baf63c
 EBUILD cdecl99-1.1.ebuild 840 BLAKE2B c4db247e94bf75828fd5e8f11a842fa8389b4e5ef904d9dcb16caa198767539b22dff14175ff9c72e5144a230a73aba912f6383d66176cf7c9c037c7d7daed45 SHA512 265fc841decfba9dc0386178354242723b078e5960084f678a042775f6485c196d4561eb38e76847d10c76858448a058b8980b94209f60b7f6c8bc1367da05e1
 EBUILD cdecl99-1.2.ebuild 881 BLAKE2B d920883aaac6bdfcdb0a9a23ac953ca19a6cc0bf91b1cfe66cc15aee79dc43307f2e7bf80218009da417773d3d845c245e80fe45d7f4706d3c653cbb08727175 SHA512 f3304f1fe9655ecd8ea764e64c45ab17a471b2079af7dd94e7fc6cb2adfa8bda278c3065273cb0595356680348ea9fb788f45368843472843e46d6244b1b9e42
+EBUILD cdecl99-1.3.ebuild 974 BLAKE2B 647c6c296a5111095ce0b86c8e0b49e4638f8d57e87cee4ac5ffb2ce4511510402e634f0ec8bd8620762e68335e43a75ebb7eb0ba7dbd37960249b78627c2401 SHA512 c413f98ea0ba1ee1500db2d7c9f3b1a3d25e4e7a686832872a23dd34f0a8c0d74064dbab40eef8238788b6978497b381b47a1ed3e52344c9a76e016aad94fa52
 EBUILD cdecl99-1.ebuild 983 BLAKE2B 7aeac8e288503e90380bec97a95f914d387f8a79b7d80cd925ec934b6e0743d080fc416576feb2112d90d2afa22ccd91a9216a2ceff1d715e1821e4be2af4de0 SHA512 60b87931aa6fa5055907942916292cb99fc125c5b7259f66f076f0d146e24131c55c3b2037c6a7f8bf930c221c86e41c438d483b980d6c1cf5d01d1215d19554
diff --git a/dev-util/cdecl99/cdecl99-1.3.ebuild b/dev-util/cdecl99/cdecl99-1.3.ebuild
new file mode 100644 (file)
index 0000000..fec29c6
--- /dev/null
@@ -0,0 +1,42 @@
+# Copyright © 2021-2022, 2024 Nick Bowler
+# License GPLv3+: GNU General Public License version 3 or any later version.
+# This is free software: you are free to change and redistribute it.
+# There is NO WARRANTY, to the extent permitted by law.
+
+EAPI=7
+
+inherit multiprocessing unpacker
+
+DESCRIPTION="Explain and construct C declarations"
+HOMEPAGE="http://draconx.ca/projects/cdecl99/"
+SRC_URI="http://draconx.ca/archive/$PN/$P.tar.lz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86"
+IUSE="static-libs nls readline"
+
+RDEPEND="nls? ( virtual/libintl sys-devel/bison[nls] )
+       readline? ( sys-libs/readline:= )"
+DEPEND="$RDEPEND"
+
+PATCHES=(
+       "$FILESDIR/$P-bash5-fix.patch"
+)
+
+src_configure () {
+       econf \
+               --enable-shared $(use_enable static-libs static) \
+               $(use_with readline) \
+               $(use_enable nls)
+}
+
+src_install () {
+       default
+
+       use static-libs || find "$ED" -name '*.la' -delete
+}
+
+src_test () {
+       emake TESTSUITEFLAGS="-j$(makeopts_jobs)" check
+}
diff --git a/dev-util/cdecl99/files/cdecl99-1.3-bash5-fix.patch b/dev-util/cdecl99/files/cdecl99-1.3-bash5-fix.patch
new file mode 100644 (file)
index 0000000..0ffc323
--- /dev/null
@@ -0,0 +1,49 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+NotDashEscaped: You need gpg to verify this message
+
+The configure script included with the cdecl99-1.3 release fails on
+bash-5 due to a parser bug in this shell.  On affected systems, a
+message similar to the following may be seen when running configure:
+
+  ./configure: line 6631: syntax error near unexpected token `do'
+  ./configure: line 6631: `do'
+
+You can work around the problem by setting the CONFIG_SHELL environment
+variable to some other shell before running configure; otherwise you can
+apply this patch file with a command such as:
+
+  % cd cdecl99-1.3
+  % patch -p1 <cdecl99-1.3-bash5-fix.patch
+
+*** cdecl99-1.3.orig/configure
+--- cdecl99-1.3/configure
+***************
+*** 6626,6633 ****
+    $as_echo_n "(cached) " >&6
+  else
+    dx_cv_have_alignas=no
+! for _dx_alignas
+! in '_Alignas(X)' '__attribute__((__aligned__(X)))' '__declspec(align(X))'
+  do
+  if ac_fn_c_compute_int "$LINENO" "sizeof (struct { char a; char ALIGNAS_TEST(4) b; }) >= 8" "_dx_tmp"        "#include <stddef.h>
+  #define ALIGNAS_TEST(X) $_dx_alignas
+--- 6626,6632 ----
+    $as_echo_n "(cached) " >&6
+  else
+    dx_cv_have_alignas=no
+! for _dx_alignas in '_Alignas(X)' '__attribute__((__aligned__(X)))' '__declspec(align(X))'
+  do
+  if ac_fn_c_compute_int "$LINENO" "sizeof (struct { char a; char ALIGNAS_TEST(4) b; }) >= 8" "_dx_tmp"        "#include <stddef.h>
+  #define ALIGNAS_TEST(X) $_dx_alignas
+-----BEGIN PGP SIGNATURE-----
+
+iQEzBAEBCAAdFiEEJagcgrvBtB9dtMuDW0XT0YW44fYFAmYfNBUACgkQW0XT0YW4
+4famBQf9GhDZJGOvrkDB5dGWwieXqFCWXJBbATVbY8JmY5wJupke5MqvDEQJ3tBr
+A2YIcQZ67+KjA2LwWTTQhQgKkveQs1HWFdTDrHnhTm4dF4jZdlxwVK3K3kHCcref
+uW+vl/6C9YkKcVcbf8OeHT4JVgYv2h7XRKW69XIB6lchdMc6rGNeStuCHyuGKYWG
+7n3WH9bA5OBPmPAd6yUPmU4urWBHjZwxyTaFBYBO7T+9R3Q4KvvyzCfxt1JxTUPS
+SmiQC1B0gg16/N2XJzCmnBsaVXSHdsvt8UrZeIZyWipejqtb2UR1MVnVToz/83NO
+gh5tyhxXnYiQgRqd2/uRg9z+GzziDw==
+=/RXF
+-----END PGP SIGNATURE-----