diff options
author | Lockywolf <for_sbo.xloadimage_2023-10-15@lockywolf.net> | 2023-10-19 12:54:43 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-10-19 13:25:56 +0700 |
commit | 1cb0db460d9f44ad40d798f89bcf5fcffe8a3a65 (patch) | |
tree | bb53676a29fe122c911617c84bae3f642bbb0d61 /graphics | |
parent | 857fb2fd94ced2b9f44e8f4176d8cc2927f48ce0 (diff) |
graphics/xloadimage: Added (Image Viewer).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/xloadimage/README | 5 | ||||
-rw-r--r-- | graphics/xloadimage/enable-image-types.patch | 74 | ||||
-rw-r--r-- | graphics/xloadimage/png15-tiff4.patch | 50 | ||||
-rw-r--r-- | graphics/xloadimage/slack-desc | 19 | ||||
-rw-r--r-- | graphics/xloadimage/xloadimage.SlackBuild | 123 | ||||
-rw-r--r-- | graphics/xloadimage/xloadimage.info | 10 |
6 files changed, 281 insertions, 0 deletions
diff --git a/graphics/xloadimage/README b/graphics/xloadimage/README new file mode 100644 index 0000000000000..f24f7105884b4 --- /dev/null +++ b/graphics/xloadimage/README @@ -0,0 +1,5 @@ +xloadimage is one of the first image viewers for X11. + +It includes xsetbg to set the wallpaper, an xview, which is the same +thing as xloadimage, but with a name which can be confused with +SUN XView windowing system. diff --git a/graphics/xloadimage/enable-image-types.patch b/graphics/xloadimage/enable-image-types.patch new file mode 100644 index 0000000000000..b61e36b8782eb --- /dev/null +++ b/graphics/xloadimage/enable-image-types.patch @@ -0,0 +1,74 @@ +diff -wbBur xloadimage.4.1/imagetypes.h xloadimage.4.1.my/imagetypes.h +--- xloadimage.4.1/imagetypes.h 2011-02-11 11:47:37.000000000 +0000 ++++ xloadimage.4.1.my/imagetypes.h 2011-02-11 16:04:35.000000000 +0000 +@@ -94,15 +94,9 @@ + {niffIdent, niffLoad, niffDump, "niff", "Native Image File Format (NIFF)"}, + {sunRasterIdent, sunRasterLoad, NULL, "sunraster", "Sun Rasterfile"}, + {gifIdent, gifLoad, NULL, "gif", "GIF Image"}, +-#ifdef HAVE_LIBJPEG + {jpegIdent, jpegLoad, jpegDump, "jpeg", "JFIF-style JPEG Image"}, +-#endif +-#ifdef HAVE_LIBTIFF + {tiffIdent, tiffLoad, tiffDump, "tiff", "TIFF image"}, +-#endif +-#ifdef HAVE_LIBPNG + {pngIdent, pngLoad, NULL, "png", "PNG image"}, +-#endif + {fbmIdent, fbmLoad, NULL, "fbm", "FBM Image"}, + {cmuwmIdent, cmuwmLoad, NULL, "cmuraster", "CMU WM Raster"}, + {pbmIdent, pbmLoad, pbmDump, "pbm", "Portable Bit Map (PBM, PGM, PPM)"}, +diff -wbBur xloadimage.4.1/Imakefile xloadimage.4.1.my/Imakefile +--- xloadimage.4.1/Imakefile 2011-02-11 12:05:53.000000000 +0000 ++++ xloadimage.4.1.my/Imakefile 2011-02-11 16:06:21.000000000 +0000 +@@ -40,7 +40,7 @@ + PNG_SRC = png.c + PNG_OBJ = png.o + +- EXTRA_DEFINES = $(TIFF_DEFS) $(JPEG_DEFS) $(PNG_DEFS) ++ EXTRA_DEFINES = $(TIFF_DEFS) $(JPEG_DEFS) $(PNG_DEFS) -DHAVE_LIBJPEG -DHAVE_LIBTIFF -DHAVE_LIBPNG + LOCAL_LIBRARIES = $(TIFF_LIB) $(JPEG_LIB) $(PNG_LIB) $(XLIB) + + SRCS = new.c niff.c value.c zio.c cmuwmraster.c faces.c fbm.c gif.c imagetypes.c img.c mac.c mcidas.c mc_tables.c pbm.c pcx.c pdsuncomp.c rle.c rlelib.c sunraster.c vff.c vicar.c xbitmap.c xpixmap.c xwd.c bright.c clip.c compress.c dither.c fill.c halftone.c merge.c reduce.c rotate.c smooth.c undither.c zoom.c config.c misc.c options.c root.c send.c window.c xloadimage.c $(TIFF_SRC) $(JPEG_SRC) $(PNG_SRC) +diff -wbBur xloadimage.4.1/Makefile xloadimage.4.1.my/Makefile +--- xloadimage.4.1/Makefile 2011-02-11 12:06:16.000000000 +0000 ++++ xloadimage.4.1.my/Makefile 2011-02-11 16:06:24.000000000 +0000 +@@ -2,7 +2,7 @@ + # $Xorg: imake.c,v 1.6 2001/02/09 02:03:15 xorgcvs Exp $ + + # ---------------------------------------------------------------------- +-# Makefile generated from "Imake.tmpl" and </tmp/IIf.yUZBVe> ++# Makefile generated from "Imake.tmpl" and </tmp/IIf.7u155R> + # $Xorg: Imake.tmpl,v 1.4 2000/08/17 19:41:46 cpqbld Exp $ + # $XdotOrg: xc/config/cf/Imake.tmpl,v 1.9 2005/01/24 06:37:31 daniels Exp $ + # +@@ -1063,7 +1063,7 @@ + PNG_SRC = png.c + PNG_OBJ = png.o + +- EXTRA_DEFINES = $(TIFF_DEFS) $(JPEG_DEFS) $(PNG_DEFS) ++ EXTRA_DEFINES = $(TIFF_DEFS) $(JPEG_DEFS) $(PNG_DEFS) -DHAVE_LIBJPEG -DHAVE_LIBTIFF -DHAVE_LIBPNG + LOCAL_LIBRARIES = $(TIFF_LIB) $(JPEG_LIB) $(PNG_LIB) $(XLIB) + + SRCS = new.c niff.c value.c zio.c cmuwmraster.c faces.c fbm.c gif.c imagetypes.c img.c mac.c mcidas.c mc_tables.c pbm.c pcx.c pdsuncomp.c rle.c rlelib.c sunraster.c vff.c vicar.c xbitmap.c xpixmap.c xwd.c bright.c clip.c compress.c dither.c fill.c halftone.c merge.c reduce.c rotate.c smooth.c undither.c zoom.c config.c misc.c options.c root.c send.c window.c xloadimage.c $(TIFF_SRC) $(JPEG_SRC) $(PNG_SRC) +diff -wbBur xloadimage.4.1/png.c xloadimage.4.1.my/png.c +--- xloadimage.4.1/png.c 2011-02-11 11:47:37.000000000 +0000 ++++ xloadimage.4.1.my/png.c 2011-02-11 16:06:50.000000000 +0000 +@@ -18,6 +18,7 @@ + * + */ + ++#define _GETOPT_H + + #include "image.h" /* xloadimage declarations */ + #ifdef HAVE_LIBPNG +diff -wbBur xloadimage.4.1/jpeg.c xloadimage.4.1.my/jpeg.c +--- xloadimage.4.1/jpeg.c 2011-02-11 14:47:37.000000000 +0300 ++++ xloadimage.4.1.my/jpeg.c 2011-11-21 14:32:30.000000000 +0400 +@@ -319,6 +319,7 @@ + if (verbose) + printf(" Using arithmetic coding.\n"); + cinfo->arith_code = TRUE; ++ } + #else + fprintf(stderr, "jpegDump: sorry, arithmetic coding not supported\n"); + } diff --git a/graphics/xloadimage/png15-tiff4.patch b/graphics/xloadimage/png15-tiff4.patch new file mode 100644 index 0000000000000..8536e36f3ddc2 --- /dev/null +++ b/graphics/xloadimage/png15-tiff4.patch @@ -0,0 +1,50 @@ +diff -wbBur xloadimage.4.1/png.c xloadimage.4.1.my/png.c +--- xloadimage.4.1/png.c 2011-02-11 14:47:37.000000000 +0300 ++++ xloadimage.4.1.my/png.c 2012-01-19 11:58:44.000000000 +0400 +@@ -75,7 +75,7 @@ + { + debug(" #error "); + output_warn( png_ptr, str); +- longjmp(png_ptr->jmpbuf, 1); /* return control to outer routine */ ++ longjmp(png_jmpbuf(png_ptr), 1); /* return control to outer routine */ + } + + +@@ -164,7 +164,7 @@ + png_destroy_read_struct(png_pp, info_pp, end_pp); + return 0; + } +- if (setjmp((*png_pp)->jmpbuf)) { ++ if (setjmp(png_jmpbuf(*png_pp))) { + /* On error */ + png_destroy_read_struct(png_pp, info_pp, end_pp); + return 0; +@@ -220,7 +220,7 @@ + zclose(zinput_file); + return 0; + } +- if (setjmp(png_ptr->jmpbuf)) { ++ if (setjmp(png_jmpbuf(png_ptr))) { + /* On error */ + freeImage(image); + png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); +diff -wbBur xloadimage.4.1/tiff.c xloadimage.4.1.my/tiff.c +--- xloadimage.4.1/tiff.c 2011-02-11 14:47:38.000000000 +0300 ++++ xloadimage.4.1.my/tiff.c 2012-01-19 12:00:00.000000000 +0400 +@@ -34,14 +34,14 @@ + struct tiff_info *info; + { + ZFILE *zf; +- TIFFHeader th; ++ TIFFHeaderCommon th; + TIFF *tiff; + + zf = zopen(fullname); + + /* read TIFF header and see if it looks right + */ +- if ((zread(zf, (byte *)&th, sizeof(TIFFHeader)) == sizeof(TIFFHeader)) && ++ if ((zread(zf, (byte *)&th, sizeof(TIFFHeaderCommon)) == sizeof(TIFFHeaderCommon)) && + ((th.tiff_magic == TIFF_BIGENDIAN) || + (th.tiff_magic == TIFF_LITTLEENDIAN))) { + diff --git a/graphics/xloadimage/slack-desc b/graphics/xloadimage/slack-desc new file mode 100644 index 0000000000000..8d491ff03b089 --- /dev/null +++ b/graphics/xloadimage/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------------------------------------------------------| +xloadimage: xloadimage (a modern, fresh, and simple image viewer from 1992) +xloadimage: +xloadimage: xloadimage, xview - load images into an X11 window or onto the root +xloadimage: window. +xloadimage: +xloadimage: +xloadimage: +xloadimage: +xloadimage: +xloadimage: +xloadimage: diff --git a/graphics/xloadimage/xloadimage.SlackBuild b/graphics/xloadimage/xloadimage.SlackBuild new file mode 100644 index 0000000000000..a9044f4b9d626 --- /dev/null +++ b/graphics/xloadimage/xloadimage.SlackBuild @@ -0,0 +1,123 @@ +#!/bin/bash + +# Slackware build script for xloadimage + +# Copyright 2023, Lockywolf +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS 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 AUTHOR 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. + + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=xloadimage +VERSION=${VERSION:-4.1} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +elif [ "$ARCH" = "aarch64" ]; 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-$VERSION +tar xvf $CWD/$PRGNAM.$VERSION-1.tar.gz +cd $PRGNAM.$VERSION + +patch -p1 < $CWD/enable-image-types.patch +patch -p1 < $CWD/png15-tiff4.patch + +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 {} \; + + +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + xmkmf +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + make + + install -D -m755 xloadimage "$PKG"/usr/bin/xloadimage + install -D -m755 uufilter "$PKG"/usr/bin/uufilter + install -D -m644 xloadimagerc "$PKG"/etc/xloadimagerc.example + install -D -m644 xloadimage.man "$PKG"/usr/man/man1/xloadimage.1x + install -D -m644 uufilter.man "$PKG"/usr/man/man1/uufilter.1x + + ( + cd $PKG/usr/bin + ln -sr xloadimage xsetbg + ) + + +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 \ + README sample \ + $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 diff --git a/graphics/xloadimage/xloadimage.info b/graphics/xloadimage/xloadimage.info new file mode 100644 index 0000000000000..60fd2e4a8eae4 --- /dev/null +++ b/graphics/xloadimage/xloadimage.info @@ -0,0 +1,10 @@ +PRGNAM="xloadimage" +VERSION="4.1" +HOMEPAGE="https://sioseis.com/xloadimage.html" +DOWNLOAD="https://arch.p5n.pp.ru/~sergej/dl/2018/xloadimage.4.1-1.tar.gz" +MD5SUM="86b42b1b628a9c00008b7deec21e1175" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Lockywolf" +EMAIL="for_sbo.xloadimage_2023-10-15@lockywolf.net" |