games/widelands: Updated for version build15.

Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
This commit is contained in:
Heinz Wiesinger 2010-08-22 11:28:00 -04:00 committed by Erik Hanson
parent e86ddb47ba
commit 5a7fa9c6bf
3 changed files with 44 additions and 34 deletions

View file

@ -1,5 +1,5 @@
Widelands is a strategy game based on Settlers II. 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. with the GGZ Gaming Zone you will also need ggz-base-libs.
All available at SlackBuilds.org. All available at SlackBuilds.org.

View file

@ -22,15 +22,19 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
SRCNAM=Widelands PRGNAM=widelands
SRCVER=Build14 VERSION=build15
PRGNAM=$(echo $SRCNAM | tr [:upper:] [:lower:])
VERSION=$(echo $SRCVER | tr [:upper:] [:lower:])
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1} BUILD=${BUILD:-1}
TAG=${TAG:-_SBo} 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) CWD=$(pwd)
TMP=${TMP:-/tmp/SBo} TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM PKG=$TMP/package-$PRGNAM
@ -43,9 +47,10 @@ elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686" SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX="" LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then elif [ "$ARCH" = "x86_64" ]; then
# we need to deviate from the standard cflags here, as -O2 results SLKCFLAGS="-O2 -fPIC"
# in a segfault LIBDIRSUFFIX=""
SLKCFLAGS="-O0 -fPIC" else
SLKCFLAGS="-O2"
LIBDIRSUFFIX="" LIBDIRSUFFIX=""
fi fi
@ -54,37 +59,42 @@ set -e
rm -rf $PKG rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT mkdir -p $TMP $PKG $OUTPUT
cd $TMP cd $TMP
rm -rf $PRGNAM rm -rf $PRGNAM-$VERSION-src
7z x $CWD/$SRCNAM-$SRCVER-src.7z tar xvf $CWD/$PRGNAM-$VERSION-src.tar.bz2
cd $PRGNAM cd $PRGNAM-$VERSION-src
chown -R root:root . chown -R root:root .
chmod -R u+w,go+r-w,a-s . chmod -R u+w,go+r-w,a-s .
scons \ # make locale install dir configurable
install_prefix="/usr" \ localedir="WLBUILD_INSTALL_LOCALEDIR"
bindir="bin" \ old="$localedir \"\${CMAKE_INSTALL_PREFIX}/\${WL_INSTALL_DATADIR}/locale\""
datadir="share/games/widelands" \ new="$localedir \${WL_INSTALL_LOCALEDIR}"
localedir="share/locale" \ sed -i "s|$old|$new|" CMakeLists.txt
enable_ggz=${GGZ:-no} \
extra_compile_flags="$(echo $SLKCFLAGS)"
scons \ mkdir -p build1
install_prefix="$PKG/usr" \ cd build1
bindir="bin" \ cmake \
datadir="share/games/widelands" \ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
localedir="share/locale" \ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
enable_ggz=${GGZ:-no} \ -DCMAKE_INSTALL_PREFIX=/usr \
extra_compile_flags="$(echo $SLKCFLAGS)" \ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
install -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 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 \ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
mv $PKG/usr/share/games/widelands/doc $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 cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install mkdir -p $PKG/install

View file

@ -1,8 +1,8 @@
PRGNAM="widelands" PRGNAM="widelands"
VERSION="build14" VERSION="build15"
HOMEPAGE="http://www.widelands.org" HOMEPAGE="http://www.widelands.org"
DOWNLOAD="http://downloads.sourceforge.net/widelands/Widelands-Build14-src.7z" DOWNLOAD="http://launchpad.net/widelands/build15/build15/+download/widelands-build15-src.tar.bz2"
MD5SUM="06d63783b82b68af7af26198bc0a5afa" MD5SUM="5b2e2d0913272f66055e424f91360b1d"
DOWNLOAD_x86_64="" DOWNLOAD_x86_64=""
MD5SUM_x86_64="" MD5SUM_x86_64=""
MAINTAINER="Heinz Wiesinger" MAINTAINER="Heinz Wiesinger"