aboutsummaryrefslogtreecommitdiff
path: root/wxwidgets/wxWidgets.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'wxwidgets/wxWidgets.SlackBuild')
-rwxr-xr-xwxwidgets/wxWidgets.SlackBuild29
1 files changed, 16 insertions, 13 deletions
diff --git a/wxwidgets/wxWidgets.SlackBuild b/wxwidgets/wxWidgets.SlackBuild
index a24471ed..1e5fe02d 100755
--- a/wxwidgets/wxWidgets.SlackBuild
+++ b/wxwidgets/wxWidgets.SlackBuild
@@ -35,6 +35,12 @@ SRC_DIR=${SRC:=$CWD}
TMP=${TMP:=/tmp}
REPOS=${REPOS:=$TMP}
+# ------- error codes for createpkg --------------
+ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33
+ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36
+ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39
+ERROR_PATCH=40
+
if [ "$ARCH" == "x86_64" ]; then
LIBDIR=/usr/lib64
else
@@ -49,14 +55,8 @@ URL="http://heanet.dl.sourceforge.net/sourceforge/wxwindows/$SRC"
SRC_DIR="$SRC_DIR/$PACKAGE"
mkdir -p $SRC_DIR
-if [ "$PACKAGE_EXT" == "bz2" ]; then
- tarflag="j"
-else
- tarflag="z"
-fi
-
if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then
- wget "$URL" -O "$SRC_DIR/$SRC"
+ wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
fi
TMP="$TMP/$PACKAGE"
@@ -64,16 +64,16 @@ rm -rf $TMP
mkdir -p $TMP
cd $TMP
-tar xvf$tarflag $SRC_DIR/$SRC
+tar xvf $SRC_DIR/$SRC
cd $PACKAGE-$VERSION
if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then
- patch -p1 < $CWD/$PACKAGE-$VERSION.diff
+ patch -p1 < $CWD/$PACKAGE-$VERSION.diff || exit $ERROR_PATCH
fi
-./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR --with-docdir=/usr/doc/$PACKAGE-$VERSION --enable-unicode
-make || exit 32
-make DESTDIR=$TMP/package-$PACKAGE install
+./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR --with-docdir=/usr/doc/$PACKAGE-$VERSION --enable-unicode --enable-config || exit $ERROR_CONF
+make || exit $ERROR_MAKE
+make DESTDIR=$TMP/package-$PACKAGE install || exit $ERROR_INSTALL
CWD="`pwd`"
@@ -82,6 +82,9 @@ cd $TMP/package-$PACKAGE
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+( cd usr/bin && rm wx-config )
+( cd usr/bin && ln -sf /usr/lib64/wx/config/gtk2-unicode-release-2.6 wx-config )
+
mkdir install
cat << EOF > install/slack-desc
# HOW TO EDIT THIS FILE:
@@ -112,7 +115,7 @@ for file in CHANGES.txt COPYING.LIB INSTALL-MAC.txt INSTALL-MGL.txt INSTALL-MOTI
cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/
done
-makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz
+makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG
if [ "$CLEANUP" == "yes" ]; then
rm -rf $TMP