summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Hanson <erik@slackbuilds.org>2011-12-20 00:57:57 -0200
committerRobby Workman <rworkman@slackbuilds.org>2011-12-22 00:02:51 -0600
commit30d07f73f98619c05fcd2027c2c9464ad04ed4a0 (patch)
treedfb180878d59755d44fa02873aa1774c39c1a2be
parentf7b2a0085a88a347f0f00f9ff121b4bd766ba800 (diff)
downloadslackbuilds-30d07f73f98619c05fcd2027c2c9464ad04ed4a0.tar.gz
libraries/allegro: Updated for version 4.4.2.
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
-rw-r--r--libraries/allegro/allegro.SlackBuild61
-rw-r--r--libraries/allegro/allegro.info8
-rw-r--r--libraries/allegro/allegro_make382.patch50
-rw-r--r--libraries/allegro/doinst.sh13
4 files changed, 51 insertions, 81 deletions
diff --git a/libraries/allegro/allegro.SlackBuild b/libraries/allegro/allegro.SlackBuild
index af24bfec4d..f1e1903c3d 100644
--- a/libraries/allegro/allegro.SlackBuild
+++ b/libraries/allegro/allegro.SlackBuild
@@ -2,7 +2,7 @@
#
# Slackware build script for allegro
#
-# Copyright 2009 Erik W. Hanson, Minneapolis, MN, USA
+# Copyright 2009-2011 Erik W. Hanson, Minneapolis, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,15 +22,19 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# This selects it's own flags for compilation, resulting in -mtune=pentium
-# on modern (>=i586) machines. Hence no CFLAGS and the i586 ARCH.
-
PRGNAM=allegro
-VERSION=4.2.2
-ARCH=${ARCH:-i586}
+VERSION=${VERSION:-4.4.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -45,47 +49,50 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
+set -ue
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-# Patch makefile.in for make-3.82
-patch -p1 < $CWD/allegro_make382.patch
-
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --infodir=/usr/info \
- --enable-shared=yes \
- --enable-static=no \
- || exit 1
-
-sed -i "s/fnstsw %eax/fnstsw %ax/" src/i386/icpus.s
-
-make || exit 1
-make install DESTDIR=$PKG || exit 1
-make install-gzipped-man DESTDIR=$PKG || exit 1
-make install-gzipped-info DESTDIR=$PKG || exit 1
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make VERBOSE=1
+ make install DESTDIR=$PKG
+cd ..
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+mkdir -p $PKG/usr/share/allegro
+cp language.dat keyboard.dat $PKG/usr/share/allegro
+mkdir -p $PKG/etc
+cp allegro.cfg $PKG/etc/allegro.cfg.new
+gzip -9 $PKG/usr/info/*.info*
+
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a readme.txt todo.txt AUTHORS CHANGES THANKS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/libraries/allegro/allegro.info b/libraries/allegro/allegro.info
index aeddf7eb2f..ccf8d93018 100644
--- a/libraries/allegro/allegro.info
+++ b/libraries/allegro/allegro.info
@@ -1,10 +1,10 @@
PRGNAM="allegro"
-VERSION="4.2.2"
+VERSION="4.4.2"
HOMEPAGE="http://www.allegro.cc/"
-DOWNLOAD="http://www.allegro.cc/files/4.2.2/allegro-4.2.2.tar.gz"
-MD5SUM="2b677f9ef772944b62251cf823dc24b6"
+DOWNLOAD="http://downloads.sourceforge.net/alleg/allegro-4.4.2.tar.gz"
+MD5SUM="4db71b0460fc99926ae91d223199c2e6"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="Erik Hanson"
EMAIL="erik@slackbuilds.org"
-APPROVED="rworkman"
+APPROVED="Niels Horn"
diff --git a/libraries/allegro/allegro_make382.patch b/libraries/allegro/allegro_make382.patch
deleted file mode 100644
index 2eb20bcaff..0000000000
--- a/libraries/allegro/allegro_make382.patch
+++ /dev/null
@@ -1,50 +0,0 @@
---- allegro-4.2.2/makefile.in 2007-07-22 02:55:54.000000000 -0300
-+++ allegro-4.2.2_patched/makefile.in 2011-04-03 20:38:48.000000000 -0300
-@@ -398,37 +398,32 @@
-
- # -------- rules for deleting the generated files --------
-
--clean:
--
- define RM_OBJ_CLEAN_FILES
-- $(foreach file, $(OBJ_CLEAN_FILES), rm -f $(file)
-- )
-+ $(foreach file, $(OBJ_CLEAN_FILES), rm -f $(file))
- endef
-
- define RM_OTHER_CLEAN_FILES
-- $(foreach file, $(OTHER_CLEAN_FILES), rm -f $(file)
-- )
-+ $(foreach file, $(OTHER_CLEAN_FILES), rm -f $(file))
- endef
-
-- $(RM_OBJ_CLEAN_FILES)
-- $(RM_OTHER_CLEAN_FILES)
--
--distclean: clean
--
- define RM_DISTCLEAN_FILES
- $(foreach file, $(DISTCLEAN_FILES) $(ALLEGRO_LIB_X_EXES), rm -f $(file)
- )
- endef
-
-- $(RM_DISTCLEAN_FILES)
--
--veryclean: distclean
--
- define RM_VERYCLEAN_FILES
- $(foreach file, $(VERYCLEAN_FILES), rm -f $(file)
- )
- endef
-
-+clean:
-+ $(RM_OBJ_CLEAN_FILES)
-+ $(RM_OTHER_CLEAN_FILES)
-+
-+distclean: clean
-+ $(RM_DISTCLEAN_FILES)
-+
-+veryclean: distclean
- $(RM_VERYCLEAN_FILES)
- rm -f makefile
-
diff --git a/libraries/allegro/doinst.sh b/libraries/allegro/doinst.sh
new file mode 100644
index 0000000000..35c7a1846d
--- /dev/null
+++ b/libraries/allegro/doinst.sh
@@ -0,0 +1,13 @@
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/allegro.cfg.new