diff options
author | V3n3RiX <venerix@koprulu.sector> | 2025-02-08 00:11:30 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2025-02-08 00:11:30 +0000 |
commit | 8b3c41ecef8a1cdd270ce3aabcfdfb991839699c (patch) | |
tree | ece43c29d9163f887ef99c43aad6f2f568961231 /dev-libs/bglibs | |
parent | 1b2360e7bab42e4045232887cb4f6c4a24ca3975 (diff) |
Diffstat (limited to 'dev-libs/bglibs')
-rw-r--r-- | dev-libs/bglibs/Manifest | 3 | ||||
-rw-r--r-- | dev-libs/bglibs/bglibs-2.04-r3.ebuild | 84 | ||||
-rw-r--r-- | dev-libs/bglibs/files/bglibs-2.04-feature-tests.patch | 198 | ||||
-rw-r--r-- | dev-libs/bglibs/files/bglibs-2.04-musl.patch | 100 |
4 files changed, 385 insertions, 0 deletions
diff --git a/dev-libs/bglibs/Manifest b/dev-libs/bglibs/Manifest index 23daca38e32a..ac410f55cb94 100644 --- a/dev-libs/bglibs/Manifest +++ b/dev-libs/bglibs/Manifest @@ -1,5 +1,8 @@ +AUX bglibs-2.04-feature-tests.patch 4117 BLAKE2B 2f59dece7a4d9965750eebc78488873ad9264f5270ffe8376cdf9a733cff5d6d00933558588fc7a687d964223cffe43b45b819a3ec2944a9a60ebfd8a5af7ef6 SHA512 7661fae03afea5e555affc1e8958972fa94d821b12c2ee3f24f8af424f7b7609364ac6ef2fbe886d0c04068572f745776148caa14d172eeb80bed561a8b74878 +AUX bglibs-2.04-musl.patch 2878 BLAKE2B 915d4d702b3df63fd5c0b9656b450026619384241bafa40dc98bf8f81edb4df08b1a77c300a430189fe93d5c67aeb7503d195db1805da88caa929936c61363d1 SHA512 dbe18aebefbb2813008357487dd0437fa70494274d98b6d0de81f7dcb81da4d63586a929587f42387507a5f12fb28187e9070c95a31291254206c09ee00e769e AUX bglibs-2.04-stack-buffers.patch 1676 BLAKE2B 356ef239c23178b5f07d80776279c0e91a35af07623c977d051217317496e796a337dd81df5bffa828296e78a007bdb043d73d195a3bfb74116b7751b1c2f42d SHA512 0000b26a5c781b3e68253b6aa8642f1b8d0fe99d4c6cef4a776a33b83272c1ea218ae91845ccd7ba291be6a17b719513317dba32fbeedcba42f469ea65b85b85 DIST bglibs-2.04.tar.gz 713673 BLAKE2B 9e1353b3221ef6a8cfb256ec8616d1e208777b20ecade3e6ae17faca6b42222e18aa601a948e6201139378bf6f8131a2b7a053d77b198176776d42a1af611186 SHA512 094268cad7d4bacf65c0dd3d42fde2e6bac34da0fd6193b1c8202c018e752b3ef80a86c38e687467fb3a4e97130126fe74ee4a86063e4b25ee291de573984a6f EBUILD bglibs-2.04-r1.ebuild 1685 BLAKE2B eb3335d918ca5dda4e53d114d0afcae126877d05d5bcb54f9d71d3e083de3ca1333ba2973a5186e5ef4a9a69903d74904f383b7f86059a518d48d1b79bfc1c95 SHA512 da66f5c3bce7f52213e487e1372134f064bfc490b579507d02c3b05aa3ac9fcad3a694947a9fd22707a695f204b555cee3fc4bd23f4c303b0184cea5924e8497 EBUILD bglibs-2.04-r2.ebuild 1814 BLAKE2B 855e4de296b025900c4796be3c4efd1bcbcbab28fb5a7075884415477a1c86fde3ccad3fb1275b55a1cca92a9b98fe87be83ab81c8c59dc89631623aa3fda249 SHA512 22f8374b34e2c431582e467af0ef5166ae3a03454710f96b097ccded548e573cee90fd0c12c176ef64de244f3a59d63f7b19d0b1596fcb140d5773ea70653368 +EBUILD bglibs-2.04-r3.ebuild 1910 BLAKE2B e5f82a861766e690ccad567b1f92f3cc340a4d9df613e86f0e64fa4cba4096dbcf643b2d1d97703fdddc3f4859f2dea5f14eedad9a3e782053be7ab47868cecb SHA512 37ecff70605615dde36cafc733d03cd7f5bd1d24f4fd43fd27e9d49aad49d4c2d09931b77e4b6093710f1ed6e6967787583cea19e0547771f4bc3ad17eaeb450 MISC metadata.xml 168 BLAKE2B 2e0e000b4c3b6ca04c12903fdbe278415c05a822623c52e9aa95cbbf3d50bcb1246b7edbda7d2f6b559af8950c6374e6e0a69b76319964cfe686bf50b0604a57 SHA512 4dcf45d1809e8390a2d8155c8ebfe0dd610203e392aeab0ccd8a10f42cc8532a4925eff32b35e7a6c35598a4efd288229034ec0732299dbd8cfa0acff705fed3 diff --git a/dev-libs/bglibs/bglibs-2.04-r3.ebuild b/dev-libs/bglibs/bglibs-2.04-r3.ebuild new file mode 100644 index 000000000000..cf69431cce50 --- /dev/null +++ b/dev-libs/bglibs/bglibs-2.04-r3.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="Bruce Guenter's Libraries Collection" +HOMEPAGE="https://untroubled.org/bglibs/" +SRC_URI="https://untroubled.org/bglibs/archive/${P}.tar.gz" + +LICENSE="LGPL-2.1+" +SLOT="0/2" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="doc" + +BDEPEND=" + sys-apps/which + dev-build/libtool + doc? ( + app-text/doxygen + dev-texlive/texlive-latexrecommended + dev-texlive/texlive-latex + dev-texlive/texlive-latexextra + virtual/latex-base + ) +" + +PATCHES=( + "${FILESDIR}"/bglibs-2.04-stack-buffers.patch + "${FILESDIR}"/bglibs-2.04-feature-tests.patch + "${FILESDIR}"/bglibs-2.04-musl.patch +) + +src_prepare() { + default + # disable tests as we want them manually + sed -i '/^all:/s|selftests||' Makefile || die + sed -i '/selftests/d' TARGETS || die +} + +src_configure() { + echo "$(tc-getCC) ${CFLAGS}" > conf-cc || die + echo "$(tc-getCC) ${LDFLAGS}" > conf-ld || die +} + +src_compile() { + # Parallel build fails, bug #343617 + MAKEOPTS+=" -j1" default + + if use doc; then + emake -C doc/latex pdf + fi +} + +src_test() { + einfo "Running selftests" + emake selftests +} + +src_install() { + echo "${ED}/usr/bin" > conf-bin || die + echo "${ED}/usr/$(get_libdir)/bglibs" > conf-lib || die + echo "${ED}/usr/include" > conf-include || die + echo "${ED}/usr/share/man" > conf-man || die + + default + + # Install .so into LDPATH + mv "${ED}"/usr/$(get_libdir)/bglibs/libbg.so.2.0.0 \ + "${ED}"/usr/$(get_libdir)/ \ + || die + dosym libbg.so.2.0.0 /usr/$(get_libdir)/libbg.so.2 + dosym libbg.so.2.0.0 /usr/$(get_libdir)/libbg.so + dosym ../libbg.so.2.0.0 /usr/$(get_libdir)/bglibs/libbg.so.2.0.0 + + rm "${ED}"/usr/$(get_libdir)/bglibs/libbg.la || die + + dodoc ANNOUNCEMENT NEWS README ChangeLog TODO VERSION + dodoc -r doc/html/ + if use doc; then + dodoc doc/latex/refman.pdf + fi +} diff --git a/dev-libs/bglibs/files/bglibs-2.04-feature-tests.patch b/dev-libs/bglibs/files/bglibs-2.04-feature-tests.patch new file mode 100644 index 000000000000..20cbe9e503ee --- /dev/null +++ b/dev-libs/bglibs/files/bglibs-2.04-feature-tests.patch @@ -0,0 +1,198 @@ +From 2ee0bd3ede22945756d727ee5efa52f593ab0a2f Mon Sep 17 00:00:00 2001 +From: NHOrus <jy6x2b32pie9@yahoo.com> +Date: Sat, 6 Apr 2024 12:12:13 +0400 +Subject: [PATCH] Feature tests fail to build with GCC-14 or Clang-17 + +Due to correctly detecting features removed from C99 as major source of errors +Fixing includes and main signature. + +Closes: #6 +--- + sys/tryflock.c | 2 +- + sys/trygetpeereid.c | 2 +- + sys/trynamedpipebug.c | 1 + + sys/trypoll.c | 1 + + sys/trysendfile.c | 2 +- + sys/trysigaction.c | 2 +- + sys/trysigprocmask.c | 2 +- + sys/tryspnam.c | 3 ++- + sys/tryulong32.c | 4 +++- + sys/tryulong64.c | 4 +++- + sys/tryunsetenv.c | 2 +- + sys/tryuserpw.c | 2 +- + sys/tryvfork.c | 4 +++- + sys/trywaitp.c | 2 +- + 14 files changed, 21 insertions(+), 12 deletions(-) + +diff --git a/sys/tryflock.c b/sys/tryflock.c +index 8c8aa76..b18743a 100644 +--- a/sys/tryflock.c ++++ b/sys/tryflock.c +@@ -2,7 +2,7 @@ + #include <sys/file.h> + #include <fcntl.h> + +-void main() ++int main() + { + flock(0,LOCK_EX | LOCK_UN | LOCK_NB); + } +diff --git a/sys/trygetpeereid.c b/sys/trygetpeereid.c +index cb8b858..e6529ce 100644 +--- a/sys/trygetpeereid.c ++++ b/sys/trygetpeereid.c +@@ -1,7 +1,7 @@ + #include <sys/types.h> + #include <unistd.h> + +-void main() ++int main() + { + getpeereid(); + } +diff --git a/sys/trynamedpipebug.c b/sys/trynamedpipebug.c +index df688a5..0f53b40 100644 +--- a/sys/trynamedpipebug.c ++++ b/sys/trynamedpipebug.c +@@ -2,6 +2,7 @@ + #include <fcntl.h> + #include <sys/time.h> + #include <unistd.h> ++#include <sys/stat.h> + + int main(void) + { +diff --git a/sys/trypoll.c b/sys/trypoll.c +index 7a2fd20..0aad538 100644 +--- a/sys/trypoll.c ++++ b/sys/trypoll.c +@@ -1,6 +1,7 @@ + #include <sys/types.h> + #include <fcntl.h> + #include <poll.h> ++#include <unistd.h> + + int main() + { +diff --git a/sys/trysendfile.c b/sys/trysendfile.c +index 05f67d3..3963cfa 100644 +--- a/sys/trysendfile.c ++++ b/sys/trysendfile.c +@@ -2,7 +2,7 @@ + #include <asm/unistd.h> + #include <unistd.h> + +-void main(void) { ++int main(void) { + int x; + x = __NR_sendfile; + sendfile(0, 1, 0, 0); +diff --git a/sys/trysigaction.c b/sys/trysigaction.c +index 263cb21..1471ecc 100644 +--- a/sys/trysigaction.c ++++ b/sys/trysigaction.c +@@ -1,6 +1,6 @@ + #include <signal.h> + +-void main() ++int main() + { + struct sigaction sa; + sa.sa_handler = 0; +diff --git a/sys/trysigprocmask.c b/sys/trysigprocmask.c +index 2797eea..3d73f86 100644 +--- a/sys/trysigprocmask.c ++++ b/sys/trysigprocmask.c +@@ -1,6 +1,6 @@ + #include <signal.h> + +-main() ++int main() + { + sigset_t ss; + +diff --git a/sys/tryspnam.c b/sys/tryspnam.c +index 622ba8b..c916217 100644 +--- a/sys/tryspnam.c ++++ b/sys/tryspnam.c +@@ -1,6 +1,7 @@ + #include <shadow.h> ++#include <stdio.h> + +-void main() ++int main() + { + struct spwd *spw; + +diff --git a/sys/tryulong32.c b/sys/tryulong32.c +index a108076..1278283 100644 +--- a/sys/tryulong32.c ++++ b/sys/tryulong32.c +@@ -1,4 +1,6 @@ +-void main() ++#include <unistd.h> ++ ++int main() + { + unsigned long u; + u = 1; +diff --git a/sys/tryulong64.c b/sys/tryulong64.c +index 01965cb..74b8f0e 100644 +--- a/sys/tryulong64.c ++++ b/sys/tryulong64.c +@@ -1,4 +1,6 @@ +-main() ++#include <unistd.h> ++ ++int main() + { + unsigned long u; + u = 1; +diff --git a/sys/tryunsetenv.c b/sys/tryunsetenv.c +index 99f5dcd..cb977e4 100644 +--- a/sys/tryunsetenv.c ++++ b/sys/tryunsetenv.c +@@ -1,5 +1,5 @@ + #include <stdlib.h> + +-void main(void) { ++int main(void) { + unsetenv("PATH"); + } +diff --git a/sys/tryuserpw.c b/sys/tryuserpw.c +index fb14623..a359d27 100644 +--- a/sys/tryuserpw.c ++++ b/sys/tryuserpw.c +@@ -1,6 +1,6 @@ + #include <userpw.h> + +-void main() ++int main() + { + struct userpw *upw; + +diff --git a/sys/tryvfork.c b/sys/tryvfork.c +index 21387e4..83b57a0 100644 +--- a/sys/tryvfork.c ++++ b/sys/tryvfork.c +@@ -1,4 +1,6 @@ +-void main() ++#include <unistd.h> ++ ++int main() + { + vfork(); + } +diff --git a/sys/trywaitp.c b/sys/trywaitp.c +index 7e73bfa..0380358 100644 +--- a/sys/trywaitp.c ++++ b/sys/trywaitp.c +@@ -1,7 +1,7 @@ + #include <sys/types.h> + #include <sys/wait.h> + +-void main() ++int main() + { + waitpid(0,0,0); + } diff --git a/dev-libs/bglibs/files/bglibs-2.04-musl.patch b/dev-libs/bglibs/files/bglibs-2.04-musl.patch new file mode 100644 index 000000000000..65819699926a --- /dev/null +++ b/dev-libs/bglibs/files/bglibs-2.04-musl.patch @@ -0,0 +1,100 @@ +From 999598621421a46ef2d11244f57b70855a28ec60 Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky <michael@orlitzky.com> +Date: Fri, 7 Feb 2025 04:43:56 +0000 +Subject: [PATCH 1/3] net/{bindu,connectu}.c: add missing <string.h> includes + +These two files call strcpy() which is defined in string.h. It's +probably included transitively on glibc, but on musl this leads +to a build failure. +--- + net/bindu.c | 1 + + net/connectu.c | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/net/bindu.c b/net/bindu.c +index bf228dd..3d30579 100644 +--- a/net/bindu.c ++++ b/net/bindu.c +@@ -21,6 +21,7 @@ + #include <sys/socket.h> + #include <sys/un.h> + #include <unistd.h> ++#include <string.h> + #include "socket.h" + + /** Bind a UNIX domain address (path) to a socket. */ +diff --git a/net/connectu.c b/net/connectu.c +index a0a00ad..a82b9aa 100644 +--- a/net/connectu.c ++++ b/net/connectu.c +@@ -21,6 +21,7 @@ + #include <sys/socket.h> + #include <sys/un.h> + #include <unistd.h> ++#include <string.h> + #include "socket.h" + + /** Make an UNIX domain connection. */ + +From d930f1ff4043e25c1d5427e474af0de4cc787e2c Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky <michael@orlitzky.com> +Date: Fri, 7 Feb 2025 04:45:12 +0000 +Subject: [PATCH 2/3] unix/sig_all.c: drop <sys/signal.h> include + +The POSIX name for this header is <signal.h>, + + https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/signal.h.html + +and while the "sys" name still works, it now generates a warning on +musl + + In file included from unix/sig_all.c:2: + /usr/include/sys/signal.h:1:2: warning: #warning redirecting incorrect + #include <sys/signal.h> to <signal.h> [-Wcpp] + 1 | #warning redirecting incorrect #include <sys/signal.h> to <signal.h> + | ^~~~~~~ + +and presumably will not work forever. +--- + unix/sig_all.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/unix/sig_all.c b/unix/sig_all.c +index b8821de..f2cb1e4 100644 +--- a/unix/sig_all.c ++++ b/unix/sig_all.c +@@ -1,5 +1,4 @@ + #include <signal.h> +-#include <sys/signal.h> + #include "sig.h" + #include "sysdeps.h" + + +From 5069fe01396d465c3d39ed8353f5d88538086b0d Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky <michael@orlitzky.com> +Date: Fri, 7 Feb 2025 13:48:38 +0000 +Subject: [PATCH 3/3] selftests.sh: fgrep -> grep -F + +GNU grep now warns that "fgrep" is obsolete: + + Creating temporary directory selftests.sh.tmp.35861 + fgrep: warning: fgrep is obsolescent; using /bin/grep -F + +The "-F" flag is part of POSIX and should be reliable. +--- + selftests.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/selftests.sh b/selftests.sh +index 23c7719..8d9944f 100644 +--- a/selftests.sh ++++ b/selftests.sh +@@ -48,7 +48,7 @@ if [ $# -gt 0 ]; then + do_test $c || exitcode=false + done + else +- for c in `fgrep -l '#ifdef SELFTEST_MAIN' */*.c` ++ for c in `grep -F -l '#ifdef SELFTEST_MAIN' */*.c` + do + do_test $c || exitcode=false + done |