summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Peterson <lavajoe@gentoo.org>2008-05-06 22:31:25 +0000
committerJoe Peterson <lavajoe@gentoo.org>2008-05-06 22:31:25 +0000
commit991a3dc9431153bb2c602275ee91c18d66f0e155 (patch)
tree24a091594f1317584ceeca1b455f36689763cd17 /media-gfx/xv
parentadd new fix for libtool-2.2.4, thanks to Panagiotis Christopoulos <pxrist@gma... (diff)
downloadhistorical-991a3dc9431153bb2c602275ee91c18d66f0e155.tar.gz
historical-991a3dc9431153bb2c602275ee91c18d66f0e155.tar.bz2
historical-991a3dc9431153bb2c602275ee91c18d66f0e155.zip
Fix -wait option (bug #149270)
Package-Manager: portage-2.1.4.4
Diffstat (limited to 'media-gfx/xv')
-rw-r--r--media-gfx/xv/ChangeLog10
-rw-r--r--media-gfx/xv/Manifest4
-rw-r--r--media-gfx/xv/files/xv-3.10a-fix-wait-20070520.patch40
-rw-r--r--media-gfx/xv/xv-3.10a-r15.ebuild94
4 files changed, 145 insertions, 3 deletions
diff --git a/media-gfx/xv/ChangeLog b/media-gfx/xv/ChangeLog
index 3efcd30f5de7..2c08b1f316fe 100644
--- a/media-gfx/xv/ChangeLog
+++ b/media-gfx/xv/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for media-gfx/xv
-# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/xv/ChangeLog,v 1.89 2007/11/09 22:32:58 grobian Exp $
+# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/xv/ChangeLog,v 1.90 2008/05/06 22:31:25 lavajoe Exp $
+
+*xv-3.10a-r15 (06 May 2008)
+
+ 06 May 2008; Joe Peterson <lavajoe@gentoo.org>
+ +files/xv-3.10a-fix-wait-20070520.patch, +xv-3.10a-r15.ebuild:
+ Fix -wait option (bug #149270)
09 Nov 2007; Fabian Groffen <grobian@gentoo.org> xv-3.10a-r12.ebuild,
xv-3.10a-r14.ebuild:
diff --git a/media-gfx/xv/Manifest b/media-gfx/xv/Manifest
index 0a64ddf6ae36..37ad7f882bb7 100644
--- a/media-gfx/xv/Manifest
+++ b/media-gfx/xv/Manifest
@@ -1,6 +1,7 @@
AUX jumbo-patch-nojpeg.diff 469 RMD160 e6adbb74283c0229dd3520e5fbb990d6a6260745 SHA1 996613ef21cba8a0ae66215cd69c99fc94dac205 SHA256 878f157764984d34e97c0902a279f1b17f6e1839ecb4244019a6048c5fdadc72
AUX xv-3.10a-bmpfix.patch 3450 RMD160 abc65d3704df17b4cddd144bfd13348198d408b0 SHA1 9148c4aab1ed529244dca0676ee70de6c0d2580e SHA256 3722f6322356b31add075922794631f46f297f649cf7cf620e7f7b3ce5d6a73c
AUX xv-3.10a-disable-jp2k-20070520.patch 589 RMD160 9c5ba21c35aac25ad06a2f3e2428ba9a8258c5ca SHA1 3e437c27016b0846d42f04ea0a17499af5374b05 SHA256 477c9e3684960e661679cbe0cce69218dfb9dccc006ff5bfe80eefb8e80d6ed2
+AUX xv-3.10a-fix-wait-20070520.patch 1664 RMD160 7d65d1ce5310ca7890ab426f41ce0bcf86f5dabc SHA1 4a7eb17085cca76702ac120ba021a46a5175a657 SHA256 840d8e0397367360004e23a26e27fa6074318bb20fc7ffcc575884369f66cece
AUX xv-3.10a-makefile-osx.patch 538 RMD160 4beeb0060d7825710011926305ae1682e727133f SHA1 1cad533310a815ca13e78f3c848d3c30461175ba SHA256 4ed3e9ce901410626934d6f2c93a5d884b7ff1025ec55babc09c0fdbbbd62d1c
AUX xv-3.10a-osx-bsd-20070520.patch 1479 RMD160 27f6e665e4a6dad409d90b64eba5416d17fe60e9 SHA1 96fd3efc7c6ced3374aa4de15dbe983ab475fcb4 SHA256 fc801f9f3e4ebfc6f59f62e4dc15404b65654f1b46d1141794b249270d941114
AUX xv-3.10a-osx-bsd.patch 1765 RMD160 99e517747bba0f80f62a82fb2bf15ce576951035 SHA1 f098d963de07b9b390392479ca688876983bf1bd SHA256 887188099d676a742f9798edcebb0e809f629195c76651b9112ab768f128cc03
@@ -18,5 +19,6 @@ AUX xv-use-getcwd.patch 222 RMD160 75b09ec334e8f7f5050827dabf05fe0f1b28b3d9 SHA1
DIST xv-3.10a-jumbo-patches-20070520.tar.gz 1363802 RMD160 23bc07030416ebaca5ce4d223921e33094c37b93 SHA1 d00308c1687d9d803d26ef40c73d19a0f593c626 SHA256 221ec89fdf0772bd09c845cbb337aecf411a1aee215140b676717f49e9e65c80
DIST xv-3.10a.tar.gz 2259124 RMD160 7d545e0c0e5b0120a7d026ea549cba19a53fbc0d SHA1 9e6372f154be9e9e355972cbeb91d98d9c342474 SHA256 03eb26b1e8f315c3093f4ae794862ba46637d16c055e8efbe5e3beb5d40fc451
EBUILD xv-3.10a-r14.ebuild 2347 RMD160 9ad0b1124c7be0fcd06cfaffd83d02e455b800d5 SHA1 1adfbaf0cda0262a10bd1494a2f79447828f7998 SHA256 611c503b3000a54e2980dc62b019b4cc8f29233d7fa6fe09fec85b56afec4e54
-MISC ChangeLog 13140 RMD160 6ed692a9981ebad96efea364f9a91061fb7f2aac SHA1 011a24c0c817521bafb51300f24774aa9a301c3c SHA256 1e149a5b8b3bafa6ff108a269f282a48a03684b122f84208e5ac963a737d5a6b
+EBUILD xv-3.10a-r15.ebuild 2472 RMD160 6c8594a2d97d17cb0b1c3eea1882d62873eae407 SHA1 fbf2e88f5db13a07717e920b05ee1f36fe520f81 SHA256 54d884d404c29943446794b7af79bcc686f01e34781a552b1e44a88cf7cf0cd0
+MISC ChangeLog 13317 RMD160 087eb2037d2e41d56b56791ee45ca0a59c106260 SHA1 4389d59a4e408e60042fe7c141c458342e58ee1f SHA256 05057a7c50a33807d6b48255964d3d2fb23fa99806ac6fb68befb2295eba9ac2
MISC metadata.xml 223 RMD160 0c9c59654305e8789fe6c93fd07c561cfe003f54 SHA1 7904e6fb45104baf2cb67fb9886c633af4dc7056 SHA256 a24b49fe5448d4cb329acf1d8113ac30eb1d61d63a7319b66c077d3f1775d055
diff --git a/media-gfx/xv/files/xv-3.10a-fix-wait-20070520.patch b/media-gfx/xv/files/xv-3.10a-fix-wait-20070520.patch
new file mode 100644
index 000000000000..ec093ab309c9
--- /dev/null
+++ b/media-gfx/xv/files/xv-3.10a-fix-wait-20070520.patch
@@ -0,0 +1,40 @@
+diff -Nur xv-3.10a_old/xvevent.c xv-3.10a/xvevent.c
+--- xv-3.10a_old/xvevent.c 2008-05-06 12:44:41.000000000 -0600
++++ xv-3.10a/xvevent.c 2008-05-06 15:55:59.000000000 -0600
+@@ -82,7 +82,7 @@
+ int retval,done,waiting;
+ #ifdef USE_TICKS
+ clock_t waitsec_ticks=0L, orgtime_ticks=0L, curtime_ticks;
+- clock_t elapsed_ticks=0L, remaining_interval;
++ clock_t elapsed_ticks=0L, remaining_interval, clock_ticks_per_sec;
+ #else
+ time_t orgtime=0L, curtime;
+ #endif
+@@ -126,7 +126,8 @@
+ all pending events (ie, drawing the image the first time)
+ have been dealt with: START WAITING */
+ #ifdef USE_TICKS
+- waitsec_ticks = (clock_t)(waitsec * CLK_TCK);
++ clock_ticks_per_sec = sysconf(_SC_CLK_TCK);
++ waitsec_ticks = (clock_t)(waitsec * clock_ticks_per_sec);
+ orgtime_ticks = times(NULL); /* unclear if NULL valid, but OK on Linux */
+ #else
+ orgtime = time(NULL);
+@@ -168,11 +169,14 @@
+ } else
+ elapsed_ticks = curtime_ticks - orgtime_ticks;
+ remaining_interval = waitsec_ticks - elapsed_ticks;
+- if (remaining_interval >= (clock_t)(1 * CLK_TCK))
++ if (remaining_interval > clock_ticks_per_sec)
+ sleep(1);
+ else {
+- /* less than one second remaining: do delay in msec, then return */
+- Timer((remaining_interval * 1000L) / CLK_TCK); /* can't overflow */
++ if (remaining_interval > 0) {
++ /* less than one second remaining: do delay in msec, then return */
++ Timer((remaining_interval * 1000L) / clock_ticks_per_sec); /* can't overflow */
++ }
++
+ return waitloop? NEXTLOOP : NEXTQUIT;
+ }
+ #else
diff --git a/media-gfx/xv/xv-3.10a-r15.ebuild b/media-gfx/xv/xv-3.10a-r15.ebuild
new file mode 100644
index 000000000000..ed9face8d3ac
--- /dev/null
+++ b/media-gfx/xv/xv-3.10a-r15.ebuild
@@ -0,0 +1,94 @@
+# 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.1 2008/05/06 22:31:25 lavajoe Exp $
+
+inherit flag-o-matic eutils toolchain-funcs
+
+JUMBOV=20070520
+DESCRIPTION="An interactive image manipulation program for X, supporting 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"
+
+LICENSE="xv"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="jpeg tiff png"
+
+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}
+ cd "${S}"
+
+ # Apply the jumbo patch
+ epatch "${WORKDIR}/${P}"-jumbo-fix-enh-patch-${JUMBOV}.txt
+
+ # OSX and BSD xv.h define patches
+ epatch "${FILESDIR}/${P}"-osx-bsd-${JUMBOV}.patch
+
+ # OSX malloc patch
+ epatch "${FILESDIR}/${P}"-vdcomp-osx-${JUMBOV}.patch
+
+ # Disable JP2K (i.e. use system JPEG libs)
+ epatch "${FILESDIR}/${P}"-disable-jp2k-${JUMBOV}.patch
+
+ # 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
+
+ # /usr/bin/gzip => /bin/gzip
+ sed -i -e 's#/usr\(/bin/gzip\)#\1#g' config.h
+
+ # 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/${P}" \
+ 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
+
+ dodoc CHANGELOG BUGS IDEAS
+}