From 75995e13c9415d3579091ebe66968b6ac62ea74f Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Thu, 26 Nov 2015 04:12:18 -0500 Subject: games/ufoai: Fix compile issue. --- games/ufoai/README | 3 +++ games/ufoai/ufoai.SlackBuild | 20 ++++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) (limited to 'games/ufoai') diff --git a/games/ufoai/README b/games/ufoai/README index 9ce95441cf..192f4d18fc 100644 --- a/games/ufoai/README +++ b/games/ufoai/README @@ -16,3 +16,6 @@ If you're going to install the package on a host whose CPU lacks streaming SIMD extensions, set SSE=no in the script's environment. To find out whether SSE is supported, try "grep sse /proc/cpuinfo". If you get no output, you don't have SSE. + +By default, ufoai is built with SDL1. If you'd prefer SDL2, install +SDL2 and SDL2_ttf, then run this script with SDL2=yes in the environment. diff --git a/games/ufoai/ufoai.SlackBuild b/games/ufoai/ufoai.SlackBuild index 395573bd04..91fa4efc5a 100644 --- a/games/ufoai/ufoai.SlackBuild +++ b/games/ufoai/ufoai.SlackBuild @@ -24,9 +24,14 @@ # - allow building the radiant editor. I have no idea if it's working # correctly, since I have no idea how to use it. +# 20151126 bkw: +# - fix build on systems that have SDL2 but not SDL2_ttf +# - add SDL2 environment variable +# - move binaries to /usr/games + PRGNAM=ufoai VERSION=${VERSION:-2.5} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -86,6 +91,8 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +[ "${SDL2:-no}" = "no" ] && EXTRAOPT="--disable-sdl2" + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ @@ -98,6 +105,7 @@ CXXFLAGS="$SLKCFLAGS" \ --enable-ufo \ --enable-ufoded \ --enable-ufoslicer \ + $EXTRAOPT \ $radiant make @@ -108,7 +116,7 @@ make pk3 BINARIES= # Manual install: first the data... -mkdir -p $PKG/usr/share/games/$PRGNAM $PKG/usr/bin +mkdir -p $PKG/usr/share/games/$PRGNAM $PKG/usr/games cp -a base $PKG/usr/share/games/$PRGNAM/ # ...then the binaries @@ -119,7 +127,7 @@ if [ "$radiant" = "--enable-uforadiant" ]; then fi BINARIES="$BINARIES ufo ufoded ufo2map ufomodel memory ufoslicer" -install -s -m0755 $BINARIES $PKG/usr/bin/ +install -s -m0755 $BINARIES $PKG/usr/games/ # .desktop files, icons and man pages... mkdir -p $PKG/usr/share/applications $PKG/usr/share/pixmaps $PKG/usr/man/man6 @@ -128,11 +136,7 @@ install -m 0644 debian/*.xpm $PKG/usr/share/pixmaps/ install -m 0644 debian/*.6 $PKG/usr/man/man6/ gzip $PKG/usr/man/man6/*.6 -# Remove wrong execution path from .desktop files -# and get rid of uforadiant stuff if we don't have uforadiant -# [ 20140826 bkw: actually /usr/games is where they should go, but -# I won't change this just to be changing it ] -sed -i "s|/usr/games/||" $PKG/usr/share/applications/*.desktop +# Get rid of uforadiant stuff if we don't have uforadiant [ "$radiant" = "" ] && rm $PKG/usr/share/applications/uforadiant.desktop \ $PKG/usr/man/man6/uforadiant.6.gz $PKG/usr/share/pixmaps/uforadiant.xpm -- cgit v1.2.3