diff options
author | Alexander Golubev <fatzer2@gmail.com> | 2024-11-18 10:39:32 +0300 |
---|---|---|
committer | Alexander Golubev <fatzer2@gmail.com> | 2024-11-18 10:40:02 +0300 |
commit | 06b7a3ee184fc85d87cc0590fd7f065f8e99af38 (patch) | |
tree | 134e99b334d8d290c7bedca553e10851ee6b50b9 /media-gfx/grafx2 | |
parent | media-gfx/grafx2: add missing RDEPEND (diff) | |
download | guru-06b7a3ee184fc85d87cc0590fd7f065f8e99af38.tar.gz guru-06b7a3ee184fc85d87cc0590fd7f065f8e99af38.tar.bz2 guru-06b7a3ee184fc85d87cc0590fd7f065f8e99af38.zip |
media-gfx/grafx2: add 2.9.3219
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
Diffstat (limited to 'media-gfx/grafx2')
-rw-r--r-- | media-gfx/grafx2/Manifest | 2 | ||||
-rw-r--r-- | media-gfx/grafx2/grafx2-2.9.3219.ebuild | 112 | ||||
-rw-r--r-- | media-gfx/grafx2/metadata.xml | 4 |
3 files changed, 117 insertions, 1 deletions
diff --git a/media-gfx/grafx2/Manifest b/media-gfx/grafx2/Manifest index 39b36d2b3..c42dcbbd3 100644 --- a/media-gfx/grafx2/Manifest +++ b/media-gfx/grafx2/Manifest @@ -1 +1,3 @@ DIST grafx2-2.7.2978-src.tgz 1104727 BLAKE2B 7ae308ea7ce3dd10966e85353111c890931a56c9bc496c4d956d89db9609e4e472280df1202e85494929979ee080a7c5daf07b629ed7002291448c87a7547cf6 SHA512 ed8d92b51cf71ee139b7c21206a088ba056642debcbbc6e650bdab9547b53159251d842eb4c5ea46b18859c0f333bad66ed60e4b91d58bacd7f02022ead7a61e +DIST grafx2-testdata-20201222.tar.bz2 36853538 BLAKE2B 506db79030f33e5308ac9f4cbed7891c836cde9c8795eb867b7df2c80bd3b3825af93099f3def6f3a0e55b8628a4139e9b1c689d317daec189037d50a9e2da93 SHA512 3be28934b8d7b945fcc21bd9e1d500dd4dfca2bb371b801ef7dbe4670529d054fb19f10fdeeb2fec9096c611c31adfcf238c4b3035b2891db4fc6e9968978c4e +DIST grafx2-v2.9.3219.tar.gz 2631545 BLAKE2B 76c67986f45f21c11d7df7f628c689f2e08d24ec54e14ed2d2d25729e471b4b045cc4d70e5c4c20ee9e6e4950439d1747b3e67308d2dacd706be762c693391d6 SHA512 db6a6092c899dbc313e4a680654d128e77b0db8af64032f412dc788b0d9fa9070847cfdb6ec8af4a4dbb35568dc992bce2ebf8f3852ecba1a12608f0a454cd74 diff --git a/media-gfx/grafx2/grafx2-2.9.3219.ebuild b/media-gfx/grafx2/grafx2-2.9.3219.ebuild new file mode 100644 index 000000000..b873337c8 --- /dev/null +++ b/media-gfx/grafx2/grafx2-2.9.3219.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-{1..4} ) + +inherit lua-single toolchain-funcs xdg + +pic_samples_commit=40738b358a5a5cb33d54897b008cbccad98e63d6 +pic_samples_date=20201222 + +DESCRIPTION="A pixelart-oriented painting program" +HOMEPAGE="http://www.pulkomandy.tk/projects/GrafX2 + https://grafx2.eu/ +" +SRC_URI="http://www.pulkomandy.tk/projects/GrafX2/downloads/${PN}-v${PV}.tar.gz + test? ( + https://gitlab.com/GrafX2/pic-samples/-/archive/${pic_samples_commit}/pic-samples-${pic_samples_commit}.tar.bz2 + -> ${PN}-testdata-${pic_samples_date}.tar.bz2 + ) +" +S="${WORKDIR}/${PN}-v$(ver_cut 1-2)/src" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc lua +sdl sdl2 ttf test" +REQUIRED_USE=" + lua? ( ${LUA_REQUIRED_USE} ) + ?? ( sdl sdl2 ) + ttf? ( ^^ ( sdl sdl2 ) ) +" +RESTRICT="!test? ( test )" + +SDL_DEPS=" + media-libs/libsdl!VER! + media-libs/sdl!VER!-image[tiff] + ttf? ( media-libs/sdl!VER!-ttf ) +" + +RDEPEND=" + media-libs/libpng + lua? ( ${LUA_DEPS} ) + sdl? ( ${SDL_DEPS//!VER!/} ) + sdl2? ( ${SDL_DEPS//!VER!/2} ) + !sdl? ( !sdl2? ( x11-libs/libX11 ) ) + ttf? ( media-libs/freetype ) +" +DEPEND="$RDEPEND" + +src_prepare() { + pushd .. || die + default + + if use test; then + rmdir tests/pic-samples || die + mv "${WORKDIR}/pic-samples-${pic_samples_commit}" tests/pic-samples || die + fi + + popd || die + + # Remove optimisation and debug info from CFLAGS + sed -r -i '/^\s*COPT\s*\+?=/s!\s*(-g(|gdb|stabs)|-O\$\(OPTIM\))(\s|$)!\3!g' Makefile +} + +src_configure() { + my_makeargs=( + V=1 + PREFIX="${EPREFIX}/usr" + ) + use sdl && my_makeargs+=( API=sdl ) + use sdl2 && my_makeargs+=( API=sdl2 ) + use sdl || use sdl2 || my_makeargs+=( API=x11 ) + + use ttf || my_makeargs+=( NOTTF=1 ) + use lua || my_makeargs+=( NOLUA=1 SCRIPT_FILES="" ) + + tc-export CC PKG_CONFIG +} + +src_compile() { + emake "${my_makeargs[@]}" +} + +src_test() { + emake "${my_makeargs[@]}" check +} + +src_install() { + emake "${my_makeargs[@]}" DESTDIR="${D}" install + + # install documentation + cd ../doc || die + dodoc README.txt COMPILING.txt + + if use doc; then + dodoc -r original_docs + + insinto "/usr/share/doc/${P}" + doins quickstart.rtf + fi + + # grafx2 binary usually has name grafx2-sdl or grafx2-x11 but desktop file + # references it as just grafx2, so let's create symlink to mitigate it. + local bin="$(basename "$(ls "${ED}"/usr/bin/grafx2*)" )" + [[ -z "$bin" ]] && die "failed to find installed binary" + if [[ "$bin" != "grafx2" ]]; then + echo "$bin" + dosym "$bin" "/usr/bin/grafx2" || die; + fi +} diff --git a/media-gfx/grafx2/metadata.xml b/media-gfx/grafx2/metadata.xml index d36ec0dfb..3ca1b8e83 100644 --- a/media-gfx/grafx2/metadata.xml +++ b/media-gfx/grafx2/metadata.xml @@ -4,6 +4,8 @@ <pkgmetadata> <!-- maintainer-needed --> <use> - <flag name="ttf">Install TTF Fonts</flag> + <flag name="ttf">Add support for TTF fonts</flag> + <flag name="sdl">Use <pkg>media-libs/libsdl</pkg> as a rendering backend</flag> + <flag name="sdl2">Use <pkg>media-libs/libsdl2</pkg> as a rendering backend</flag> </use> </pkgmetadata> |