Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 337773 - x11-misc/xearth does not respect LDFLAGS
Summary: x11-misc/xearth does not respect LDFLAGS
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High QA
Assignee: Desktop Misc. Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: ldflags
  Show dependency tree
 
Reported: 2010-09-17 10:14 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2010-09-18 00:51 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Build log (xearth-1.1:20100917-091043.log,6.66 KB, text/plain)
2010-09-17 10:14 UTC, Diego Elio Pettenò (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2010-09-17 10:14:41 UTC
See attached build log.

(Please do not complain about the need for looking at the build log until you can provide an easy way to open bugs with the correct data picked out of a tinderbox log. Thanks.)
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-09-17 10:14:54 UTC
Created attachment 247713 [details]
Build log
Comment 2 Michael Weber (RETIRED) gentoo-dev 2010-09-17 10:48:20 UTC
Doesn't respect CC, too.
And I think the x11-libs/libXext RDEPEND is wrong.

io ~ # qlist xearth | xargs scanelf -L -n -q -F '%n #F' | tr , ' ' | xargs qfile -C | sort -u 
sys-libs/glibc (/lib64/libc.so.6)
sys-libs/glibc (/lib64/libm.so.6)
x11-libs/libX11 (/usr/lib64/libX11.so.6)
x11-libs/libXt (/usr/lib64/libXt.so.6)



--- xearth-1.1.ebuild   2010-09-17 12:30:44.154878186 +0200
+++ xearth-1.1-r1.ebuild        2010-09-17 12:43:21.960944516 +0200
@@ -2,6 +2,10 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/x11-misc/xearth/xearth-1.1.ebuild,v 1.14 2010/03/22 20:59:40 jlec Exp $
 
+EAPI=2
+
+inherit toolchain-funcs
+
 HOMEPAGE="http://hewgill.com/xearth/original/"
 DESCRIPTION="Xearth sets the X root window to an image of the Earth"
 SRC_URI="ftp://cag.lcs.mit.edu/pub/tuna/${P}.tar.gz
@@ -9,7 +13,7 @@
 
 SLOT="0"
 LICENSE="xearth"
-KEYWORDS="alpha amd64 ppc ppc64 sparc x86"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86"
 IUSE=""
 
 RDEPEND="x11-libs/libX11
@@ -20,16 +24,15 @@
        app-text/rman
        x11-proto/xproto"
 
-src_compile() {
+src_prepare() {
        xmkmf || die
-       mv Makefile Makefile.orig
-       sed -e "s:CDEBUGFLAGS = .*:CDEBUGFLAGS = ${CFLAGS} -fno-strength-reduce:" \
-                       Makefile.orig > Makefile
-       emake || die
+}
+
+src_compile() {
+       emake CC="$(tc-getCC)" CCOPTIONS="${CFLAGS}" CDEBUGFLAGS="-fno-strength-reduce" EXTRA_LDOPTIONS="${LDFLAGS}" || die
 }
 
 src_install() {
-       newman xearth.man xearth.1
-       dobin xearth
-       dodoc BUILT-IN GAMMA-TEST HISTORY README
+       emake install install.man DESTDIR="${D}" || die
+       dodoc BUILT-IN GAMMA-TEST HISTORY README || die
 }
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2010-09-18 00:51:55 UTC
Fixed in -r1.

(In reply to comment #2)
 Doesn't respect CC, too.
> And I think the x11-libs/libXext RDEPEND is wrong.

i686-pc-linux-gnu-gcc -o xearth -O2 -fno-strength-reduce -fno-strict-aliasing -O2 -pipe -Wall -ggdb -march=athlon-xp  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed   -L/usr/lib   xearth.o dither.o extarr.o gif.o gifout.o mapdata.o                   markers.o ppm.o render.o resources.o scan.o sunpos.o                   x11.o -lXt -lSM -lICE -lXext -lX11   -lm

jer@astrid /var/tmp/portage/x11-misc/xearth-1.1-r1/work/xearth-1.1 $ scanelf -n xearth
 TYPE   NEEDED FILE
ET_EXEC libXt.so.6,libX11.so.6,libm.so.6,libc.so.6 xearth

Indeed. The wonders of --as-needed. I have removed that from DEPEND.