From 068424b26532f3551a81421a9be67ed206e5c11a Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 11 Aug 2021 07:02:28 +0100 Subject: gentoo resync : 11.08.2021 --- net-p2p/gtk-gnutella/Manifest | 2 + .../files/gtk-gnutella-1.2.1-glibc234.patch | 53 +++++++++++++ net-p2p/gtk-gnutella/gtk-gnutella-1.2.1-r1.ebuild | 91 ++++++++++++++++++++++ 3 files changed, 146 insertions(+) create mode 100644 net-p2p/gtk-gnutella/files/gtk-gnutella-1.2.1-glibc234.patch create mode 100644 net-p2p/gtk-gnutella/gtk-gnutella-1.2.1-r1.ebuild (limited to 'net-p2p/gtk-gnutella') diff --git a/net-p2p/gtk-gnutella/Manifest b/net-p2p/gtk-gnutella/Manifest index 4e6ed0f6de68..b9ed1a315abe 100644 --- a/net-p2p/gtk-gnutella/Manifest +++ b/net-p2p/gtk-gnutella/Manifest @@ -1,3 +1,5 @@ +AUX gtk-gnutella-1.2.1-glibc234.patch 1881 BLAKE2B 4f4ce21452694eefcbf2c9e70d4ae1b3279a5c94c194bdef56bc4078d38302ba2901f2c23b8c877d4f3af75dcfad4c8cecf7321f362d841133bca991557d7ffd SHA512 9c328f8d17a1bbda4dcef95e2068823826ed09cd7d17268ab91294eecf10ba2dfd09c0f9bcdce32aa80f3c17c09e4ead1f9c632010155d95b2ed37a513ef656e DIST gtk-gnutella-1.2.1.tar.gz 25055800 BLAKE2B 09f68979bc4df130e2b7b4a78017c2834feab1173d6242fe07856be038b9c671609fee7a7ec270fd6f9592a2fb2bfa0bf8a08472da0f41f6e3dc2dfaafd5ed58 SHA512 e53c8e0f7d11f699e9eb77546f3d6ca240ee9fa92e8817af4631250d86714b97eb36fbcd83e46d8429cbd12532c9c9a343a2ba69eba6deda4bc9c5610e98efc8 +EBUILD gtk-gnutella-1.2.1-r1.ebuild 2006 BLAKE2B 271740922e56bdce412839647fba43ba9b78c22b5e9c444a45fb7761b43797dbc9255ca95c625a1e5975747b13340f812cec3c9884cdde538afb0e4b24c13068 SHA512 ffdb77c2eb2ce03d6e3f1433f57a4f7be922f4b227dd952b4635ead494b0fa82537907e6ba33aa36428d5792ad12def4d62bc659c76f0aa69aa52b762968985b EBUILD gtk-gnutella-1.2.1.ebuild 1955 BLAKE2B 8909b8ddab6c94525ea72f5d7dd0514dfd6a8f2be7305594dc001c1a65fc56be119ba4351fa71331ff1d1de04ade63e0e6fe66304146aa6518a3a0069db99752 SHA512 772f019794f4abdfcb1721f7a97b6e2ac3272cd182790752218ee3bfb6ead7395b6ca57f67d542f09af0cee18b5788a7308ff7f31e2687710cf1b4ba74da1d1d MISC metadata.xml 299 BLAKE2B 8e823e2ff9ff16738e4f1d5a5e04264557ee9529ce035978e59a8d1371a8dba5485bde5095e05346ddca410d197e7fbb62f8b651bbe8cd0815396fdeda7935ed SHA512 ab18fa3318fdd64a0e4bff392a88d9f58b1c611c71ee090a767a4a25f75f273dc60a7cfeb7e386e5fbed548d982788c16654584938aec8ef5f6b11cd6d5b3c61 diff --git a/net-p2p/gtk-gnutella/files/gtk-gnutella-1.2.1-glibc234.patch b/net-p2p/gtk-gnutella/files/gtk-gnutella-1.2.1-glibc234.patch new file mode 100644 index 000000000000..8d985b966701 --- /dev/null +++ b/net-p2p/gtk-gnutella/files/gtk-gnutella-1.2.1-glibc234.patch @@ -0,0 +1,53 @@ +From 31d06cecac572852c6e5e8d85cea641883cbe4c6 Mon Sep 17 00:00:00 2001 +From: Raphael Manfredi +Date: Mon, 9 Aug 2021 09:36:00 +0200 +Subject: [PATCH] Fix compilation with newest glibc. + +The PTHREAD_STACK_MIN value is no longer a constant but rather +defined as sysconf(_SC_THREAD_STACK_MIN). + +Therefore, we must avoid using cpp computations on that value. +--- + src/lib/thread.c | 7 +------ + src/lib/thread.h | 2 +- + 2 files changed, 2 insertions(+), 7 deletions(-) + +diff --git a/src/lib/thread.c b/src/lib/thread.c +index 178c09794..e7a702029 100644 +--- a/src/lib/thread.c ++++ b/src/lib/thread.c +@@ -9705,7 +9705,7 @@ thread_launch_trampoline(void *arg) + * In case PTHREAD_STACK_MIN is not defined by . + */ + #ifndef PTHREAD_STACK_MIN +-#define PTHREAD_STACK_MIN 0 ++#define PTHREAD_STACK_MIN 1024U + #endif + + /** +@@ -9737,12 +9737,7 @@ thread_launch(struct thread_element *te, + pthread_attr_init(&attr); + + if (stack != 0) { +- /* Avoid compiler warning when PTHREAD_STACK_MIN == 0 */ +-#if PTHREAD_STACK_MIN != 0 + stacksize = MAX(PTHREAD_STACK_MIN, stack); +-#else +- stacksize = stack; +-#endif + stacksize = MAX(stacksize, THREAD_STACK_MIN); + } else { + stacksize = MAX(THREAD_STACK_DFLT, PTHREAD_STACK_MIN); +diff --git a/src/lib/thread.h b/src/lib/thread.h +index 73e15fa36..740f3a6f9 100644 +--- a/src/lib/thread.h ++++ b/src/lib/thread.h +@@ -63,7 +63,7 @@ typedef size_t thread_qid_t; /* Quasi Thread ID */ + typedef unsigned int thread_key_t; /* Local thread storage key */ + + #define THREAD_MAX 64 /**< Max amount of threads we can track */ +-#define THREAD_STACK_DFLT (65536 * PTRSIZE) /**< Default stack requested */ ++#define THREAD_STACK_DFLT (65536U * PTRSIZE) /**< Default stack requested */ + #define THREAD_LOCAL_MAX 1024 /**< Max amount of thread-local keys */ + + #define THREAD_SUSPEND_TIMEOUT 90 /**< secs: thread max suspension time */ diff --git a/net-p2p/gtk-gnutella/gtk-gnutella-1.2.1-r1.ebuild b/net-p2p/gtk-gnutella/gtk-gnutella-1.2.1-r1.ebuild new file mode 100644 index 000000000000..46f39f6e3695 --- /dev/null +++ b/net-p2p/gtk-gnutella/gtk-gnutella-1.2.1-r1.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic strip-linguas toolchain-funcs + +IUSE="nls dbus ssl +gtk" + +DESCRIPTION="A GTK+ Gnutella client" +SRC_URI="https://github.com/gtk-gnutella/gtk-gnutella/archive/v${PV}.tar.gz -> ${P}.tar.gz" +HOMEPAGE="http://gtk-gnutella.sourceforge.net/" + +SLOT="0" +LICENSE="CC-BY-SA-4.0 GPL-2" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" + +RDEPEND=" + sys-libs/binutils-libs:= + dev-libs/glib:2 + sys-libs/zlib + gtk? ( >=x11-libs/gtk+-2.2.1:2 ) + dbus? ( >=sys-apps/dbus-0.35.2 ) + ssl? ( >=net-libs/gnutls-2.2.5 ) + nls? ( >=sys-devel/gettext-0.11.5 )" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( "${FILESDIR}/${P}-glibc234.patch" ) + +src_prepare() { + filter-flags -flto + strip-linguas -i po + + echo "# Gentoo-selected LINGUAS" > po/LINGUAS + for ling in ${LINGUAS}; do + echo $ling >> po/LINGUAS + done + + default +} + +src_configure() { + # There is no option to turn off optimization through the build.sh + # script. + sed -i -e "s/Configure -Oder/Configure -Oder -Doptimize=none/" build.sh || die + + # The build script does not support the equivalent --enable + # options so we must construct the configuration by hand. + + local myconf + + if ! use nls; then + myconf="${myconf} --disable-nls" + fi + + if ! use dbus; then + myconf="${myconf} --disable-dbus" + fi + + if ! use ssl; then + myconf="${myconf} --disable-gnutls" + fi + + if use gtk; then + myconf="${myconf} --gtk2" + else + myconf="${myconf} --topless" + fi + + ./build.sh \ + --configure-only \ + --prefix="/usr" \ + --cc=$(tc-getCC) \ + ${myconf} +} + +src_compile() { + # Build system is not parallel-safe, bug 500760 + emake -j1 +} + +src_install() { + dodir /usr/bin + emake INSTALL_PREFIX="${D}" install + dodoc AUTHORS ChangeLog README TODO + + # Touch the symbols file into the future to avoid warnings from + # gtk-gnutella later on, since we will most likely strip the binary. + touch --date="next minute" "${D}/usr/lib/gtk-gnutella/gtk-gnutella.nm" || die +} -- cgit v1.2.3