diff options
Diffstat (limited to 'graphics/xli')
-rw-r--r-- | graphics/xli/README | 12 | ||||
-rw-r--r-- | graphics/xli/patch-ac | 22 | ||||
-rw-r--r-- | graphics/xli/patch-ad | 15 | ||||
-rw-r--r-- | graphics/xli/patch-ae | 16 | ||||
-rw-r--r-- | graphics/xli/patch-af | 40 | ||||
-rw-r--r-- | graphics/xli/patch-ag | 13 | ||||
-rw-r--r-- | graphics/xli/patch-ah | 13 | ||||
-rw-r--r-- | graphics/xli/slack-desc | 19 | ||||
-rw-r--r-- | graphics/xli/xli.SlackBuild | 95 | ||||
-rw-r--r-- | graphics/xli/xli.info | 10 |
10 files changed, 255 insertions, 0 deletions
diff --git a/graphics/xli/README b/graphics/xli/README new file mode 100644 index 0000000000..6182b19ecc --- /dev/null +++ b/graphics/xli/README @@ -0,0 +1,12 @@ +This utility will view several types of images under X11, or load +images onto the X11 root window. Supported image formats include +GIF, JPEG, JFIF, Faces, PNG, PPM and friends, XPM, and XWUD. + +A variety of options are available to modify images prior to viewing. +These options include clipping, dithering, depth reduction, zoom +(either X or Y axis independently or both at once), brightening or +darkening, input gamma correction, and image merging. When applicable, +these options are done automatically (eg. a color image to be displayed +on a monochrome screen will be dithered automatically). A utility (xlito) +is provided that allows these viewing options to be appended to the image +files. diff --git a/graphics/xli/patch-ac b/graphics/xli/patch-ac new file mode 100644 index 0000000000..60d8da122f --- /dev/null +++ b/graphics/xli/patch-ac @@ -0,0 +1,22 @@ +$NetBSD: patch-ac,v 1.3 2005/03/21 15:19:28 salo Exp $ + +--- faces.c.orig 2005-02-28 01:42:39.000000000 +0100 ++++ faces.c 2005-03-21 16:08:17.000000000 +0100 +@@ -54,9 +54,15 @@ + if (! strcmp(buf, "\n")) + break; + if (!strncmp(buf, "FirstName:", 10)) +- strcpy(fname, buf + 11); ++ { ++ strncpy(fname, buf + 11, BUFSIZ - 1); ++ fname[BUFSIZ - 1] = '\0'; ++ } + else if (!strncmp(buf, "LastName:", 9)) +- strcpy(lname, buf + 10); ++ { ++ strncpy(lname, buf + 10, BUFSIZ - 1); ++ lname[BUFSIZ - 1] = '\0'; ++ } + else if (!strncmp(buf, "Image:", 6)) { + if (sscanf(buf + 7, "%d%d%d", &iw, &ih, &id) != 3) { + fprintf(stderr,"facesLoad: %s - Bad image\n", name); diff --git a/graphics/xli/patch-ad b/graphics/xli/patch-ad new file mode 100644 index 0000000000..571f48b3e5 --- /dev/null +++ b/graphics/xli/patch-ad @@ -0,0 +1,15 @@ +$NetBSD: patch-ad,v 1.2 2005/10/23 20:02:57 rillig Exp $ + +--- png.c.orig 2005-02-28 00:42:39.000000000 +0000 ++++ png.c 2005-09-18 04:22:14.076313248 +0000 +@@ -3,6 +3,10 @@ + * Glenn Randers-Pehrson et al. Any bugs are my fault. -- smar@reptiles.org + */ + ++#if defined(linux) ++/* hack from gentoo to avoid a parse error on GLIBC /usr/include/string.h */ ++#undef _BSD_SOURCE ++#endif + #include "xli.h" + #include "imagetypes.h" + #include "pbm.h" diff --git a/graphics/xli/patch-ae b/graphics/xli/patch-ae new file mode 100644 index 0000000000..78be8b3115 --- /dev/null +++ b/graphics/xli/patch-ae @@ -0,0 +1,16 @@ +$NetBSD: patch-ae,v 1.1 2005/10/30 17:58:58 salo Exp $ + +Security fix for CVE-2005-3178, from Debian. + +--- reduce.c.orig 1999-10-25 04:15:02.000000000 +0200 ++++ reduce.c 2005-10-30 18:49:53.000000000 +0100 +@@ -178,7 +178,8 @@ + /* get destination image */ + depth = colorsToDepth(OutColors); + new_image = newRGBImage(image->width, image->height, depth); +- sprintf(buf, "%s (%d colors)", image->title, OutColors); ++ snprintf(buf, BUFSIZ, "%s (%d colors)", image->title, OutColors); ++ buf[BUFSIZ-1] = '\0'; + new_image->title = dupString(buf); + new_image->gamma = image->gamma; + diff --git a/graphics/xli/patch-af b/graphics/xli/patch-af new file mode 100644 index 0000000000..7e4565ee9b --- /dev/null +++ b/graphics/xli/patch-af @@ -0,0 +1,40 @@ +$NetBSD: patch-af,v 1.1 2005/10/30 17:58:58 salo Exp $ + +Security fix for CVE-2005-3178, from Debian. + +--- zoom.c.orig 2005-02-28 01:42:39.000000000 +0100 ++++ zoom.c 2005-10-30 18:50:04.000000000 +0100 +@@ -52,28 +52,29 @@ + if (verbose) + printf(" Zooming image Y axis by %d%%...", yzoom); + if (changetitle) +- sprintf(buf, "%s (Y zoom %d%%)", oimage->title, yzoom); ++ snprintf(buf, BUFSIZ, "%s (Y zoom %d%%)", oimage->title, yzoom); + } + else if (!yzoom) { + if (verbose) + printf(" Zooming image X axis by %d%%...", xzoom); + if (changetitle) +- sprintf(buf, "%s (X zoom %d%%)", oimage->title, xzoom); ++ snprintf(buf, BUFSIZ, "%s (X zoom %d%%)", oimage->title, xzoom); + } + else if (xzoom == yzoom) { + if (verbose) + printf(" Zooming image by %d%%...", xzoom); + if (changetitle) +- sprintf(buf, "%s (%d%% zoom)", oimage->title, xzoom); ++ snprintf(buf, BUFSIZ, "%s (%d%% zoom)", oimage->title, xzoom); + } + else { + if (verbose) + printf(" Zooming image X axis by %d%% and Y axis by %d%%...", + xzoom, yzoom); + if (changetitle) +- sprintf(buf, "%s (X zoom %d%% Y zoom %d%%)", oimage->title, ++ snprintf(buf, BUFSIZ, "%s (X zoom %d%% Y zoom %d%%)", oimage->title, + xzoom, yzoom); + } ++ buf[BUFSIZ-1] = '\0'; + if (!changetitle) + strcpy(buf,oimage->title); + diff --git a/graphics/xli/patch-ag b/graphics/xli/patch-ag new file mode 100644 index 0000000000..7c0db75567 --- /dev/null +++ b/graphics/xli/patch-ag @@ -0,0 +1,13 @@ +$NetBSD: patch-ag,v 1.1 2006/01/12 00:48:36 joerg Exp $ + +--- imagetypes.c.orig 2006-01-12 00:41:30.000000000 +0000 ++++ imagetypes.c +@@ -13,8 +13,6 @@ + #include "imagetypes.h" + #include <errno.h> + +-extern int errno; +- + /* some of these are order-dependent */ + + static struct { diff --git a/graphics/xli/patch-ah b/graphics/xli/patch-ah new file mode 100644 index 0000000000..408fcae66b --- /dev/null +++ b/graphics/xli/patch-ah @@ -0,0 +1,13 @@ +$NetBSD: patch-ah,v 1.1 2006/01/12 00:48:36 joerg Exp $ + +--- path.c.orig 2006-01-12 00:44:46.000000000 +0000 ++++ path.c +@@ -18,8 +18,6 @@ + #endif + #include <errno.h> + +-extern int errno; +- + static unsigned int NumPaths = 0; + static unsigned int NumExts = 0; + static char *Paths[BUFSIZ]; diff --git a/graphics/xli/slack-desc b/graphics/xli/slack-desc new file mode 100644 index 0000000000..90971c14c5 --- /dev/null +++ b/graphics/xli/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +xli: xli (X11 Image Loading Utility) +xli: +xli: This utility will view several types of images under X11, or load +xli: images onto the X11 root window. Supported image formats include +xli: GIF, JPEG, JFIF, Faces, PNG, PPM and friends, XPM, and XWUD. +xli: +xli: A variety of options are available to modify images prior to viewing. +xli: These options include clipping, dithering, depth reduction, zoom +xli: (either X or Y axis independently or both at once), brightening or +xli: darkening, input gamma correction, and image merging. +xli: diff --git a/graphics/xli/xli.SlackBuild b/graphics/xli/xli.SlackBuild new file mode 100644 index 0000000000..a4f1aa399b --- /dev/null +++ b/graphics/xli/xli.SlackBuild @@ -0,0 +1,95 @@ +#!/bin/sh + +# Slackware build script for xli + +# Copyright 2014 Leonard Schmidt <lems@gmx.net> +# All rights reserved. +# +# Permission to use, copy, modify, and distribute this software for any purpose +# with or without fee is hereby granted, provided that the above copyright +# notice and this permission notice appear in all copies. +# +# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, +# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +# FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# AUTHORS AND COPYRIGHT HOLDERS AND THEIR CONTRIBUTORS BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=xli +VERSION=${VERSION:-1.17} +SRCVER=${SRCVER:-2005-02-27} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$SRCVER +tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz +cd $PRGNAM-$SRCVER +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +# These patches are from NetBSD's pkgsrc: +# <http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/graphics/xli/patches/?only_with_tag=MAIN> +for i in c d e f g h; do + patch -p0 < $CWD/patch-a${i} +done + +xmkmf -a +make CDEBUGFLAGS="$SLKCFLAGS" +make install install.man DESTDIR=$PKG + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a ABOUTGAMMA CHANGES README README.xloadimage TODO $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/graphics/xli/xli.info b/graphics/xli/xli.info new file mode 100644 index 0000000000..d7bd0f8219 --- /dev/null +++ b/graphics/xli/xli.info @@ -0,0 +1,10 @@ +PRGNAM="xli" +VERSION="1.17" +HOMEPAGE="http://pantransit.reptiles.org/prog/xli" +DOWNLOAD="ftp://ftp.NetBSD.org/pub/pkgsrc/distfiles/xli-2005-02-27.tar.gz" +MD5SUM="db470da53500017fd6969457c12c98f7" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Leonard Schmidt" +EMAIL="lems@gmx.net" |