commit:     5ecbed8544680aa105f16e8408ae1a2082686916
Author:     Alexey Sokolov <sokolov <AT> google <DOT> com>
AuthorDate: Fri Oct 18 23:51:16 2019 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Sat Oct 19 22:22:09 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ecbed85

games-fps/openarena: support building only a server

Package-Manager: Portage-2.3.76, Repoman-2.3.16
Signed-off-by: Alexey Sokolov <sokolov <AT> google.com>
Closes: https://github.com/gentoo/gentoo/pull/13336
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 games-fps/openarena/metadata.xml              |  3 +++
 games-fps/openarena/openarena-0.8.8-r1.ebuild | 39 +++++++++++++++------------
 2 files changed, 25 insertions(+), 17 deletions(-)

diff --git a/games-fps/openarena/metadata.xml b/games-fps/openarena/metadata.xml
index fb6c4d02068..ec45d585b91 100644
--- a/games-fps/openarena/metadata.xml
+++ b/games-fps/openarena/metadata.xml
@@ -5,6 +5,9 @@
                <email>[email protected]</email>
                <name>Gentoo Games Project</name>
        </maintainer>
+       <use>
+               <flag name="client">Build OpenArena client</flag>
+       </use>
        <upstream>
                <remote-id type="sourceforge">oarena</remote-id>
        </upstream>

diff --git a/games-fps/openarena/openarena-0.8.8-r1.ebuild 
b/games-fps/openarena/openarena-0.8.8-r1.ebuild
index 7440f19e8ec..f9a04f80a0b 100644
--- a/games-fps/openarena/openarena-0.8.8-r1.ebuild
+++ b/games-fps/openarena/openarena-0.8.8-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -12,21 +12,23 @@ SRC_URI="mirror://sourceforge/oarena/${P}.zip
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="+curl +openal +vorbis"
+IUSE="+client +curl +openal +vorbis"
 
 RDEPEND="
-       media-libs/libsdl[joystick,opengl,video]
-       media-libs/speex
-       media-libs/speexdsp
-       virtual/jpeg:0
-       virtual/opengl
-       x11-libs/libXext
-       x11-libs/libX11
-       x11-libs/libXau
-       x11-libs/libXdmcp
-       curl? ( net-misc/curl )
-       openal? ( media-libs/openal )
-       vorbis? ( media-libs/libvorbis )
+       client? (
+               media-libs/libsdl[joystick,opengl,video]
+               media-libs/speex
+               media-libs/speexdsp
+               virtual/jpeg:0
+               virtual/opengl
+               x11-libs/libXext
+               x11-libs/libX11
+               x11-libs/libXau
+               x11-libs/libXdmcp
+               curl? ( net-misc/curl )
+               openal? ( media-libs/openal )
+               vorbis? ( media-libs/libvorbis )
+       )
 "
 DEPEND="${RDEPEND}
        app-arch/unzip
@@ -52,6 +54,7 @@ src_compile() {
        # also build always server and use smp by default
        myopts="USE_INTERNAL_SPEEX=0 USE_VOIP=1 USE_MUMBLE=0
                BUILD_SERVER=1 BUILD_CLIENT_SMP=1 USE_LOCAL_HEADERS=0"
+       use client || myopts="${myopts} BUILD_CLIENT=0"
        use curl || myopts="${myopts} USE_CURL=0"
        use openal || myopts="${myopts} USE_OPENAL=0"
        use vorbis || myopts="${myopts} USE_CODEC_VORBIS=0"
@@ -67,7 +70,7 @@ src_compile() {
 
 src_install() {
        cd "${MY_S}"/"${BUILD_DIR}"
-       newbin openarena-smp.* "${PN}"
+       use client && newbin openarena-smp.* "${PN}"
        newbin oa_ded.* "${PN}-ded"
        cd "${S}"
 
@@ -75,6 +78,8 @@ src_install() {
        doins -r baseoa missionpack
 
        dodoc CHANGES CREDITS LINUXNOTES README
-       newicon "${MY_S}"/misc/quake3.png ${PN}.png
-       make_desktop_entry ${PN} "OpenArena"
+       if use client; then
+               newicon "${MY_S}"/misc/quake3.png ${PN}.png
+               make_desktop_entry ${PN} "OpenArena"
+       fi
 }

Reply via email to