diff --git a/media-gfx/grafx2/Manifest b/media-gfx/grafx2/Manifest new file mode 100644 index 0000000000..39b36d2b3d --- /dev/null +++ b/media-gfx/grafx2/Manifest @@ -0,0 +1 @@ +DIST grafx2-2.7.2978-src.tgz 1104727 BLAKE2B 7ae308ea7ce3dd10966e85353111c890931a56c9bc496c4d956d89db9609e4e472280df1202e85494929979ee080a7c5daf07b629ed7002291448c87a7547cf6 SHA512 ed8d92b51cf71ee139b7c21206a088ba056642debcbbc6e650bdab9547b53159251d842eb4c5ea46b18859c0f333bad66ed60e4b91d58bacd7f02022ead7a61e diff --git a/media-gfx/grafx2/files/grafx2-desktop-file.patch b/media-gfx/grafx2/files/grafx2-desktop-file.patch new file mode 100644 index 0000000000..a08bb8aeb0 --- /dev/null +++ b/media-gfx/grafx2/files/grafx2-desktop-file.patch @@ -0,0 +1,16 @@ +diff --git a/misc/unix/grafx2.desktop b/misc/unix/grafx2.desktop +index 9718f06..892e7b2 100644 +--- a/misc/unix/grafx2.desktop ++++ b/misc/unix/grafx2.desktop +@@ -1,9 +1,9 @@ + [Desktop Entry] + Name=GrafX2 + Comment=Deluxe Paint Clone +-Exec=grafx2 %f ++Exec=grafx2-sdl %f + Terminal=false + Type=Application + Icon=grafx2 +-Categories=Application;Graphics; ++Categories=Graphics; + MimeType=image/lbm;image/iff;image/pcx;image/tga;image/gif;image/bmp;image/x-icon;image/png; diff --git a/media-gfx/grafx2/grafx2-2.7.2978.ebuild b/media-gfx/grafx2/grafx2-2.7.2978.ebuild new file mode 100644 index 0000000000..ac53ecd119 --- /dev/null +++ b/media-gfx/grafx2/grafx2-2.7.2978.ebuild @@ -0,0 +1,52 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit 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="ttf lua" + +# Test phase fails: make: *** [Makefile:1146: ../bin/tests-sdl] Error 1 +RESTRICT="test" + +PATCHES=( + "${FILESDIR}/${PN}-desktop-file.patch" +) + +DEPEND=" + media-libs/libsdl + media-libs/sdl-image + media-libs/freetype + media-libs/libpng + ttf? ( media-libs/sdl-ttf ) + lua? ( >=dev-lang/lua-5.1.0 ) +" + +S="${WORKDIR}/${PN}/src/" + +src_prepare() { + pushd ../ + eapply ${PATCHES} + eapply_user + popd + sed -i s/lua5\.1/lua/g Makefile || die +} + +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/media-gfx/grafx2/metadata.xml b/media-gfx/grafx2/metadata.xml new file mode 100644 index 0000000000..8e1ca16e5e --- /dev/null +++ b/media-gfx/grafx2/metadata.xml @@ -0,0 +1,9 @@ + + + + + + + Install TTF Fonts + +