diff options
author | James Le Cuirot <chewi@gentoo.org> | 2020-01-25 14:05:57 +0000 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2020-01-25 14:05:57 +0000 |
commit | 00ddbd2134a56fd5b11bda2cb88b74d7fcc8ad6e (patch) | |
tree | defe22bc294b39f7d0f8042733fc6b188c5d3074 /games-strategy/ufoai/ufoai-2.5.0_p20180603-r1.ebuild | |
parent | games-emulation/ppsspp: tweak for gcc-10 (diff) | |
download | gentoo-00ddbd2134a56fd5b11bda2cb88b74d7fcc8ad6e.tar.gz gentoo-00ddbd2134a56fd5b11bda2cb88b74d7fcc8ad6e.tar.bz2 gentoo-00ddbd2134a56fd5b11bda2cb88b74d7fcc8ad6e.zip |
games-strategy/ufoai: Drop USE=editor to avoid dead gtkglext dependency
Now I can undo last-rites.
Package-Manager: Portage-2.3.85, Repoman-2.3.20
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'games-strategy/ufoai/ufoai-2.5.0_p20180603-r1.ebuild')
-rw-r--r-- | games-strategy/ufoai/ufoai-2.5.0_p20180603-r1.ebuild | 138 |
1 files changed, 138 insertions, 0 deletions
diff --git a/games-strategy/ufoai/ufoai-2.5.0_p20180603-r1.ebuild b/games-strategy/ufoai/ufoai-2.5.0_p20180603-r1.ebuild new file mode 100644 index 000000000000..81b78a01e04d --- /dev/null +++ b/games-strategy/ufoai/ufoai-2.5.0_p20180603-r1.ebuild @@ -0,0 +1,138 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit desktop flag-o-matic toolchain-funcs xdg + +# 2.5.0 requires several patches +COMMIT="8b4533e85fdc0665889ff285e1521432084ee784" + +# UFO:AI v2.5.0 was uploaded to SourceForge as 2.5 +DIST_VERSION=$(ver_cut 1-2) + +# Install game data here +DATADIR="/usr/share/${PN}" + +DESCRIPTION="UFO: Alien Invasion - X-COM inspired strategy game" +HOMEPAGE="https://ufoai.org/" +SRC_URI=" + https://dev.gentoo.org/~chewi/distfiles/${PN}-code-${COMMIT}.zip + mirror://sourceforge/${PN}/${PN}-${DIST_VERSION}-data.tar +" + +# https://ufoai.org/licenses/ +LICENSE="GPL-2 GPL-3 public-domain CC-BY-3.0 CC-BY-SA-3.0 MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+client cpu_flags_x86_sse debug server" +REQUIRED_USE="|| ( client server )" + +RDEPEND=" + dev-libs/mxml + net-misc/curl + sys-libs/zlib + + client? ( + media-libs/libogg + media-libs/libpng:0= + media-libs/libsdl2[joystick,opengl,sound,threads,video] + media-libs/libtheora + media-libs/libvorbis + media-libs/sdl2-mixer + media-libs/sdl2-ttf + media-libs/xvid + virtual/jpeg:0 + virtual/opengl + ) + + server? ( + media-libs/libsdl2[threads] + ) +" + +DEPEND=" + ${RDEPEND} + app-arch/unzip + sys-devel/gettext + virtual/pkgconfig +" + +S="${WORKDIR}/${PN}-code-${COMMIT}" + +PATCHES=( + "${FILESDIR}"/${P}-install.patch + "${FILESDIR}"/${P}-mxml3.patch +) + +src_unpack() { + unpack ${PN}-code-${COMMIT}.zip + cd "${S}" || die + unpack ${PN}-${DIST_VERSION}-data.tar +} + +src_prepare() { + default + + # Make the build system a bit happier, will be fixed upstream + mkdir -p base/{maps,models} contrib/installer/mojosetup/scripts || die + + # Remove bundled mxml + rm -r src/libs/mxml/ || die +} + +src_configure() { + # Avoid noise, will be present in 2.6 + append-cxxflags -Wno-expansion-to-defined + + # The configure script of UFO:AI is hand crafted and a bit special + # econf does not work: "invalid option --build=x86_64-pc-linux-gnu" + local config=( + --prefix="${EPREFIX}"/usr + --datadir="${EPREFIX}${DATADIR}" + --libdir="${EPREFIX}"/usr/$(get_libdir)/${PN} + --localedir="${EPREFIX}"/usr/share/locale + --disable-dependency-tracking + --disable-paranoid + --disable-memory + --disable-testall + --disable-ufomodel + --disable-ufoslicer + $(use_enable cpu_flags_x86_sse sse) + $(use_enable !debug release) + $(use_enable server ufoded) + $(use_enable client ufo) + --disable-uforadiant + --disable-ufo2map + ) + + if use client || use server; then + config+=( --enable-game ) + else + config+=( --disable-game ) + fi + + echo ./configure "${config[@]}" + + CC=$(tc-getCC) CXX=$(tc-getCXX) \ + ./configure "${config[@]}" || die "configure failed" +} + +src_compile() { + emake all lang Q= +} + +src_install() { + newicon -s 32 src/ports/linux/ufo.png ${PN}.png + emake install Q= DESTDIR="${D}" + + if use client; then + doman debian/ufo.6 + make_desktop_entry ufo "UFO: Alien Invasion" ${PN} + fi + + if use server; then + doman debian/ufoded.6 + make_desktop_entry ufoded "UFO: Alien Invasion Server" ${PN} "Game;StrategyGame" "Terminal=true" + fi +} |