From 8d9afabd1ceac2830056f626f976f611bdb7aa06 Mon Sep 17 00:00:00 2001 From: Theo Anderson Date: Sun, 6 Dec 2020 22:51:45 +1300 Subject: [PATCH] media-gfx/grafx2: migrate to lua-single.eclass Package-Manager: Portage-3.0.11, Repoman-3.0.2 Signed-off-by: Theo Anderson --- media-gfx/grafx2/grafx2-2.7.2978-r100.ebuild | 48 ++++++++++++++++++++ profiles/package.mask | 5 +- 2 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 media-gfx/grafx2/grafx2-2.7.2978-r100.ebuild diff --git a/media-gfx/grafx2/grafx2-2.7.2978-r100.ebuild b/media-gfx/grafx2/grafx2-2.7.2978-r100.ebuild new file mode 100644 index 0000000000..eb9f7ac95e --- /dev/null +++ b/media-gfx/grafx2/grafx2-2.7.2978-r100.ebuild @@ -0,0 +1,48 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +LUA_COMPAT=( lua5-{1..4} ) + +inherit lua-single xdg + +DESCRIPTION="A pixelart-oriented painting program" +HOMEPAGE="http://www.pulkomandy.tk/projects/GrafX2" +SRC_URI="http://www.pulkomandy.tk/projects/GrafX2/downloads/${P}-src.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="lua ttf" +# Test phase fails: make: *** [Makefile:1146: ../bin/tests-sdl] Error 1 +RESTRICT="test" + +DEPEND=" + media-libs/libsdl + media-libs/sdl-image + media-libs/freetype + media-libs/libpng + ttf? ( media-libs/sdl-ttf ) + lua? ( ${LUA_DEPS} ) +" + +S="${WORKDIR}/${PN}/src/" + +PATCHES=( "${FILESDIR}/${PN}-desktop-file.patch" ) + +src_prepare() { + pushd ../ && default && popd + sed -i s/lua5\.1/lua/g Makefile || die "sed failed" +} + +src_compile() { + use ttf || MYCNF="NOTTF=1" + use lua || MYCNF="${MYCNF} NOLUA=1" + + emake ${MYCNF} || die "emake failed" +} + +src_install() { + emake ${MYCNF} DESTDIR="${D}" PREFIX="/usr" install || die "Install failed" +} diff --git a/profiles/package.mask b/profiles/package.mask index 1c7ef8267b..57b1bacbe4 100644 --- a/profiles/package.mask +++ b/profiles/package.mask @@ -1,4 +1,5 @@ # Huang Rui (2020-04-27) -# Requires >=dev-lang/lua-5.3 which is masked -# User should unmask dev-lang/lua-5.3 and media-video/kikoplay to install +# Theo Anderson (2020-12-06) +# All these ebuilds require slotted Lua, which is still masked. +>=media-gfx/grafx2-2.7.2978-r100 media-video/kikoplay