commit:     7fd6b71cb7c2fc49a0e9cbf5fc89c41513f09356
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 16 20:36:34 2020 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Thu Apr 16 20:43:55 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7fd6b71c

games-simulation/openttd: Fix dependencies and CC/CXX

Bug: https://bugs.gentoo.org/716528
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 .../{openttd-1.10.0.ebuild => openttd-1.10.0-r1.ebuild}       | 11 +++++++----
 games-simulation/openttd/openttd-9999.ebuild                  | 11 +++++++----
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/games-simulation/openttd/openttd-1.10.0.ebuild 
b/games-simulation/openttd/openttd-1.10.0-r1.ebuild
similarity index 94%
rename from games-simulation/openttd/openttd-1.10.0.ebuild
rename to games-simulation/openttd/openttd-1.10.0-r1.ebuild
index c8b8fc022e8..07ee1c24820 100644
--- a/games-simulation/openttd/openttd-1.10.0.ebuild
+++ b/games-simulation/openttd/openttd-1.10.0-r1.ebuild
@@ -2,7 +2,8 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
-inherit xdg
+
+inherit toolchain-funcs xdg
 
 MY_PV="${PV/_rc/-RC}"
 MY_P="${PN}-${MY_PV}"
@@ -20,11 +21,11 @@ fi
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="aplaymidi debug dedicated iconv icu lzo +openmedia +png 
cpu_flags_x86_sse +timidity +truetype zlib"
+IUSE="aplaymidi debug dedicated iconv icu +lzma lzo +openmedia +png 
cpu_flags_x86_sse +timidity +truetype zlib"
 RESTRICT="test" # needs a graphics set in order to test
 
 RDEPEND="!dedicated? (
-               media-libs/libsdl[sound,X,video]
+               media-libs/libsdl2[sound,video]
                icu? (
                        dev-libs/icu-layoutex
                        dev-libs/icu-le-hb
@@ -36,6 +37,7 @@ RDEPEND="!dedicated? (
                        sys-libs/zlib:=
                )
        )
+       lzma? ( app-arch/xz-utils )
        lzo? ( dev-libs/lzo:2 )
        iconv? ( virtual/libiconv )
        png? (
@@ -72,6 +74,7 @@ src_configure() {
                --prefix-dir="${EPREFIX}/usr"
                $(use_with cpu_flags_x86_sse sse)
                $(use_with iconv)
+               $(use_with lzma)
                $(use_with lzo liblzo2)
                $(use_with png)
                $(usex debug '--enable-debug=3' '')
@@ -101,7 +104,7 @@ src_configure() {
 
        # configure is a hand-written bash-script, so econf will not work.
        # It's all built as C++, upstream uses CFLAGS internally.
-       CFLAGS="" ./configure ${myopts[@]} || die
+       CC=$(tc-getCC) CXX=$(tc-getCXX) CFLAGS="" ./configure ${myopts[@]} || 
die
 }
 
 src_compile() {

diff --git a/games-simulation/openttd/openttd-9999.ebuild 
b/games-simulation/openttd/openttd-9999.ebuild
index c8b8fc022e8..07ee1c24820 100644
--- a/games-simulation/openttd/openttd-9999.ebuild
+++ b/games-simulation/openttd/openttd-9999.ebuild
@@ -2,7 +2,8 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
-inherit xdg
+
+inherit toolchain-funcs xdg
 
 MY_PV="${PV/_rc/-RC}"
 MY_P="${PN}-${MY_PV}"
@@ -20,11 +21,11 @@ fi
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="aplaymidi debug dedicated iconv icu lzo +openmedia +png 
cpu_flags_x86_sse +timidity +truetype zlib"
+IUSE="aplaymidi debug dedicated iconv icu +lzma lzo +openmedia +png 
cpu_flags_x86_sse +timidity +truetype zlib"
 RESTRICT="test" # needs a graphics set in order to test
 
 RDEPEND="!dedicated? (
-               media-libs/libsdl[sound,X,video]
+               media-libs/libsdl2[sound,video]
                icu? (
                        dev-libs/icu-layoutex
                        dev-libs/icu-le-hb
@@ -36,6 +37,7 @@ RDEPEND="!dedicated? (
                        sys-libs/zlib:=
                )
        )
+       lzma? ( app-arch/xz-utils )
        lzo? ( dev-libs/lzo:2 )
        iconv? ( virtual/libiconv )
        png? (
@@ -72,6 +74,7 @@ src_configure() {
                --prefix-dir="${EPREFIX}/usr"
                $(use_with cpu_flags_x86_sse sse)
                $(use_with iconv)
+               $(use_with lzma)
                $(use_with lzo liblzo2)
                $(use_with png)
                $(usex debug '--enable-debug=3' '')
@@ -101,7 +104,7 @@ src_configure() {
 
        # configure is a hand-written bash-script, so econf will not work.
        # It's all built as C++, upstream uses CFLAGS internally.
-       CFLAGS="" ./configure ${myopts[@]} || die
+       CC=$(tc-getCC) CXX=$(tc-getCXX) CFLAGS="" ./configure ${myopts[@]} || 
die
 }
 
 src_compile() {

Reply via email to