summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViorel Munteanu <ceamac.paragon@gmail.com>2021-03-22 18:37:36 +0200
committerSam James <sam@gentoo.org>2021-03-27 16:42:29 +0000
commit0d5589a76eeb41356df572265dcf8379826269fd (patch)
tree81957fbaecfca40a5b3a5a093a419252285f2ae1 /media-gfx
parentmedia-gfx/xpaint: fix compilation with clang (diff)
downloadgentoo-0d5589a76eeb41356df572265dcf8379826269fd.tar.gz
gentoo-0d5589a76eeb41356df572265dcf8379826269fd.tar.bz2
gentoo-0d5589a76eeb41356df572265dcf8379826269fd.zip
media-gfx/xpaint: fix passing LDFLAGS
Closes: https://bugs.gentoo.org/727632 Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: Viorel Munteanu <ceamac.paragon@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/xpaint/files/xpaint-2.10.2-respect-ldflags.patch18
-rw-r--r--media-gfx/xpaint/xpaint-2.10.2-r1.ebuild8
2 files changed, 20 insertions, 6 deletions
diff --git a/media-gfx/xpaint/files/xpaint-2.10.2-respect-ldflags.patch b/media-gfx/xpaint/files/xpaint-2.10.2-respect-ldflags.patch
new file mode 100644
index 000000000000..11a0b0e9a84e
--- /dev/null
+++ b/media-gfx/xpaint/files/xpaint-2.10.2-respect-ldflags.patch
@@ -0,0 +1,18 @@
+The original Makefile did not pass CFLAGS and LDFLAGS
+See bug https://bugs.gentoo.org/727632
+Also remove -O3 and stripping, leave portage control that
+--- a/util/Makefile
++++ b/util/Makefile
+@@ -10,10 +10,10 @@
+ endif
+
+ pdfconcat:
+- $(CC) $(CFLAGS) -O3 -s -DNDEBUG=1 -DNO_CONFIG=1 -ansi -pedantic -Wunused -Wall -W -Wstrict-prototypes -Wtraditional -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wmissing-prototypes -Wmissing-declarations pdfconcat.c -o pdfconcat
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -DNDEBUG=1 -DNO_CONFIG=1 -ansi -pedantic -Wunused -Wall -W -Wstrict-prototypes -Wtraditional -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wmissing-prototypes -Wmissing-declarations pdfconcat.c -o pdfconcat
+
+ ppmtops:
+- $(CC) $(CFLAGS) ppmtops.c -o ppmtops
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) ppmtops.c -o ppmtops
+
+ ifneq ($(WITH_PGF),no)
+ pgf2pnm: main.cpp pnm.cpp
diff --git a/media-gfx/xpaint/xpaint-2.10.2-r1.ebuild b/media-gfx/xpaint/xpaint-2.10.2-r1.ebuild
index 86563f5c2aba..53779ba99c75 100644
--- a/media-gfx/xpaint/xpaint-2.10.2-r1.ebuild
+++ b/media-gfx/xpaint/xpaint-2.10.2-r1.ebuild
@@ -45,13 +45,9 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/${P}-libtool-clang.patch
+ "${FILESDIR}"/${P}-respect-ldflags.patch
)
-src_prepare() {
- default
- sed -i -e 's/-O3 -s//g' util/Makefile || die
-}
-
src_configure() {
econf \
$(use_enable tiff) \
@@ -83,5 +79,5 @@ src_install() {
-C util install
doicon icons/xpaint.svg
make_desktop_entry "${PN}"
- find "${D}" \( -name '*.la' -o -name '*.a' \) -type f -delete || die
+ find "${ED}" \( -name '*.la' -o -name '*.a' \) -type f -delete || die
}