Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@××××××.net>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:master commit in: media-gfx/grafx2/files/, media-gfx/grafx2/
Date: Sat, 26 Sep 2020 12:26:39
Message-Id: 1601117676.35a5376e0439fbcfa037d1518f2904c80a191a09.andrewammerlaan@gentoo
1 commit: 35a5376e0439fbcfa037d1518f2904c80a191a09
2 Author: Stefan Ott <gentoo <AT> desire <DOT> ch>
3 AuthorDate: Sat Sep 26 10:54:03 2020 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
5 CommitDate: Sat Sep 26 10:54:36 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=35a5376e
7
8 media-gfx/grafx2: new package
9
10 Signed-off-by: Stefan Ott <gentoo <AT> desire.ch>
11
12 media-gfx/grafx2/Manifest | 1 +
13 media-gfx/grafx2/files/grafx2-desktop-file.patch | 15 ++++++
14 media-gfx/grafx2/grafx2-2.7.2978.ebuild | 69 ++++++++++++++++++++++++
15 3 files changed, 85 insertions(+)
16
17 diff --git a/media-gfx/grafx2/Manifest b/media-gfx/grafx2/Manifest
18 new file mode 100644
19 index 00000000..39b36d2b
20 --- /dev/null
21 +++ b/media-gfx/grafx2/Manifest
22 @@ -0,0 +1 @@
23 +DIST grafx2-2.7.2978-src.tgz 1104727 BLAKE2B 7ae308ea7ce3dd10966e85353111c890931a56c9bc496c4d956d89db9609e4e472280df1202e85494929979ee080a7c5daf07b629ed7002291448c87a7547cf6 SHA512 ed8d92b51cf71ee139b7c21206a088ba056642debcbbc6e650bdab9547b53159251d842eb4c5ea46b18859c0f333bad66ed60e4b91d58bacd7f02022ead7a61e
24
25 diff --git a/media-gfx/grafx2/files/grafx2-desktop-file.patch b/media-gfx/grafx2/files/grafx2-desktop-file.patch
26 new file mode 100644
27 index 00000000..8b623545
28 --- /dev/null
29 +++ b/media-gfx/grafx2/files/grafx2-desktop-file.patch
30 @@ -0,0 +1,15 @@
31 +diff -Naur grafx2.orig/misc/unix/grafx2.desktop grafx2/misc/unix/grafx2.desktop
32 +--- grafx2.orig/misc/unix/grafx2.desktop 2020-03-03 20:32:57.000000000 +0100
33 ++++ grafx2/misc/unix/grafx2.desktop 2020-09-26 04:04:31.315093477 +0200
34 +@@ -1,9 +1,9 @@
35 + [Desktop Entry]
36 + Name=GrafX2
37 + Comment=Deluxe Paint Clone
38 +-Exec=grafx2 %f
39 ++Exec=grafx2-sdl %f
40 + Terminal=false
41 + Type=Application
42 + Icon=grafx2
43 +-Categories=Application;Graphics;
44 ++Categories=Graphics;
45 + MimeType=image/lbm;image/iff;image/pcx;image/tga;image/gif;image/bmp;image/x-icon;image/png;
46
47 diff --git a/media-gfx/grafx2/grafx2-2.7.2978.ebuild b/media-gfx/grafx2/grafx2-2.7.2978.ebuild
48 new file mode 100644
49 index 00000000..fb9aa1b4
50 --- /dev/null
51 +++ b/media-gfx/grafx2/grafx2-2.7.2978.ebuild
52 @@ -0,0 +1,69 @@
53 +# Copyright 1999-2009 Gentoo Foundation
54 +# Distributed under the terms of the GNU General Public License v2
55 +
56 +EAPI=7
57 +
58 +inherit xdg-utils
59 +
60 +DESCRIPTION="A pixelart-oriented painting program"
61 +HOMEPAGE="http://www.pulkomandy.tk/projects/GrafX2"
62 +SRC_URI="http://www.pulkomandy.tk/projects/GrafX2/downloads/${P}-src.tgz"
63 +
64 +LICENSE="GPL-2"
65 +SLOT="0"
66 +KEYWORDS="~amd64 ~x86"
67 +IUSE="ttf lua"
68 +
69 +PATCHES=(
70 + "${FILESDIR}/${PN}-desktop-file.patch"
71 +)
72 +
73 +DEPEND="media-libs/libsdl
74 + media-libs/sdl-image
75 + media-libs/freetype
76 + media-libs/libpng
77 + ttf? ( media-libs/sdl-ttf )
78 + lua? ( >=dev-lang/lua-5.1.0 )"
79 +RDEPEND=""
80 +
81 +src_unpack()
82 +{
83 + unpack ${P}-src.tgz && mv ${PN} ${P}
84 +}
85 +
86 +src_prepare()
87 +{
88 + eapply ${PATCHES}
89 +
90 + eapply_user
91 +
92 + cd ${WORKDIR}/${P}/src/
93 + sed -i s/lua5\.1/lua/g Makefile
94 +}
95 +
96 +src_compile()
97 +{
98 + use ttf || MYCNF="NOTTF=1"
99 + use lua || MYCNF="${MYCNF} NOLUA=1"
100 +
101 + cd ${WORKDIR}/${P}/src/
102 + emake ${MYCNF} || die "emake failed"
103 +}
104 +
105 +src_install()
106 +{
107 + cd ${WORKDIR}/${P}/src/
108 + emake ${MYCNF} DESTDIR="${D}" PREFIX="/usr" install || die "Install failed"
109 +}
110 +
111 +pkg_postinst()
112 +{
113 + xdg_desktop_database_update
114 + xdg_icon_cache_update
115 +}
116 +
117 +pkg_postrm()
118 +{
119 + xdg_desktop_database_update
120 + xdg_icon_cache_update
121 +}