commit:     059a10905238161e821fa2501a994908db6eefd5
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 30 19:01:56 2020 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Mon Nov 30 20:12:13 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=059a1090

games-roguelike/crossfire-client: migrate to lua-single.eclass

Upstream build scripts look explicitly for lua5.1 so let's stick with that.

Closes: https://bugs.gentoo.org/752693
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 .../crossfire-client-1.71.0-r100.ebuild            | 82 ++++++++++++++++++++++
 profiles/package.mask                              |  1 +
 2 files changed, 83 insertions(+)

diff --git 
a/games-roguelike/crossfire-client/crossfire-client-1.71.0-r100.ebuild 
b/games-roguelike/crossfire-client/crossfire-client-1.71.0-r100.ebuild
new file mode 100644
index 00000000000..4f37b491493
--- /dev/null
+++ b/games-roguelike/crossfire-client/crossfire-client-1.71.0-r100.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+LUA_COMPAT=( lua5-1 )
+
+inherit autotools desktop lua-single toolchain-funcs xdg-utils
+
+DESCRIPTION="Client for the nethack-style but more in the line of UO"
+HOMEPAGE="http://crossfire.real-time.com/";
+SRC_URI="mirror://sourceforge/crossfire/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="lua opengl sdl sound"
+
+REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )"
+
+RDEPEND="
+       lua? ( ${LUA_DEPS} )
+       media-libs/libpng:0
+       net-misc/curl
+       opengl? ( virtual/opengl
+               media-libs/freeglut )
+       sdl? ( media-libs/libsdl[video]
+               media-libs/sdl-image[png] )
+       sound? ( media-libs/sdl-mixer[vorbis] )
+       sys-libs/zlib
+       x11-libs/gtk+:2"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+src_prepare() {
+       default
+
+       sed -ri -e '/^.TH/s:$: 6:' $(find . -name "*man") || die
+       # Since we have to rewrite this anyway, dispense with the wrapper
+       # and point configure directly at the implementation of choice.
+       sed -i -e "s/lua-5.1/${ELUA}/" configure.ac || die
+       eautoreconf
+}
+
+src_configure() {
+       # bugs in configure script so we cant use $(use_enable ...)
+       local myconf
+
+       use lua    && myconf="${myconf} --enable-lua"
+       use sdl    || myconf="${myconf} --disable-sdl"
+       use opengl || myconf="${myconf} --disable-opengl"
+       use sound  || myconf="${myconf} --disable-sound"
+
+       econf ${myconf}
+}
+
+src_compile() {
+       # bug 139785
+       if use sound ; then
+               emake -C sound-src AR="$(tc-getAR)"
+       fi
+       emake AR="$(tc-getAR)"
+}
+
+src_install() {
+       local s
+
+       default
+       domenu gtk-v2/crossfire-client.desktop
+       for s in 16 32 48
+       do
+               newicon -s ${s} pixmaps/${s}x${s}.png ${PN}.png
+       done
+}
+
+pkg_postinst() {
+       xdg_icon_cache_update
+}
+
+pkg_postrm() {
+       xdg_icon_cache_update
+}

diff --git a/profiles/package.mask b/profiles/package.mask
index 4117f527e87..f3287cd4f24 100644
--- a/profiles/package.mask
+++ b/profiles/package.mask
@@ -563,6 +563,7 @@ dev-lua/luacrypto
 >=games-engines/love-11.3-r100:0
 >=games-engines/solarus-1.3.1-r100
 >=games-puzzle/fish-fillets-1.0.1-r100
+>=games-roguelike/crossfire-client-1.71.0-r100
 >=games-roguelike/stone-soup-0.25.1-r100
 >=mail-filter/imapfilter-2.6.16-r100
 >=media-gfx/geeqie-1.5.1-r1

Reply via email to