From 8dfa44f37e40e4a638c8bb966346ae5b04af9c21 Mon Sep 17 00:00:00 2001 From: Hans de Graaff Date: Tue, 29 Mar 2016 21:57:05 +0200 Subject: net-p2p/gtk-gnutella: fix bug 577012 Package-Manager: portage-2.2.26 --- .../files/gtk-gnutella-1.1.9-load-symbols.patch | 31 ++++++++ net-p2p/gtk-gnutella/gtk-gnutella-1.1.9-r1.ebuild | 88 ++++++++++++++++++++++ net-p2p/gtk-gnutella/gtk-gnutella-1.1.9.ebuild | 86 --------------------- 3 files changed, 119 insertions(+), 86 deletions(-) create mode 100644 net-p2p/gtk-gnutella/files/gtk-gnutella-1.1.9-load-symbols.patch create mode 100644 net-p2p/gtk-gnutella/gtk-gnutella-1.1.9-r1.ebuild delete mode 100644 net-p2p/gtk-gnutella/gtk-gnutella-1.1.9.ebuild (limited to 'net-p2p/gtk-gnutella') diff --git a/net-p2p/gtk-gnutella/files/gtk-gnutella-1.1.9-load-symbols.patch b/net-p2p/gtk-gnutella/files/gtk-gnutella-1.1.9-load-symbols.patch new file mode 100644 index 000000000000..40a6943a241d --- /dev/null +++ b/net-p2p/gtk-gnutella/files/gtk-gnutella-1.1.9-load-symbols.patch @@ -0,0 +1,31 @@ +From 8645df4344f22228862efb3c212e6aa7ec2c6d45 Mon Sep 17 00:00:00 2001 +From: Raphael Manfredi +Date: Tue, 29 Mar 2016 21:16:48 +0200 +Subject: [PATCH] symbols_load_from(): must release write lock after falling + back to pre-computed. + +--- + src/lib/symbols.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/lib/symbols.c b/src/lib/symbols.c +index 9b2e080..69796f6 100644 +--- a/src/lib/symbols.c ++++ b/src/lib/symbols.c +@@ -1448,7 +1448,7 @@ symbols_load_from(symbols_t *st, const char *exe, const char *lpath) + } + + if (st->garbage) +- return; /* Already went through the "done" part */ ++ goto unlock; /* Already went through the "done" part */ + + /* FALL THROUGH */ + } +@@ -1474,6 +1474,7 @@ symbols_load_from(symbols_t *st, const char *exe, const char *lpath) + if (!retried && !st->indirect && st->garbage) + goto use_pre_computed; + ++unlock: + SYMBOLS_WRITE_UNLOCK(st); + } + diff --git a/net-p2p/gtk-gnutella/gtk-gnutella-1.1.9-r1.ebuild b/net-p2p/gtk-gnutella/gtk-gnutella-1.1.9-r1.ebuild new file mode 100644 index 000000000000..35ad92728aa7 --- /dev/null +++ b/net-p2p/gtk-gnutella/gtk-gnutella-1.1.9-r1.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils + +IUSE="nls dbus ssl +gtk" + +DESCRIPTION="A GTK+ Gnutella client" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" +HOMEPAGE="http://gtk-gnutella.sourceforge.net/" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd" + +RDEPEND=" + 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} + virtual/pkgconfig" + +src_prepare() { + epatch "${FILESDIR}/${P}-load-symbols.patch" + + strip-linguas -i po + + echo "# Gentoo-selected LINGUAS" > po/LINGUAS + for ling in ${LINGUAS}; do + echo $ling >> po/LINGUAS + done +} + +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 || die "Install failed" + 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 +} diff --git a/net-p2p/gtk-gnutella/gtk-gnutella-1.1.9.ebuild b/net-p2p/gtk-gnutella/gtk-gnutella-1.1.9.ebuild deleted file mode 100644 index 154b509fd546..000000000000 --- a/net-p2p/gtk-gnutella/gtk-gnutella-1.1.9.ebuild +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=5 - -inherit eutils - -IUSE="nls dbus ssl +gtk" - -DESCRIPTION="A GTK+ Gnutella client" -SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" -HOMEPAGE="http://gtk-gnutella.sourceforge.net/" - -SLOT="0" -LICENSE="GPL-2" -KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd" - -RDEPEND=" - 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} - virtual/pkgconfig" - -src_prepare() { - strip-linguas -i po - - echo "# Gentoo-selected LINGUAS" > po/LINGUAS - for ling in ${LINGUAS}; do - echo $ling >> po/LINGUAS - done -} - -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 || die "Install failed" - 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-65-gdbad