commit:     0d5589a76eeb41356df572265dcf8379826269fd
Author:     Viorel Munteanu <ceamac.paragon <AT> gmail <DOT> com>
AuthorDate: Mon Mar 22 16:37:36 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Mar 27 16:42:29 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d5589a7

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 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../xpaint/files/xpaint-2.10.2-respect-ldflags.patch   | 18 ++++++++++++++++++
 media-gfx/xpaint/xpaint-2.10.2-r1.ebuild               |  8 ++------
 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 00000000000..11a0b0e9a84
--- /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 86563f5c2ab..53779ba99c7 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
 }

Reply via email to