games-kids/tuxtype: Fix missing and optional dependencies
authorJames Le Cuirot <chewi@gentoo.org>
Wed, 27 Nov 2019 22:56:17 +0000 (22:56 +0000)
committerJames Le Cuirot <chewi@gentoo.org>
Wed, 27 Nov 2019 22:56:49 +0000 (22:56 +0000)
Closes: https://bugs.gentoo.org/701298
Package-Manager: Portage-2.3.80, Repoman-2.3.17
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
games-kids/tuxtype/metadata.xml
games-kids/tuxtype/tuxtype-1.8.3-r1.ebuild [moved from games-kids/tuxtype/tuxtype-1.8.3.ebuild with 77% similarity]

index 52de2ed0b37210620bffc6e4f87d208c383a0da6..edb3136e70161e148c1530a81143767781d900e8 100644 (file)
@@ -8,4 +8,7 @@
        <upstream>
                <remote-id type="github">tux4kids/tuxtype</remote-id>
        </upstream>
+       <use>
+               <flag name="pango">Render fonts using <pkg>media-libs/sdl-pango</pkg> instead of <pkg>media-libs/sdl-ttf</pkg></flag>
+       </use>
 </pkgmetadata>
similarity index 77%
rename from games-kids/tuxtype/tuxtype-1.8.3.ebuild
rename to games-kids/tuxtype/tuxtype-1.8.3-r1.ebuild
index b808b1e4682741f785e105b2968d658ba1382b11..ecbbdaebb72ad156552709a418a66d47279ed385 100644 (file)
@@ -12,17 +12,19 @@ SRC_URI="https://github.com/tux4kids/${PN}/archive/upstream/${PV}.tar.gz -> ${P}
 LICENSE="GPL-2 OFL-1.1"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="svg"
+IUSE="+pango svg"
 
 DEPEND="acct-group/gamestat
+       dev-games/t4k-common
        media-libs/libsdl[video]
        media-libs/sdl-image
        media-libs/sdl-mixer
-       media-libs/sdl-pango
-       media-libs/sdl-ttf
+       !pango? ( media-libs/sdl-ttf )
+       pango? ( media-libs/sdl-pango )
        svg? ( gnome-base/librsvg:2 )"
 
 RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
 
 S="${WORKDIR}/${PN}-upstream-${PV}"
 
@@ -32,13 +34,19 @@ PATCHES=(
 
 src_prepare() {
        xdg_src_prepare
+
+       # Fix broken linkage due to incorrect variable casing.
+       sed -i 's:$SDL_TTF:$SDL_ttf:g' configure.ac || die
+
        eautoreconf
 }
 
 src_configure() {
        econf \
                --localedir="${EPREFIX}"/usr/share/locale \
-               $(use_with svg rsvg)
+               $(use_with pango sdlpango) \
+               $(use_with svg rsvg) \
+               --without-sdlnet # Unused!
 }
 
 src_install() {