summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViorel Munteanu <ceamac.paragon@gmail.com>2021-12-07 10:31:31 +0200
committerSam James <sam@gentoo.org>2021-12-08 00:29:08 +0000
commit7c21d5be105004e3f906a299955ac9b464a249c2 (patch)
tree8b3358f5693c2b12ca3403ab3f98119c6b97f2cf /media-libs/netpbm
parentsys-fs/zfs-kmod: update compat to 5.15 (diff)
downloadgentoo-7c21d5be105004e3f906a299955ac9b464a249c2.tar.gz
gentoo-7c21d5be105004e3f906a299955ac9b464a249c2.tar.bz2
gentoo-7c21d5be105004e3f906a299955ac9b464a249c2.zip
media-libs/netpbm: fix compilation with hardened clang
Closes: https://bugs.gentoo.org/828127 Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Viorel Munteanu <ceamac.paragon@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/23207 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs/netpbm')
-rw-r--r--media-libs/netpbm/netpbm-10.86.27.ebuild10
1 files changed, 9 insertions, 1 deletions
diff --git a/media-libs/netpbm/netpbm-10.86.27.ebuild b/media-libs/netpbm/netpbm-10.86.27.ebuild
index a4bc1a21670d..c43a3d9a31f5 100644
--- a/media-libs/netpbm/netpbm-10.86.27.ebuild
+++ b/media-libs/netpbm/netpbm-10.86.27.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-inherit multilib toolchain-funcs
+inherit flag-o-matic multilib toolchain-funcs
DESCRIPTION="A set of utilities for converting to/from the netpbm (and related) formats"
HOMEPAGE="http://netpbm.sourceforge.net/"
@@ -73,6 +73,13 @@ netpbm_config() {
fi
}
+# for bug #828127
+netpbm_cflags_for_build() {
+ if is-flagq -fPIC; then
+ echo -fPIC
+ fi
+}
+
src_prepare() {
default
@@ -147,6 +154,7 @@ src_configure() {
STRIPFLAG =
CFLAGS_SHLIB = -fPIC
+ CFLAGS_FOR_BUILD += $(netpbm_cflags_for_build)
LDRELOC = \$(LD) -r
LDSHLIB = $(netpbm_ldshlib)