mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-20 19:41:34 +01:00
games/naev: Fix 15.0 build.
Signed-off-by: B. Watson <yalhcru@gmail.com>
This commit is contained in:
parent
9e61295b01
commit
e4c05f8cbc
2 changed files with 40 additions and 13 deletions
19
games/naev/bfd.diff
Normal file
19
games/naev/bfd.diff
Normal file
|
@ -0,0 +1,19 @@
|
|||
diff -Naur naev-0.7.0/src/naev.c naev-0.7.0.patched/src/naev.c
|
||||
--- naev-0.7.0/src/naev.c 2017-07-15 18:51:22.000000000 -0400
|
||||
+++ naev-0.7.0.patched/src/naev.c 2022-02-20 17:32:49.060133407 -0500
|
||||
@@ -1375,12 +1375,11 @@
|
||||
asection *section;
|
||||
|
||||
for (section = abfd->sections; section != NULL; section = section->next) {
|
||||
- if ((bfd_get_section_flags(abfd, section) & SEC_ALLOC) == 0)
|
||||
+ if ((bfd_section_flags(section) & SEC_ALLOC) == 0)
|
||||
continue;
|
||||
|
||||
- bfd_vma vma = bfd_get_section_vma(abfd, section);
|
||||
- bfd_size_type size = bfd_get_section_size(section);
|
||||
- if (address < vma || address >= vma + size)
|
||||
+ bfd_vma vma = bfd_section_vma(section);
|
||||
+ if (address < vma || address >= vma + bfd_section_size(section))
|
||||
continue;
|
||||
|
||||
if (!bfd_find_nearest_line(abfd, section, syms, address - vma,
|
|
@ -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 \
|
||||
|
|
Loading…
Reference in a new issue