* [gentoo-commits] repo/proj/guru:dev commit in: media-gfx/grafx2/, media-gfx/grafx2/files/
2020-09-26 12:26 [gentoo-commits] repo/proj/guru:master commit in: media-gfx/grafx2/, media-gfx/grafx2/files/ Andrew Ammerlaan
@ 2020-09-26 12:26 ` Andrew Ammerlaan
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Ammerlaan @ 2020-09-26 12:26 UTC (permalink / raw
To: gentoo-commits
commit: 0c3b028992ba41bbd2940db583140129a9412978
Author: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
AuthorDate: Sat Sep 26 12:26:17 2020 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Sat Sep 26 12:26:17 2020 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0c3b0289
media-gfx/grafx2: simplify ebuild
- xdg eclass exports phase functions so saves some lines
- use the S variable instead of moving stuff around and cd'ing
- RESTRICT test phase because it fails
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>
media-gfx/grafx2/files/grafx2-desktop-file.patch | 7 ++--
media-gfx/grafx2/grafx2-2.7.2978.ebuild | 49 ++++++++----------------
media-gfx/grafx2/metadata.xml | 9 +++++
3 files changed, 29 insertions(+), 36 deletions(-)
diff --git a/media-gfx/grafx2/files/grafx2-desktop-file.patch b/media-gfx/grafx2/files/grafx2-desktop-file.patch
index 8b623545..a08bb8ae 100644
--- a/media-gfx/grafx2/files/grafx2-desktop-file.patch
+++ b/media-gfx/grafx2/files/grafx2-desktop-file.patch
@@ -1,6 +1,7 @@
-diff -Naur grafx2.orig/misc/unix/grafx2.desktop grafx2/misc/unix/grafx2.desktop
---- grafx2.orig/misc/unix/grafx2.desktop 2020-03-03 20:32:57.000000000 +0100
-+++ grafx2/misc/unix/grafx2.desktop 2020-09-26 04:04:31.315093477 +0200
+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
diff --git a/media-gfx/grafx2/grafx2-2.7.2978.ebuild b/media-gfx/grafx2/grafx2-2.7.2978.ebuild
index fb9aa1b4..ac53ecd1 100644
--- a/media-gfx/grafx2/grafx2-2.7.2978.ebuild
+++ b/media-gfx/grafx2/grafx2-2.7.2978.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit xdg-utils
+inherit xdg
DESCRIPTION="A pixelart-oriented painting program"
HOMEPAGE="http://www.pulkomandy.tk/projects/GrafX2"
@@ -14,56 +14,39 @@ 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
+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 )"
-RDEPEND=""
+ lua? ( >=dev-lang/lua-5.1.0 )
+"
-src_unpack()
-{
- unpack ${P}-src.tgz && mv ${PN} ${P}
-}
+S="${WORKDIR}/${PN}/src/"
-src_prepare()
-{
+src_prepare() {
+ pushd ../
eapply ${PATCHES}
-
eapply_user
-
- cd ${WORKDIR}/${P}/src/
- sed -i s/lua5\.1/lua/g Makefile
+ popd
+ sed -i s/lua5\.1/lua/g Makefile || die
}
-src_compile()
-{
+src_compile() {
use ttf || MYCNF="NOTTF=1"
use lua || MYCNF="${MYCNF} NOLUA=1"
- cd ${WORKDIR}/${P}/src/
emake ${MYCNF} || die "emake failed"
}
-src_install()
-{
- cd ${WORKDIR}/${P}/src/
+src_install() {
emake ${MYCNF} DESTDIR="${D}" PREFIX="/usr" install || die "Install failed"
}
-
-pkg_postinst()
-{
- xdg_desktop_database_update
- xdg_icon_cache_update
-}
-
-pkg_postrm()
-{
- xdg_desktop_database_update
- xdg_icon_cache_update
-}
diff --git a/media-gfx/grafx2/metadata.xml b/media-gfx/grafx2/metadata.xml
new file mode 100644
index 00000000..8e1ca16e
--- /dev/null
+++ b/media-gfx/grafx2/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <use>
+ <flag name="ttf">Install TTF Fonts</flag>
+ </use>
+</pkgmetadata>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/proj/guru:master commit in: media-gfx/grafx2/, media-gfx/grafx2/files/
@ 2020-09-26 12:26 Andrew Ammerlaan
2020-09-26 12:26 ` [gentoo-commits] repo/proj/guru:dev " Andrew Ammerlaan
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Ammerlaan @ 2020-09-26 12:26 UTC (permalink / raw
To: gentoo-commits
commit: 0c3b028992ba41bbd2940db583140129a9412978
Author: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
AuthorDate: Sat Sep 26 12:26:17 2020 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Sat Sep 26 12:26:17 2020 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0c3b0289
media-gfx/grafx2: simplify ebuild
- xdg eclass exports phase functions so saves some lines
- use the S variable instead of moving stuff around and cd'ing
- RESTRICT test phase because it fails
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>
media-gfx/grafx2/files/grafx2-desktop-file.patch | 7 ++--
media-gfx/grafx2/grafx2-2.7.2978.ebuild | 49 ++++++++----------------
media-gfx/grafx2/metadata.xml | 9 +++++
3 files changed, 29 insertions(+), 36 deletions(-)
diff --git a/media-gfx/grafx2/files/grafx2-desktop-file.patch b/media-gfx/grafx2/files/grafx2-desktop-file.patch
index 8b623545..a08bb8ae 100644
--- a/media-gfx/grafx2/files/grafx2-desktop-file.patch
+++ b/media-gfx/grafx2/files/grafx2-desktop-file.patch
@@ -1,6 +1,7 @@
-diff -Naur grafx2.orig/misc/unix/grafx2.desktop grafx2/misc/unix/grafx2.desktop
---- grafx2.orig/misc/unix/grafx2.desktop 2020-03-03 20:32:57.000000000 +0100
-+++ grafx2/misc/unix/grafx2.desktop 2020-09-26 04:04:31.315093477 +0200
+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
diff --git a/media-gfx/grafx2/grafx2-2.7.2978.ebuild b/media-gfx/grafx2/grafx2-2.7.2978.ebuild
index fb9aa1b4..ac53ecd1 100644
--- a/media-gfx/grafx2/grafx2-2.7.2978.ebuild
+++ b/media-gfx/grafx2/grafx2-2.7.2978.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit xdg-utils
+inherit xdg
DESCRIPTION="A pixelart-oriented painting program"
HOMEPAGE="http://www.pulkomandy.tk/projects/GrafX2"
@@ -14,56 +14,39 @@ 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
+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 )"
-RDEPEND=""
+ lua? ( >=dev-lang/lua-5.1.0 )
+"
-src_unpack()
-{
- unpack ${P}-src.tgz && mv ${PN} ${P}
-}
+S="${WORKDIR}/${PN}/src/"
-src_prepare()
-{
+src_prepare() {
+ pushd ../
eapply ${PATCHES}
-
eapply_user
-
- cd ${WORKDIR}/${P}/src/
- sed -i s/lua5\.1/lua/g Makefile
+ popd
+ sed -i s/lua5\.1/lua/g Makefile || die
}
-src_compile()
-{
+src_compile() {
use ttf || MYCNF="NOTTF=1"
use lua || MYCNF="${MYCNF} NOLUA=1"
- cd ${WORKDIR}/${P}/src/
emake ${MYCNF} || die "emake failed"
}
-src_install()
-{
- cd ${WORKDIR}/${P}/src/
+src_install() {
emake ${MYCNF} DESTDIR="${D}" PREFIX="/usr" install || die "Install failed"
}
-
-pkg_postinst()
-{
- xdg_desktop_database_update
- xdg_icon_cache_update
-}
-
-pkg_postrm()
-{
- xdg_desktop_database_update
- xdg_icon_cache_update
-}
diff --git a/media-gfx/grafx2/metadata.xml b/media-gfx/grafx2/metadata.xml
new file mode 100644
index 00000000..8e1ca16e
--- /dev/null
+++ b/media-gfx/grafx2/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <use>
+ <flag name="ttf">Install TTF Fonts</flag>
+ </use>
+</pkgmetadata>
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-26 12:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-26 12:26 [gentoo-commits] repo/proj/guru:master commit in: media-gfx/grafx2/, media-gfx/grafx2/files/ Andrew Ammerlaan
2020-09-26 12:26 ` [gentoo-commits] repo/proj/guru:dev " Andrew Ammerlaan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox