diff options
author | Joe Peterson <lavajoe@gentoo.org> | 2008-05-06 22:31:25 +0000 |
---|---|---|
committer | Joe Peterson <lavajoe@gentoo.org> | 2008-05-06 22:31:25 +0000 |
commit | d369ba54d6619490de7d24c57ff1f31e8c60bdf4 (patch) | |
tree | c068fa5d2d5c70902352605be5034f4c9b857aae /media-gfx | |
parent | add new fix for libtool-2.2.4, thanks to Panagiotis Christopoulos <pxrist@gma... (diff) | |
download | gentoo-2-d369ba54d6619490de7d24c57ff1f31e8c60bdf4.tar.gz gentoo-2-d369ba54d6619490de7d24c57ff1f31e8c60bdf4.tar.bz2 gentoo-2-d369ba54d6619490de7d24c57ff1f31e8c60bdf4.zip |
Fix -wait option (bug #149270)
(Portage version: 2.1.4.4)
Diffstat (limited to 'media-gfx')
-rw-r--r-- | media-gfx/xv/ChangeLog | 10 | ||||
-rw-r--r-- | media-gfx/xv/files/xv-3.10a-fix-wait-20070520.patch | 40 | ||||
-rw-r--r-- | media-gfx/xv/xv-3.10a-r15.ebuild | 94 |
3 files changed, 142 insertions, 2 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/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 +} |