diff options
Diffstat (limited to 'media-gfx/xli')
-rw-r--r-- | media-gfx/xli/ChangeLog | 15 | ||||
-rw-r--r-- | media-gfx/xli/files/xli-1.17.0-fix-scale-zoom.patch | 61 | ||||
-rw-r--r-- | media-gfx/xli/xli-1.17.0-r4.ebuild | 74 |
3 files changed, 148 insertions, 2 deletions
diff --git a/media-gfx/xli/ChangeLog b/media-gfx/xli/ChangeLog index 68ba7d502398..ec4edbb154fa 100644 --- a/media-gfx/xli/ChangeLog +++ b/media-gfx/xli/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for media-gfx/xli -# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-gfx/xli/ChangeLog,v 1.42 2008/04/21 17:34:38 phreak Exp $ +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-gfx/xli/ChangeLog,v 1.43 2009/09/05 22:11:45 robbat2 Exp $ + + 05 Sep 2009; Robin H. Johnson <robbat2@gentoo.org> +xli-1.17.0-r4.ebuild, + +files/xli-1.17.0-fix-scale-zoom.patch: + Fix bug 282979: Broken -zoom in jpeg-7, so that we can stop restricting + the jpeg-6 version. + +*xli-1.17.0-r4 (05 Sep 2009) + + 05 Sep 2009; Robin H. Johnson <robbat2@gentoo.org> +xli-1.17.0-r4.ebuild: + Xli works fine with media-libs/jpeg-7, revbump to remove it from being a + blocker on anybodies systems for the upgrade. 21 Apr 2008; Christian Heim <phreak@gentoo.org> metadata.xml: Fix up metadata.xml. If there's no maintainer for the package, the metadata diff --git a/media-gfx/xli/files/xli-1.17.0-fix-scale-zoom.patch b/media-gfx/xli/files/xli-1.17.0-fix-scale-zoom.patch new file mode 100644 index 000000000000..44ee262aee25 --- /dev/null +++ b/media-gfx/xli/files/xli-1.17.0-fix-scale-zoom.patch @@ -0,0 +1,61 @@ +As of jpeg-7, the scale coefficents may be set to non-unitary values by the +initial DCT transform. This caused the original already-scale detection +algorithm in xli to break. + +To avoid this, set the already-scaled marker when we adjust the scale fraction +(that gets passed into the DCT). + +Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> + +diff -Nuar -X x xli-2005-02-27.orig/jpeg.c xli-2005-02-27/jpeg.c +--- xli-2005-02-27.orig/jpeg.c 2005-02-27 16:42:39.000000000 -0800 ++++ xli-2005-02-27/jpeg.c 2009-09-05 15:02:12.462635389 -0700 +@@ -211,7 +211,7 @@ + xli_jpg_err jerr; + Image *image = 0; + byte **rows = 0; +- int i, rowbytes; ++ int i, rowbytes, flags; + + CURRFUNC("jpegLoad"); + zfp = zopen(fullname); +@@ -248,9 +248,13 @@ + if (verbose) + describe_jpeg(&cinfo, fullname); + ++ flags = 0; + if (image_ops->iscale > 0 && image_ops->iscale < 4) { +- cinfo.scale_num = 1; +- cinfo.scale_denom = 1 << image_ops->iscale; ++ flags |= FLAG_ISCALE; ++ //cinfo.scale_num = 1; ++ cinfo.scale_denom *= 1 << image_ops->iscale; ++ if (verbose) ++ printf("scaling to %d/%d\n", cinfo.scale_num, cinfo.scale_denom); + } else if (image_ops->iscale_auto) { + image_ops->iscale = 0; + while (image_ops->iscale < 3 && (cinfo.image_width >> +@@ -258,9 +262,11 @@ + cinfo.image_height >> image_ops->iscale > + globals.dinfo.height * .9)) + image_ops->iscale += 1; +- cinfo.scale_denom = 1 << image_ops->iscale; ++ cinfo.scale_denom *= 1 << image_ops->iscale; ++ if(image_ops->iscale > 0) ++ flags |= FLAG_ISCALE; + if (verbose) +- printf("auto-scaling to 1/%d\n", cinfo.scale_denom); ++ printf("auto-scaling to %d/%d\n", cinfo.scale_num, cinfo.scale_denom); + } + znocache(zfp); + +@@ -288,8 +294,7 @@ + } + + image->gamma = RETURN_GAMMA; +- if (cinfo.scale_denom > 1) +- image->flags |= FLAG_ISCALE; ++ image->flags |= flags; + + rowbytes = cinfo.output_width * cinfo.output_components; + assert(image->pixlen * image->width == rowbytes); diff --git a/media-gfx/xli/xli-1.17.0-r4.ebuild b/media-gfx/xli/xli-1.17.0-r4.ebuild new file mode 100644 index 000000000000..0083186abb81 --- /dev/null +++ b/media-gfx/xli/xli-1.17.0-r4.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-gfx/xli/xli-1.17.0-r4.ebuild,v 1.1 2009/09/05 22:11:45 robbat2 Exp $ + +inherit eutils + +SNAPSHOT="2005-02-27" +DESCRIPTION="X Load Image: view images or load them to root window" +HOMEPAGE="http://pantransit.reptiles.org/prog/" +SRC_URI="http://pantransit.reptiles.org/prog/xli/xli-${SNAPSHOT}.tar.gz" + +LICENSE="X11" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="" + +RDEPEND="x11-libs/libXext + >=sys-libs/zlib-1.1.4 + >=media-libs/libpng-1.0.5 + >=media-libs/jpeg-6b + app-arch/bzip2" +DEPEND="${RDEPEND} + x11-proto/xextproto + x11-misc/imake + app-text/rman + !media-gfx/xloadimage + !<media-gfx/xli-1.17.0-r3" + +S=${WORKDIR}/${PN}-${SNAPSHOT} + +src_unpack() { + unpack ${A} + cd "${S}" + + sed -i Imakefile \ + -e '/^DEFINES =/s/$/ -DHAVE_GUNZIP -DHAVE_BUNZIP2 /' \ + -e '/CCOPTIONS =/s/=.*/=/' + + # This is a hack to avoid a parse error on /usr/include/string.h + # when _BSD_SOURCE is defined. This may be a bug in that header. + sed -i png.c \ + -e '/^#include "xli.h"/i#undef _BSD_SOURCE' + + # This hack will allow xli to compile using gcc-3.3 + sed -i rlelib.c \ + -e 's/#include <varargs.h>//' + + # fix potential security issues. + EPATCH_OPTS="-F3 -l" epatch "${FILESDIR}"/xli-security-gentoo.diff + + # Fix scale per bug 282979 + epatch "${FILESDIR}"/${P}-fix-scale-zoom.patch +} + +src_compile() { + xmkmf || die + emake CDEBUGFLAGS="${CFLAGS}" || die +} + +src_install() { + dobin xli xlito || die + + dosym xli /usr/bin/xsetbg || die + dosym xli /usr/bin/xview || die + + dodoc README README.xloadimage ABOUTGAMMA TODO chkgamma.jpg + newman xli.man xli.1 + newman xliguide.man xliguide.1 + newman xlito.man xlito.1 + + insinto /etc/X11/app-defaults + newins "${FILESDIR}"/Xli.ad Xli + fperms a+r /etc/X11/app-defaults/Xli +} |