aboutsummaryrefslogtreecommitdiff
path: root/games/widelands
diff options
context:
space:
mode:
authorHeinz Wiesinger <pprkut@liwjatan.at>2010-08-22 11:28:00 -0400
committerErik Hanson <erik@slackbuilds.org>2010-08-23 00:53:39 -0500
commit5a7fa9c6bf4665c6796c55a5db9dc6450537b2cf (patch)
treed19ae3aa202b6784786b31e3c9d6eb339c26f03a /games/widelands
parente86ddb47ba428fd12d42c03fb1209c70015703c0 (diff)
games/widelands: Updated for version build15.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'games/widelands')
-rw-r--r--games/widelands/README2
-rw-r--r--games/widelands/widelands.SlackBuild70
-rw-r--r--games/widelands/widelands.info6
3 files changed, 44 insertions, 34 deletions
diff --git a/games/widelands/README b/games/widelands/README
index c57c96549fdd..74aeec0218d2 100644
--- a/games/widelands/README
+++ b/games/widelands/README
@@ -1,5 +1,5 @@
Widelands is a strategy game based on Settlers II.
-Requires SDL_gfx, p7zip and scons. If you want integration
+Widelands requires SDL_gfx and lua. If you want integration
with the GGZ Gaming Zone you will also need ggz-base-libs.
All available at SlackBuilds.org.
diff --git a/games/widelands/widelands.SlackBuild b/games/widelands/widelands.SlackBuild
index e39f25eb7d53..5c723a914ea6 100644
--- a/games/widelands/widelands.SlackBuild
+++ b/games/widelands/widelands.SlackBuild
@@ -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.
-SRCNAM=Widelands
-SRCVER=Build14
-
-PRGNAM=$(echo $SRCNAM | tr [:upper:] [:lower:])
-VERSION=$(echo $SRCVER | tr [:upper:] [:lower:])
-ARCH=${ARCH:-i486}
+PRGNAM=widelands
+VERSION=build15
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
@@ -43,9 +47,10 @@ elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
- # we need to deviate from the standard cflags here, as -O2 results
- # in a segfault
- SLKCFLAGS="-O0 -fPIC"
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
@@ -54,37 +59,42 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM
-7z x $CWD/$SRCNAM-$SRCVER-src.7z
-cd $PRGNAM
+rm -rf $PRGNAM-$VERSION-src
+tar xvf $CWD/$PRGNAM-$VERSION-src.tar.bz2
+cd $PRGNAM-$VERSION-src
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-scons \
- install_prefix="/usr" \
- bindir="bin" \
- datadir="share/games/widelands" \
- localedir="share/locale" \
- enable_ggz=${GGZ:-no} \
- extra_compile_flags="$(echo $SLKCFLAGS)"
+# make locale install dir configurable
+localedir="WLBUILD_INSTALL_LOCALEDIR"
+old="$localedir \"\${CMAKE_INSTALL_PREFIX}/\${WL_INSTALL_DATADIR}/locale\""
+new="$localedir \${WL_INSTALL_LOCALEDIR}"
+sed -i "s|$old|$new|" CMakeLists.txt
-scons \
- install_prefix="$PKG/usr" \
- bindir="bin" \
- datadir="share/games/widelands" \
- localedir="share/locale" \
- enable_ggz=${GGZ:-no} \
- extra_compile_flags="$(echo $SLKCFLAGS)" \
- install
+mkdir -p build1
+cd build1
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DWL_INSTALL_LOCALEDIR="/usr/share/locale" \
+ -DWL_INSTALL_BINDIR="bin" \
+ ..
+ make
+ make install DESTDIR=$PKG
+cd ..
mkdir -p $PKG/usr/share/applications
-install -m 0644 $CWD/widelands.desktop $PKG/usr/share/applications/widelands.desktop
+install -m 0644 $CWD/widelands.desktop \
+ $PKG/usr/share/applications/widelands.desktop
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/doc
-mv $PKG/usr/share/games/widelands/doc $PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a ChangeLog COPYING CREDITS WL_RELEASE $PKG/usr/doc/$PRGNAM-$VERSION/
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
diff --git a/games/widelands/widelands.info b/games/widelands/widelands.info
index 1603a5f34ef8..12e69efd96d0 100644
--- a/games/widelands/widelands.info
+++ b/games/widelands/widelands.info
@@ -1,8 +1,8 @@
PRGNAM="widelands"
-VERSION="build14"
+VERSION="build15"
HOMEPAGE="http://www.widelands.org"
-DOWNLOAD="http://downloads.sourceforge.net/widelands/Widelands-Build14-src.7z"
-MD5SUM="06d63783b82b68af7af26198bc0a5afa"
+DOWNLOAD="http://launchpad.net/widelands/build15/build15/+download/widelands-build15-src.tar.bz2"
+MD5SUM="5b2e2d0913272f66055e424f91360b1d"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="Heinz Wiesinger"