games-fps/yamagi-quake2: fix USE=-client
authorAlexander Tsoy <alexander@tsoy.me>
Sun, 22 Jul 2018 00:09:10 +0000 (03:09 +0300)
committerAndreas Sturmlechner <asturm@gentoo.org>
Sun, 22 Jul 2018 23:21:52 +0000 (01:21 +0200)
Do not build/install useless files with USE=-client
Closes: https://github.com/gentoo/gentoo/pull/9309

games-fps/yamagi-quake2/yamagi-quake2-7.21-r1.ebuild [moved from games-fps/yamagi-quake2/yamagi-quake2-7.21.ebuild with 87% similarity]

similarity index 87%
rename from games-fps/yamagi-quake2/yamagi-quake2-7.21.ebuild
rename to games-fps/yamagi-quake2/yamagi-quake2-7.21-r1.ebuild
index 70d72875290947bd763a4b66ef486ba02cb5d058..843343c0acafbc6c84b2c4237ca6dd53f7a54fab 100644 (file)
@@ -76,10 +76,12 @@ src_prepare() {
 
 src_compile() {
        local targets=( game )
-       use client && targets+=( client )
+       if use client; then
+               targets+=( client )
+               use opengl && targets+=( ref_gl1 ref_gl3 )
+               use softrender && targets+=( ref_soft )
+       fi
        use dedicated && targets+=( server )
-       use opengl && targets+=( ref_gl1 ref_gl3 )
-       use softrender && targets+=( ref_soft )
 
        mymake config
        mymake "${targets[@]}"
@@ -121,15 +123,17 @@ src_install() {
                insinto /usr/lib/yamagi-quake2/${addon}
                doins "${WORKDIR}"/quake2-${addon}-*/release/game.so
 
-               local addon_name
-               case ${addon} in
-                       ctf)    addon_name="CTF" ;;
-                       rogue)  addon_name="Ground Zero" ;;
-                       xatrix) addon_name="The Reckoning" ;;
-               esac
-
-               make_wrapper "yquake2-${addon}" "yquake2 +set game ${addon}"
-               make_desktop_entry "yquake2-${addon}" "Yamagi Quake II: ${addon_name}"
+               if use client; then
+                       local addon_name
+                       case ${addon} in
+                               ctf)    addon_name="CTF" ;;
+                               rogue)  addon_name="Ground Zero" ;;
+                               xatrix) addon_name="The Reckoning" ;;
+                       esac
+
+                       make_wrapper "yquake2-${addon}" "yquake2 +set game ${addon}"
+                       make_desktop_entry "yquake2-${addon}" "Yamagi Quake II: ${addon_name}"
+               fi
        done
 
        einstalldocs