From e9e47f04979aaa0b2d73550ab4403d0d2f57327e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Rolim?= Date: Sun, 30 Aug 2020 17:28:45 -0300 Subject: [PATCH 1/2] New package: ZMusic-1.1.2. ZMusic needs libopenal to enable sound playback. libopenal, libfluidsynth and libsndfile are all loaded dynamically. Based on and closes #20665. --- common/shlibs | 2 ++ srcpkgs/ZMusic-devel | 1 + srcpkgs/ZMusic/patches/system-gme.patch | 24 +++++++++++++++++ srcpkgs/ZMusic/template | 34 +++++++++++++++++++++++++ 4 files changed, 61 insertions(+) create mode 120000 srcpkgs/ZMusic-devel create mode 100644 srcpkgs/ZMusic/patches/system-gme.patch create mode 100644 srcpkgs/ZMusic/template diff --git a/common/shlibs b/common/shlibs index a6b5737b845..688a5c69399 100644 --- a/common/shlibs +++ b/common/shlibs @@ -2977,6 +2977,8 @@ libpisync.so.1 pilot-link-0.12.5_1 libpitcl.so.0 pilot-link-0.12.5_1 libiscsi.so.9 libiscsi-1.19.0_1 libgme.so.0 libgme-0.6.1_1 +libzmusic.so.1 ZMusic-1.1.2_1 +libzmusiclite.so.1 ZMusic-1.1.2_1 libsidplayfp.so.5 libsidplayfp-2.0.0_1 libstilview.so.0 libsidplayfp-1.8.7_1 libczmq.so.4 czmq-4.0.1_1 diff --git a/srcpkgs/ZMusic-devel b/srcpkgs/ZMusic-devel new file mode 120000 index 00000000000..023ff24ecd4 --- /dev/null +++ b/srcpkgs/ZMusic-devel @@ -0,0 +1 @@ +ZMusic \ No newline at end of file diff --git a/srcpkgs/ZMusic/patches/system-gme.patch b/srcpkgs/ZMusic/patches/system-gme.patch new file mode 100644 index 00000000000..ed42fbcfbec --- /dev/null +++ b/srcpkgs/ZMusic/patches/system-gme.patch @@ -0,0 +1,24 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f09423d..468b06f 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -195,18 +195,7 @@ else() + set( ZLIB_LIBRARY z ) + endif() + +- +-if( GME_FOUND AND NOT FORCE_INTERNAL_GME ) +- message( STATUS "Using system gme library, includes found at ${GME_INCLUDE_DIR}" ) +-else() +- message( STATUS "Using internal gme library" ) +- # Use MAME as it's a balanced emulator: well-accurate, but doesn't eats lot of CPU +- # Nuked OPN2 is very accurate emulator, but it eats too much CPU for the workflow +- set( GME_YM2612_EMU "MAME" ) +- add_subdirectory( thirdparty/game-music-emu ) +- set( GME_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/game-music-emu" ) +- set( GME_LIBRARIES gme ) +-endif() ++message( STATUS "Using system gme library, includes found at ${GME_INCLUDE_DIR}" ) + + set( ADL_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/adlmidi" ) + set( OPN_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/opnmidi" ) diff --git a/srcpkgs/ZMusic/template b/srcpkgs/ZMusic/template new file mode 100644 index 00000000000..3f627af6369 --- /dev/null +++ b/srcpkgs/ZMusic/template @@ -0,0 +1,34 @@ +# Template file for 'ZMusic' +pkgname=ZMusic +version=1.1.2 +revision=1 +build_style=cmake +configure_args="-DGME_INCLUDE_DIR=/usr/include -DGME_LIBRARIES=gme" +hostmakedepends="pkg-config" +makedepends="zlib-devel alsa-lib-devel libgme-devel libopenal-devel libsndfile-devel" +depends="libfluidsynth libopenal libsndfile" +short_desc="GZDoom's music system" +maintainer="Érico Nogueira " +license="GPL-3.0-or-later" +homepage="https://github.com/coelckers/ZMusic" +distfiles="${homepage}/archive/${version}.tar.gz" +checksum=951940fe63ee386fdea044f2543c7460977921ce3e60d282b87be81546078e07 +nocross=yes + +if [ "$XBPS_TARGET_LIBC" = musl ]; then + makedepends+=" musl-fts-devel" +fi + +post_install() { + vmkdir usr/share/licenses/${pkgname} + vcopy "licenses/*" usr/share/licenses/${pkgname}/ +} + +ZMusic-devel_package() { + depends="${sourcepkg}>=${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove "usr/lib/*.so" + } +} From 0be9d1679a4178e4f91ea3093d7e1fef106172bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Rolim?= Date: Sun, 9 Aug 2020 01:59:48 -0300 Subject: [PATCH 2/2] gzdoom: update to 4.4.2. --- ...d654ed85fc42ec59c99f760a7da572a95d2d.patch | 21 ----------- srcpkgs/gzdoom/patches/i686.patch | 35 ------------------- srcpkgs/gzdoom/patches/ppc-musl.patch | 13 ------- srcpkgs/gzdoom/template | 33 +++++++++-------- 4 files changed, 16 insertions(+), 86 deletions(-) delete mode 100644 srcpkgs/gzdoom/patches/c3fed654ed85fc42ec59c99f760a7da572a95d2d.patch delete mode 100644 srcpkgs/gzdoom/patches/i686.patch delete mode 100644 srcpkgs/gzdoom/patches/ppc-musl.patch diff --git a/srcpkgs/gzdoom/patches/c3fed654ed85fc42ec59c99f760a7da572a95d2d.patch b/srcpkgs/gzdoom/patches/c3fed654ed85fc42ec59c99f760a7da572a95d2d.patch deleted file mode 100644 index 92399384298..00000000000 --- a/srcpkgs/gzdoom/patches/c3fed654ed85fc42ec59c99f760a7da572a95d2d.patch +++ /dev/null @@ -1,21 +0,0 @@ -From c3fed654ed85fc42ec59c99f760a7da572a95d2d Mon Sep 17 00:00:00 2001 -From: John Zimmermann -Date: Tue, 29 Oct 2019 01:02:09 +0100 -Subject: [PATCH] utility/palette.cpp requires sse2 on x86* - ---- - src/CMakeLists.txt | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 6f6ece0a24..cb8ffc0f3d 100644 ---- src/CMakeLists.txt -+++ src/CMakeLists.txt -@@ -1305,6 +1305,7 @@ if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE ) - rendering/polyrenderer/poly_all.cpp - rendering/swrenderer/r_all.cpp - utility/x86.cpp -+ utility/palette.cpp - PROPERTIES COMPILE_FLAGS "-msse2 -mmmx" ) - endif() - endif() diff --git a/srcpkgs/gzdoom/patches/i686.patch b/srcpkgs/gzdoom/patches/i686.patch deleted file mode 100644 index 6f9d839ab06..00000000000 --- a/srcpkgs/gzdoom/patches/i686.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- src/utility/palette.cpp 2019-10-20 16:16:08.000000000 +0200 -+++ - 2019-10-30 16:45:10.882234214 +0100 -@@ -34,6 +34,10 @@ - - #include "palette.h" - #include "palentry.h" -+#include -+#include -+#include -+#include - - /****************************/ - /* Palette management stuff */ ---- src/CMakeLists.txt 2019-10-30 16:50:46.769763172 +0100 -+++ - 2019-10-30 17:11:18.507995925 +0100 -@@ -1210,7 +1210,7 @@ - endif() - endif() - --target_link_libraries( zdoom ${ZDOOM_LIBS} gdtoa dumb lzma adl opn timidity timidityplus wildmidi oplsynth zmusic ) -+target_link_libraries( zdoom ${ZDOOM_LIBS} dl gdtoa dumb lzma adl opn timidity timidityplus wildmidi oplsynth zmusic ) - - include_directories( . - g_statusbar ---- libraries/zmusic/CMakeLists.txt 2019-10-20 16:16:08.000000000 +0200 -+++ - 2019-10-30 17:15:11.581747039 +0100 -@@ -94,7 +94,7 @@ - zmusic/zmusic.cpp - ${PLAT_SOURCES} - ) --target_link_libraries( zmusic adl dumb gme oplsynth opn timidity timidityplus wildmidi ) -+target_link_libraries( zmusic dl adl dumb gme oplsynth opn timidity timidityplus wildmidi ) - - if( NOT DYN_SNDFILE AND SNDFILE_FOUND ) - include_directories( "${SNDFILE_INCLUDE_DIRS}" ) diff --git a/srcpkgs/gzdoom/patches/ppc-musl.patch b/srcpkgs/gzdoom/patches/ppc-musl.patch deleted file mode 100644 index 978800ac214..00000000000 --- a/srcpkgs/gzdoom/patches/ppc-musl.patch +++ /dev/null @@ -1,13 +0,0 @@ -Taken from libgme package. - ---- libraries/game-music-emu/gme/blargg_endian.h -+++ libraries/game-music-emu/gme/blargg_endian.h -@@ -36,7 +36,7 @@ - #endif - - #if defined (MSB_FIRST) || defined (__BIG_ENDIAN__) || defined (WORDS_BIGENDIAN) || \ -- defined (__sparc__) || BLARGG_CPU_POWERPC || \ -+ defined (__sparc__) || \ - (defined (BIG_ENDIAN) && BIG_ENDIAN+0 != 4321) - #define BLARGG_BIG_ENDIAN 1 - #elif !defined (__mips__) diff --git a/srcpkgs/gzdoom/template b/srcpkgs/gzdoom/template index 96e9aedeac5..2e2baa629a9 100644 --- a/srcpkgs/gzdoom/template +++ b/srcpkgs/gzdoom/template @@ -1,41 +1,40 @@ # Template file for 'gzdoom' pkgname=gzdoom -version=4.3.3 +version=4.4.2 revision=1 -_tagdate=2019-07-09 +_tagdate=2020-06-16 wrksrc="${pkgname}-g${version}" build_style=cmake configure_args="-DINSTALL_PK3_PATH=share/gzdoom" hostmakedepends="pkg-config tar xz" -makedepends="SDL2-devel gtk+3-devel fluidsynth-devel libgme-devel libgomp-devel ppl-devel" -depends="libfluidsynth gtk+3" +makedepends="SDL2-devel gtk+3-devel fluidsynth-devel libgme-devel libgomp-devel + ppl-devel ZMusic-devel" +depends="gtk+3" short_desc="Advanced Doom source port with OpenGL support" maintainer="Michael Straube " license="GPL-3.0-or-later" homepage="https://www.zdoom.org" distfiles="https://github.com/coelckers/${pkgname}/archive/g${version}.tar.gz https://github.com/coelckers/${pkgname}/releases/download/g${version}/${pkgname}_${version}_amd64.deb" -checksum="8fe6bf59071dc603e611e9e822cd8a6934cc481d0a2a198d921af88126661b60 - 6d3c216eb12dd6f5a9504f7a2479721a465b1cc60a1888deab1b47bff1431eaa" +checksum="d0ede9aefa8834b6d97a8a5336e57077475f43c297447f75b37550ee93010674 + ccff299967bd47c8154d3af835fe514df29fc0560831437074a4b5ada674e6ba" skip_extraction="${pkgname}_${version}_amd64.deb" nocross=yes -case "$XBPS_MACHINE" in - *-musl) - configure_args+=" -DCMAKE_CXX_FLAGS=-Wl,-lexecinfo -DCMAKE_EXE_LINKER_FLAGS=-lfts" - makedepends+=" musl-fts-devel libexecinfo-devel" - ;; -esac +if [ "$XBPS_TARGET_LIBC" = musl ]; then + makedepends+=" musl-fts-devel libexecinfo-devel" +fi post_extract() { ar -p ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${pkgname}_${version}_amd64.deb data.tar.xz | tar --strip-components=4 -xJf - ./usr/share/{pixmaps/gzdoom.png,applications/gzdoom.desktop} - sed -i "s|GIT_DESCRIPTION|\"${version}\"|g" src/gitinfo.cpp - sed -i "s|VERSIONSTR|\"${version}\"|g" src/gitinfo.cpp - sed -i "s|GIT_TIME|\"${_tagdate}\"|g" src/gitinfo.cpp - sed -i 's|#define SHARE_DIR.*|#define SHARE_DIR "/usr/share/gzdoom/"|' src/posix/i_system.h - sed -i 's|/usr/share/games/doom|/usr/share/gzdoom|g' src/gameconfigfile.cpp + vsed -e "s|GIT_DESCRIPTION|\"${version}\"|g" -i src/gitinfo.cpp + vsed -e "s|VERSIONSTR|\"${version}\"|g" -i src/gitinfo.cpp + vsed -e "s|GIT_TIME|\"${_tagdate}\"|g" -i src/gitinfo.cpp + vsed -e 's|#define SHARE_DIR.*|#define SHARE_DIR "/usr/share/gzdoom/"|' \ + -i src/common/platform/posix/i_system.h + vsed -e 's|/usr/share/games/doom|/usr/share/gzdoom|g' -i src/gameconfigfile.cpp } post_install() {