public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "James Le Cuirot" <chewi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: games-action/trine-enchanted-edition/
Date: Wed, 31 Oct 2018 21:53:24 +0000 (UTC)	[thread overview]
Message-ID: <1541022791.bc136377c77f0ea077c87592f911b4683da94331.chewi@gentoo> (raw)

commit:     bc136377c77f0ea077c87592f911b4683da94331
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 31 21:35:57 2018 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Wed Oct 31 21:53:11 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc136377

games-action/trine-enchanted-edition: Use our SDL with SDL_DYNAMIC_API

This is a magic environment variable that allows us to bypass the
static version of SDL 2 that the game was built with.

Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 ...8.ebuild => trine-enchanted-edition-2.12.508-r1.ebuild} | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/games-action/trine-enchanted-edition/trine-enchanted-edition-2.12.508.ebuild b/games-action/trine-enchanted-edition/trine-enchanted-edition-2.12.508-r1.ebuild
similarity index 81%
rename from games-action/trine-enchanted-edition/trine-enchanted-edition-2.12.508.ebuild
rename to games-action/trine-enchanted-edition/trine-enchanted-edition-2.12.508-r1.ebuild
index fcff32bee8f..d15a55db5f7 100644
--- a/games-action/trine-enchanted-edition/trine-enchanted-edition-2.12.508.ebuild
+++ b/games-action/trine-enchanted-edition/trine-enchanted-edition-2.12.508-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -23,14 +23,15 @@ QA_PREBUILT="opt/${PN}/${PN}*"
 DEPEND="app-arch/unzip"
 
 # SDL 1.3 is bundled but the game appears to be statically linked
-# against SDL 2.0.3. This is unfortunate as there are bugs. For example,
-# it doesn't respect the DISPLAY variable under Zaphod mode.
+# against SDL 2.0.3. We can bypass this and use our own SDL 2 by setting
+# the SDL_DYNAMIC_API environment variable.
 
 RDEPEND="
 	media-gfx/nvidia-cg-toolkit[abi_x86_32]
 	media-libs/alsa-lib[abi_x86_32]
 	media-libs/freetype:2[abi_x86_32]
 	media-libs/libogg[abi_x86_32]
+	>=media-libs/libsdl2-2.0.3[abi_x86_32,joystick,opengl,sound,threads,video]
 	>=media-libs/libvorbis-1.3[abi_x86_32]
 	>=media-libs/openal-1.15[abi_x86_32]
 	>=sys-devel/gcc-4.6[cxx]
@@ -56,7 +57,7 @@ pkg_nofetch() {
 }
 
 src_install() {
-	local dir=/opt/${PN}
+	local dir=/opt/${PN} SDL=${EPREFIX}/usr/$(ABI=x86 get_libdir)/libSDL2-2.0.so.0
 
 	insinto "${dir}"
 	doins -r *.fbq data
@@ -64,14 +65,14 @@ src_install() {
 	exeinto "${dir}"
 	newexe bin/trine1_linux_32bit ${PN}
 
-	make_wrapper ${PN} ./${PN} "${dir}"
+	make_wrapper ${PN} "env SDL_DYNAMIC_API=\"${SDL}\" ./${PN}" "${dir}"
 	make_desktop_entry ${PN} "${MY_PN}"
 
 	if use launcher ; then
 		exeinto "${dir}"
 		newexe bin/trine1_linux_launcher_32bit ${PN}-launcher
 
-		make_wrapper ${PN}-launcher ./${PN}-launcher "${dir}"
+		make_wrapper ${PN}-launcher "env SDL_DYNAMIC_API=\"${SDL}\" ./${PN}-launcher" "${dir}"
 		make_desktop_entry ${PN}-launcher "${MY_PN} (launcher)"
 
 		# Launcher binary has hardcoded the game path.
@@ -82,6 +83,5 @@ src_install() {
 	dodoc readme_changelog.txt
 }
 
-pkg_preinst() { gnome2_icon_savelist; }
 pkg_postinst() { gnome2_icon_cache_update; }
 pkg_postrm() { gnome2_icon_cache_update; }


             reply	other threads:[~2018-10-31 21:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-31 21:53 James Le Cuirot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-05-19 16:17 [gentoo-commits] repo/gentoo:master commit in: games-action/trine-enchanted-edition/ James Le Cuirot
2020-11-11 20:50 James Le Cuirot
2019-11-08  6:48 Michał Górny
2018-03-25 21:22 James Le Cuirot
2018-03-25 16:33 James Le Cuirot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1541022791.bc136377c77f0ea077c87592f911b4683da94331.chewi@gentoo \
    --to=chewi@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox