summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Peterson <lavajoe@gentoo.org>2008-06-16 15:21:31 +0000
committerJoe Peterson <lavajoe@gentoo.org>2008-06-16 15:21:31 +0000
commitd0f2677df708d1a59b4390a546bbba49ad951afc (patch)
treef9d48c6049fbd99e85e1a08fe873d521dd64f5a9 /media-gfx/xv
parentAdded more gcc-4.3 love to the mathcore, thanks to Derek Dolney, bug #226013 (diff)
downloadgentoo-2-d0f2677df708d1a59b4390a546bbba49ad951afc.tar.gz
gentoo-2-d0f2677df708d1a59b4390a546bbba49ad951afc.tar.bz2
gentoo-2-d0f2677df708d1a59b4390a546bbba49ad951afc.zip
Fix linking (bug #226897) - no rev bump
(Portage version: 2.1.4.4)
Diffstat (limited to 'media-gfx/xv')
-rw-r--r--media-gfx/xv/ChangeLog6
-rw-r--r--media-gfx/xv/files/xv-3.10a-add-ldflags-20070520.patch27
-rw-r--r--media-gfx/xv/xv-3.10a-r15.ebuild73
3 files changed, 65 insertions, 41 deletions
diff --git a/media-gfx/xv/ChangeLog b/media-gfx/xv/ChangeLog
index cb8b68e31541..b23a94141666 100644
--- a/media-gfx/xv/ChangeLog
+++ b/media-gfx/xv/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for media-gfx/xv
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/xv/ChangeLog,v 1.97 2008/06/07 19:53:02 lavajoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/xv/ChangeLog,v 1.98 2008/06/16 15:21:30 lavajoe Exp $
+
+ 16 Jun 2008; Joe Peterson <lavajoe@gentoo.org>
+ +files/xv-3.10a-add-ldflags-20070520.patch, xv-3.10a-r15.ebuild:
+ Fix linking (bug #226897) - no rev bump
07 Jun 2008; Joe Peterson <lavajoe@gentoo.org> -xv-3.10a-r14.ebuild:
Remove old
diff --git a/media-gfx/xv/files/xv-3.10a-add-ldflags-20070520.patch b/media-gfx/xv/files/xv-3.10a-add-ldflags-20070520.patch
new file mode 100644
index 000000000000..da53ccb8bd6b
--- /dev/null
+++ b/media-gfx/xv/files/xv-3.10a-add-ldflags-20070520.patch
@@ -0,0 +1,27 @@
+--- xv-3.10a/Makefile.orig 2008-06-16 08:32:39.000000000 -0600
++++ xv-3.10a/Makefile 2008-06-16 08:49:19.000000000 -0600
+@@ -369,19 +369,19 @@
+
+ #xv: $(OBJS) $(JPEGLIB) $(TIFFLIB)
+ xv: $(OBJS)
+- $(CC) -o xv $(CFLAGS) $(OBJS) $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o xv $(OBJS) $(LIBS)
+
+ bggen: bggen.c
+- $(CC) $(CFLAGS) -o bggen bggen.c $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o bggen bggen.c $(LIBS)
+
+ vdcomp: vdcomp.c
+- $(CC) $(CFLAGS) -o vdcomp vdcomp.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o vdcomp vdcomp.c
+
+ xcmap: xcmap.c
+- $(CC) $(CFLAGS) -o xcmap xcmap.c $(LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o xcmap xcmap.c $(LIBS)
+
+ xvpictoppm: xvpictoppm.c
+- $(CC) $(CFLAGS) -o xvpictoppm xvpictoppm.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o xvpictoppm xvpictoppm.c
+
+
+
diff --git a/media-gfx/xv/xv-3.10a-r15.ebuild b/media-gfx/xv/xv-3.10a-r15.ebuild
index bec1fa2e0e18..d3d6409b1299 100644
--- a/media-gfx/xv/xv-3.10a-r15.ebuild
+++ b/media-gfx/xv/xv-3.10a-r15.ebuild
@@ -1,11 +1,11 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/xv/xv-3.10a-r15.ebuild,v 1.8 2008/06/07 19:45:37 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/xv/xv-3.10a-r15.ebuild,v 1.9 2008/06/16 15:21:30 lavajoe Exp $
-inherit flag-o-matic eutils toolchain-funcs
+inherit eutils flag-o-matic
JUMBOV=20070520
-DESCRIPTION="An interactive image manipulation program for X, supporting a wide variety of image formats"
+DESCRIPTION="An interactive image manipulation program that supports a wide variety of image formats"
HOMEPAGE="http://www.trilon.com/xv/index.html http://www.sonic.net/~roelofs/greg_xv.html"
SRC_URI="mirror://sourceforge/png-mng/${P}-jumbo-patches-${JUMBOV}.tar.gz ftp://ftp.cis.upenn.edu/pub/xv/${P}.tar.gz"
@@ -18,7 +18,6 @@ DEPEND="x11-libs/libXt
jpeg? ( >=media-libs/jpeg-6b )
tiff? ( >=media-libs/tiff-3.6.1-r2 )
png? ( >=media-libs/libpng-1.2 >=sys-libs/zlib-1.1.4 )"
-RDEPEND=${DEPEND}
src_unpack() {
unpack ${A}
@@ -39,56 +38,50 @@ src_unpack() {
# Fix -wait option (do not rely on obsolete CLK_TCK)
epatch "${FILESDIR}/${P}"-fix-wait-${JUMBOV}.patch
- sed -i -e 's/\(^JPEG.*\)/#\1/g' \
- -e 's/\(^PNG.*\)/#\1/g' \
- -e 's/\(^TIFF.*\)/#\1/g' \
- -e 's/\(^LIBS = .*\)/\1 $(LDFLAGS) /g' Makefile
+ # Use LDFLAGS on link lines
+ epatch "${FILESDIR}/${P}"-add-ldflags-${JUMBOV}.patch
+
+ # Link with various image libraries depending on use flags
+ IMAGE_LIBS=""
+ use jpeg && IMAGE_LIBS="${IMAGE_LIBS} -ljpeg"
+ use png && IMAGE_LIBS="${IMAGE_LIBS} -lz -lpng"
+ use tiff && IMAGE_LIBS="${IMAGE_LIBS} -ltiff"
+
+ sed -i \
+ -e 's/\(^JPEG.*\)/#\1/g' \
+ -e 's/\(^PNG.*\)/#\1/g' \
+ -e 's/\(^TIFF.*\)/#\1/g' \
+ -e "s/\(^LIBS = .*\)/\1${IMAGE_LIBS}/g" Makefile
# /usr/bin/gzip => /bin/gzip
- sed -i -e 's#/usr\(/bin/gzip\)#\1#g' config.h
+ sed -i -e 's#/usr\(/bin/gzip\)#\1#g' config.h
- # fix installation of ps docs.
+ # Fix installation of ps docs
sed -i -e 's#$(DESTDIR)$(LIBDIR)#$(LIBDIR)#g' Makefile
}
src_compile() {
append-flags -DUSE_GETCWD -DLINUX -DUSLEEP
-
- einfo "Enabling Optional Features..."
- if use jpeg; then
- ebegin " jpeg"
- append-flags -DDOJPEG
- append-ldflags -ljpeg
- eend
- fi
- if use png; then
- ebegin " png"
- append-flags -DDOPNG
- append-ldflags -lz -lpng
- eend
- fi
- if use tiff; then
- ebegin " tiff"
- append-flags -DDOTIFF -DUSE_TILED_TIFF_BOTLEFT_FIX
- append-ldflags -ltiff
- eend
- fi
- einfo "done."
-
- emake CC="$(tc-getCC)" CCOPTS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \
- PREFIX=/usr \
- DOCDIR=/usr/share/doc/${PF} \
- LIBDIR="${T}" || die
+ use jpeg && append-flags -DDOJPEG
+ use png && append-flags -DDOPNG
+ use tiff && append-flags -DDOTIFF -DUSE_TILED_TIFF_BOTLEFT_FIX
+
+ emake \
+ CC="$(tc-getCC)" CCOPTS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \
+ PREFIX=/usr \
+ DOCDIR=/usr/share/doc/${PF} \
+ LIBDIR="${T}" || die
}
src_install() {
dodir /usr/bin
dodir /usr/share/man/man1
- emake DESTDIR="${D}" \
- PREFIX=/usr \
- DOCDIR=/usr/share/doc/${PF} \
- LIBDIR="${T}" install || die
+ emake \
+ DESTDIR="${D}" \
+ PREFIX=/usr \
+ DOCDIR=/usr/share/doc/${PF} \
+ LIBDIR="${T}" install || die
dodoc CHANGELOG BUGS IDEAS
}