summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--misc/gcolor2/callbacks.c.2.patch17
-rw-r--r--misc/gcolor2/callbacks.c.patch2
-rw-r--r--misc/gcolor2/doinst.sh4
-rw-r--r--misc/gcolor2/gcolor2.SlackBuild18
-rw-r--r--misc/gcolor2/main.c.patch2
5 files changed, 8 insertions, 35 deletions
diff --git a/misc/gcolor2/callbacks.c.2.patch b/misc/gcolor2/callbacks.c.2.patch
deleted file mode 100644
index 1c86587163..0000000000
--- a/misc/gcolor2/callbacks.c.2.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-
-$FreeBSD: ports/graphics/gcolor2/files/patch-src_callbacks.c,v 1.4 2007/10/24 23:35:51 marcus Exp $
-
---- src/callbacks.c.orig
-+++ src/callbacks.c
-@@ -166,9 +166,10 @@
- void on_copy_color_to_clipboard_activate (GtkMenuItem *menuitem, gpointer user_data)
- {
- gchar* hex;
-+ GtkClipboard *cb;
-
- hex = hex_value (colorvalue);
-- GtkClipboard *cb = gtk_clipboard_get (gdk_atom_intern ("PRIMARY", FALSE));
-+ cb = gtk_clipboard_get (gdk_atom_intern ("PRIMARY", FALSE));
- gtk_clipboard_set_text (cb, hex, strlen (hex));
- }
-
diff --git a/misc/gcolor2/callbacks.c.patch b/misc/gcolor2/callbacks.c.patch
index 7fda4938d6..9364c4c354 100644
--- a/misc/gcolor2/callbacks.c.patch
+++ b/misc/gcolor2/callbacks.c.patch
@@ -1,4 +1,3 @@
-
--- gcolor2-0.4.orig/src/callbacks.c
+++ gcolor2-0.4/src/callbacks.c
@@ -9,6 +9,9 @@
@@ -11,4 +10,3 @@
GtkWidget *savedialog;
gchar *colorname;
-
diff --git a/misc/gcolor2/doinst.sh b/misc/gcolor2/doinst.sh
index 7ebfa3ab4d..5fb28930db 100644
--- a/misc/gcolor2/doinst.sh
+++ b/misc/gcolor2/doinst.sh
@@ -1,3 +1,3 @@
-if [ -x usr/bin/update-desktop-database ]; then
- usr/bin/update-desktop-database -q usr/share/applications
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi
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
diff --git a/misc/gcolor2/main.c.patch b/misc/gcolor2/main.c.patch
index f8ce79feea..958e394cdb 100644
--- a/misc/gcolor2/main.c.patch
+++ b/misc/gcolor2/main.c.patch
@@ -1,4 +1,3 @@
-
--- gcolor2-0.4.orig/src/main.c
+++ gcolor2-0.4/src/main.c
@@ -4,11 +4,15 @@
@@ -48,4 +47,3 @@
#ifdef ENABLE_NLS
bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
-