games/boswars: Build with lua51.

Signed-off-by: B. Watson <urchlay@slackware.uk>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2024-10-18 15:50:38 -04:00 committed by Willy Sudiarto Raharjo
parent 48c30d9069
commit 9a13ba8cc4
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 17 additions and 12 deletions

View file

@ -22,12 +22,19 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# 20241018 bkw: Modified by SlackBuilds.org, BUILD=2: use lua51
# instead of lua. Note: there are other issues with this build. ELF
# binaries are installed to /usr/share (which is supposed to be for
# arch-independent data only), and the package has a bunch of .o files
# that shouldn't be there. Not going to fix this right now...
# Also, the executable should be in /usr/games, not /usr/bin.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=boswars
VERSION=${VERSION:-2.8}
SRCVERSION=$(echo $VERSION-src)
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -39,9 +46,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
@ -74,14 +78,12 @@ rm -rf $PRGNAM-$SRCVERSION
tar xvf $CWD/$PRGNAM-$SRCVERSION.tar.gz
cd $PRGNAM-$SRCVERSION
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 \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
# 20241020 bkw: to build with our lua51, we have to force the correct
# include path.
sed -i "/^incpaths/s,','/usr/include/lua5.1 ," make.py
./make.py # build source code
@ -98,6 +100,9 @@ done
# install launcher
install -D -m0755 $CWD/$PRGNAM.sh $PKG/usr/bin/$PRGNAM
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/share/applications
install -D -m644 $CWD/$PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM.desktop

View file

@ -5,6 +5,6 @@ DOWNLOAD="https://www.boswars.org/dist/releases/boswars-2.8-src.tar.gz"
MD5SUM="f77b1236260f3007ff43f8296baa9824"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="lua"
REQUIRES="lua51"
MAINTAINER="Dimitris Zlatanidis"
EMAIL="d.zlatanidis@gmail.com"