Skip to content

Commit

Permalink
media-libs/imlib: fix testsuite underlinking, bug #367645
Browse files Browse the repository at this point in the history
Fix by Greg Turner adds required libraries to t-load test.
While at it dropped LDFLAGS leak into imlib.pc.

Reported-by: Diego Elio Pettenò
Bug: https://bugs.gentoo.org/367645

Package-Manager: portage-2.3.0
  • Loading branch information
Sergei Trofimovich committed Aug 27, 2016
1 parent 3d3e379 commit b027c1e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
16 changes: 16 additions & 0 deletions media-libs/imlib/files/imlib-1.9.15-no-LDFLAGS-in-pc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Detected by Gentoo QA check:

* QA Notice: pkg-config files with wrong LDFLAGS detected:
* /usr/lib32/pkgconfig/imlib.pc:Libs: -L${libdir} -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -lImlib -ljpeg -ltiff -lgif -lpng -lz -lm -lXext -lSM -lICE -lXext -lX11
* /usr/lib64/pkgconfig/imlib.pc:Libs: -L${libdir} -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -lImlib -ljpeg -ltiff -lgif -lpng -lz -lm -lXext -lSM -lICE -lXext -lX11
diff --git a/imlib.pc.in b/imlib.pc.in
index 0a6f276..dc1ef7d 100644
--- a/imlib.pc.in
+++ b/imlib.pc.in
@@ -9,5 +9,5 @@ Name: Imlib
Description: An image loading and rendering library for X11R6
Version: @VERSION@
Requires:
-Libs: -L${libdir} @LDFLAGS@ -lImlib @SUPPORT_LIBS@ @X_LIBS@ @X_PRE_LIBS@ -lXext -lX11 @X_EXTRA_LIBS@
+Libs: -L${libdir} -lImlib @SUPPORT_LIBS@ @X_LIBS@ @X_PRE_LIBS@ -lXext -lX11 @X_EXTRA_LIBS@
Cflags: -I${includedir} @X_CFLAGS@
10 changes: 10 additions & 0 deletions media-libs/imlib/files/imlib-1.9.15-underlinking-test.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
https://bugs.gentoo.org/show_bug.cgi?id=367645
by Greg Turner
diff -urpN imlib-1.9.15.orig/Imlib/Makefile.am imlib-1.9.15/Imlib/Makefile.am
--- imlib-1.9.15.orig/Imlib/Makefile.am 2004-09-20 17:22:59.000000000 -0700
+++ imlib-1.9.15/Imlib/Makefile.am 2013-10-08 02:48:53.772197627 -0700
@@ -44,3 +44,3 @@ INCLUDES = -I. -I$(srcdir) -I.. -I$(srcd
check_PROGRAMS = t-load

-t_load_LDADD = libImlib.la
+t_load_LDADD = libImlib.la $(X_PRE_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS)
4 changes: 3 additions & 1 deletion media-libs/imlib/imlib-1.9.15-r4.ebuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 1999-2015 Gentoo Foundation
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

Expand Down Expand Up @@ -39,6 +39,8 @@ src_prepare() {
epatch "${FILESDIR}"/${P}-fix-rendering.patch #197489
epatch "${FILESDIR}"/${P}-asneeded.patch #207638
epatch "${FILESDIR}"/${P}-libpng15.patch #357167
epatch "${FILESDIR}"/${P}-underlinking-test.patch #367645
epatch "${FILESDIR}"/${P}-no-LDFLAGS-in-pc.patch

mkdir m4 && cp "${WORKDIR}"/gtk-1-for-imlib.m4 m4

Expand Down

0 comments on commit b027c1e

Please sign in to comment.