diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /games-fps/urbanterror |
reinit the tree, so we can have metadata
Diffstat (limited to 'games-fps/urbanterror')
-rw-r--r-- | games-fps/urbanterror/Manifest | 10 | ||||
-rw-r--r-- | games-fps/urbanterror/files/urbanterror-4.3-respect_CFLAGS.patch | 53 | ||||
-rw-r--r-- | games-fps/urbanterror/metadata.xml | 27 | ||||
-rw-r--r-- | games-fps/urbanterror/urbanterror-4.3.2_p20170426.ebuild | 152 | ||||
-rw-r--r-- | games-fps/urbanterror/urbanterror-4.3.2_p20170713.ebuild | 152 | ||||
-rw-r--r-- | games-fps/urbanterror/urbanterror-4.3.2_p20170915.ebuild | 152 |
6 files changed, 546 insertions, 0 deletions
diff --git a/games-fps/urbanterror/Manifest b/games-fps/urbanterror/Manifest new file mode 100644 index 000000000000..cfcf4a8fc258 --- /dev/null +++ b/games-fps/urbanterror/Manifest @@ -0,0 +1,10 @@ +AUX urbanterror-4.3-respect_CFLAGS.patch 1473 SHA256 7a6467e157d8e70c409a8cacde491fcee33fd0365605ba15f9e0d9f80924940b SHA512 f0fa26b1c82bf8df7c1b47eb7cd2afbc93c5b61b3638c0d5bdec33f12051ba525851269d70a7379093f5da7a8fbbb8e3e39f9c74d4df1c4807f32673819f01ee WHIRLPOOL 689176cdd85ab5980a0c7726af1accfd0f8c3879261c5141820bf9e5ad421c49012a19f9ec04360e77eb7b503862a1994ba0f97e84772c9c03fea0a9c78d6dee +DIST urbanterror-4.3.2_p20170426.tar.gz 10058308 SHA256 8009516332e1f77eae3681b436e099fdd42ffa55d2691694eedc0ca94b194878 SHA512 e8107ab44fdb40bc14a548239185905a01120bbe960b8713e5959df18330fd845761350c5e8e5efd5fbfec10ad62ff9fef68420406cc4cfbe2af69ee66eff1f3 WHIRLPOOL 6aac15e44b0695501195ae172133f4b6788b9dffa5442af20d11626ad27ffd597c7f070c0fb95b0e0e8b8b3d6cf0e1bfc40b0a16abaa27c8f932ee90f19a1824 +DIST urbanterror-4.3.2_p20170713.tar.gz 9984763 SHA256 cf1784a3bd00451fe1bda3267235ea3eee93da65880f15fd13c07681952b4859 SHA512 09fd2232c3cbdde001b8d037f2667a55a584378615f2da10c6815797748028f36b75c899ca4fd1d7d97a33f4b3ddbaa4d271b36b5eabf3bf9e81852ef15864a4 WHIRLPOOL 2bed79adc1dc338d74212263105c03bad51391f8c9e9e543ad54f6d6006cea4a8ebfc0e601400338b941d799dc0f642f71478dc68ad84a50718043f06f042290 +DIST urbanterror-4.3.2_p20170915.tar.gz 10061394 SHA256 fe37df609d763247a0bfaa7dedb33ca45a8aa523467b16f1a585ca8a08b03078 SHA512 d22bc3a0d8d191f797f5b1e7a0671424ca6dafbe5a3bd7fbfcd0e7249b9b4b6e790a64cdf7c93690d032b38f92aee703e9e302701084703d7a79d8f60cc2433e WHIRLPOOL 912201a55822dcf8423f77023f01882339739984dc9e9bdb5dca55763271c56158b47fd137da83d6e56c7625e49df8b5fc5299af646e91104e1f53cad9a50fcb +EBUILD urbanterror-4.3.2_p20170426.ebuild 3969 SHA256 79c983e8d6ad44095d13ca8e059a581a71073895ce88672eb1a9b76421f11394 SHA512 ba6670fe91361a1017192bca67d6235c982b878916af4191392607f46367671b802d88befe8118042bc4798920db37d2be920c05f0aaca00c764b19d23c57adf WHIRLPOOL 68892849966d590a6f8869331e4fd764d077720168dba93f18c7b7dc00ce9ebcda4ef7580344e12c0702e72fe5d6469a0450348585b89f7345514298afa8d7ae +EBUILD urbanterror-4.3.2_p20170713.ebuild 4004 SHA256 11a126c91c5bf155777ce5faaf9364b78ff964e6ea235c8d0bfdc3aa6ee5edb0 SHA512 def80468298e611f7a46bf453582b50f43748da4244d4ae62faeddb26809c6d8f18ad2afa9a0513e1ea3d87b8576df700d092e0412417cf99d63bb63a06df482 WHIRLPOOL e0f0e1f886992640385322e9bf29e8b8c0696a85eaf61d2c47c995a819b7ce95c17169acc5231a0ef8be83b67f70e5f642af11e954de9156fa8b609ab24e0bfc +EBUILD urbanterror-4.3.2_p20170915.ebuild 4004 SHA256 7a1f1f1996b676412b226eb6f87bdd4d112c40300ed5537b795ba280286412c3 SHA512 73cbfce8f97dcbeaa621a6eca247a3aa496e0221c94dbf718f3a1af550dd9c346842e21fe2690d1ceb4a53dc0c7a70603907558c3c6c43b89f7b81dfc1e6bf8c WHIRLPOOL aec2645cbe2f72ea02ecaad009af408573ca92e1f835c9c6391f5e0e21283e4c882cbed85d95f6654c47d84daccb256362de26ce5f4b09795a3ec5291bc4bd23 +MISC ChangeLog 2861 SHA256 6a07b67b0007d36999171cc39cddb002e247ed978dac24bca50df23787244b87 SHA512 30a7d06750de5a6ce7cc16f8f34954e0a7f5596a1b75e67cc755404ade0fa731b5571bf51f3224ee6a70a9d8a2fb13abf60e218361ee92e68930336c044d65c5 WHIRLPOOL b6fd9e88efe71379fbcdee7cf2339ca2e2de7275aba3b7a8d6f8f45f1f031b6534f1f07ef233e4ef2fa0551ed23d9cc6136880dc23c2eaee3899797269df75d6 +MISC ChangeLog-2015 10015 SHA256 b3650a701ee283726d067bf6244814e3410f789158f0ec939e52261fbc9c7c47 SHA512 1a14a93b1c3b7786eabb0563ce6b10b5090df027d8b3b04a5a51838880190deb893a17f6e0336f810bf34ae549affccc6e5dd50dedb4ac59d87d8288bae1f7fd WHIRLPOOL 89734ece7c9e708b6e42f48c38c080aaab79dacb98d66f8031dd4ca7db705e90240c7f5ed3a92e6fe68488e0cc585b073d2c0a37bd55e39dcf0a8568f42cc3a0 +MISC metadata.xml 1022 SHA256 91dfa742a5e0abfbee69544d8e816505fe9860707a8186fe5904e263924b130c SHA512 77a9bf551d2e24b4cfd36196bd2d8d8e9a969f5ceb643144893a1b9485d636e59eb7db0f4b3758f38a454c1f4cbaf8b4582181fe59ae08dcea20b3ec0e4db130 WHIRLPOOL ed83dab78fbed48d453e4d5472958434775d85b601c3239360ed1cdf1ba760c0cb62fc87b02f716710dedaf0f4ea30eafcdbca821d8e8c1812bf63e15433c4b1 diff --git a/games-fps/urbanterror/files/urbanterror-4.3-respect_CFLAGS.patch b/games-fps/urbanterror/files/urbanterror-4.3-respect_CFLAGS.patch new file mode 100644 index 000000000000..5ce13342ab58 --- /dev/null +++ b/games-fps/urbanterror/files/urbanterror-4.3-respect_CFLAGS.patch @@ -0,0 +1,53 @@ +Author: holgersson <holgersson@posteo.de> +Date: Fri Mar 31 12:13:00 2017 +0200 + +Respect CFLAGS - inspired by hasufell’s patch + +--- a/Makefile 2017-03-31 11:08:58.419210817 +0200 ++++ b/Makefile 2017-03-31 12:06:52.559412054 +0200 +@@ -290,34 +290,33 @@ + CLIENT_EXTRA_FILES= + + ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu")) +- BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \ +- -pipe -DUSE_ICON -DARCH_STRING=\\\"$(ARCH)\\\" ++ BASE_CFLAGS = -DUSE_ICON -DARCH_STRING=\\\"$(ARCH)\\\" + CLIENT_CFLAGS += $(SDL_CFLAGS) + +- OPTIMIZEVM = -O3 +- OPTIMIZE = $(OPTIMIZEVM) -ffast-math ++ OPTIMIZEVM = ++ OPTIMIZE = $(OPTIMIZEVM) + + ifeq ($(ARCH),x86_64) +- OPTIMIZEVM = -O3 +- OPTIMIZE = $(OPTIMIZEVM) -ffast-math ++ OPTIMIZEVM = ++ OPTIMIZE = $(OPTIMIZEVM) + HAVE_VM_COMPILED = true + else + ifeq ($(ARCH),x86) +- OPTIMIZEVM = -O3 -march=i586 +- OPTIMIZE = $(OPTIMIZEVM) -ffast-math ++ OPTIMIZEVM = ++ OPTIMIZE = $(OPTIMIZEVM) + HAVE_VM_COMPILED=true + else + ifeq ($(ARCH),ppc) +- BASE_CFLAGS += -maltivec ++ BASE_CFLAGS += + HAVE_VM_COMPILED=true + endif + ifeq ($(ARCH),ppc64) +- BASE_CFLAGS += -maltivec ++ BASE_CFLAGS += + HAVE_VM_COMPILED=true + endif + ifeq ($(ARCH),sparc) +- OPTIMIZE += -mtune=ultrasparc3 -mv8plus +- OPTIMIZEVM += -mtune=ultrasparc3 -mv8plus ++ OPTIMIZE += ++ OPTIMIZEVM += + HAVE_VM_COMPILED=true + endif + ifeq ($(ARCH),armv7l) diff --git a/games-fps/urbanterror/metadata.xml b/games-fps/urbanterror/metadata.xml new file mode 100644 index 000000000000..062f62f84665 --- /dev/null +++ b/games-fps/urbanterror/metadata.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>holgersson@posteo.de</email> + <name>Nils Freydank</name> + </maintainer> + <maintainer type="project"> + <email>games@gentoo.org</email> + <name>Gentoo Games Project</name> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <use> + <flag name="altgamma">Alternative way for gamma setting with modesetting driver</flag> + <flag name="client">Build binary for client (includes code for non-dedicated server)</flag> + <flag name="opus">Use opus as sound codec</flag> + <flag name="mumble">Use Mumble for ingame VoIP (experimental)</flag> + <flag name="voip">Use ioq3 ingame VoIP (experimental)</flag> + <flag name="server">Build binary for dedicated server</flag> + </use> + <upstream> + <remote-id type="github">Barbatos/ioq3-for-UrbanTerror-4</remote-id> + </upstream> +</pkgmetadata> diff --git a/games-fps/urbanterror/urbanterror-4.3.2_p20170426.ebuild b/games-fps/urbanterror/urbanterror-4.3.2_p20170426.ebuild new file mode 100644 index 000000000000..eaf4a41e7db6 --- /dev/null +++ b/games-fps/urbanterror/urbanterror-4.3.2_p20170426.ebuild @@ -0,0 +1,152 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" +inherit flag-o-matic gnome2-utils + +DESCRIPTION="Hollywood tactical shooter based on the ioquake3 engine" +HOMEPAGE="http://urbanterror.info" + +if [[ ${PV} == "9999" ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/mickael9/ioq3.git" + EGIT_BRANCH="urt" +else + COMMIT_ID="60b17a27ecaa30bffc44114cb94df82af7febfdd" + SRC_URI="https://github.com/mickael9/ioq3/archive/${COMMIT_ID}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/ioq3-${COMMIT_ID}" + KEYWORDS="amd64 x86" + +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="+altgamma +client +curl debug mumble openal +opus server voip vorbis" +REQUIRED_USE=" || ( client server )" + +PATCHES=( "${FILESDIR}"/${PN}-4.3-respect_CFLAGS.patch ) + +RDEPEND=" + client? ( + media-libs/libsdl2[X,sound,joystick,opengl,video] + mumble? ( media-sound/mumble ) + openal? ( media-libs/openal ) + opus? ( media-libs/opusfile ) + vorbis? ( + media-libs/libogg + media-libs/libvorbis + ) + ) + curl? ( net-misc/curl ) + ~games-fps/urbanterror-data-4.3.2 + sys-libs/zlib[minizip] + virtual/jpeg:0 +" + +DEPEND="${RDEPEND}" + +pkg_pretend() { + if use client; then + if ! use openal && ! use opus && ! use vorbis; then + ewarn + ewarn "No sound implementation selected. Enable 'openal', 'opus' or 'vorbis' USE flag to get sound!" + fi + fi +} + +src_compile() { + buildit() { use $1 && echo 1 || echo 0 ; } + nobuildit() { use $1 && echo 0 || echo 1 ; } + + # Workaround for used zlib macro, wrt bug #44951 + append-flags "-DOF=_Z_OF" + + emake \ + ARCH=$(usex amd64 "x86_64" "i386") \ + DEFAULT_BASEDIR="/usr/share/urbanterror" \ + BUILD_CLIENT=$(buildit client) \ + BUILD_SERVER=$(buildit server) \ + BUILD_BASEGAME=1 \ + BUILD_MISSIONPACK=0 \ + BUILD_GAME_SO=0 \ + BUILD_GAME_QVM=0 \ + BUILD_STANDALONE=1 \ + SERVERBIN="Quake3-UrT-Ded" \ + CLIENTBIN="Quake3-UrT" \ + USE_RENDERER_DLOPEN=0 \ + USE_YACC=0 \ + BASEGAME="q3ut4"\ + BASEGAME_CFLAGS="${CFLAGS}" \ + USE_OPENAL=$(buildit openal) \ + USE_OPENAL_DLOPEN=$(buildit openal) \ + USE_CURL=$(buildit curl) \ + USE_CURL_DLOPEN=$(buildit curl) \ + USE_CODEC_VORBIS=$(buildit vorbis) \ + USE_CODEC_OPUS=$(buildit opus) \ + USE_MUMBLE=$(buildit mumble) \ + USE_VOIP=$(buildit voip) \ + USE_INTERNAL_LIBS=0 \ + USE_LOCAL_HEADERS=0 \ + USE_ALTGAMMA=$(buildit altgamma) +} + +src_install() { + local my_arch=$(usex amd64 "x86_64" "i386") + + # docs from ioq3, not from UrbanTerror ZIP file + dodoc ChangeLog README.md README.ioq3.md md4-readme.txt + + if use client; then + newbin build/$(usex debug "debug" "release")-linux-${my_arch}/Quake3-UrT.${my_arch} ${PN} + # Shooter as defined in https://specifications.freedesktop.org/menu-spec/latest/apas02.html + make_desktop_entry ${PN} "UrbanTerror" ${PN} + fi + + if use server && ! use client; then + # dedicated server only + newbin build/$(usex debug "debug" "release")-linux-${my_arch}/Quake3-UrT-Ded.${my_arch} ${PN}-ded + fi +} + +pkg_preinst() { + use client && gnome2_icon_savelist +} + +pkg_postinst() { + use client && gnome2_icon_cache_update + + if [[ -z "${REPLACING_VERSIONS}" ]]; then + # This is a new installation + if use openal; then + elog "" + elog "You might need to set:" + elog " seta s_useopenal \"1\"" + elog "in your ~/.q3a/q3ut4/q3config.cfg for openal to work." + fi + + if use altgamma; then + elog "" + elog "You might need to set:" + elog " seta r_altgamma \"1\"" + elog "in your ~/.q3a/q3ut4/q3config.cfg for altgamma to work." + fi + + if ! use altgamma; then + elog "" + elog "If you are using a modesetting graphics driver you might" + elog "consider setting USE=\"altgamma\"." + elog "For details take a look at:" + elog "https://bugs.freedesktop.org/show_bug.cgi?id=27222" + fi + if ! use client; then + elog "" + elog "You disabled client support. You won't be able to connect" + elog "to any servers and play. If you want to do so, enable" + elog "USE=\"client\"." + fi + fi +} + +pkg_postrm() { + use client && gnome2_icon_cache_update +} diff --git a/games-fps/urbanterror/urbanterror-4.3.2_p20170713.ebuild b/games-fps/urbanterror/urbanterror-4.3.2_p20170713.ebuild new file mode 100644 index 000000000000..ba228d054171 --- /dev/null +++ b/games-fps/urbanterror/urbanterror-4.3.2_p20170713.ebuild @@ -0,0 +1,152 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" +inherit flag-o-matic gnome2-utils + +DESCRIPTION="Hollywood tactical shooter based on the ioquake3 engine" +HOMEPAGE="http://urbanterror.info https://github.com/mickael9/ioq3" + +if [[ ${PV} == "9999" ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/mickael9/ioq3.git" + EGIT_BRANCH="urt" +else + COMMIT_ID="8eb3e10163c62331b77171a71ca6102d3d63c3e7" + SRC_URI="https://github.com/mickael9/ioq3/archive/${COMMIT_ID}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/ioq3-${COMMIT_ID}" + KEYWORDS="~amd64 ~x86" + +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="+altgamma +client +curl debug mumble openal +opus server voip vorbis" +REQUIRED_USE=" || ( client server )" + +PATCHES=( "${FILESDIR}"/${PN}-4.3-respect_CFLAGS.patch ) + +RDEPEND=" + client? ( + media-libs/libsdl2[X,sound,joystick,opengl,video] + mumble? ( media-sound/mumble ) + openal? ( media-libs/openal ) + opus? ( media-libs/opusfile ) + vorbis? ( + media-libs/libogg + media-libs/libvorbis + ) + ) + curl? ( net-misc/curl ) + ~games-fps/urbanterror-data-4.3.2 + sys-libs/zlib[minizip] + virtual/jpeg:0 +" + +DEPEND="${RDEPEND}" + +pkg_pretend() { + if use client; then + if ! use openal && ! use opus && ! use vorbis; then + ewarn + ewarn "No sound implementation selected. Enable 'openal', 'opus' or 'vorbis' USE flag to get sound!" + fi + fi +} + +src_compile() { + buildit() { use $1 && echo 1 || echo 0 ; } + nobuildit() { use $1 && echo 0 || echo 1 ; } + + # Workaround for used zlib macro, wrt bug #44951 + append-flags "-DOF=_Z_OF" + + emake \ + ARCH=$(usex amd64 "x86_64" "i386") \ + DEFAULT_BASEDIR="/usr/share/urbanterror" \ + BUILD_CLIENT=$(buildit client) \ + BUILD_SERVER=$(buildit server) \ + BUILD_BASEGAME=1 \ + BUILD_MISSIONPACK=0 \ + BUILD_GAME_SO=0 \ + BUILD_GAME_QVM=0 \ + BUILD_STANDALONE=1 \ + SERVERBIN="Quake3-UrT-Ded" \ + CLIENTBIN="Quake3-UrT" \ + USE_RENDERER_DLOPEN=0 \ + USE_YACC=0 \ + BASEGAME="q3ut4"\ + BASEGAME_CFLAGS="${CFLAGS}" \ + USE_OPENAL=$(buildit openal) \ + USE_OPENAL_DLOPEN=$(buildit openal) \ + USE_CURL=$(buildit curl) \ + USE_CURL_DLOPEN=$(buildit curl) \ + USE_CODEC_VORBIS=$(buildit vorbis) \ + USE_CODEC_OPUS=$(buildit opus) \ + USE_MUMBLE=$(buildit mumble) \ + USE_VOIP=$(buildit voip) \ + USE_INTERNAL_LIBS=0 \ + USE_LOCAL_HEADERS=0 \ + USE_ALTGAMMA=$(buildit altgamma) +} + +src_install() { + local my_arch=$(usex amd64 "x86_64" "i386") + + # docs from ioq3, not from UrbanTerror ZIP file + dodoc ChangeLog README.md README.ioq3.md md4-readme.txt + + if use client; then + newbin build/$(usex debug "debug" "release")-linux-${my_arch}/Quake3-UrT.${my_arch} ${PN} + # Shooter as defined in https://specifications.freedesktop.org/menu-spec/latest/apas02.html + make_desktop_entry ${PN} "UrbanTerror" ${PN} + fi + + if use server && ! use client; then + # dedicated server only + newbin build/$(usex debug "debug" "release")-linux-${my_arch}/Quake3-UrT-Ded.${my_arch} ${PN}-ded + fi +} + +pkg_preinst() { + use client && gnome2_icon_savelist +} + +pkg_postinst() { + use client && gnome2_icon_cache_update + + if [[ -z "${REPLACING_VERSIONS}" ]]; then + # This is a new installation + if use openal; then + elog "" + elog "You might need to set:" + elog " seta s_useopenal \"1\"" + elog "in your ~/.q3a/q3ut4/q3config.cfg for openal to work." + fi + + if use altgamma; then + elog "" + elog "You might need to set:" + elog " seta r_altgamma \"1\"" + elog "in your ~/.q3a/q3ut4/q3config.cfg for altgamma to work." + fi + + if ! use altgamma; then + elog "" + elog "If you are using a modesetting graphics driver you might" + elog "consider setting USE=\"altgamma\"." + elog "For details take a look at:" + elog "https://bugs.freedesktop.org/show_bug.cgi?id=27222" + fi + if ! use client; then + elog "" + elog "You disabled client support. You won't be able to connect" + elog "to any servers and play. If you want to do so, enable" + elog "USE=\"client\"." + fi + fi +} + +pkg_postrm() { + use client && gnome2_icon_cache_update +} diff --git a/games-fps/urbanterror/urbanterror-4.3.2_p20170915.ebuild b/games-fps/urbanterror/urbanterror-4.3.2_p20170915.ebuild new file mode 100644 index 000000000000..6265e8c10cd1 --- /dev/null +++ b/games-fps/urbanterror/urbanterror-4.3.2_p20170915.ebuild @@ -0,0 +1,152 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" +inherit flag-o-matic gnome2-utils + +DESCRIPTION="Hollywood tactical shooter based on the ioquake3 engine" +HOMEPAGE="http://urbanterror.info https://github.com/mickael9/ioq3" + +if [[ ${PV} == "9999" ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/mickael9/ioq3.git" + EGIT_BRANCH="urt" +else + COMMIT_ID="0b3e62a00bd05d337f2ab6dad2cdb311a5d76464" + SRC_URI="https://github.com/mickael9/ioq3/archive/${COMMIT_ID}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}/ioq3-${COMMIT_ID}" + KEYWORDS="~amd64 ~x86" + +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="+altgamma +client +curl debug mumble openal +opus server voip vorbis" +REQUIRED_USE=" || ( client server )" + +PATCHES=( "${FILESDIR}"/${PN}-4.3-respect_CFLAGS.patch ) + +RDEPEND=" + client? ( + media-libs/libsdl2[X,sound,joystick,opengl,video] + mumble? ( media-sound/mumble ) + openal? ( media-libs/openal ) + opus? ( media-libs/opusfile ) + vorbis? ( + media-libs/libogg + media-libs/libvorbis + ) + ) + curl? ( net-misc/curl ) + ~games-fps/urbanterror-data-4.3.2 + sys-libs/zlib[minizip] + virtual/jpeg:0 +" + +DEPEND="${RDEPEND}" + +pkg_pretend() { + if use client; then + if ! use openal && ! use opus && ! use vorbis; then + ewarn + ewarn "No sound implementation selected. Enable 'openal', 'opus' or 'vorbis' USE flag to get sound!" + fi + fi +} + +src_compile() { + buildit() { use $1 && echo 1 || echo 0 ; } + nobuildit() { use $1 && echo 0 || echo 1 ; } + + # Workaround for used zlib macro, wrt bug #44951 + append-flags "-DOF=_Z_OF" + + emake \ + ARCH=$(usex amd64 "x86_64" "i386") \ + DEFAULT_BASEDIR="/usr/share/urbanterror" \ + BUILD_CLIENT=$(buildit client) \ + BUILD_SERVER=$(buildit server) \ + BUILD_BASEGAME=1 \ + BUILD_MISSIONPACK=0 \ + BUILD_GAME_SO=0 \ + BUILD_GAME_QVM=0 \ + BUILD_STANDALONE=1 \ + SERVERBIN="Quake3-UrT-Ded" \ + CLIENTBIN="Quake3-UrT" \ + USE_RENDERER_DLOPEN=0 \ + USE_YACC=0 \ + BASEGAME="q3ut4"\ + BASEGAME_CFLAGS="${CFLAGS}" \ + USE_OPENAL=$(buildit openal) \ + USE_OPENAL_DLOPEN=$(buildit openal) \ + USE_CURL=$(buildit curl) \ + USE_CURL_DLOPEN=$(buildit curl) \ + USE_CODEC_VORBIS=$(buildit vorbis) \ + USE_CODEC_OPUS=$(buildit opus) \ + USE_MUMBLE=$(buildit mumble) \ + USE_VOIP=$(buildit voip) \ + USE_INTERNAL_LIBS=0 \ + USE_LOCAL_HEADERS=0 \ + USE_ALTGAMMA=$(buildit altgamma) +} + +src_install() { + local my_arch=$(usex amd64 "x86_64" "i386") + + # docs from ioq3, not from UrbanTerror ZIP file + dodoc ChangeLog README.md README.ioq3.md md4-readme.txt + + if use client; then + newbin build/$(usex debug "debug" "release")-linux-${my_arch}/Quake3-UrT.${my_arch} ${PN} + # Shooter as defined in https://specifications.freedesktop.org/menu-spec/latest/apas02.html + make_desktop_entry ${PN} "UrbanTerror" ${PN} + fi + + if use server && ! use client; then + # dedicated server only + newbin build/$(usex debug "debug" "release")-linux-${my_arch}/Quake3-UrT-Ded.${my_arch} ${PN}-ded + fi +} + +pkg_preinst() { + use client && gnome2_icon_savelist +} + +pkg_postinst() { + use client && gnome2_icon_cache_update + + if [[ -z "${REPLACING_VERSIONS}" ]]; then + # This is a new installation + if use openal; then + elog "" + elog "You might need to set:" + elog " seta s_useopenal \"1\"" + elog "in your ~/.q3a/q3ut4/q3config.cfg for openal to work." + fi + + if use altgamma; then + elog "" + elog "You might need to set:" + elog " seta r_altgamma \"1\"" + elog "in your ~/.q3a/q3ut4/q3config.cfg for altgamma to work." + fi + + if ! use altgamma; then + elog "" + elog "If you are using a modesetting graphics driver you might" + elog "consider setting USE=\"altgamma\"." + elog "For details take a look at:" + elog "https://bugs.freedesktop.org/show_bug.cgi?id=27222" + fi + if ! use client; then + elog "" + elog "You disabled client support. You won't be able to connect" + elog "to any servers and play. If you want to do so, enable" + elog "USE=\"client\"." + fi + fi +} + +pkg_postrm() { + use client && gnome2_icon_cache_update +} |