diff options
author | B. Watson <yalhcru@gmail.com> | 2022-02-20 17:40:19 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2022-02-21 14:34:28 -0600 |
commit | e4c05f8cbcc60ac07c0f0bc234e26471a7ccc4cd (patch) | |
tree | 6f4ed5646b411348a81f0c28bdfc9b76ebbe7bf5 /games/naev/naev.SlackBuild | |
parent | 9e61295b010577c0b9029b5af2380db294e4cb70 (diff) |
games/naev: Fix 15.0 build.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'games/naev/naev.SlackBuild')
-rw-r--r-- | games/naev/naev.SlackBuild | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/games/naev/naev.SlackBuild b/games/naev/naev.SlackBuild index eacd4496c3391..a19a38bdbe8f7 100644 --- a/games/naev/naev.SlackBuild +++ b/games/naev/naev.SlackBuild @@ -21,11 +21,16 @@ # see fit. Or as I see fit. Or as I fit. Although # that is unlikely, as I am rather tall. +# 20220220 bkw: Modified by SlackBuilds.org, BUILD=2: +# - fix build on 15.0. +# - binary in /usr/games. +# - absolute paths in .desktop. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=naev VERSION=${VERSION:-0.7.0} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -37,9 +42,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -71,18 +73,25 @@ cd $PRGNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ + -exec chmod 755 {} \+ -o \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; + -exec chmod 644 {} \+ mkdir -p $PKG/usr/share/$PRGNAM cat $CWD/$PRGNAM-$VERSION-ndata.zip > $PKG/usr/share/$PRGNAM/ndata +# 20220220 bkw: recent binutils API changes. patch based on: +# https://707852.bugs.gentoo.org/attachment.cgi?id=611192 +patch -p1 < $CWD/bfd.diff + +SLKCFLAGS+=" -fcommon" + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="-lm -lvorbis" \ ./configure \ --prefix=/usr \ + --bindir=/usr/games \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/man \ @@ -92,15 +101,14 @@ LDFLAGS="-lm -lvorbis" \ --build=$ARCH-slackware-linux make -make install DESTDIR=$PKG - -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - -find $PKG/usr/man -type f -exec gzip -9 {} \; +make install-strip DESTDIR=$PKG +gzip -9 $PKG/usr/man/man*/* mkdir -p $PKG/usr/share/applications -cat $TMP/$PRGNAM-$VERSION/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop +sed -e '/^Icon/s,=.*,=/usr/share/pixmaps/naev.png,' \ + -e '/^Exec/s,=,=/usr/games/,' \ + < $PRGNAM.desktop \ + > $PKG/usr/share/applications/$PRGNAM.desktop mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a AUTHORS LICENSE README TODO \ |