aboutsummaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackbuilds.org>2011-01-01 23:45:33 -0600
committerRobby Workman <rworkman@slackbuilds.org>2011-01-01 23:46:17 -0600
commitbf4727e8be20b37f6405367f972a94527c9f088f (patch)
tree32efb707d2d60704d01ec2cb44bd7e865784e90d /desktop
parentc1906f2648779dcf40dbf879b765a1c5fa136646 (diff)
desktop/gtk-chtheme: Fixed build error with new gtk+2 ; misc cleanup
This adds a patch to use modern gtk+2 API as well as using RPM_OPT_FLAGS to use our SLKCFLAGS instead of having to sed the Makefile. The other changes are aesthetic only :) Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/gtk-chtheme/gtk-chtheme-0.3.1-new-api.patch14
-rw-r--r--desktop/gtk-chtheme/gtk-chtheme.SlackBuild46
-rw-r--r--desktop/gtk-chtheme/gtk-chtheme.info2
3 files changed, 40 insertions, 22 deletions
diff --git a/desktop/gtk-chtheme/gtk-chtheme-0.3.1-new-api.patch b/desktop/gtk-chtheme/gtk-chtheme-0.3.1-new-api.patch
new file mode 100644
index 0000000000000..95ea07265f750
--- /dev/null
+++ b/desktop/gtk-chtheme/gtk-chtheme-0.3.1-new-api.patch
@@ -0,0 +1,14 @@
+Thanks to Fedora for the (simple) patch :)
+
+--- gtk-chtheme-0.3.1/util.c~ 2004-02-08 14:42:33.000000000 +0100
++++ gtk-chtheme-0.3.1/util.c 2010-07-14 10:40:18.000000000 +0200
+@@ -19,7 +19,8 @@
+
+ GtkWidget* unfocussable(GtkWidget *w)
+ {
+- GTK_WIDGET_UNSET_FLAGS(w, GTK_CAN_FOCUS);
++ /* GTK_WIDGET_UNSET_FLAGS(w, GTK_CAN_FOCUS); */
++ gtk_widget_set_can_focus(w, FALSE);
+ return w;
+ }
+
diff --git a/desktop/gtk-chtheme/gtk-chtheme.SlackBuild b/desktop/gtk-chtheme/gtk-chtheme.SlackBuild
index 20533203d3fb3..8072bf1ff6d35 100644
--- a/desktop/gtk-chtheme/gtk-chtheme.SlackBuild
+++ b/desktop/gtk-chtheme/gtk-chtheme.SlackBuild
@@ -26,7 +26,7 @@
PRGNAM=gtk-chtheme
VERSION=0.3.1
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG=_SBo}
# Automatically determine the architecture we're building on:
@@ -46,39 +46,43 @@ OUTPUT=${OUTPUT:-/tmp}
DOCS="COPYING ChangeLog"
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -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 || exit 1
+cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvjf $CWD/$PRGNAM-$VERSION.tar.bz2
-cd $PRGNAM-$VERSION || exit 1
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-# Rewrite CFLAGS
-if [ "$ARCH" = "i486" ]; then
- sed -i 's#CFLAGS += -Wall#CFLAGS += -O2 -march=i486 -mtune=i686#' $TMP/$PRGNAM-$VERSION/Makefile
-elif [ "$ARCH" = "i686" ]; then
- sed -i 's#CFLAGS += -Wall#CFLAGS += -O2 -march=i686 -mtune=i686#' $TMP/$PRGNAM-$VERSION/Makefile
-elif [ "$ARCH" = "x86_64" ]; then
- sed -i 's#CFLAGS += -Wall#CFLAGS += -O2 -fPIC#' $TMP/$PRGNAM-$VERSION/Makefile
-fi
+patch -p1 < $CWD/gtk-chtheme-0.3.1-new-api.patch
-make || exit 1
-make install DESTDIR=$PKG MANDIR=usr/man || exit 1
+make RPM_OPT_FLAGS="$SLKCFLAGS"
+make install DESTDIR=$PKG MANDIR=usr/man
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-( cd $PKG/usr/man
- find . -type f -exec gzip -9 {} \;
- find . -type f -exec chmod 644 {} \;
- for i in $(find . -type l) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-)
+find $PKG/usr/man -type f -exec gzip -9 {} \;
-# Docs, slack-desc, buildscript
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
diff --git a/desktop/gtk-chtheme/gtk-chtheme.info b/desktop/gtk-chtheme/gtk-chtheme.info
index 4b2fdcf2e3a0d..646dfdac27d8a 100644
--- a/desktop/gtk-chtheme/gtk-chtheme.info
+++ b/desktop/gtk-chtheme/gtk-chtheme.info
@@ -7,4 +7,4 @@ DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="Andrew Brouwers"
EMAIL="abrouwers@gmail.com"
-APPROVED="BP{k}"
+APPROVED="BP{k},rworkman"