diff options
-rw-r--r-- | graphics/png2ico/README | 10 | ||||
-rw-r--r-- | graphics/png2ico/png2ico-cstring.patch | 10 | ||||
-rw-r--r-- | graphics/png2ico/png2ico.SlackBuild | 102 | ||||
-rw-r--r-- | graphics/png2ico/png2ico.info | 10 | ||||
-rw-r--r-- | graphics/png2ico/slack-desc | 19 |
5 files changed, 151 insertions, 0 deletions
diff --git a/graphics/png2ico/README b/graphics/png2ico/README new file mode 100644 index 000000000000..1f2e6e210cef --- /dev/null +++ b/graphics/png2ico/README @@ -0,0 +1,10 @@ +PNG2ico converts PNG files to Windows icon resource files. If you're looking for +a program to create a favicon.ico for your website, look no further. + +The program is extremely simple to use. To create a favicon.ico that +contains a logo in the resolutions 16x16 and 32x32 (an icon can contain +multiple images of different sizes, but a single 16x16 image is enough +for a favicon), you would use a command like the following: + +png2ico favicon.ico logo16x16.png logo32x32.png + diff --git a/graphics/png2ico/png2ico-cstring.patch b/graphics/png2ico/png2ico-cstring.patch new file mode 100644 index 000000000000..d380c8997620 --- /dev/null +++ b/graphics/png2ico/png2ico-cstring.patch @@ -0,0 +1,10 @@ +--- a/png2ico.cpp.orig 2002-12-07 14:37:58.000000000 -0800 ++++ b/png2ico.cpp 2019-12-19 17:04:47.861832968 -0800 +@@ -35,6 +35,7 @@ Notes about transparent and inverted pix + #include <cstdio> + #include <vector> + #include <climits> ++#include <cstring> + + #if __GNUC__ > 2 + #include <ext/hash_map> diff --git a/graphics/png2ico/png2ico.SlackBuild b/graphics/png2ico/png2ico.SlackBuild new file mode 100644 index 000000000000..e164d06bcea8 --- /dev/null +++ b/graphics/png2ico/png2ico.SlackBuild @@ -0,0 +1,102 @@ +#!/bin/sh + +# Slackware build script for png2ico + +# Copyright 2019 Richard Narron, California +# 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. + +PRGNAM=png2ico +VERSION=${VERSION:-20021208} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +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" +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-src-${VERSION:0:4}-${VERSION:4:2}-${VERSION:6:2}.tar.gz +mv $PRGNAM $PRGNAM-$VERSION +cd $PRGNAM-$VERSION +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 {} \; + +# Patch to include <cstring> in png2ico.cpp +(echo " " && cat $CWD/png2ico-cstring.patch) | patch -b -p1 + +# patch Makefile, append EXTRAFLAGS to CPPFLAGS +mv Makefile Makefile.orig +sed '/^CPPFLAGS/ s/$/ $(EXTRAFLAGS)/' Makefile.orig > Makefile + +EXTRAFLAGS="$SLKCFLAGS" \ +make + +install -D -m755 -t $PKG/usr/bin/ png2ico +install -D -m644 -t $PKG/usr/man/man1/ doc/png2ico.1 + +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 \ + LICENSE README* VERSION doc/bmp.txt \ + $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/png2ico/png2ico.info b/graphics/png2ico/png2ico.info new file mode 100644 index 000000000000..32f353fd9a82 --- /dev/null +++ b/graphics/png2ico/png2ico.info @@ -0,0 +1,10 @@ +PRGNAM="png2ico" +VERSION="20021208" +HOMEPAGE="https://www.winterdrache.de/freeware/png2ico/" +DOWNLOAD="https://www.winterdrache.de/freeware/png2ico/data/png2ico-src-2002-12-08.tar.gz" +MD5SUM="9b663df81c826cd564638cba2e6bc75b" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Richard Narron" +EMAIL="richard@aaazen.com" diff --git a/graphics/png2ico/slack-desc b/graphics/png2ico/slack-desc new file mode 100644 index 000000000000..6c498957cabd --- /dev/null +++ b/graphics/png2ico/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------------------------------------------------------| +png2ico: png2ico (PNG to icon converter) +png2ico: +png2ico: Converts PNG files to Windows icon resource files. +png2ico: +png2ico: +png2ico: +png2ico: +png2ico: +png2ico: +png2ico: +png2ico: |