1 |
commit: 6ed0c1e3e76aed0126175dbe7a9db4dd98782e90 |
2 |
Author: Jonathan Scruggs <j.scruggs <AT> gmail <DOT> com> |
3 |
AuthorDate: Fri Aug 26 14:28:21 2016 +0000 |
4 |
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Aug 29 21:30:41 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ed0c1e3 |
7 |
|
8 |
media-sound/tuxguitar: New package |
9 |
|
10 |
A multitrack tablature editor and player that allows you to |
11 |
compose music using the following features: |
12 |
- Tablature editor |
13 |
- Score Viewer |
14 |
- Multitrack display |
15 |
- Autoscroll while playing |
16 |
- Note duration management |
17 |
- Various effects (bend, slide, vibrato, hammer-on/pull-off) |
18 |
- Support for triplets (5,6,7,9,10,11,12) |
19 |
- Repeat open and close |
20 |
- Time signature management |
21 |
- Tempo management |
22 |
- Imports and exports gp3,gp4 and gp5 files |
23 |
|
24 |
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=360117 |
25 |
|
26 |
Package-Manager: portage-2.3.0 |
27 |
|
28 |
Signed-off-by: Jonathan Scruggs (j.scruggs <AT> gmail.com) |
29 |
Closes: https://github.com/gentoo/gentoo/pull/2149 |
30 |
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org> |
31 |
|
32 |
media-sound/tuxguitar/Manifest | 1 + |
33 |
.../files/tuxguitar-fixed-ant-files.patch | 237 +++++++++++++++++++++ |
34 |
media-sound/tuxguitar/metadata.xml | 42 ++++ |
35 |
media-sound/tuxguitar/tuxguitar-1.3.2.ebuild | 130 +++++++++++ |
36 |
4 files changed, 410 insertions(+) |
37 |
|
38 |
diff --git a/media-sound/tuxguitar/Manifest b/media-sound/tuxguitar/Manifest |
39 |
new file mode 100644 |
40 |
index 00000000..c687c7d |
41 |
--- /dev/null |
42 |
+++ b/media-sound/tuxguitar/Manifest |
43 |
@@ -0,0 +1 @@ |
44 |
+DIST tuxguitar-1.3.2-src.tar.gz 82294553 SHA256 1295cded91a76e4310648036578a6631faaa7231cd5524786891fbfdc3a0b551 SHA512 fb94472df25578d94ad11cd385cfc9347bfefcdd8ebedd2e785f3645d6b2e0d6d87d3fc457af159865b3fae77ad443ac4246b3c6fbe42397f4d15908dd3b7149 WHIRLPOOL 35e538692ca546d045c607347d57a7f4601f7444753a208065458efc40d24060dfc5aca2d5b3a66869136a42e143676366334c5d49ef6913b2ad15583b2a3e3f |
45 |
|
46 |
diff --git a/media-sound/tuxguitar/files/tuxguitar-fixed-ant-files.patch b/media-sound/tuxguitar/files/tuxguitar-fixed-ant-files.patch |
47 |
new file mode 100644 |
48 |
index 00000000..9e1cbf7 |
49 |
--- /dev/null |
50 |
+++ b/media-sound/tuxguitar/files/tuxguitar-fixed-ant-files.patch |
51 |
@@ -0,0 +1,237 @@ |
52 |
+diff -purN a/TuxGuitar/build.properties b/TuxGuitar/build.properties |
53 |
+--- a/TuxGuitar/build.properties 2016-03-16 21:26:23.000000000 +0000 |
54 |
++++ b/TuxGuitar/build.properties 2016-08-23 10:55:06.271917712 +0100 |
55 |
+@@ -5,4 +5,5 @@ ant.build.javac.source=1.5 |
56 |
+ ant.build.javac.target=1.5 |
57 |
+ |
58 |
+ path.tuxguitar-lib=../TuxGuitar-lib/tuxguitar-lib.jar |
59 |
++path.tuxguitar-editor-utils=../TuxGuitar-editor-utils/tuxguitar-editor-utils.jar |
60 |
+ path.swt=../TuxGuitar/lib/swt.jar |
61 |
+diff -purN a/TuxGuitar/build.xml b/TuxGuitar/build.xml |
62 |
+--- a/TuxGuitar/build.xml 2016-03-16 21:26:23.000000000 +0000 |
63 |
++++ b/TuxGuitar/build.xml 2016-08-23 08:59:03.987797193 +0100 |
64 |
+@@ -12,6 +12,7 @@ |
65 |
+ |
66 |
+ <path id="class.path"> |
67 |
+ <pathelement location="${path.tuxguitar-lib}"/> |
68 |
++ <pathelement location="${path.tuxguitar-editor-utils}"/> |
69 |
+ <pathelement location="${path.swt}"/> |
70 |
+ </path > |
71 |
+ |
72 |
+diff -purN a/TuxGuitar-awt-graphics/build.properties b/TuxGuitar-awt-graphics/build.properties |
73 |
+--- a/TuxGuitar-awt-graphics/build.properties 1970-01-01 01:00:00.000000000 +0100 |
74 |
++++ b/TuxGuitar-awt-graphics/build.properties 2016-08-23 09:11:06.737851049 +0100 |
75 |
+@@ -0,0 +1,7 @@ |
76 |
++### ANT Flags |
77 |
++# |
78 |
++# build.compiler=gcj |
79 |
++ant.build.javac.source=1.5 |
80 |
++ant.build.javac.target=1.5 |
81 |
++ |
82 |
++path.tuxguitar-lib=../TuxGuitar-lib/tuxguitar-lib.jar |
83 |
+diff -purN a/TuxGuitar-awt-graphics/build.xml b/TuxGuitar-awt-graphics/build.xml |
84 |
+--- a/TuxGuitar-awt-graphics/build.xml 1970-01-01 01:00:00.000000000 +0100 |
85 |
++++ b/TuxGuitar-awt-graphics/build.xml 2016-08-23 12:40:24.005858183 +0100 |
86 |
+@@ -0,0 +1,45 @@ |
87 |
++<?xml version="1.0" encoding="iso-8859-1"?> |
88 |
++ |
89 |
++<project name="TuxGuitar-awt-graphics" basedir="." default="all"> |
90 |
++ <description> |
91 |
++ TuxGuitar AWT Graphics |
92 |
++ </description> |
93 |
++ |
94 |
++ <property file="build.properties" /> |
95 |
++ <property name="build.src.path" value="src" /> |
96 |
++ <property name="build.path" value="build" /> |
97 |
++ <property name="build.jar" value="tuxguitar-awt-graphics.jar" /> |
98 |
++ |
99 |
++ <path id="class.path"> |
100 |
++ <pathelement location="${path.tuxguitar-lib}"/> |
101 |
++ </path > |
102 |
++ |
103 |
++ <target name="init" depends="clean"> |
104 |
++ <mkdir dir="${build.path}" /> |
105 |
++ </target> |
106 |
++ |
107 |
++ <target name="build" depends="init"> |
108 |
++ <echo>+-------------------------------------------------+</echo> |
109 |
++ <echo>| B U I L D I N G P L U G I N |</echo> |
110 |
++ <echo>+-------------------------------------------------+</echo> |
111 |
++ |
112 |
++ <javac srcdir="${build.src.path}" destdir="${build.path}" debug="false" > |
113 |
++ <classpath refid="class.path"/> |
114 |
++ <include name="**/*.java"/> |
115 |
++ </javac> |
116 |
++ |
117 |
++ <echo>+-----------------------------------------------+</echo> |
118 |
++ <echo>| P A C K A G I N G P L U G I N |</echo> |
119 |
++ <echo>+-----------------------------------------------+</echo> |
120 |
++ |
121 |
++ <jar destfile="${build.jar}" basedir="${build.path}" /> |
122 |
++ <delete quiet="true" dir="${build.path}" /> |
123 |
++ </target> |
124 |
++ |
125 |
++ <target name="clean"> |
126 |
++ <delete quiet="true" dir="${build.path}" /> |
127 |
++ <delete quiet="true" file="${build.jar}" /> |
128 |
++ </target> |
129 |
++ |
130 |
++ <target name="all" depends="build" /> |
131 |
++</project> |
132 |
+diff -purN a/TuxGuitar-editor-utils/build.properties b/TuxGuitar-editor-utils/build.properties |
133 |
+--- a/TuxGuitar-editor-utils/build.properties 1970-01-01 01:00:00.000000000 +0100 |
134 |
++++ b/TuxGuitar-editor-utils/build.properties 2016-08-23 08:46:42.164749665 +0100 |
135 |
+@@ -0,0 +1,7 @@ |
136 |
++### ANT Flags |
137 |
++# |
138 |
++# build.compiler=gcj |
139 |
++ant.build.javac.source=1.5 |
140 |
++ant.build.javac.target=1.5 |
141 |
++ |
142 |
++path.tuxguitar-lib=../TuxGuitar-lib/tuxguitar-lib.jar |
143 |
+diff -purN a/TuxGuitar-editor-utils/build.xml b/TuxGuitar-editor-utils/build.xml |
144 |
+--- a/TuxGuitar-editor-utils/build.xml 1970-01-01 01:00:00.000000000 +0100 |
145 |
++++ b/TuxGuitar-editor-utils/build.xml 2016-08-23 10:51:44.533478977 +0100 |
146 |
+@@ -0,0 +1,45 @@ |
147 |
++<?xml version="1.0" encoding="iso-8859-1"?> |
148 |
++ |
149 |
++<project name="TuxGuitar-editor-utils" basedir="." default="all"> |
150 |
++ <description> |
151 |
++ TuxGuitar Editor Utils |
152 |
++ </description> |
153 |
++ |
154 |
++ <property file="build.properties" /> |
155 |
++ <property name="build.src.path" value="src" /> |
156 |
++ <property name="build.path" value="build" /> |
157 |
++ <property name="build.jar" value="tuxguitar-editor-utils.jar" /> |
158 |
++ |
159 |
++ <path id="class.path"> |
160 |
++ <pathelement location="${path.tuxguitar-lib}"/> |
161 |
++ </path > |
162 |
++ |
163 |
++ <target name="init" depends="clean"> |
164 |
++ <mkdir dir="${build.path}" /> |
165 |
++ </target> |
166 |
++ |
167 |
++ <target name="build" depends="init"> |
168 |
++ <echo>+-------------------------------------------------+</echo> |
169 |
++ <echo>| B U I L D I N G L I B R A R Y |</echo> |
170 |
++ <echo>+-------------------------------------------------+</echo> |
171 |
++ |
172 |
++ <javac srcdir="${build.src.path}" destdir="${build.path}" debug="false" > |
173 |
++ <classpath refid="class.path"/> |
174 |
++ <include name="**/*.java"/> |
175 |
++ </javac> |
176 |
++ |
177 |
++ <echo>+-----------------------------------------------+</echo> |
178 |
++ <echo>| P A C K A G I N G L I B R A R Y |</echo> |
179 |
++ <echo>+-----------------------------------------------+</echo> |
180 |
++ |
181 |
++ <jar destfile="${build.jar}" basedir="${build.path}" /> |
182 |
++ <delete quiet="true" dir="${build.path}" /> |
183 |
++ </target> |
184 |
++ |
185 |
++ <target name="clean"> |
186 |
++ <delete quiet="true" dir="${build.path}" /> |
187 |
++ <delete quiet="true" file="${build.jar}" /> |
188 |
++ </target> |
189 |
++ |
190 |
++ <target name="all" depends="build" /> |
191 |
++</project> |
192 |
+diff -purN a/TuxGuitar-gtp-ui/build.xml b/TuxGuitar-gtp-ui/build.xml |
193 |
+--- a/TuxGuitar-gtp-ui/build.xml 2016-03-16 21:26:23.000000000 +0000 |
194 |
++++ b/TuxGuitar-gtp-ui/build.xml 2016-08-23 15:21:38.068032721 +0100 |
195 |
+@@ -9,7 +9,7 @@ |
196 |
+ <property name="build.src.path" value="src${file.separator}" /> |
197 |
+ <property name="build.share.path" value="share${file.separator}" /> |
198 |
+ <property name="build.path" value="build${file.separator}" /> |
199 |
+- <property name="build.jar" value="tuxguitar-gtp.jar" /> |
200 |
++ <property name="build.jar" value="tuxguitar-gtp-ui.jar" /> |
201 |
+ |
202 |
+ <path id="class.path"> |
203 |
+ <pathelement location="${path.tuxguitar-lib}"/> |
204 |
+diff -purN a/TuxGuitar-jsa/build.properties b/TuxGuitar-jsa/build.properties |
205 |
+--- a/TuxGuitar-jsa/build.properties 2016-03-16 21:26:23.000000000 +0000 |
206 |
++++ b/TuxGuitar-jsa/build.properties 2016-08-23 12:45:00.324325595 +0100 |
207 |
+@@ -7,4 +7,5 @@ ant.build.javac.target=1.5 |
208 |
+ path.tuxguitar=../TuxGuitar/tuxguitar.jar |
209 |
+ path.tuxguitar-lib=../TuxGuitar-lib/tuxguitar-lib.jar |
210 |
+ path.tuxguitar-gm-utils=../TuxGuitar-gm-utils/tuxguitar-gm-utils.jar |
211 |
++path.tuxguitar-editor-utils=../TuxGuitar-editor-utils/tuxguitar-editor-utils.jar |
212 |
+ path.swt=../TuxGuitar/lib/swt.jar |
213 |
+diff -purN a/TuxGuitar-jsa/build.xml b/TuxGuitar-jsa/build.xml |
214 |
+--- a/TuxGuitar-jsa/build.xml 2016-03-16 21:26:23.000000000 +0000 |
215 |
++++ b/TuxGuitar-jsa/build.xml 2016-08-23 12:46:07.932440095 +0100 |
216 |
+@@ -14,6 +14,7 @@ |
217 |
+ <path id="class.path"> |
218 |
+ <pathelement location="${path.tuxguitar-lib}"/> |
219 |
+ <pathelement location="${path.tuxguitar-gm-utils}"/> |
220 |
++ <pathelement location="${path.tuxguitar-editor-utils}"/> |
221 |
+ <pathelement location="${path.tuxguitar}"/> |
222 |
+ <pathelement location="${path.swt}"/> |
223 |
+ </path > |
224 |
+diff -purN a/TuxGuitar-pdf/build.properties b/TuxGuitar-pdf/build.properties |
225 |
+--- a/TuxGuitar-pdf/build.properties 2016-03-16 21:26:23.000000000 +0000 |
226 |
++++ b/TuxGuitar-pdf/build.properties 2016-08-23 13:37:17.230856507 +0100 |
227 |
+@@ -7,5 +7,7 @@ ant.build.javac.target=1.5 |
228 |
+ path.tuxguitar=../TuxGuitar/tuxguitar.jar |
229 |
+ path.tuxguitar-lib=../TuxGuitar-lib/tuxguitar-lib.jar |
230 |
+ path.tuxguitar-gm-utils=../TuxGuitar-gm-utils/tuxguitar-gm-utils.jar |
231 |
++path.tuxguitar-editor-utils=../TuxGuitar-editor-utils/tuxguitar-editor-utils.jar |
232 |
++path.tuxguitar-awt-graphics=../TuxGuitar-awt-graphics/tuxguitar-awt-graphics.jar |
233 |
+ path.itext=../TuxGuitar/lib/itext.jar |
234 |
+ path.swt=../TuxGuitar/lib/swt.jar |
235 |
+diff -purN a/TuxGuitar-pdf/build.xml b/TuxGuitar-pdf/build.xml |
236 |
+--- a/TuxGuitar-pdf/build.xml 2016-03-16 21:26:23.000000000 +0000 |
237 |
++++ b/TuxGuitar-pdf/build.xml 2016-08-23 13:37:40.843895665 +0100 |
238 |
+@@ -17,6 +17,8 @@ |
239 |
+ <pathelement location="${path.tuxguitar}"/> |
240 |
+ <pathelement location="${path.tuxguitar-lib}"/> |
241 |
+ <pathelement location="${path.tuxguitar-gm-utils}"/> |
242 |
++ <pathelement location="${path.tuxguitar-editor-utils}"/> |
243 |
++ <pathelement location="${path.tuxguitar-awt-graphics}"/> |
244 |
+ </path > |
245 |
+ |
246 |
+ <target name="init" depends="clean"> |
247 |
+diff -purN a/TuxGuitar-tray/build.properties b/TuxGuitar-tray/build.properties |
248 |
+--- a/TuxGuitar-tray/build.properties 2016-03-16 21:26:23.000000000 +0000 |
249 |
++++ b/TuxGuitar-tray/build.properties 2016-08-23 13:41:10.241259782 +0100 |
250 |
+@@ -6,4 +6,6 @@ ant.build.javac.target=1.5 |
251 |
+ |
252 |
+ path.tuxguitar=../TuxGuitar/tuxguitar.jar |
253 |
+ path.tuxguitar-lib=../TuxGuitar-lib/tuxguitar-lib.jar |
254 |
++path.tuxguitar-gm-utils=../TuxGuitar-gm-utils/tuxguitar-gm-utils.jar |
255 |
++path.tuxguitar-editor-utils=../TuxGuitar-editor-utils/tuxguitar-editor-utils.jar |
256 |
+ path.swt=../TuxGuitar/lib/swt.jar |
257 |
+diff -purN a/TuxGuitar-tray/build.xml b/TuxGuitar-tray/build.xml |
258 |
+--- a/TuxGuitar-tray/build.xml 2016-03-16 21:26:23.000000000 +0000 |
259 |
++++ b/TuxGuitar-tray/build.xml 2016-08-23 13:41:41.262315895 +0100 |
260 |
+@@ -15,6 +15,8 @@ |
261 |
+ <property name="service.provider" value="org.herac.tuxguitar.tray.TGTrayPlugin" /> |
262 |
+ |
263 |
+ <path id="class.path"> |
264 |
++ <pathelement location="${path.tuxguitar-editor-utils}"/> |
265 |
++ <pathelement location="${path.tuxguitar-gm-utils}"/> |
266 |
+ <pathelement location="${path.tuxguitar-lib}"/> |
267 |
+ <pathelement location="${path.tuxguitar}"/> |
268 |
+ <pathelement location="${path.swt}"/> |
269 |
+diff -purN a/TuxGuitar-tuner/build.properties b/TuxGuitar-tuner/build.properties |
270 |
+--- a/TuxGuitar-tuner/build.properties 2016-03-16 21:26:14.000000000 +0000 |
271 |
++++ b/TuxGuitar-tuner/build.properties 2016-08-23 13:42:25.501396719 +0100 |
272 |
+@@ -6,4 +6,5 @@ ant.build.javac.target=1.5 |
273 |
+ |
274 |
+ path.tuxguitar=../TuxGuitar/tuxguitar.jar |
275 |
+ path.tuxguitar-lib=../TuxGuitar-lib/tuxguitar-lib.jar |
276 |
++path.tuxguitar-gm-utils=../TuxGuitar-gm-utils/tuxguitar-gm-utils.jar |
277 |
+ path.swt=../TuxGuitar/lib/swt.jar |
278 |
+diff -purN a/TuxGuitar-tuner/build.xml b/TuxGuitar-tuner/build.xml |
279 |
+--- a/TuxGuitar-tuner/build.xml 2016-03-16 21:26:14.000000000 +0000 |
280 |
++++ b/TuxGuitar-tuner/build.xml 2016-08-23 13:42:50.180442190 +0100 |
281 |
+@@ -12,6 +12,7 @@ |
282 |
+ <property name="build.jar" value="tuxguitar-tuner.jar" /> |
283 |
+ |
284 |
+ <path id="class.path"> |
285 |
++ <pathelement location="${path.tuxguitar-gm-utils}"/> |
286 |
+ <pathelement location="${path.tuxguitar-lib}"/> |
287 |
+ <pathelement location="${path.tuxguitar}"/> |
288 |
+ <pathelement location="${path.swt}"/> |
289 |
|
290 |
diff --git a/media-sound/tuxguitar/metadata.xml b/media-sound/tuxguitar/metadata.xml |
291 |
new file mode 100644 |
292 |
index 00000000..67a86a3 |
293 |
--- /dev/null |
294 |
+++ b/media-sound/tuxguitar/metadata.xml |
295 |
@@ -0,0 +1,42 @@ |
296 |
+<?xml version="1.0" encoding="UTF-8"?> |
297 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
298 |
+<pkgmetadata> |
299 |
+ <maintainer type="person"> |
300 |
+ <email>j.scruggs@×××××.com</email> |
301 |
+ <name>Jonathan Scruggs</name> |
302 |
+ </maintainer> |
303 |
+ <maintainer type="project"> |
304 |
+ <email>proxy-maint@g.o</email> |
305 |
+ <name>Proxy Maintainers</name> |
306 |
+ </maintainer> |
307 |
+ <longdescription> |
308 |
+ A multitrack tablature editor and player that allows you to |
309 |
+ compose music using the following features: |
310 |
+ - Tablature editor |
311 |
+ - Score Viewer |
312 |
+ - Multitrack display |
313 |
+ - Autoscroll while playing |
314 |
+ - Note duration management |
315 |
+ - Various effects (bend, slide, vibrato, hammer-on/pull-off) |
316 |
+ - Support for triplets (5,6,7,9,10,11,12) |
317 |
+ - Repeat open and close |
318 |
+ - Time signature management |
319 |
+ - Tempo management |
320 |
+ - Imports and exports gp3,gp4 and gp5 files |
321 |
+ </longdescription> |
322 |
+ <use> |
323 |
+ <flag name="fluidsynth"> |
324 |
+ Enables Fluidsynth MIDI software synthesis (with external sound fonts). |
325 |
+ JSA must be disabled in the plug-ins menu to use this. |
326 |
+ </flag> |
327 |
+ <flag name="lilypond"> |
328 |
+ Exports the score in a lilypond compatible format. |
329 |
+ </flag> |
330 |
+ <flag name="pdf"> |
331 |
+ Exports the score as a PDF file using <pkg>dev-java/itext</pkg>. |
332 |
+ </flag> |
333 |
+ <flag name="tray"> |
334 |
+ Adds an icon to the tray that controls midi playback. |
335 |
+ </flag> |
336 |
+ </use> |
337 |
+</pkgmetadata> |
338 |
|
339 |
diff --git a/media-sound/tuxguitar/tuxguitar-1.3.2.ebuild b/media-sound/tuxguitar/tuxguitar-1.3.2.ebuild |
340 |
new file mode 100644 |
341 |
index 00000000..001b67c |
342 |
--- /dev/null |
343 |
+++ b/media-sound/tuxguitar/tuxguitar-1.3.2.ebuild |
344 |
@@ -0,0 +1,130 @@ |
345 |
+# Copyright 1999-2016 Gentoo Foundation |
346 |
+# Distributed under the terms of the GNU General Public License v2 |
347 |
+# $id$ |
348 |
+ |
349 |
+EAPI="6" |
350 |
+JAVA_PKG_IUSE="source" |
351 |
+ |
352 |
+inherit eutils java-pkg-2 java-ant-2 toolchain-funcs flag-o-matic fdo-mime gnome2-utils |
353 |
+ |
354 |
+MY_P="${P}-src" |
355 |
+DESCRIPTION="TuxGuitar is a multitrack guitar tablature editor and player written in Java-SWT" |
356 |
+HOMEPAGE="http://tuxguitar.herac.com.ar/" |
357 |
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" |
358 |
+LICENSE="LGPL-2.1" |
359 |
+SLOT="0" |
360 |
+ |
361 |
+IUSE="alsa fluidsynth jack lilypond oss pdf timidity tray" |
362 |
+ |
363 |
+KEYWORDS="~amd64 ~x86" |
364 |
+ |
365 |
+CDEPEND="dev-java/swt:3.7[cairo] |
366 |
+ alsa? ( media-libs/alsa-lib ) |
367 |
+ pdf? ( dev-java/itext:5 ) |
368 |
+ fluidsynth? ( media-sound/fluidsynth ) |
369 |
+ lilypond? ( media-sound/lilypond )" |
370 |
+ |
371 |
+RDEPEND=">=virtual/jre-1.5 |
372 |
+ timidity? ( media-sound/timidity++[alsa?,oss?] ) |
373 |
+ ${CDEPEND}" |
374 |
+ |
375 |
+DEPEND=">=virtual/jdk-1.5 |
376 |
+ ${CDEPEND}" |
377 |
+ |
378 |
+S="${WORKDIR}/${MY_P}" |
379 |
+ |
380 |
+PATCHES=( "${FILESDIR}"/${PN}-fixed-ant-files.patch ) |
381 |
+ |
382 |
+LIBRARY_LIST=() |
383 |
+PLUGIN_LIST=() |
384 |
+ |
385 |
+src_prepare() { |
386 |
+ java-pkg-2_src_prepare |
387 |
+ default_src_prepare |
388 |
+ |
389 |
+ sed -e "s|../TuxGuitar/lib/swt.jar|$(java-pkg_getjar swt-3.7 swt.jar)|" \ |
390 |
+ -i TuxGuitar*/build.properties || die "sed TuxGuitar*/build.properties failed" |
391 |
+ |
392 |
+ if use pdf; then |
393 |
+ sed -e "s|../TuxGuitar/lib/itext.jar|$(java-pkg_getjar itext-5 itext.jar)|" \ |
394 |
+ -i TuxGuitar-pdf/build.properties || die "sed TuxGuitar-pdf/build.properties failed" |
395 |
+ fi |
396 |
+ |
397 |
+ LIBRARY_LIST=( TuxGuitar-lib TuxGuitar-awt-graphics TuxGuitar-editor-utils |
398 |
+ TuxGuitar-gm-utils TuxGuitar |
399 |
+ ) |
400 |
+ |
401 |
+ PLUGIN_LIST=( $(usev alsa) ascii browser-ftp community compat |
402 |
+ converter $(usev fluidsynth) gm-settings gpx gtp gtp-ui image |
403 |
+ $(usev jack) $(usex jack jack-ui "") jsa $(usev lilypond) midi |
404 |
+ musicxml $(usev oss) $(usev pdf) ptb svg tef $(usev tray) tuner |
405 |
+ ) |
406 |
+} |
407 |
+ |
408 |
+src_compile() { |
409 |
+ local build_order=( ${LIBRARY_LIST[@]} ${PLUGIN_LIST[@]/#/TuxGuitar-} ) |
410 |
+ local directory |
411 |
+ |
412 |
+ for directory in ${build_order[@]}; do |
413 |
+ cd "${S}"/${directory} || die "cd ${directory} failed" |
414 |
+ eant |
415 |
+ if [[ -d jni ]]; then |
416 |
+ append-flags -fPIC $(java-pkg_get-jni-cflags) |
417 |
+ CC=$(tc-getCC) emake -C jni |
418 |
+ fi |
419 |
+ done |
420 |
+} |
421 |
+ |
422 |
+src_install() { |
423 |
+ local tuxguitar_inst_path="/usr/share/${PN}" |
424 |
+ local library |
425 |
+ local plugin |
426 |
+ |
427 |
+ for library in ${LIBRARY_LIST[@]}; do |
428 |
+ cd "${S}"/${library} || die "cd ${library} failed" |
429 |
+ java-pkg_dojar ${library,,}.jar |
430 |
+ use source && java-pkg_dosrc src/org |
431 |
+ done |
432 |
+ |
433 |
+ java-pkg_dolauncher ${PN} \ |
434 |
+ --main org.herac.tuxguitar.app.TGMainSingleton \ |
435 |
+ --java_args "-Xmx512m -Dtuxguitar.share.path=${tuxguitar_inst_path}/share" |
436 |
+ |
437 |
+ # Images and Files |
438 |
+ insinto ${tuxguitar_inst_path} |
439 |
+ doins -r share |
440 |
+ |
441 |
+ java-pkg_sointo ${tuxguitar_inst_path}/lib |
442 |
+ insinto ${tuxguitar_inst_path}/share/plugins |
443 |
+ for plugin in ${PLUGIN_LIST[@]/#/TuxGuitar-}; do |
444 |
+ cd "${S}"/${plugin} || die "cd ${plugin} failed" |
445 |
+ doins ${plugin,,}.jar |
446 |
+ |
447 |
+ #TuxGuitar has its own classloader. No need to register the plugins. |
448 |
+ if [[ -d jni ]]; then |
449 |
+ java-pkg_doso jni/lib${plugin,,}-jni.so |
450 |
+ fi |
451 |
+ done |
452 |
+ |
453 |
+ insinto ${tuxguitar_inst_path}/share |
454 |
+ doins -r "${S}"/TuxGuitar-resources/resources/soundfont |
455 |
+ doman "${S}/misc/${PN}.1" |
456 |
+ insinto /usr/share/mime/packages |
457 |
+ doins "${S}/misc/${PN}.xml" |
458 |
+ doicon "${S}/misc/${PN}.xpm" |
459 |
+ domenu "${S}/misc/${PN}.desktop" |
460 |
+} |
461 |
+ |
462 |
+pkg_postinst() { |
463 |
+ fdo-mime_desktop_database_update |
464 |
+ gnome2_icon_cache_update |
465 |
+ if use fluidsynth; then |
466 |
+ ewarn "Fluidsynth plugin blocks behavior of JSA plugin." |
467 |
+ ewarn "Enable only one of them in \"Tools > Plugins\"" |
468 |
+ fi |
469 |
+} |
470 |
+ |
471 |
+pkg_postrm() { |
472 |
+ fdo-mime_desktop_database_update |
473 |
+ gnome2_icon_cache_update |
474 |
+} |