diff options
author | Jeroen Roovers <jer@gentoo.org> | 2020-04-19 18:18:35 +0200 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2020-04-19 18:19:01 +0200 |
commit | 98b0b5f0acd550393b896406c3019af411d58a34 (patch) | |
tree | ac618210ccef1c28c1b93d8a0393b01660250462 | |
parent | x11-misc/shared-mime-info: 1.15 version bump (diff) | |
download | gentoo-98b0b5f0acd550393b896406c3019af411d58a34.tar.gz gentoo-98b0b5f0acd550393b896406c3019af411d58a34.tar.bz2 gentoo-98b0b5f0acd550393b896406c3019af411d58a34.zip |
sys-libs/libnih: Fix building with CFLAGS=-fno-common
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Closes: https://bugs.gentoo.org/707592
Signed-off-by: Jeroen Roovers <jer@gentoo.org>
-rw-r--r-- | sys-libs/libnih/files/libnih-1.0.3-fno-common.patch | 11 | ||||
-rw-r--r-- | sys-libs/libnih/files/libnih-1.0.3-optional-dbus.patch | 8 | ||||
-rw-r--r-- | sys-libs/libnih/files/libnih-1.0.3-pkg-config.patch | 40 | ||||
-rw-r--r-- | sys-libs/libnih/files/libnih-1.0.3-signal-race.patch | 20 | ||||
-rw-r--r-- | sys-libs/libnih/libnih-1.0.3-r4.ebuild | 53 |
5 files changed, 74 insertions, 58 deletions
diff --git a/sys-libs/libnih/files/libnih-1.0.3-fno-common.patch b/sys-libs/libnih/files/libnih-1.0.3-fno-common.patch new file mode 100644 index 000000000000..2b3a9cef5b48 --- /dev/null +++ b/sys-libs/libnih/files/libnih-1.0.3-fno-common.patch @@ -0,0 +1,11 @@ +--- a/nih-dbus-tool/output.h ++++ b/nih-dbus-tool/output.h +@@ -27,7 +27,7 @@ + + NIH_BEGIN_EXTERN + +-char *output_package; ++extern char *output_package; + + int output (const char *source_path, int source_fd, + const char *header_path, int header_fd, diff --git a/sys-libs/libnih/files/libnih-1.0.3-optional-dbus.patch b/sys-libs/libnih/files/libnih-1.0.3-optional-dbus.patch index afe43749b6b0..49ad68a07b5a 100644 --- a/sys-libs/libnih/files/libnih-1.0.3-optional-dbus.patch +++ b/sys-libs/libnih/files/libnih-1.0.3-optional-dbus.patch @@ -1,5 +1,5 @@ ---- libnih-1.0.1/configure.ac -+++ libnih-1.0.1/configure.ac +--- a/configure.ac ++++ b/configure.ac @@ -23,12 +23,21 @@ PKG_PROG_PKG_CONFIG([0.22]) @@ -25,8 +25,8 @@ # Checks for header files. AC_CHECK_HEADERS([valgrind/valgrind.h]) ---- libnih-1.0.1.orig/Makefile.am -+++ libnih-1.0.1/Makefile.am +--- a/Makefile.am ++++ b/Makefile.am @@ -1,6 +1,9 @@ ## Process this file with automake to produce Makefile.in diff --git a/sys-libs/libnih/files/libnih-1.0.3-pkg-config.patch b/sys-libs/libnih/files/libnih-1.0.3-pkg-config.patch index 979e363f2157..6516de799432 100644 --- a/sys-libs/libnih/files/libnih-1.0.3-pkg-config.patch +++ b/sys-libs/libnih/files/libnih-1.0.3-pkg-config.patch @@ -1,14 +1,5 @@ -# Bazaar merge directive format 2 (Bazaar 0.90) -# revision_id: vapier@gentoo.org-20111019170935-fheqs03szv6mhh3o -# target_branch: http://bazaar.launchpad.net/~scott/libnih/trunk/ -# testament_sha1: 84b368e08fdd9f8276611cdfe97d34f51cd90598 -# timestamp: 2011-10-19 13:13:52 -0400 -# base_revision_id: scott@netsplit.com-20110901184103-d2xbvc5hbt0vqxf0 -# -# Begin patch -=== modified file 'nih-dbus/Makefile.am' ---- nih-dbus/Makefile.am 2009-11-21 21:44:23 +0000 -+++ nih-dbus/Makefile.am 2011-10-19 17:09:35 +0000 +--- a/nih-dbus/Makefile.am ++++ b/nih-dbus/Makefile.am @@ -49,7 +49,7 @@ test_dbus.h @@ -19,9 +10,8 @@ -=== modified file 'nih/Makefile.am' ---- nih/Makefile.am 2009-11-21 21:44:23 +0000 -+++ nih/Makefile.am 2011-10-19 17:09:35 +0000 +--- a/nih/Makefile.am ++++ b/nih/Makefile.am @@ -71,7 +71,7 @@ test_hash.h @@ -32,25 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PwwvwVSDuTAzASyFMevBBdbmdy3y0L0Y2 -oqRD3LY5+RqPM9R4/XEkdVuXmAxvF7GgrzRSIuDsTD2MANhmBxuF+EEbTKN/ciAzAUxnOdie1hol -lqAkHxA44ja0WMKzYlmGU28kSdqB1i6h4nLevOVCnK+WtEKLpuOy6eZFThX5IsRrjenja/BSN2iu -FFE+cHoYwJzGRI9yFKvpRUQ+H0qqaIoI5lP18lEqsPiBhRHMkpPIHqMuoiGiZyQxSXC0ynqSTYNX -80VoGbTVLspApI9vo8XZBOScj6oHLR6qkjlnhkwwNQ8/wZdSfNBI0NSKLNasgKl6LF7FVbx4MCcj -jYREWWzVEEVd81rloiAfu+h8H33/8DPhciqmx3QHdcdLEOKQ1mHIp8NQLYDAhQjJPmRA4hvGfSG+ -dwTBj1rKUFKGB7BYiKJ+C3dZ91NewHQ8kxHGlS0rSLioLvwrlwNSrRgtyZzWVFTWB8C7kinChIdW -BZS4 diff --git a/sys-libs/libnih/files/libnih-1.0.3-signal-race.patch b/sys-libs/libnih/files/libnih-1.0.3-signal-race.patch index 4cba5ae4ded3..364af7f5383e 100644 --- a/sys-libs/libnih/files/libnih-1.0.3-signal-race.patch +++ b/sys-libs/libnih/files/libnih-1.0.3-signal-race.patch @@ -1,21 +1,5 @@ -https://bugs.launchpad.net/libnih/+bug/518921 - -fix race in signal processing leading to lost signals - -The current loop will walk all signals one by one and run the handler -for it if any signals were pending. Then it clears the array. But if -a signal comes in for an earlier checked signal, it will get clobbered -when the final clear runs. - -Change the logic so that we only clear entries for signals whose handler -we explicitly call. If a different signal comes in, we'll process it -the next time around. - -This was discovered & triaged by Jeffy Chen from Rockchip. - -=== modified file 'nih/signal.c' ---- nih/signal.c 2009-06-23 09:29:37 +0000 -+++ nih/signal.c 2015-05-21 08:12:11 +0000 +--- a/nih/signal.c ++++ b/nih/signal.c @@ -337,17 +337,37 @@ nih_signal_init (); diff --git a/sys-libs/libnih/libnih-1.0.3-r4.ebuild b/sys-libs/libnih/libnih-1.0.3-r4.ebuild new file mode 100644 index 000000000000..fae185404cc4 --- /dev/null +++ b/sys-libs/libnih/libnih-1.0.3-r4.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools toolchain-funcs multilib flag-o-matic usr-ldscript + +DESCRIPTION="Light-weight 'standard library' of C functions" +HOMEPAGE="https://launchpad.net/libnih" +SRC_URI="https://launchpad.net/${PN}/$(ver_cut 1-2)/${PV}/+download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE="+dbus nls static-libs +threads" + +# The configure phase will check for valgrind headers, and the tests will use +# that header, but only to do dynamic valgrind detection. The tests aren't +# run directly through valgrind, only by developers directly. So don't bother +# depending on valgrind here. #559830 +RDEPEND="dbus? ( dev-libs/expat >=sys-apps/dbus-1.2.16 )" +DEPEND="${RDEPEND} + sys-devel/gettext + virtual/pkgconfig" +PATCHES=( + "${FILESDIR}"/${PN}-1.0.3-optional-dbus.patch + "${FILESDIR}"/${PN}-1.0.3-pkg-config.patch + "${FILESDIR}"/${PN}-1.0.3-signal-race.patch + "${FILESDIR}"/${PN}-1.0.3-fno-common.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + append-lfs-flags + econf \ + $(use_with dbus) \ + $(use_enable nls) \ + $(use_enable static-libs static) \ + $(use_enable threads) \ + $(use_enable threads threading) +} + +src_install() { + default + + # we need to be in / because upstart needs libnih + gen_usr_ldscript -a nih $(use dbus && echo nih-dbus) + use static-libs || rm "${ED}"/usr/$(get_libdir)/*.la +} |