mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-20 19:41:34 +01:00
games/prboom: Fix 15.0 build.
Signed-off-by: B. Watson <yalhcru@gmail.com>
This commit is contained in:
parent
375d74f058
commit
8404bfce3a
1 changed files with 20 additions and 16 deletions
|
@ -22,6 +22,11 @@
|
|||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# 20220221 bkw: Modified by SlackBuilds.org:
|
||||
# - fix 15.0 build.
|
||||
# - use "set -e" instead of "|| exit 1" after every command.
|
||||
# - do not install useless INSTALL in doc dir.
|
||||
|
||||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PRGNAM=prboom
|
||||
|
@ -32,15 +37,12 @@ PKGTYPE=${PKGTYPE:-tgz}
|
|||
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
i?86) ARCH=i486 ;;
|
||||
i?86) ARCH=i586 ;;
|
||||
arm*) ARCH=arm ;;
|
||||
*) ARCH=$( uname -m ) ;;
|
||||
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
|
||||
|
@ -50,8 +52,8 @@ TMP=${TMP:-/tmp/SBo}
|
|||
PKG=$TMP/package-$PRGNAM
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
if [ "$ARCH" = "i486" ]; then
|
||||
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
||||
if [ "$ARCH" = "i586" ]; then
|
||||
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||
|
@ -64,6 +66,8 @@ else
|
|||
LIBDIRSUFFIX=""
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG $OUTPUT
|
||||
cd $TMP || exit 1
|
||||
|
@ -73,12 +77,14 @@ cd $PRGNAM-$VERSION || exit 1
|
|||
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 {} \+
|
||||
|
||||
# patch thanks to Arch Linux
|
||||
patch -p1 < $CWD/libpng-1.4.patch || exit 1
|
||||
patch -p1 < $CWD/libpng-1.4.patch
|
||||
|
||||
SLKCFLAGS+=" -fcommon"
|
||||
|
||||
# --disable-i386-asm fixes the "exit with signal 8" crash on the x86 arch
|
||||
# --enable-gl allows to launch game with: prboom -vidmode gl
|
||||
|
@ -94,17 +100,15 @@ CXXFLAGS="$SLKCFLAGS" \
|
|||
--docdir=/usr/doc/$PRGNAM-$VERSION \
|
||||
--build=$ARCH-slackware-linux \
|
||||
--disable-i386-asm \
|
||||
--enable-gl || exit 1
|
||||
--enable-gl
|
||||
|
||||
make || exit 1
|
||||
make install-strip DESTDIR=$PKG || exit 1
|
||||
|
||||
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
|
||||
make
|
||||
make install-strip DESTDIR=$PKG
|
||||
gzip $PKG/usr/man/man*/*
|
||||
|
||||
mv $PKG/usr/share/doc $PKG/usr
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a TODO INSTALL $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a TODO $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
|
||||
mkdir -p $PKG/install
|
||||
|
|
Loading…
Reference in a new issue