diff --git a/srcpkgs/thextech/files/patches/arm-disable-opus.patch b/srcpkgs/thextech/files/patches/arm-disable-opus.patch new file mode 100644 index 00000000000000..42b587deed7059 --- /dev/null +++ b/srcpkgs/thextech/files/patches/arm-disable-opus.patch @@ -0,0 +1,52 @@ +--- a/3rdparty/AudioCodecs/CMakeLists.txt 2025-12-28 20:00:37.812797800 +1000 ++++ b/3rdparty/AudioCodecs/CMakeLists.txt 2026-02-16 23:13:08.565423177 +1000 +@@ -181,16 +181,24 @@ + endif() + + option(BUILD_OPUS "Enable building of OPUS" ON) ++option(BUILD_OPUS_DISABLE_RTCD "Disable assembly optimisations even they are available" OFF) + if(BUILD_OPUS) + if(NOT BUILD_OGG_VORBIS) + add_subdirectory(libogg) + endif() ++ if(BUILD_OPUS_DISABLE_RTCD) ++ set(DISABLE_RTCD ON) ++ endif() + add_subdirectory(libopus) + add_subdirectory(libopusfile) + target_include_directories(opus PUBLIC ${CMAKE_SOURCE_DIR}/libogg/include) + target_include_directories(opusfile PUBLIC ${CMAKE_SOURCE_DIR}/libogg/include) + add_dependencies(opus ogg) + add_dependencies(opusfile opus ogg) ++ if(BUILD_OPUS_DISABLE_RTCD) ++ mark_as_advanced(DISABLE_RTCD) ++ unset(DISABLE_RTCD) ++ endif() + endif() + + option(BUILD_WAVPACK "Enable building of WavPack" ON) +--- a/cmake/library_SDLMixerX.cmake 2025-12-28 20:00:05.180841700 +1000 ++++ b/cmake/library_SDLMixerX.cmake 2026-02-17 00:18:36.994818739 +1000 +@@ -22,6 +22,7 @@ + endif() + + option(MIXERX_ENABLE_WAVPACK "Enable the WavPack codec support [Support is experimental, doesn't builds on some platforms]" OFF) ++option(AUDIOCODECS_DISABLE_ASM_OPTIMIZATIONS "Disable hardware optimizations for libopus and other AudioCodecs-built libraries" OFF) + + if(NOT NINTENDO_WII AND NOT NINTENDO_WIIU AND NOT XTECH_MACOSX_TIGER) + option(PGE_USE_LOCAL_SDL2 "Do use the locally-built SDL2 library from the AudioCodecs set. Otherwise, download and build the development top main version." ON) +@@ -237,6 +238,13 @@ + ${VITA_AUDIOCODECS_CMAKE_FLAGS} + ) + ++if(AUDIOCODECS_DISABLE_ASM_OPTIMIZATIONS) ++ list(APPEND AUDIO_CODECS_BUILD_ARGS ++ "-DBUILD_OPUS_DISABLE_RTCD=ON" ++ "-DDISABLE_RTCD=ON" ++ ) ++endif() ++ + if(VITA OR NINTENDO_DS OR NINTENDO_3DS OR NINTENDO_WII OR NINTENDO_WIIU OR NINTENDO_SWITCH) + list(APPEND AUDIO_CODECS_BUILD_ARGS + -DENABLE_FPIC=OFF + diff --git a/srcpkgs/thextech/template b/srcpkgs/thextech/template new file mode 100644 index 00000000000000..1023ddd39e8eb2 --- /dev/null +++ b/srcpkgs/thextech/template @@ -0,0 +1,43 @@ +# Template file for 'thextech' +pkgname=thextech +version=1.3.7.2 +revision=1 +_subversion=1 # hotfix +build_style=cmake +configure_args="-DPGE_SHARED_SDLMIXER=OFF -DUSE_SYSTEM_SDL2=ON -DUSE_FREEIMAGE_SYSTEM_LIBS=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=MinSizeRel" +hostmakedepends="pkg-config git cmake ninja" +makedepends="SDL2-devel libpng-devel libjpeg-turbo-devel alsa-lib-devel" +depends="SDL2 libjpeg-turbo libpng" +short_desc="Modern C++ port and successor of the SMBX engine" +maintainer="SkullGamer205 " +license=GPL-3.0 +homepage="wohlsoft.ru/projects/thextech" + +_ver_subver() { + echo ${version}$( if [ -n $_subversion ]; then + echo "-${_subversion}" + fi ) +} +distfiles="https://github.com/TheXTech/TheXTech/releases/download/v$(_ver_subver)/thextech-full-src-v${version}.tar.gz" +checksum=a639c70ea8259a1a0a0345d9614d295aaad8eeca8e6b1752b896930f74ed2404 +nopie=yes # Various file managers recognise it as SO library. + +case "$XBPS_TARGET_MACHINE" in + armv[67]*) configure_args+=" -DAUDIOCODECS_DISABLE_ASM_OPTIMIZATIONS=ON" ;; +esac + +post_patch() { + case "$XBPS_TARGET_MACHINE" in + armv[67]*) + msg_normal "Detected ARM architecture ("$XBPS_TARGET_MACHINE")\n" + for x in ${FILESDIR}/patches/arm-disable-opus.patch; do + msg_normal "Applying patch $x\n" + patch -sNp1 -i ${x} + done + esac +} + +post_install() { + rm -rf ${DESTDIR}/builddir +} +