From afee3f947f8d5257b1846508f1f9382823d74795 Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Thu, 4 May 2023 11:03:01 +0200 Subject: [PATCH] game_music_emu, restore 0.6.1 for aplayer (#8580) --- .../game_music_emu-0.6.1.recipe | 78 +++++++++++ .../patches/game_music_emu-0.6.1.patchset | 121 ++++++++++++++++++ 2 files changed, 199 insertions(+) create mode 100644 media-libs/game-music-emu/game_music_emu-0.6.1.recipe create mode 100644 media-libs/game-music-emu/patches/game_music_emu-0.6.1.patchset diff --git a/media-libs/game-music-emu/game_music_emu-0.6.1.recipe b/media-libs/game-music-emu/game_music_emu-0.6.1.recipe new file mode 100644 index 000000000..e47e15d58 --- /dev/null +++ b/media-libs/game-music-emu/game_music_emu-0.6.1.recipe @@ -0,0 +1,78 @@ +SUMMARY="Collection of video game music file emulators" +DESCRIPTION="Game_Music_Emu is a collection of video game music file emulators that +support the following formats and systems: + +- AY ZX Spectrum/Amstrad CPC +- GBS Nintendo Game Boy +- GYM Sega Genesis/Mega Drive +- HES NEC TurboGrafx-16/PC Engine +- KSS MSX Home Computer/other Z80 systems (doesn't support FM sound) +- NSF/NSFE Nintendo NES/Famicom (with VRC 6, Namco 106, and FME-7 sound) +- SAP Atari systems using POKEY sound chip +- SPC Super Nintendo/Super Famicom +- VGM/VGZ Sega Master System/Mark III, Sega Genesis/Mega Drive,BBC Micro" +HOMEPAGE="https://bitbucket.org/mpyne/game-music-emu" +COPYRIGHT="2002 Stephane Dallongeville + 2003-2009 Shay Green" +LICENSE="GNU LGPL v2.1" +REVISION="3" +SOURCE_URI="https://bitbucket.org/mpyne/game-music-emu/downloads/game-music-emu-$portVersion.tar.bz2" +CHECKSUM_SHA256="dc11bea098072d540d4d52dfb252e76fc3d3af67ee2807da48fbd8dbda3fd321" +SOURCE_DIR="game-music-emu-$portVersion" +PATCHES="game_music_emu-$portVersion.patchset" + +ARCHITECTURES="!all x86_gcc2" +SECONDARY_ARCHITECTURES="x86_gcc2 !x86" + +PROVIDES=" + game_music_emu$secondaryArchSuffix = $portVersion + lib:libgme$secondaryArchSuffix = 0.6.1 compat >= 0 + " +REQUIRES=" + haiku$secondaryArchSuffix + " + +PROVIDES_devel=" + game_music_emu${secondaryArchSuffix}_devel = $portVersion + devel:libgme$secondaryArchSuffix = 0.6.1 compat >= 0 + " +REQUIRES_devel=" + game_music_emu$secondaryArchSuffix == $portVersion base + haiku${secondaryArchSuffix}_devel + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:gcc$secondaryArchSuffix + cmd:make + " + +defineDebugInfoPackage game_music_emu$secondaryArchSuffix \ + $libDir/libgme.so.0.6.1 + +BUILD() +{ + cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=$prefix \ + -DLIB_SUFFIX=/${secondaryArchSuffix#"_"} + make -C build $jobArgs +} + +INSTALL() +{ + make -C build install + + # Fixup install paths + mkdir -p $developDir $includeDir + mv $prefix/include/* $includeDir + rm -rf $prefix/include + + prepareInstalledDevelLib libgme + fixPkgconfig + + packageEntries devel \ + $developDir +} diff --git a/media-libs/game-music-emu/patches/game_music_emu-0.6.1.patchset b/media-libs/game-music-emu/patches/game_music_emu-0.6.1.patchset new file mode 100644 index 000000000..cc1f45443 --- /dev/null +++ b/media-libs/game-music-emu/patches/game_music_emu-0.6.1.patchset @@ -0,0 +1,121 @@ +From 937d8de67015e0eeccce62f0ece12df26ce7315c Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Mon, 28 Mar 2016 10:51:20 +0200 +Subject: gcc2 compatibility. + + +diff --git a/gme/Gbs_Emu.h b/gme/Gbs_Emu.h +index 580f395..df0e70a 100644 +--- a/gme/Gbs_Emu.h ++++ b/gme/Gbs_Emu.h +@@ -41,7 +41,11 @@ public: + + public: + // deprecated ++#if __GNUC__ <= 2 ++ blargg_err_t load(Data_Reader& in) {return Music_Emu::load(in);} ++#else + using Music_Emu::load; ++#endif + blargg_err_t load( header_t const& h, Data_Reader& in ) // use Remaining_Reader + { return load_remaining_( &h, sizeof h, in ); } + +diff --git a/gme/Gym_Emu.h b/gme/Gym_Emu.h +index 290f57f..048f6ef 100644 +--- a/gme/Gym_Emu.h ++++ b/gme/Gym_Emu.h +@@ -34,7 +34,11 @@ public: + + public: + // deprecated ++#if __GNUC__ <= 2 ++ blargg_err_t load(Data_Reader& in) {return Music_Emu::load(in);} ++#else + using Music_Emu::load; ++#endif + blargg_err_t load( header_t const& h, Data_Reader& in ) // use Remaining_Reader + { return load_remaining_( &h, sizeof h, in ); } + enum { gym_rate = 60 }; +diff --git a/gme/Music_Emu.h b/gme/Music_Emu.h +index 3aafa5e..0f0c7b9 100644 +--- a/gme/Music_Emu.h ++++ b/gme/Music_Emu.h +@@ -78,7 +78,11 @@ public: + void ignore_silence( bool disable = true ); + + // Info for current track ++#if __GNUC__ <= 2 ++ blargg_err_t track_info( track_info_t* out, int t ) const {return Gme_File::track_info(out,t);} ++#else + using Gme_File::track_info; ++#endif + blargg_err_t track_info( track_info_t* out ) const; + + // Sound customization +diff --git a/gme/Nsf_Emu.h b/gme/Nsf_Emu.h +index e538b1b..55461b0 100644 +--- a/gme/Nsf_Emu.h ++++ b/gme/Nsf_Emu.h +@@ -44,7 +44,11 @@ public: + + public: + // deprecated ++#if __GNUC__ <= 2 ++ blargg_err_t load(Data_Reader& in) {return Music_Emu::load(in);} ++#else + using Music_Emu::load; ++#endif + blargg_err_t load( header_t const& h, Data_Reader& in ) // use Remaining_Reader + { return load_remaining_( &h, sizeof h, in ); } + +diff --git a/gme/Nsfe_Emu.h b/gme/Nsfe_Emu.h +index fd65f0a..5c015c1 100644 +--- a/gme/Nsfe_Emu.h ++++ b/gme/Nsfe_Emu.h +@@ -46,7 +46,11 @@ public: + public: + // deprecated + struct header_t { char tag [4]; }; ++#if __GNUC__ <= 2 ++ blargg_err_t load(Data_Reader& in) {return Music_Emu::load(in);} ++#else + using Music_Emu::load; ++#endif + blargg_err_t load( header_t const& h, Data_Reader& in ) // use Remaining_Reader + { return load_remaining_( &h, sizeof h, in ); } + void disable_playlist( bool = true ); // use clear_playlist() +diff --git a/gme/Spc_Emu.h b/gme/Spc_Emu.h +index 76e1ac6..c7d06b1 100644 +--- a/gme/Spc_Emu.h ++++ b/gme/Spc_Emu.h +@@ -48,7 +48,11 @@ public: + + public: + // deprecated ++#if __GNUC__ <= 2 ++ blargg_err_t load(Data_Reader& in) {return Music_Emu::load(in);} ++#else + using Music_Emu::load; ++#endif + blargg_err_t load( header_t const& h, Data_Reader& in ) // use Remaining_Reader + { return load_remaining_( &h, sizeof h, in ); } + byte const* trailer() const; // use track_info() +diff --git a/gme/Vgm_Emu.h b/gme/Vgm_Emu.h +index 40cfb71..9d21c6a 100644 +--- a/gme/Vgm_Emu.h ++++ b/gme/Vgm_Emu.h +@@ -53,7 +53,11 @@ public: + + public: + // deprecated ++#if __GNUC__ <= 2 ++ blargg_err_t load(Data_Reader& in) {return Music_Emu::load(in);} ++#else + using Music_Emu::load; ++#endif + blargg_err_t load( header_t const& h, Data_Reader& in ) // use Remaining_Reader + { return load_remaining_( &h, sizeof h, in ); } + byte const* gd3_data( int* size_out = 0 ) const; // use track_info() +-- +2.37.3 +