summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-strategy/dunelegacy')
-rw-r--r--games-strategy/dunelegacy/Manifest1
-rw-r--r--games-strategy/dunelegacy/dunelegacy-0.96.4.ebuild39
-rw-r--r--games-strategy/dunelegacy/files/dunelegacy-0.96.4-init-mid.patch50
-rw-r--r--games-strategy/dunelegacy/metadata.xml1
4 files changed, 90 insertions, 1 deletions
diff --git a/games-strategy/dunelegacy/Manifest b/games-strategy/dunelegacy/Manifest
index 8f985fdaa79c..1094eeaea8c5 100644
--- a/games-strategy/dunelegacy/Manifest
+++ b/games-strategy/dunelegacy/Manifest
@@ -1,2 +1,3 @@
DIST dunelegacy-0.96.3-no-autoreconf.patch.xz 8908 BLAKE2B eb1c0a5a155851e199ad2c1f0cbd8f7c583ac148f92e1b2829607c0960bf09a6d8bea8e34749df726f394b3cf796f0c457086d993ace2b3336ce99ed36fb77e1 SHA512 fc17c771a19611057b2990b76eda0eea08e011dcac455bdf7e26bba1f2e2aa6cec120f2dcbce488a2318553f9e58b4a2b5ea24c7e1e27ada9ec5740f2b66ca4c
DIST dunelegacy-0.96.3-src.tar.bz2 1652302 BLAKE2B 4502300f1364027f1734a0738a648a9ac473a142e8091d08f5c44996fa41a26e91ab030f90d3f961b95b44e7e2bcb72a376915dc014aafee5e3d0dc4f6c8915b SHA512 c84281b44bdac4eec360d90e2f23aa75468cf08c6edd6a5002c539e609312fd39e3284518ef5498201f2b0433d11cf2478cd13a2159af7c6bbef326e680fa241
+DIST dunelegacy-0.96.4-src.tar.bz2 2513167 BLAKE2B 119ccabc319a54fbc85906a215ccb44079dabf82568dbd446447bbc6fade873c4760da83a50351acf63aec49bf8364c50386eef2b0681bc7a895db870673340f SHA512 d6e152da4bc526ed05ac89fafc2e3467b1a95b3670987eeca262b7207e7dbe67dd228483cb5a432fe08232e34a52d4cb500b42cd186adb4bcde5da17419f7db0
diff --git a/games-strategy/dunelegacy/dunelegacy-0.96.4.ebuild b/games-strategy/dunelegacy/dunelegacy-0.96.4.ebuild
new file mode 100644
index 000000000000..6fef0db3e77f
--- /dev/null
+++ b/games-strategy/dunelegacy/dunelegacy-0.96.4.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit desktop xdg
+
+DESCRIPTION="Updated clone of Westood Studios' Dune II"
+HOMEPAGE="http://dunelegacy.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.bz2"
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+
+RDEPEND="media-libs/libsdl2[sound,threads,video]
+ media-libs/sdl2-mixer[midi]"
+
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-init-mid.patch
+)
+
+src_prepare() {
+ default
+
+ # Prepend upstream flags.
+ sed -i -r 's/^(C.*FLAGS)=[^$]+$/\0" ${\1}"/' configure{,.ac} || die
+}
+
+src_install() {
+ default
+
+ doicon -s scalable ${PN}.svg
+ doicon -s 48 ${PN}.png
+ newicon -s 128 ${PN}-128x128.png ${PN}.png
+ make_desktop_entry ${PN} "Dune Legacy"
+}
diff --git a/games-strategy/dunelegacy/files/dunelegacy-0.96.4-init-mid.patch b/games-strategy/dunelegacy/files/dunelegacy-0.96.4-init-mid.patch
new file mode 100644
index 000000000000..46966269dcad
--- /dev/null
+++ b/games-strategy/dunelegacy/files/dunelegacy-0.96.4-init-mid.patch
@@ -0,0 +1,50 @@
+From e227fc26ffff199a6a659dbe954ff7b764658d4d Mon Sep 17 00:00:00 2001
+From: Richard Schaller <richard.schaller@gmx.de>
+Date: Sat, 30 Mar 2019 18:07:28 +0100
+Subject: [PATCH] Support for SDL_mixer 2.0.2 or higher: MIX_INIT_FLUIDSYNTH
+ was renamed to MIX_INIT_MID
+
+---
+ src/FileClasses/music/DirectoryPlayer.cpp | 4 ++++
+ src/FileClasses/music/XMIPlayer.cpp | 6 ++++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/src/FileClasses/music/DirectoryPlayer.cpp b/src/FileClasses/music/DirectoryPlayer.cpp
+index 531d971..05d800c 100644
+--- a/src/FileClasses/music/DirectoryPlayer.cpp
++++ b/src/FileClasses/music/DirectoryPlayer.cpp
+@@ -59,7 +59,11 @@ DirectoryPlayer::DirectoryPlayer() : MusicPlayer(settings.audio.playMusic, setti
+
+ music = nullptr;
+
++#if SDL_VERSIONNUM(SDL_MIXER_MAJOR_VERSION, SDL_MIXER_MINOR_VERSION, SDL_MIXER_PATCHLEVEL) >= SDL_VERSIONNUM(2,0,2)
++ Mix_Init(MIX_INIT_MID | MIX_INIT_FLAC | MIX_INIT_MP3 | MIX_INIT_OGG);
++#else
+ Mix_Init(MIX_INIT_FLUIDSYNTH | MIX_INIT_FLAC | MIX_INIT_MP3 | MIX_INIT_OGG);
++#endif
+ }
+
+ DirectoryPlayer::~DirectoryPlayer() {
+diff --git a/src/FileClasses/music/XMIPlayer.cpp b/src/FileClasses/music/XMIPlayer.cpp
+index a7e5150..0fcfa8f 100644
+--- a/src/FileClasses/music/XMIPlayer.cpp
++++ b/src/FileClasses/music/XMIPlayer.cpp
+@@ -30,9 +30,15 @@
+ XMIPlayer::XMIPlayer() : MusicPlayer(settings.audio.playMusic, settings.audio.musicVolume) {
+ music = nullptr;
+
++#if SDL_VERSIONNUM(SDL_MIXER_MAJOR_VERSION, SDL_MIXER_MINOR_VERSION, SDL_MIXER_PATCHLEVEL) >= SDL_VERSIONNUM(2,0,2)
++ if((Mix_Init(MIX_INIT_MID) & MIX_INIT_MID) == 0) {
++ SDL_Log("XMIPlayer: Failed to init required midi support: %s", SDL_GetError());
++ }
++#else
+ if((Mix_Init(MIX_INIT_FLUIDSYNTH) & MIX_INIT_FLUIDSYNTH) == 0) {
+ SDL_Log("XMIPlayer: Failed to init required midi support: %s", SDL_GetError());
+ }
++#endif
+ }
+
+ XMIPlayer::~XMIPlayer() {
+--
+2.24.1
+
diff --git a/games-strategy/dunelegacy/metadata.xml b/games-strategy/dunelegacy/metadata.xml
index 4dc56b2c71f1..54f6bacf4aab 100644
--- a/games-strategy/dunelegacy/metadata.xml
+++ b/games-strategy/dunelegacy/metadata.xml
@@ -6,7 +6,6 @@
<name>Gentoo Games Project</name>
</maintainer>
<upstream>
- <bugs-to>https://sourceforge.net/apps/mediawiki/dunelegacy/index.php?title=Development/Reporting_Bugs</bugs-to>
<remote-id type="sourceforge">dunelegacy</remote-id>
</upstream>
<longdescription lang="en">