commit:     48c74ea34071e23a10d1548cb719b5d0a82dc300
Author:     William Breathitt Gray <vilhelm.gray <AT> gmail <DOT> com>
AuthorDate: Thu Jun 13 11:52:21 2019 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Tue Jun 18 20:55:45 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48c74ea3

games-fps/gzdoom: Install soundfonts

Closes: https://bugs.gentoo.org/687990
Package-Manager: Portage-2.3.67, Repoman-2.3.14
Signed-off-by: William Breathitt Gray <vilhelm.gray <AT> gmail.com>
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 .../files/gzdoom-4.1.3-install_soundfonts.patch    | 34 ++++++++++++++++++++++
 games-fps/gzdoom/gzdoom-4.1.3.ebuild               |  6 +++-
 2 files changed, 39 insertions(+), 1 deletion(-)

diff --git a/games-fps/gzdoom/files/gzdoom-4.1.3-install_soundfonts.patch 
b/games-fps/gzdoom/files/gzdoom-4.1.3-install_soundfonts.patch
new file mode 100644
index 00000000000..1fe0b99d9a8
--- /dev/null
+++ b/games-fps/gzdoom/files/gzdoom-4.1.3-install_soundfonts.patch
@@ -0,0 +1,34 @@
+From 2d1c7ba17cac3ccd201e77ad01a9dd06ab22cb2e Mon Sep 17 00:00:00 2001
+From: William Breathitt Gray <[email protected]>
+Date: Thu, 13 Jun 2019 18:01:08 +0900
+Subject: [PATCH] Install soundfonts and WOPL/WOPN banks
+
+The INSTALL_SOUNDFONT_PATH cache entry is used to configure the
+installation directory.
+---
+ src/CMakeLists.txt | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 0bb16f39e..4ff15062d 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -1451,6 +1451,15 @@ add_custom_command(TARGET zdoom POST_BUILD
+       ${CMAKE_SOURCE_DIR}/fm_banks/gs-by-papiezak-and-sneakernets.wopn 
$<TARGET_FILE_DIR:zdoom>/fm_banks/gs-by-papiezak-and-sneakernets.wopn
+ )
+ 
++if( WIN32 )
++      set( INSTALL_SOUNDFONT_PATH . CACHE STRING "Directory where soundfonts 
and WOPL/WOPN banks will be placed during install." )
++else()
++      set( INSTALL_SOUNDFONT_PATH share/games/doom CACHE STRING "Directory 
where soundfonts and WOPL/WOPN banks will be placed during install." )
++endif()
++install(FILES "${PROJECT_BINARY_DIR}/soundfonts" 
"${PROJECT_BINARY_DIR}/fm_banks"
++              DESTINATION ${INSTALL_SOUNDFONT_PATH}
++              COMPONENT "Soundfont resources")
++
+ if( CMAKE_COMPILER_IS_GNUCXX )
+       # GCC misoptimizes this file
+       set_source_files_properties( oplsynth/fmopl.cpp PROPERTIES 
COMPILE_FLAGS "-fno-tree-dominator-opts -fno-tree-fre" )
+-- 
+2.21.0
+

diff --git a/games-fps/gzdoom/gzdoom-4.1.3.ebuild 
b/games-fps/gzdoom/gzdoom-4.1.3.ebuild
index 48957b791ac..242bd4e9287 100644
--- a/games-fps/gzdoom/gzdoom-4.1.3.ebuild
+++ b/games-fps/gzdoom/gzdoom-4.1.3.ebuild
@@ -29,7 +29,10 @@ DEPEND="
 RDEPEND="${DEPEND}"
 
 S="${WORKDIR}/${PN}-g${PV}"
-PATCHES="${FILESDIR}/${P}-fluidsynth2.patch"
+PATCHES=(
+       "${FILESDIR}/${P}-fluidsynth2.patch"
+       "${FILESDIR}/${P}-install_soundfonts.patch"
+)
 
 src_prepare() {
        rm -rf docs/licenses || die
@@ -40,6 +43,7 @@ src_configure() {
        local mycmakeargs=(
                -DINSTALL_DOCS_PATH="${EPREFIX}/usr/share/doc/${PF}"
                -DINSTALL_PK3_PATH="${EPREFIX}/usr/share/doom"
+               -DINSTALL_SOUNDFONT_PATH="${EPREFIX}/usr/share/doom"
                -DDYN_FLUIDSYNTH=OFF
                -DDYN_OPENAL=OFF
                -DDYN_SNDFILE=OFF

Reply via email to