From d1aab97adea5f10ccf23b0708371a8da3420ee8e Mon Sep 17 00:00:00 2001 From: biopsin Date: Sun, 8 Aug 2021 10:16:06 +0000 Subject: [PATCH] New package: etlegacy-2.77.1 --- srcpkgs/etlegacy/INSTALL | 14 +++++++++ srcpkgs/etlegacy/REMOVE | 8 +++++ .../etlegacy/patches/expand_arch_branch.patch | 29 +++++++++++++++++++ srcpkgs/etlegacy/patches/fix_musl.patch | 11 +++++++ srcpkgs/etlegacy/template | 28 ++++++++++++++++++ 5 files changed, 90 insertions(+) create mode 100644 srcpkgs/etlegacy/INSTALL create mode 100644 srcpkgs/etlegacy/REMOVE create mode 100644 srcpkgs/etlegacy/patches/expand_arch_branch.patch create mode 100644 srcpkgs/etlegacy/patches/fix_musl.patch create mode 100644 srcpkgs/etlegacy/template diff --git a/srcpkgs/etlegacy/INSTALL b/srcpkgs/etlegacy/INSTALL new file mode 100644 index 000000000000..8a54a89f042c --- /dev/null +++ b/srcpkgs/etlegacy/INSTALL @@ -0,0 +1,14 @@ +# INSTALL +case "${ACTION}" in + post) + if [ "${UPDATE}" = "no" ]; then + echo "" + echo "Downloading 219MB essential asset files for game to run." + for i in 0 1 2; do + xbps-fetch -o /usr/lib/etlegacy/etmain/pak$i.pk3 https://mirror.etlegacy.com/etmain/pak$i.pk3 + done + ecgo "" + echo "Run game with 'etl'" + fi + ;; +esac diff --git a/srcpkgs/etlegacy/REMOVE b/srcpkgs/etlegacy/REMOVE new file mode 100644 index 000000000000..5241941773ad --- /dev/null +++ b/srcpkgs/etlegacy/REMOVE @@ -0,0 +1,8 @@ +# REMOVE +case "${ACTION}" in + pre) + if [ "${UPDATE}" = "no" ]; then + rm /usr/lib/etlegacy/etmain/pak*.pk3 + fi + ;; +esac diff --git a/srcpkgs/etlegacy/patches/expand_arch_branch.patch b/srcpkgs/etlegacy/patches/expand_arch_branch.patch new file mode 100644 index 000000000000..352355a09f1b --- /dev/null +++ b/srcpkgs/etlegacy/patches/expand_arch_branch.patch @@ -0,0 +1,29 @@ +--- a/cmake/ETLPlatform.cmake.ori 2021-03-17 09:51:48.000000000 +0100 ++++ b/cmake/ETLPlatform.cmake 2021-09-13 21:57:30.274791781 +0200 +@@ -259,6 +259,14 @@ + message(STATUS "Detected ARMV7 target processor") + set(ARCH "arm") + #add_definitions(-DX265_ARCH_ARM=1 -DHAVE_ARMV7=1) ++ elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "armv7-a") ++ set(ARCH "armeabi-v7a") ++ elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "aarch64") ++ set(ARCH "arm64-v8a") ++ elseif("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "ppc64*") ++ set(ARCH "ppc64") ++ elseif("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "ppc*") ++ set(ARCH "ppc") + else() + set(ARCH "${CMAKE_SYSTEM_PROCESSOR}") + message(STATUS "Warning: processor architecture not recognised (${CMAKE_SYSTEM_PROCESSOR})") + +--- a/src/qcommon/q_platform.h.ori 2021-03-17 09:51:48.000000000 +0100 ++++ b/src/qcommon/q_platform.h 2021-09-13 22:17:09.146901486 +0200 +@@ -218,6 +218,8 @@ + #define ARCH_STRING "sparc" + #elif defined __arm__ + #define ARCH_STRING "arm" // __ARM_ARCH_'V'__ FIXME: add ARM version to the ARCH_STRING ++#elif defined __aarch64__ ++#define ARCH_STRING "arm64-v8a" + #elif defined __cris__ + #define ARCH_STRING "cris" + #elif defined __hppa__ diff --git a/srcpkgs/etlegacy/patches/fix_musl.patch b/srcpkgs/etlegacy/patches/fix_musl.patch new file mode 100644 index 000000000000..9ac2c2f6a6a1 --- /dev/null +++ b/srcpkgs/etlegacy/patches/fix_musl.patch @@ -0,0 +1,11 @@ +--- a/src/qcommon/q_platform.h.ori 2021-03-17 09:51:48.000000000 +0100 ++++ b/src/qcommon/q_platform.h 2021-09-13 22:14:56.029889098 +0200 +@@ -228,7 +228,7 @@ + #define ARCH_STRING "sh" + #endif + +-#if __FLOAT_WORD_ORDER == __BIG_ENDIAN ++#if __BYTE_ORDER == __BIG_ENDIAN + #define Q3_BIG_ENDIAN + #else + #define Q3_LITTLE_ENDIAN diff --git a/srcpkgs/etlegacy/template b/srcpkgs/etlegacy/template new file mode 100644 index 000000000000..9d26517939e4 --- /dev/null +++ b/srcpkgs/etlegacy/template @@ -0,0 +1,28 @@ +# Template file for 'etlegacy' +pkgname=etlegacy +version=2.77.1 +revision=1 +build_style=cmake +configure_args="-DCMAKE_BUILD_TYPE=Release -DCMAKE_LIBRARY_PATH=/usr \ + -DCMAKE_INSTALL_PREFIX=/usr -DINSTALL_DEFAULT_BASEDIR=/usr/lib/etlegacy \ + -DCLIENT_GLVND=1 -DBUNDLED_LIBS=0 -DFEATURE_AUTOUPDATE=0 \ + -DINSTALL_OMNIBOT=0 -DCROSS_COMPILE32=0" +hostmakedepends="libtool pkg-config" +makedepends="libglvnd-devel glew-devel SDL2-devel zlib-devel minizip-devel + libjpeg-turbo-devel libcurl-devel lua54-devel libvorbis-devel libtheora-devel + freetype-devel libpng-devel sqlite-devel libopenal-devel" +short_desc="Project based on Wolfenstein: Enemy Territory" +maintainer="biopsin " +license="GPL-3.0-or-later" +homepage="https://www.etlegacy.com" +changelog="https://github.com/etlegacy/etlegacy/wiki/Changelog.md" +distfiles="https://github.com/etlegacy/etlegacy/archive/refs/tags/v${version}.tar.gz" +checksum=730a8a52435884b922d8c280fcdeace648902399798c7a973da72fbc4163ebe2 +lib32disabled=yes +restricted=yes + +post_install() { + vmkdir usr/share + vcopy ${DESTDIR}/usr/lib/${pkgname}/share usr/share/${pkgname} + rm -rf ${DESTDIR}/usr/lib/${pkgname}/share +}