summaryrefslogtreecommitdiffstats
path: root/source/l/gtk+2
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/gtk+2')
-rwxr-xr-xsource/l/gtk+2/gtk+2.SlackBuild68
-rw-r--r--source/l/gtk+2/gtk.nsplugin.diff11
-rw-r--r--source/l/gtk+2/gtk.png14.diff19
-rw-r--r--source/l/gtk+2/gtk.pnglz.diff8
-rw-r--r--source/l/gtk+2/gtk.xid.nowarningflood.diff12
5 files changed, 80 insertions, 38 deletions
diff --git a/source/l/gtk+2/gtk+2.SlackBuild b/source/l/gtk+2/gtk+2.SlackBuild
index 0c4e043a7..f60d0a555 100755
--- a/source/l/gtk+2/gtk+2.SlackBuild
+++ b/source/l/gtk+2/gtk+2.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,12 +21,21 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-VERSION=2.14.7
-ARCH=${ARCH:-x86_64}
-BUILD=${BUILD:-4}
+VERSION=${VERSION:-$(echo gtk+-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j7 "}
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-gtk2
@@ -40,32 +49,18 @@ elif [ "$ARCH" = "s390" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
rm -rf $PKG
mkdir -p $TMP $PKG/usr
cd $TMP
rm -rf gtk+-$VERSION
-tar xvf $CWD/gtk+-$VERSION.tar.bz2 || exit 1
+tar xvf $CWD/gtk+-$VERSION.tar.?z* || exit 1
cd gtk+-$VERSION
-# There's been this long standing debate about PNG and -lz
-# and this patch is the workaround. ;-)
-zcat $CWD/gtk.pnglz.diff.gz | patch -p1 --verbose || exit 1
-# Fix Flash in Konquoror:
-zcat $CWD/gtk.nsplugin.diff.gz | patch -p1 --verbose || exit 1
-
-## Fix for x86_64 (does not hurt the other archs but note that we will start
-## using /etc/gtk-2.0/$host instead of /etc/gtk-2.0/ now):
- sed -i "s/GTK_SYSCONFDIR, \\\"gtk-2\\.0\\\"/GTK_SYSCONFDIR, \\\"gtk-2\\.0\\\", HOST/g" ./gtk/gtkrc.c ./gdk-pixbuf/gdk-pixbuf-io.c
- sed -i 's/sysconfdir)\\"/& \\\n\t-DHOST=\\\"$(host_triplet)\\\"/g' \
- gdk-pixbuf/Makefile.am \
- gtk/Makefile.am \
- modules/input/Makefile.am
-
-# The original config.{guess,sub} do not work on x86_64
-cp -p /usr/share/libtool/config.{guess,sub} .
-
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -73,6 +68,25 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# There's been this long standing debate about PNG and -lz
+# and this patch is the workaround. ;-)
+zcat $CWD/gtk.pnglz.diff.gz | patch -p1 --verbose || exit 1
+
+# Do not flood the console or .xsession-errors with "trouble ahead"
+# warnings (most noticable when using Firefox and Flash):
+zcat $CWD/gtk.xid.nowarningflood.diff.gz | patch -p1 --verbose || exit 1
+
+# Use /etc/gtk-2.0/$ARCH-slackware-linux instead of /etc/gtk-2.0/
+sed -i "s/GTK_SYSCONFDIR, \\\"gtk-2\\.0\\\"/GTK_SYSCONFDIR, \\\"gtk-2\\.0\\\", HOST/g" ./gtk/gtkrc.c ./gdk-pixbuf/gdk-pixbuf-io.c
+sed -i 's/sysconfdir)\\"/& \\\n\t-DHOST=\\\"$(host_triplet)\\\"/g' \
+gdk-pixbuf/Makefile.am \
+gtk/Makefile.am \
+modules/input/Makefile.am
+
+# Use libpng-1.4.x:
+zcat $CWD/gtk.png14.diff.gz | patch -p1 --verbose || exit 1
+
+# Regenerate ./configure:
libtoolize --force
autoreconf -vif
@@ -80,7 +94,7 @@ autoreconf -vif
# Our host is $ARCH-slackware-linux not $ARCH-slackware-linux-gnu:
sed -i -e 's#linux|linux-gnu|#linux|linux|#' config.sub
-CFLAGS="$SLKCFLAGS" \
+CFLAGS="$SLKCFLAGS -DHOST='"'"${ARCH}-slackware-linux"'"'" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
@@ -167,6 +181,14 @@ cp -a \
ln -s /usr/share/gtk-doc/html/gtk .
)
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
# I'm almost inclined to think this stuff is obsolete but I don't know for sure.
# I do know that leaving it in doesn't hurt (aside from a few wasted bytes, but
# probably less than the comments here waste ;-)
diff --git a/source/l/gtk+2/gtk.nsplugin.diff b/source/l/gtk+2/gtk.nsplugin.diff
deleted file mode 100644
index 3e0932dec..000000000
--- a/source/l/gtk+2/gtk.nsplugin.diff
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -Nur gtk+-2.14.6.orig/gtk/gtkclipboard.c gtk+-2.14.6/gtk/gtkclipboard.c
---- gtk+-2.14.6.orig/gtk/gtkclipboard.c 2008-12-15 12:38:44.000000000 -0600
-+++ gtk+-2.14.6/gtk/gtkclipboard.c 2008-12-16 21:33:21.079854023 -0600
-@@ -299,6 +299,7 @@
- gtk_clipboard_get_for_display (GdkDisplay *display,
- GdkAtom selection)
- {
-+ g_return_val_if_fail (display != NULL, NULL);
- g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
- g_return_val_if_fail (!display->closed, NULL);
-
diff --git a/source/l/gtk+2/gtk.png14.diff b/source/l/gtk+2/gtk.png14.diff
new file mode 100644
index 000000000..20d709e4e
--- /dev/null
+++ b/source/l/gtk+2/gtk.png14.diff
@@ -0,0 +1,19 @@
+--- ./configure.in.orig 2010-01-11 14:57:36.000000000 -0600
++++ ./configure.in 2010-02-12 00:48:04.000000000 -0600
+@@ -908,12 +908,12 @@
+
+ dnl Test for libpng
+ if test x$with_libpng != xno && test -z "$LIBPNG"; then
+- AC_MSG_CHECKING(for libpng12)
+- if $PKG_CONFIG --exists libpng12 ; then
++ AC_MSG_CHECKING(for libpng14)
++ if $PKG_CONFIG --exists libpng14 ; then
+ AC_MSG_RESULT(yes)
+ PNG='png'
+- PNG_DEP_CFLAGS_PACKAGES=libpng12
+- LIBPNG=`$PKG_CONFIG --libs libpng12`
++ PNG_DEP_CFLAGS_PACKAGES=libpng14
++ LIBPNG=`$PKG_CONFIG --libs libpng14`
+ else
+ AC_MSG_RESULT(no)
+ AC_CHECK_LIB(png, png_read_info,
diff --git a/source/l/gtk+2/gtk.pnglz.diff b/source/l/gtk+2/gtk.pnglz.diff
index 13020c242..1f71bd841 100644
--- a/source/l/gtk+2/gtk.pnglz.diff
+++ b/source/l/gtk+2/gtk.pnglz.diff
@@ -1,7 +1,7 @@
-diff -Nur gtk+-2.14.6.orig/gdk-pixbuf/Makefile.in gtk+-2.14.6/gdk-pixbuf/Makefile.in
---- gtk+-2.14.6.orig/gdk-pixbuf/Makefile.in 2008-12-15 12:42:35.000000000 -0600
-+++ gtk+-2.14.6/gdk-pixbuf/Makefile.in 2008-12-16 21:36:45.393854353 -0600
-@@ -245,7 +245,7 @@
+diff -Nur gtk+-2.18.4.orig/gdk-pixbuf/Makefile.in gtk+-2.18.4/gdk-pixbuf/Makefile.in
+--- gtk+-2.18.4.orig/gdk-pixbuf/Makefile.in 2009-11-30 22:08:44.000000000 -0600
++++ gtk+-2.18.4/gdk-pixbuf/Makefile.in 2009-12-03 21:57:10.541765261 -0600
+@@ -801,7 +801,7 @@
LIBJASPER = @LIBJASPER@
LIBJPEG = @LIBJPEG@
LIBOBJS = @LIBOBJS@
diff --git a/source/l/gtk+2/gtk.xid.nowarningflood.diff b/source/l/gtk+2/gtk.xid.nowarningflood.diff
new file mode 100644
index 000000000..6b8c854d8
--- /dev/null
+++ b/source/l/gtk+2/gtk.xid.nowarningflood.diff
@@ -0,0 +1,12 @@
+--- ./gdk/x11/gdkxid.c.orig 2009-12-18 20:54:50.000000000 -0600
++++ ./gdk/x11/gdkxid.c 2010-02-08 14:42:50.000000000 -0600
+@@ -57,9 +57,6 @@
+ display_x11->xid_ht = g_hash_table_new ((GHashFunc) gdk_xid_hash,
+ (GEqualFunc) gdk_xid_equal);
+
+- if (g_hash_table_lookup (display_x11->xid_ht, xid))
+- g_warning ("XID collision, trouble ahead");
+-
+ g_hash_table_insert (display_x11->xid_ht, xid, data);
+ }
+