summaryrefslogtreecommitdiffstats
path: root/games/warzone2100/warzone2100.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'games/warzone2100/warzone2100.SlackBuild')
-rw-r--r--games/warzone2100/warzone2100.SlackBuild58
1 files changed, 28 insertions, 30 deletions
diff --git a/games/warzone2100/warzone2100.SlackBuild b/games/warzone2100/warzone2100.SlackBuild
index c9f033a488..9aa0274c11 100644
--- a/games/warzone2100/warzone2100.SlackBuild
+++ b/games/warzone2100/warzone2100.SlackBuild
@@ -23,8 +23,16 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20200811 bkw: fix various issues on behalf of the SBo team:
+# - man pages were in /usr/share/man
+# - old source wasn't being deleted before extraction
+# - removed "-GNinja" from cmake command line: unnecessary, and adds a
+# dependency on ninja (which wasn't listed in the .info file)
+# - got rid of unneeded template code (no perllocal.pod gets installed)
+# - move binary to /usr/games (since it has a section 6 man page)
+
PRGNAM=warzone2100
-VERSION=${VERSION:-3.3.0}
+VERSION=${VERSION:-3.4.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -42,16 +50,16 @@ PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686 -Wno-error=maybe-uninitialized"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686 -Wno-error=maybe-uninitialized"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
+ SLKCFLAGS="-O2 -fPIC -Wno-error=maybe-uninitialized"
LIBDIRSUFFIX="64"
else
- SLKCFLAGS="-O2"
+ SLKCFLAGS="-O2 -Wno-error=maybe-uninitialized"
LIBDIRSUFFIX=""
fi
@@ -60,7 +68,8 @@ set -e
rm -rf $PKG $TMP/$PRGNAM-$VERSION
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-tar xvf $CWD/$PRGNAM-${VERSION}_src.tar.?z
+rm -rf $PRGNAM
+tar xvf $CWD/${PRGNAM}_src.tar.?z
cd $PRGNAM
chown -R root:root .
find -L . \
@@ -69,35 +78,24 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-./autogen.sh
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS -fpermissive" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --with-distributor=Slackware \
- --build=$ARCH-slackware-linux
-
-make
-make install-strip DESTDIR=$PKG
-
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-
-find $PKG -name perllocal.pod \
- -o -name ".packlist" \
- -o -name "*.bs" \
- | xargs rm -f
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_MANDIR=/usr/man \
+ -DCMAKE_INSTALL_BINDIR=games \
+ ..
+ DESTDIR=$PKG cmake --build . --target install
+cd ..
# Let's not pollute the themed icon directory
mv $PKG/usr/share/icons $PKG/usr/share/pixmaps
# --docdir= above works :)
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/share/doc/$PRGNAM/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc