diff options
Diffstat (limited to 'source.local/l/gtk+2/gtk+2.SlackBuild')
-rwxr-xr-x | source.local/l/gtk+2/gtk+2.SlackBuild | 75 |
1 files changed, 37 insertions, 38 deletions
diff --git a/source.local/l/gtk+2/gtk+2.SlackBuild b/source.local/l/gtk+2/gtk+2.SlackBuild index 8f3ae73..20ca14b 100755 --- a/source.local/l/gtk+2/gtk+2.SlackBuild +++ b/source.local/l/gtk+2/gtk+2.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2008, 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2008, 2009, 2010, 2011, 2012 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,38 +23,39 @@ # Modified 2012 by Eric Hameleers <alien at slackware.com> for ARM port. -VERSION=${VERSION:-$(echo gtk+-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-1} +VERSION=${VERSION:-2.24.17} +BUILD=${BUILD:-2} NUMJOBS=${NUMJOBS:-" -j7 "} -# Automatically determine the architecture we're building on: -MARCH=$( uname -m ) -if [ -z "$ARCH" ]; then - case "$MARCH" in - i?86) export ARCH=i486 ;; - armv7hl) export ARCH=$MARCH ;; - arm*) export ARCH=arm ;; - # Unless $ARCH is already set, use uname -m for all other archs: - *) export ARCH=$MARCH ;; - esac -fi - -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "s390" ]; then - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -elif [ "$ARCH" = "armv7hl" ]; then - SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16" - LIBDIRSUFFIX="" +if [ -e $CWD/machine.conf ]; then + . $CWD/machine.conf ] +elif [ -e /etc/slackbuild/machine.conf ]; then + . /etc/slackbuild/machine.conf ] else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" + # 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 + # Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX: + if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" + elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" + elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" + else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" + fi fi case "$ARCH" in @@ -111,7 +112,7 @@ CFLAGS="$SLKCFLAGS -DHOST='"'"${TARGET}"'"'" \ --mandir=/usr/man \ --with-xinput=yes \ --enable-xkb \ - --disable-introspection \ + --enable-introspection \ --build=$TARGET make $NUMJOBS || make || exit 1 @@ -128,15 +129,13 @@ make install \ DESTDIR=$PKG \ || exit 1 -# You'll probably need to install the newly made package right away to -# fix the result of this next line, but we had to clear this. Sorry. -rm -rf /etc/gtk-2.0 -# I'm spamming your root partition because /etc/gtk-2.0 won't install to $DESTDIR... -make install -cp -a /etc/gtk-2.0/* $PKG/etc/gtk-2.0/ || exit 1 -rm -rf $PKG/etc/gtk-2.0/$host +# This directory needs to exist, or update-gtk-immodules will run into problems: mkdir -p $PKG/etc/gtk-2.0/$host -mv $PKG/etc/gtk-2.0/gtk.immodules $PKG/etc/gtk-2.0/$host/ + +# If this file exists, move it into the host directory: +if [ -r $PKG/etc/gtk-2.0/gtk.immodules ]; then + mv $PKG/etc/gtk-2.0/gtk.immodules $PKG/etc/gtk-2.0/$host/ +fi # Don't clobber im-multipress.conf mv $PKG/etc/gtk-2.0/im-multipress.conf $PKG/etc/gtk-2.0/im-multipress.conf.new || exit 1 |