1 |
commit: df75c93f4d60c14e92c658f2ac50b7204cf859d9 |
2 |
Author: Justin Lecher <jlec <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Dec 20 16:35:31 2015 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 20 16:35:42 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df75c93f |
7 |
|
8 |
sci-chemistry/gperiodic: Version Bump and handle LINGUAS |
9 |
|
10 |
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=568852 |
11 |
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=403649 |
12 |
|
13 |
Package-Manager: portage-2.2.26 |
14 |
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org> |
15 |
|
16 |
sci-chemistry/gperiodic/Manifest | 1 + |
17 |
.../gperiodic/files/gperiodic-3.0.1-makefile.patch | 66 ++++++++++++++++++++++ |
18 |
.../gperiodic/files/gperiodic-3.0.1-nls.patch | 20 +++++++ |
19 |
sci-chemistry/gperiodic/gperiodic-3.0.1.ebuild | 55 ++++++++++++++++++ |
20 |
4 files changed, 142 insertions(+) |
21 |
|
22 |
diff --git a/sci-chemistry/gperiodic/Manifest b/sci-chemistry/gperiodic/Manifest |
23 |
index 659d4e2..8da8b7b 100644 |
24 |
--- a/sci-chemistry/gperiodic/Manifest |
25 |
+++ b/sci-chemistry/gperiodic/Manifest |
26 |
@@ -1 +1,2 @@ |
27 |
DIST gperiodic-2.0.10.tar.gz 131213 SHA256 78d72870c51c39e4a35c804c05b8ef5e39f88d42eced52b2934e21d74fb8d096 SHA512 23d0074ad5b0f9e25e8eee63f8c375e2448b1ee7c00f89e965b7dd8ce3f60f20251d7699a2f7a767228316144b946a5ac204a3e478c395767133f7fc801b51ba WHIRLPOOL b758b622bfb980aad45b0bb6e2850579408959c3bf700f4dbb21d4bc64168d2a589a9ed5974f75b5eaf7f6c9d593c69dbc9b470957b01457caa30eb356850f14 |
28 |
+DIST gperiodic-3.0.1.tar.gz 375347 SHA256 d023e6f3b8aef773331c5f87d1de17f5fa120e67f7b6da1439ca7861a2df0905 SHA512 3bf47359dda1a029f3528ea04d28cd75909bceb535f6e1dc6c90f5a17b668e0dd98900ddd83633649383ff4e2fc588265275e0e4a27897ecc4ac6db4e93befc1 WHIRLPOOL 8700f0ad254d7ece507b4c01d54ce510121b266d3b533d6035d17ef236d6310008ba2bd80900e92697bbc42c985632421c2be87a2f4bea43903c0207df231198 |
29 |
|
30 |
diff --git a/sci-chemistry/gperiodic/files/gperiodic-3.0.1-makefile.patch b/sci-chemistry/gperiodic/files/gperiodic-3.0.1-makefile.patch |
31 |
new file mode 100644 |
32 |
index 0000000..a7a402a |
33 |
--- /dev/null |
34 |
+++ b/sci-chemistry/gperiodic/files/gperiodic-3.0.1-makefile.patch |
35 |
@@ -0,0 +1,66 @@ |
36 |
+ Makefile | 36 ++++++++++++++---------------------- |
37 |
+ 1 file changed, 14 insertions(+), 22 deletions(-) |
38 |
+ |
39 |
+diff --git a/Makefile b/Makefile |
40 |
+index 7e86dc4..9bd4fe8 100644 |
41 |
+--- a/Makefile |
42 |
++++ b/Makefile |
43 |
+@@ -14,8 +14,8 @@ enable_nls ?= 1 |
44 |
+ $(CC) -c $(CFLAGS) $(CPPFLAGS) $< |
45 |
+ |
46 |
+ all: |
47 |
+- make gperiodic |
48 |
+- make -C po/ all enable_nls=$(enable_nls) |
49 |
++ $(MAKE) gperiodic |
50 |
++ $(MAKE) -C po/ all enable_nls=$(enable_nls) |
51 |
+ intltool-merge -d po gperiodic.desktop.in gperiodic.desktop |
52 |
+ |
53 |
+ gperiodic: gperiodic.o |
54 |
+@@ -29,24 +29,16 @@ gpdata.o: gpdata.c gperiodic.h |
55 |
+ gperiodic.o: gperiodic.c gperiodic.h table_data.h |
56 |
+ |
57 |
+ install: |
58 |
+- mkdir -p $(DESTDIR)$(bindir) |
59 |
+- install -m 755 gperiodic $(DESTDIR)$(bindir) |
60 |
+- mkdir -p $(DESTDIR)$(datadir)/applications |
61 |
+- install -m 644 gperiodic.desktop $(DESTDIR)$(datadir)/applications |
62 |
+- mkdir -p $(DESTDIR)$(datadir)/pixmaps |
63 |
+- install -m 644 icons/gperiodic.png $(DESTDIR)$(datadir)/pixmaps |
64 |
+- install -m 644 icons/gperiodic.xpm $(DESTDIR)$(datadir)/pixmaps |
65 |
+- mkdir -p $(DESTDIR)$(mandir) |
66 |
+- install -m 644 gperiodic.1 $(DESTDIR)$(mandir) |
67 |
+- mkdir -p $(DESTDIR)$(iconsdir)/hicolor/16x16/apps |
68 |
+- mkdir -p $(DESTDIR)$(iconsdir)/hicolor/32x32/apps |
69 |
+- mkdir -p $(DESTDIR)$(iconsdir)/hicolor/48x48/apps |
70 |
+- mkdir -p $(DESTDIR)$(iconsdir)/hicolor/64x64/apps |
71 |
+- install -m 644 icons/hicolor/16x16/apps/gperiodic.png $(DESTDIR)$(iconsdir)/hicolor/16x16/apps |
72 |
+- install -m 644 icons/hicolor/32x32/apps/gperiodic.png $(DESTDIR)$(iconsdir)/hicolor/32x32/apps |
73 |
+- install -m 644 icons/hicolor/48x48/apps/gperiodic.png $(DESTDIR)$(iconsdir)/hicolor/48x48/apps |
74 |
+- install -m 644 icons/hicolor/64x64/apps/gperiodic.png $(DESTDIR)$(iconsdir)/hicolor/64x64/apps |
75 |
+- make -C po/ install enable_nls=$(enable_nls) datadir=$(datadir) DESTDIR=$(DESTDIR) |
76 |
++ install -D -m 755 gperiodic $(DESTDIR)$(bindir)/gperiodic |
77 |
++ install -D -m 644 gperiodic.desktop $(DESTDIR)$(datadir)/applications/gperiodic.desktop |
78 |
++ install -D -m 644 icons/gperiodic.png $(DESTDIR)$(datadir)/pixmaps/gperiodic.png |
79 |
++ install -D -m 644 icons/gperiodic.xpm $(DESTDIR)$(datadir)/pixmaps/gperiodic.xpm |
80 |
++ install -D -m 644 gperiodic.1 $(DESTDIR)$(mandir)/gperiodic.1 |
81 |
++ install -D -m 644 icons/hicolor/16x16/apps/gperiodic.png $(DESTDIR)$(iconsdir)/hicolor/16x16/apps/gperiodic.png |
82 |
++ install -D -m 644 icons/hicolor/32x32/apps/gperiodic.png $(DESTDIR)$(iconsdir)/hicolor/32x32/apps/gperiodic.png |
83 |
++ install -D -m 644 icons/hicolor/48x48/apps/gperiodic.png $(DESTDIR)$(iconsdir)/hicolor/48x48/apps/gperiodic.png |
84 |
++ install -D -m 644 icons/hicolor/64x64/apps/gperiodic.png $(DESTDIR)$(iconsdir)/hicolor/64x64/apps/gperiodic.png |
85 |
++ $(MAKE) -C po/ install enable_nls=$(enable_nls) datadir=$(datadir) DESTDIR=$(DESTDIR) |
86 |
+ |
87 |
+ uninstall: |
88 |
+ rm -f $(bindir)/gperiodic \ |
89 |
+@@ -58,10 +50,10 @@ uninstall: |
90 |
+ $(iconsdir)/hicolor/32x32/apps/gperiodic.png \ |
91 |
+ $(iconsdir)/hicolor/48x48/apps/gperiodic.png \ |
92 |
+ $(iconsdir)/hicolor/64x64/apps/gperiodic.png |
93 |
+- make -C po/ uninstall enable_nls=$(enable_nls) datadir=$(datadir) DESTDIR=$(DESTDIR) |
94 |
++ $(MAKE) -C po/ uninstall enable_nls=$(enable_nls) datadir=$(datadir) DESTDIR=$(DESTDIR) |
95 |
+ |
96 |
+ clean: |
97 |
+ rm -f *.o gperiodic gperiodic.desktop |
98 |
+- make -C po/ clean |
99 |
++ $(MAKE) -C po/ clean |
100 |
+ |
101 |
+ .PHONY: install uninstall clean |
102 |
|
103 |
diff --git a/sci-chemistry/gperiodic/files/gperiodic-3.0.1-nls.patch b/sci-chemistry/gperiodic/files/gperiodic-3.0.1-nls.patch |
104 |
new file mode 100644 |
105 |
index 0000000..4420ca6 |
106 |
--- /dev/null |
107 |
+++ b/sci-chemistry/gperiodic/files/gperiodic-3.0.1-nls.patch |
108 |
@@ -0,0 +1,20 @@ |
109 |
+ po/Makefile | 2 ++ |
110 |
+ 1 file changed, 2 insertions(+) |
111 |
+ |
112 |
+diff --git a/po/Makefile b/po/Makefile |
113 |
+index d7d7d78..c596e5b 100644 |
114 |
+--- a/po/Makefile |
115 |
++++ b/po/Makefile |
116 |
+@@ -26,10 +26,12 @@ endif |
117 |
+ |
118 |
+ install: |
119 |
+ $(MAKE) all |
120 |
++ifeq ($(enable_nls),1) |
121 |
+ for f in $(FILES_MO) ; do \ |
122 |
+ mkdir -p $(DESTDIR)$(LOCALEDIR)/`basename $$f .mo`/LC_MESSAGES ; \ |
123 |
+ install -m 644 $$f $(DESTDIR)$(LOCALEDIR)/`basename $$f .mo`/LC_MESSAGES/$(PACKAGE).mo ; \ |
124 |
+ done |
125 |
++endif |
126 |
+ |
127 |
+ uninstall: |
128 |
+ for f in $(FILES_MO) ; do \ |
129 |
|
130 |
diff --git a/sci-chemistry/gperiodic/gperiodic-3.0.1.ebuild b/sci-chemistry/gperiodic/gperiodic-3.0.1.ebuild |
131 |
new file mode 100644 |
132 |
index 0000000..5793ece |
133 |
--- /dev/null |
134 |
+++ b/sci-chemistry/gperiodic/gperiodic-3.0.1.ebuild |
135 |
@@ -0,0 +1,55 @@ |
136 |
+# Copyright 1999-2015 Gentoo Foundation |
137 |
+# Distributed under the terms of the GNU General Public License v2 |
138 |
+# $Id$ |
139 |
+ |
140 |
+EAPI=5 |
141 |
+ |
142 |
+inherit eutils toolchain-funcs |
143 |
+ |
144 |
+DESCRIPTION="Periodic table application for Linux" |
145 |
+HOMEPAGE="http://www.frantz.fi/software/gperiodic.php" |
146 |
+SRC_URI="http://downloads.sourceforge.net/project/${PN}/${P}.tar.gz" |
147 |
+ |
148 |
+KEYWORDS="~amd64 ~x86" |
149 |
+SLOT="0" |
150 |
+LICENSE="GPL-2" |
151 |
+IUSE="nls" |
152 |
+MY_AVAILABLE_LINGUAS=" be bg cs da de es fi fr gl id is it lt ms nl pl pt_BR pt ru sv tr uk" |
153 |
+IUSE="${IUSE} ${MY_AVAILABLE_LINGUAS// / linguas_}" |
154 |
+ |
155 |
+RDEPEND=" |
156 |
+ sys-libs/ncurses:0 |
157 |
+ x11-libs/gtk+:2 |
158 |
+ x11-libs/cairo[X] |
159 |
+ nls? ( sys-devel/gettext )" |
160 |
+DEPEND="${RDEPEND} |
161 |
+ virtual/pkgconfig" |
162 |
+ |
163 |
+src_prepare() { |
164 |
+ epatch \ |
165 |
+ "${FILESDIR}"/${P}-makefile.patch \ |
166 |
+ "${FILESDIR}"/${P}-nls.patch |
167 |
+ for lang in ${MY_AVAILABLE_LINGUAS}; do |
168 |
+ if ! use linguas_${lang}; then |
169 |
+ einfo "Cleaning translation for ${lang}" |
170 |
+ rm po/${lang}.po || die |
171 |
+ fi |
172 |
+ done |
173 |
+} |
174 |
+ |
175 |
+src_compile() { |
176 |
+ local myopts |
177 |
+ use nls && myopts="enable_nls=1" || myopts="enable_nls=0" |
178 |
+ emake \ |
179 |
+ CFLAGS="${CFLAGS}" \ |
180 |
+ LDFLAGS="${LDFLAGS}" \ |
181 |
+ CC=$(tc-getCC) ${myopts} |
182 |
+} |
183 |
+ |
184 |
+src_install() { |
185 |
+ local myopts |
186 |
+ use nls && myopts="enable_nls=1" || myopts="enable_nls=0" |
187 |
+ emake DESTDIR="${D}" ${myopts} install |
188 |
+ dodoc AUTHORS ChangeLog README |
189 |
+ newdoc po/README README.translation |
190 |
+} |