games/OpenRA: 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 16:56:52 -04:00 committed by Willy Sudiarto Raharjo
parent b3b7cd9459
commit 01ca1fa732
No known key found for this signature in database
GPG key ID: 3F617144D7238786
4 changed files with 31 additions and 10 deletions

View file

@ -22,11 +22,13 @@
# 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: build with lua51.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=OpenRA
VERSION=${VERSION:-20210321}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -38,9 +40,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
@ -75,6 +74,7 @@ rm -rf $TMP/$PRGNAM-release-$VERSION-source
mkdir -p $TMP $PKG $OUTPUT $TMP/$PRGNAM-release-$VERSION-source
cd $TMP/$PRGNAM-release-$VERSION-source
tar xvf $CWD/$PRGNAM-release-$VERSION-source.tar.bz2
patch -p1 < $CWD/lua51.diff
tar -xzvf $CWD/openra-deps.tar.gz
cp $CWD/IP2LOCATION-LITE-DB1.IPV6.BIN.ZIP .
rm fetch-geoip.sh
@ -86,11 +86,8 @@ chmod +x fetch-geoip.sh
sed -i 's/msbuild/dotnet\ msbuild/g' ./Makefile ./packaging/functions.sh
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 {} +
unshare -n make all TARGETPLATFORM=unix-generic RUNTIME=mono MSBUILD='dotnet msbuild -verbosity:m -nologo'
make prefix=/usr mandir=/usr/man bindir=/usr/games libdir=/usr/lib${LIBDIRSUFFIX} install DESTDIR=$PKG

View file

@ -9,6 +9,6 @@ MD5SUM="38593fbcdda629561d8c0bc8ac1af402 \
ef52f92818ebc942ca98108e92a0b802"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="lua mono dotnet-sdk-6.0"
REQUIRES="lua51 mono dotnet-sdk-6.0"
MAINTAINER="khronosschoty"
EMAIL="khronosschoty@posteo.org"

12
games/OpenRA/lua51.diff Normal file
View file

@ -0,0 +1,12 @@
diff -Naur a/configure-system-libraries.sh b/configure-system-libraries.sh
--- a/configure-system-libraries.sh 2021-03-21 11:20:04.000000000 -0000
+++ b/configure-system-libraries.sh 2024-10-18 20:49:28.647234464 -0000
@@ -44,7 +44,7 @@
patch_config FreeType "${SEARCHDIRS}" bin/OpenRA.Platforms.Default.dll.config freetype6.dylib libfreetype.6.dylib
else
SEARCHDIRS="/lib /lib64 /usr/lib /usr/lib64 /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu /usr/lib/arm-linux-gnueabihf /usr/lib/aarch64-linux-gnu /usr/lib/powerpc64le-linux-gnu /usr/lib/mipsel-linux-gnu /usr/local/lib /opt/lib /opt/local/lib /app/lib"
- patch_config "Lua 5.1" "${SEARCHDIRS}" bin/Eluant.dll.config lua51.so "liblua.so.5.1.5 liblua5.1.so.5.1 liblua5.1.so.0 liblua.so.5.1 liblua-5.1.so liblua5.1.so"
+ patch_config "Lua 5.1" "${SEARCHDIRS}" bin/Eluant.dll.config lua51.so "liblua5.1.so"
patch_config SDL2 "${SEARCHDIRS}" bin/SDL2-CS.dll.config SDL2.so "libSDL2-2.0.so.0 libSDL2-2.0.so libSDL2.so"
patch_config OpenAL "${SEARCHDIRS}" bin/OpenAL-CS.Core.dll.config soft_oal.so "libopenal.so.1 libopenal.so"
patch_config FreeType "${SEARCHDIRS}" bin/OpenRA.Platforms.Default.dll.config freetype6.so "libfreetype.so.6 libfreetype.so"

12
games/OpenRA/luajit.diff Normal file
View file

@ -0,0 +1,12 @@
diff -Naur a/configure-system-libraries.sh b/configure-system-libraries.sh
--- a/configure-system-libraries.sh 2021-03-21 11:20:04.000000000 -0000
+++ b/configure-system-libraries.sh 2024-10-18 20:49:28.647234464 -0000
@@ -44,7 +44,7 @@
patch_config FreeType "${SEARCHDIRS}" bin/OpenRA.Platforms.Default.dll.config freetype6.dylib libfreetype.6.dylib
else
SEARCHDIRS="/lib /lib64 /usr/lib /usr/lib64 /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu /usr/lib/arm-linux-gnueabihf /usr/lib/aarch64-linux-gnu /usr/lib/powerpc64le-linux-gnu /usr/lib/mipsel-linux-gnu /usr/local/lib /opt/lib /opt/local/lib /app/lib"
- patch_config "Lua 5.1" "${SEARCHDIRS}" bin/Eluant.dll.config lua51.so "liblua.so.5.1.5 liblua5.1.so.5.1 liblua5.1.so.0 liblua.so.5.1 liblua-5.1.so liblua5.1.so"
+ patch_config "Lua 5.1" "${SEARCHDIRS}" bin/Eluant.dll.config lua51.so "libluajit-5.1.so"
patch_config SDL2 "${SEARCHDIRS}" bin/SDL2-CS.dll.config SDL2.so "libSDL2-2.0.so.0 libSDL2-2.0.so libSDL2.so"
patch_config OpenAL "${SEARCHDIRS}" bin/OpenAL-CS.Core.dll.config soft_oal.so "libopenal.so.1 libopenal.so"
patch_config FreeType "${SEARCHDIRS}" bin/OpenRA.Platforms.Default.dll.config freetype6.so "libfreetype.so.6 libfreetype.so"