summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2020-12-02 00:04:03 +0100
committerMarek Szuba <marecki@gentoo.org>2020-12-02 00:04:36 +0100
commit227526cc91ac1b67df908b68f822c5a8967a1a5f (patch)
treef6851fe29de0e98e4120be389a06c62f70a568de
parentgames-strategy/naev-0.7.0: fix SRC_URI, explain BDEPEND/src_unpack (diff)
downloadgentoo-227526cc.tar.gz
gentoo-227526cc.tar.bz2
gentoo-227526cc.zip
games-strategy/naev: migrate to lua-single.eclass
LUA_COMPAT=( lua5-1 luajit ) as per the upstream autoconf script. Closes: https://bugs.gentoo.org/752720 Signed-off-by: Marek Szuba <marecki@gentoo.org>
-rw-r--r--games-strategy/naev/naev-0.7.0-r100.ebuild75
-rw-r--r--profiles/package.mask1
2 files changed, 76 insertions, 0 deletions
diff --git a/games-strategy/naev/naev-0.7.0-r100.ebuild b/games-strategy/naev/naev-0.7.0-r100.ebuild
new file mode 100644
index 000000000000..f43b5a4502f8
--- /dev/null
+++ b/games-strategy/naev/naev-0.7.0-r100.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( lua5-1 luajit )
+
+inherit lua-single xdg-utils
+
+DESCRIPTION="A 2D space trading and combat game, in a similar vein to Escape Velocity"
+HOMEPAGE="https://naev.org/ https://github.com/naev/naev"
+SRC_URI="https://github.com/naev/naev/releases/download/v${PV}/${P}.tar.bz2
+ https://github.com/naev/naev/releases/download/v${PV}/${P}-ndata.zip"
+
+LICENSE="GPL-2 GPL-3 public-domain CC-BY-3.0 CC-BY-SA-3.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug +mixer +openal"
+
+REQUIRED_USE="${LUA_REQUIRED_USE}"
+
+RDEPEND="${LUA_DEPS}
+ media-libs/libsdl2[X,sound,video]
+ dev-libs/libzip
+ dev-libs/libxml2
+ >=media-libs/freetype-2:2
+ >=media-libs/libvorbis-1.2.1
+ >=media-libs/libpng-1.2:0=
+ virtual/glu
+ virtual/opengl
+ mixer? ( media-libs/sdl2-mixer )
+ openal? ( media-libs/openal )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+# This is so that only the source tarball is unpacked - the data file
+# is supposed to be installed *zipped*. This is why we do not need unzip
+# in BDEPEND in spite of what repoman/pkgcheck might say.
+src_unpack() {
+ unpack ${P}.tar.bz2
+}
+
+src_configure() {
+ econf \
+ --enable-lua=$(usex lua_single_target_luajit luajit shared) \
+ $(use_enable debug) \
+ $(use_with openal) \
+ $(use_with mixer sdlmixer)
+}
+
+src_compile() {
+ emake V=1
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ appicondir=/usr/share/pixmaps \
+ appdatadir=/usr/share/metainfo \
+ Graphicsdir=/usr/share/applications \
+ install
+ insinto /usr/share/${PN}
+ newins "${DISTDIR}/${P}-ndata.zip" ndata
+
+ rm -f "${D}/usr/share/doc/${PF}/LICENSE"
+}
+
+pkg_postinst() {
+ xdg_icon_cache_update
+}
+
+pkg_postrm() {
+ xdg_icon_cache_update
+}
diff --git a/profiles/package.mask b/profiles/package.mask
index de708ef18577..720531192c0c 100644
--- a/profiles/package.mask
+++ b/profiles/package.mask
@@ -579,6 +579,7 @@ dev-lua/luacrypto
>=games-simulation/corsix-th-0.64-r100
>=games-sports/xmoto-0.6.1-r100
>=games-strategy/hedgewars-1.0.0-r100
+>=games-strategy/naev-0.7.0-r100
>=games-util/slade-3.1.12a-r100
>=mail-filter/imapfilter-2.6.16-r100
>=media-gfx/geeqie-1.5.1-r1