summaryrefslogtreecommitdiffstats
path: root/misc/gcolor2/gcolor2.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'misc/gcolor2/gcolor2.SlackBuild')
-rw-r--r--misc/gcolor2/gcolor2.SlackBuild18
1 files changed, 6 insertions, 12 deletions
diff --git a/misc/gcolor2/gcolor2.SlackBuild b/misc/gcolor2/gcolor2.SlackBuild
index cb9334c725..6807063522 100644
--- a/misc/gcolor2/gcolor2.SlackBuild
+++ b/misc/gcolor2/gcolor2.SlackBuild
@@ -5,16 +5,14 @@
# Released under the WTFPL
PRGNAM=gcolor2
-VERSION=0.4
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-0.4}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
-# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
@@ -26,6 +24,7 @@ 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=""
@@ -53,22 +52,17 @@ find . \
-o -perm 400 \) -exec chmod 644 {} \;
# gcolor2 prefills the saved colors with the contents of rgb.txt - which it
-# can't find without this patch. Merged with the patch on:
-# http://tinyurl.com/gcolor-64bitpatch . This makes it possible to compile on
-# 64bit systems, and not segfault at runtime.
+# can't find without this patch
patch -p1 < $CWD/rgb.patch
-# and add a couple of Debian patches and a FreeBSD for x64 segfaults and so on
+# Add a couple of Debian patches for x86_64 segfaults
+# http://patch-tracker.debian.org/package/gcolor2
patch -p1 < $CWD/callbacks.c.patch
-patch -p0 < $CWD/callbacks.c.2.patch
patch -p1 < $CWD/main.c.patch
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
--mandir=/usr/man \
--build=$ARCH-slackware-linux