From: "Golubev Alexander" <fatzer2@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:dev commit in: media-gfx/grafx2/
Date: Mon, 18 Nov 2024 07:40:41 +0000 (UTC) [thread overview]
Message-ID: <1731915602.06b7a3ee184fc85d87cc0590fd7f065f8e99af38.fatzer2@gentoo> (raw)
commit: 06b7a3ee184fc85d87cc0590fd7f065f8e99af38
Author: Alexander Golubev <fatzer2 <AT> gmail <DOT> com>
AuthorDate: Mon Nov 18 07:39:32 2024 +0000
Commit: Golubev Alexander <fatzer2 <AT> gmail <DOT> com>
CommitDate: Mon Nov 18 07:40:02 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=06b7a3ee
media-gfx/grafx2: add 2.9.3219
Signed-off-by: Alexander Golubev <fatzer2 <AT> gmail.com>
media-gfx/grafx2/Manifest | 2 +
media-gfx/grafx2/grafx2-2.9.3219.ebuild | 112 ++++++++++++++++++++++++++++++++
media-gfx/grafx2/metadata.xml | 4 +-
3 files changed, 117 insertions(+), 1 deletion(-)
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>
next reply other threads:[~2024-11-18 7:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-18 7:40 Golubev Alexander [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-11-21 2:26 [gentoo-commits] repo/proj/guru:dev commit in: media-gfx/grafx2/ Golubev Alexander
2024-11-18 7:40 Golubev Alexander
2021-04-27 20:20 Marco Scardovi
2020-12-23 23:59 Theo Anderson
2020-12-06 10:29 Theo Anderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1731915602.06b7a3ee184fc85d87cc0590fd7f065f8e99af38.fatzer2@gentoo \
--to=fatzer2@gmail.com \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox