summaryrefslogtreecommitdiff
path: root/games-strategy/ufo-ai
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /games-strategy/ufo-ai
reinit the tree, so we can have metadata
Diffstat (limited to 'games-strategy/ufo-ai')
-rw-r--r--games-strategy/ufo-ai/Manifest10
-rw-r--r--games-strategy/ufo-ai/files/ufo-ai-2.4-anon.patch17
-rw-r--r--games-strategy/ufo-ai/files/ufo-ai-2.4-locale.patch15
-rw-r--r--games-strategy/ufo-ai/files/ufo-ai-2.4-mathlib.patch29
-rw-r--r--games-strategy/ufo-ai/metadata.xml14
-rw-r--r--games-strategy/ufo-ai/ufo-ai-2.4.ebuild118
6 files changed, 203 insertions, 0 deletions
diff --git a/games-strategy/ufo-ai/Manifest b/games-strategy/ufo-ai/Manifest
new file mode 100644
index 000000000000..22bb951b1b4a
--- /dev/null
+++ b/games-strategy/ufo-ai/Manifest
@@ -0,0 +1,10 @@
+AUX ufo-ai-2.4-anon.patch 731 SHA256 45564b6d8b6638d230ee92e2f971b43ee2d276decb0950946f8b7d650dd1d568 SHA512 252d3cfe1ad2dc947433e316505b5cbdacd663d3465aa5ffaaeb1ba2a641b2a8a01ef91f503fa335c2642f0fc0342abf159fbc13640802d02d7aabdbbb40883c WHIRLPOOL 0cf699a23058ea5fcf27f6ebcea55b74ff4631c81d59d92131b611536af1b9e23070829c91986f6fbf9eb4111fc8f271ecc6e19ce4721cbbc38489e95f1ed433
+AUX ufo-ai-2.4-locale.patch 744 SHA256 edf333eea46aaea2a43529d4d323d2b317a9376c39e5952a2b92d7bf25fe110b SHA512 94ae4710bfed572abe7dd4b6238ddb4e240c55250e608d63fc1c8ccf67567927721a0f09234ae7a018fe38e4f5a0bc47745b483e5073d5a4da3816d99853746d WHIRLPOOL 13b655d127c34353c1cd73e5b4e62dc9267892f0288b39aef4c28b1c0d8bbe163b60a1d232c4a1912fe8e52404799d47cb1f1a9dd82d95754140db31583129da
+AUX ufo-ai-2.4-mathlib.patch 1852 SHA256 4de46ec51a00b3e68a270dc18a67605663b0de372164f9e08fc182e87f8f45e3 SHA512 3b086458e94ea9a7f1efd4ecb7d96a5b44e326f0d59916476595bf328c1e66250241124a74921302a9e139eeb61fd7b2a860fd972bbbc5664157bf60a2196b02 WHIRLPOOL 1821dff2538794997a22109258a949d8a7ca1589ee52c1efdefa8581f1582a64d938a37154f454496bfc9a1f86c684031b78ff61678f5d8c0885e647fc401dd9
+DIST 1maps.pk3 242016 SHA256 8cdb8c231c0ba98900d97012b62c5cef72ab5710fe3f087e534496a66f7b0e4e SHA512 9615b365e590dceb82362e7cd683980e15401a3b5a2b359a33c7ed2a4c51e5328efb352618cc48f46971a2ced1717276b5270ca6bf6d2bc7fc2b2238030eb3ae WHIRLPOOL 8e798ffeaa83609114fd239ea8f379ee54fa6038735a09bd3abe3076073e92b44e7fa867c893d597577da462b4e583fb0a2bba7cd2014a9f4b4bb8ef04b377e6
+DIST ufoai-2.4-data.tar 937062400 SHA256 6bb322fc0362781d07439799de32c677884cef7c96fcf17dd87c62cc108030b7 SHA512 471eab2f62cad144fe9966317d48c408fba19de0c33cf7414918b502c723b722af38a025f808848698d9a06ffc10fb0faac145dd01dcd3d321547c87da1c6246 WHIRLPOOL 139251bdbd76f86cb38175eb9c14149ea0cab6bbcb04e2dba7351cdb5b0e21bdfd231e350c0af4f52379d0c5bee91f0512422a7eb9f6339eb6a07170d64fec0c
+DIST ufoai-2.4-source.tar.bz2 16875353 SHA256 254a61b770f141374d57e5c2589048be9298d0a920e914c6e72c2b98255bb94f SHA512 3f9d0df7392f50c201464c81e42435f860df97d5d7a2ef53bb9a05d2b2fc645a1130baaf16fc34818b88bb07b8cf83283f7479d685cbd3caf80ea7522e13c56f WHIRLPOOL 0e68149ab2b3eeffb7134e65cc29de9cecf60dc89c965958a0d669c2d22462d05b89b0a81a3225ebbd7e47015fc63697cbad365136706f4853f9c1e690b0667d
+EBUILD ufo-ai-2.4.ebuild 2731 SHA256 6350df5c12be4d90e112a4bfbbaaeb040ae3adde9d6bd56cf7845f389915035c SHA512 e134db85d033b70c0e4c5482a776dc82e0d6b9e30e589047e02e21a2286f9f3e51685e2828ccec4ab39a14a21c24dc5a29c7835b5cc9bb4d2dd27e1699469806 WHIRLPOOL 200091aa0b3ba52864798cbb60258501173cd067d54a577bfb74d00470773878547824f6ada5109e2d6b5acf8bb1ab1b05a0d0d19b26b10ab202fa45fefbe4b8
+MISC ChangeLog 3152 SHA256 e205495456859a389b266eab7e89c232065f62b91d41203e779ec8ab0a460a65 SHA512 0db097d950bb6b37f76565e458ea9b5ceba1f3382ef6ff1d3d728ca736a89fed29427ca181417e90e52b85225176a16d81553898061ff23dfd972bdea1a90fb6 WHIRLPOOL e6a936c44c75ea1c15041eafb6696a78436820c8e114ba5c15d2cc83edbc900e281e47164727679bac8b6e94ccb2f6d52e947f4c0f1479286564e5e23430187e
+MISC ChangeLog-2015 6563 SHA256 98a10359e09a5830defbfb35ba923e90e0a4cfe8a114ef28c92fe6ff8eeb8f6e SHA512 35060c8333d4287fa3aa682c42b53ec8632d82eaa7bb9ba82f90a4dbb1a0d1f7e9a0bd18be25dd2bcebfdaebbad883091fdf16922bb3b520c5cb40f5c27f791e WHIRLPOOL 3504606169d41e4fcf9216babd332a60a4441bc3a59a2099eb614d80efcb4a1210e816a8935efd57a42fba9d1125a8f356cda7664e870c27e1641f90039996bd
+MISC metadata.xml 403 SHA256 7e653f5b0c3d642d66afecab051470b0cf91edc471b0bd43c84669b86ff4a9dc SHA512 959ff148dd3c58fdc06929f0ec98e1aecdced859cd0ce4549582dde6913d7061bc7ad39522f88fd6e18cf8731c04d3c8198d5f731b1839df16a53fc554c4adf0 WHIRLPOOL 49f314c4f420b01d58a600401fc8b05207bf3291b897554f75e2bd5900217267c7e5f7993741b7c3c65213899cc8482671b127d179ce95ef76cdfb1dafa18932
diff --git a/games-strategy/ufo-ai/files/ufo-ai-2.4-anon.patch b/games-strategy/ufo-ai/files/ufo-ai-2.4-anon.patch
new file mode 100644
index 000000000000..53f07261bb7e
--- /dev/null
+++ b/games-strategy/ufo-ai/files/ufo-ai-2.4-anon.patch
@@ -0,0 +1,17 @@
+--- src/tools/radiant/radiant/camera/CameraSettings.h.old 2014-10-22 08:30:35.690248415 +0200
++++ src/tools/radiant/radiant/camera/CameraSettings.h 2014-10-22 08:31:12.329900302 +0200
+@@ -16,13 +16,13 @@
+ const std::string RKEY_ENABLE_FARCLIP = "user/ui/camera/enableCubicClipping";
+ const std::string RKEY_DRAWMODE = "user/ui/camera/drawMode";
+ const std::string RKEY_SOLID_SELECTION_BOXES = "user/ui/xyview/solidSelectionBoxes";
++}
+
+ enum CameraDrawMode
+ {
+ drawWire, drawSolid, drawTexture
+ };
+
+-}
+ /* greebo: This is the home of all the camera settings. As this class derives
+ * from a RegistryKeyObserver, it can be connected to the according registry keys
+ * and gets notified if any of the observed keys are changed.*/
diff --git a/games-strategy/ufo-ai/files/ufo-ai-2.4-locale.patch b/games-strategy/ufo-ai/files/ufo-ai-2.4-locale.patch
new file mode 100644
index 000000000000..632e0d4fdc0d
--- /dev/null
+++ b/games-strategy/ufo-ai/files/ufo-ai-2.4-locale.patch
@@ -0,0 +1,15 @@
+diff -urN ufoai-2.4-source.old//src/client/cl_main.c ufoai-2.4-source/src/client/cl_main.c
+--- ufoai-2.4-source.old//src/client/cl_main.c 2012-05-01 10:59:51.720868619 +0200
++++ ufoai-2.4-source/src/client/cl_main.c 2012-05-01 11:00:57.235869759 +0200
+@@ -1180,7 +1180,11 @@
+ if (fs_i18ndir->string[0] != '\0')
+ Q_strncpyz(languagePath, fs_i18ndir->string, sizeof(languagePath));
+ else
++#ifdef LOCALEDIR
++ Q_strncpyz(languagePath, LOCALEDIR, sizeof(languagePath));
++#else
+ Com_sprintf(languagePath, sizeof(languagePath), "%s/"BASEDIRNAME"/i18n/", FS_GetCwd());
++#endif
+ Com_DPrintf(DEBUG_CLIENT, "...using mo files from %s\n", languagePath);
+ bindtextdomain(TEXT_DOMAIN, languagePath);
+ bind_textdomain_codeset(TEXT_DOMAIN, "UTF-8");
diff --git a/games-strategy/ufo-ai/files/ufo-ai-2.4-mathlib.patch b/games-strategy/ufo-ai/files/ufo-ai-2.4-mathlib.patch
new file mode 100644
index 000000000000..72fd81038fb6
--- /dev/null
+++ b/games-strategy/ufo-ai/files/ufo-ai-2.4-mathlib.patch
@@ -0,0 +1,29 @@
+http://bugs.gentoo.org/509928
+
+src/common/common.c:261: error: undefined reference to 'sincos'
+src/shared/mathlib.c:476: error: undefined reference to '__acosf_finite'
+[ ... snip ... ]
+collect2: error: ld returned 1 exit status
+
+--- build/modules/ufo.mk
++++ build/modules/ufo.mk
+@@ -9,7 +9,7 @@
+ $(TARGET)_LINKER := $(CC)
+ $(TARGET)_FILE := $(TARGET)$(EXE_EXT)
+ $(TARGET)_CFLAGS += -DCOMPILE_UFO $(BFD_CFLAGS) $(SDL_CFLAGS) $(SDL_TTF_CFLAGS) $(SDL_MIXER_CFLAGS) $(CURL_CFLAGS) $(THEORA_CFLAGS) $(XVID_CFLAGS) $(VORBIS_CFLAGS) $(OGG_CFLAGS) $(MXML_CFLAGS)
+-$(TARGET)_LDFLAGS += -lpng -ljpeg $(BFD_LIBS) $(INTL_LIBS) $(SDL_TTF_LIBS) $(SDL_MIXER_LIBS) $(OPENGL_LIBS) $(SDL_LIBS) $(CURL_LIBS) $(THEORA_LIBS) $(XVID_LIBS) $(VORBIS_LIBS) $(OGG_LIBS) $(MXML_LIBS) $(SO_LIBS) -lz
++$(TARGET)_LDFLAGS += -lpng -ljpeg $(BFD_LIBS) $(INTL_LIBS) $(SDL_TTF_LIBS) $(SDL_MIXER_LIBS) $(OPENGL_LIBS) $(SDL_LIBS) $(CURL_LIBS) $(THEORA_LIBS) $(XVID_LIBS) $(VORBIS_LIBS) $(OGG_LIBS) $(MXML_LIBS) $(SO_LIBS) -lz -lm
+
+ $(TARGET)_SRCS = \
+ client/cl_console.c \
+--- build/modules/testall.mk
++++ build/modules/testall.mk
+@@ -9,7 +9,7 @@
+ $(TARGET)_LINKER := $(CC)
+ $(TARGET)_FILE := $(TARGET)$(EXE_EXT)
+ $(TARGET)_CFLAGS += -DCOMPILE_UFO -DHARD_LINKED_GAME -DCOMPILE_UNITTESTS $(BFD_CFLAGS) $(SDL_CFLAGS) $(CURL_CFLAGS) $(OGG_CFLAGS) $(MXML_CFLAGS)
+-$(TARGET)_LDFLAGS += -lcunit -lpng -ljpeg $(BFD_LIBS) $(INTL_LIBS) $(SDL_TTF_LIBS) $(SDL_MIXER_LIBS) $(OPENGL_LIBS) $(SDL_LIBS) $(CURL_LIBS) $(THEORA_LIBS) $(XVID_LIBS) $(VORBIS_LIBS) $(OGG_LIBS) $(MXML_LIBS) $(SO_LIBS) -lz
++$(TARGET)_LDFLAGS += -lcunit -lpng -ljpeg $(BFD_LIBS) $(INTL_LIBS) $(SDL_TTF_LIBS) $(SDL_MIXER_LIBS) $(OPENGL_LIBS) $(SDL_LIBS) $(CURL_LIBS) $(THEORA_LIBS) $(XVID_LIBS) $(VORBIS_LIBS) $(OGG_LIBS) $(MXML_LIBS) $(SO_LIBS) -lz -lm
+
+ $(TARGET)_SRCS = \
+ tests/test_all.c \
diff --git a/games-strategy/ufo-ai/metadata.xml b/games-strategy/ufo-ai/metadata.xml
new file mode 100644
index 000000000000..21d773f531ac
--- /dev/null
+++ b/games-strategy/ufo-ai/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <use>
+ <flag name="editor">Build map editor</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">ufoai</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-strategy/ufo-ai/ufo-ai-2.4.ebuild b/games-strategy/ufo-ai/ufo-ai-2.4.ebuild
new file mode 100644
index 000000000000..47d4e1fa6df9
--- /dev/null
+++ b/games-strategy/ufo-ai/ufo-ai-2.4.ebuild
@@ -0,0 +1,118 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils flag-o-matic games
+
+MY_P=${P/o-a/oa}
+
+DESCRIPTION="UFO: Alien Invasion - X-COM inspired strategy game"
+HOMEPAGE="http://ufoai.sourceforge.net/"
+SRC_URI="mirror://sourceforge/ufoai/${MY_P}-source.tar.bz2
+ mirror://sourceforge/ufoai/${MY_P}-data.tar
+ http://mattn.ninex.info/1maps.pk3"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug dedicated editor"
+
+# Dependencies and more instructions can be found here:
+# http://ufoai.ninex.info/wiki/index.php/Compile_for_Linux
+DEPEND="!dedicated? (
+ virtual/opengl
+ virtual/glu
+ media-libs/libsdl
+ media-libs/sdl-image[jpeg,png]
+ media-libs/sdl-ttf
+ media-libs/sdl-mixer
+ virtual/jpeg
+ media-libs/libpng:0
+ media-libs/libogg
+ media-libs/libvorbis
+ x11-proto/xf86vidmodeproto
+ )
+ net-misc/curl
+ sys-devel/gettext
+ sys-libs/zlib
+ editor? (
+ dev-libs/libxml2
+ virtual/jpeg
+ media-libs/openal
+ x11-libs/gtkglext
+ x11-libs/gtksourceview:2.0
+ )"
+
+S=${WORKDIR}/${MY_P}-source
+
+src_prepare() {
+ if has_version '>=sys-libs/zlib-1.2.5.1-r1' ; then
+ sed -i -e '1i#define OF(x) x' src/common/ioapi.h || die
+ fi
+
+ # don't try to use the system mini-xml
+ sed -i -e '/mxml/d' configure || die
+
+ epatch \
+ "${FILESDIR}"/${P}-mathlib.patch \
+ "${FILESDIR}"/${P}-anon.patch \
+ "${FILESDIR}"/${P}-locale.patch
+
+ cp "${DISTDIR}"/1maps.pk3 "${WORKDIR}"/base/ || die
+ mv "${WORKDIR}"/base/ "${S}"/ || die
+}
+
+src_configure() {
+ # they are special and provide hand batched configure file
+ local myconf="
+ --disable-dependency-tracking
+ $(use_enable !debug release)
+ $(use_enable editor ufo2map)
+ $(use_enable editor uforadiant)
+ --enable-ufoded
+ --bindir="${GAMES_BINDIR}"
+ --libdir="$(games_get_libdir)"
+ --datadir="${GAMES_DATADIR}/${PN/-}"
+ --localedir="${EPREFIX}/usr/share/locale/"
+ --prefix="${GAMES_PREFIX}"
+ "
+ echo "./configure ${myconf}"
+ ./configure ${myconf} || die
+}
+
+src_compile() {
+ emake
+ emake lang
+
+ if use editor; then
+ emake uforadiant
+ fi
+}
+
+src_install() {
+ newicon src/ports/linux/ufo.png ${PN}.png
+ dobin ufoded
+ make_desktop_entry ufoded "UFO: Alien Invasion Server" ${PN}
+ if ! use dedicated; then
+ dobin ufo
+ make_desktop_entry ufo "UFO: Alien Invasion" ${PN}
+ fi
+
+ if use editor; then
+ dobin ufo2map ufomodel
+ fi
+
+ # install data
+ insinto "${GAMES_DATADIR}"/${PN/-}
+ doins -r base
+ rm -rf "${ED}/${GAMES_DATADIR}/${PN/-}/base/game.so"
+ dogameslib base/game.so
+
+ # move translations where they belong
+ dodir "${GAMES_DATADIR_BASE}/locale"
+ mv "${ED}/${GAMES_DATADIR}/${PN/-}/base/i18n/"* \
+ "${ED}/${GAMES_DATADIR_BASE}/locale/" || die
+ rm -rf "${ED}/${GAMES_DATADIR}/${PN/-}/base/i18n/" || die
+
+ prepgamesdirs
+}