From: Jonathan Scruggs Date: Fri, 26 Aug 2016 14:28:21 +0000 (+0100) Subject: media-sound/tuxguitar: New package X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=6ed0c1e3e76aed0126175dbe7a9db4dd98782e90;p=gentoo.git media-sound/tuxguitar: New package A multitrack tablature editor and player that allows you to compose music using the following features: - Tablature editor - Score Viewer - Multitrack display - Autoscroll while playing - Note duration management - Various effects (bend, slide, vibrato, hammer-on/pull-off) - Support for triplets (5,6,7,9,10,11,12) - Repeat open and close - Time signature management - Tempo management - Imports and exports gp3,gp4 and gp5 files Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=360117 Package-Manager: portage-2.3.0 Signed-off-by: Jonathan Scruggs (j.scruggs@gmail.com) Closes: https://github.com/gentoo/gentoo/pull/2149 Signed-off-by: James Le Cuirot --- diff --git a/media-sound/tuxguitar/Manifest b/media-sound/tuxguitar/Manifest new file mode 100644 index 000000000000..c687c7d86000 --- /dev/null +++ b/media-sound/tuxguitar/Manifest @@ -0,0 +1 @@ +DIST tuxguitar-1.3.2-src.tar.gz 82294553 SHA256 1295cded91a76e4310648036578a6631faaa7231cd5524786891fbfdc3a0b551 SHA512 fb94472df25578d94ad11cd385cfc9347bfefcdd8ebedd2e785f3645d6b2e0d6d87d3fc457af159865b3fae77ad443ac4246b3c6fbe42397f4d15908dd3b7149 WHIRLPOOL 35e538692ca546d045c607347d57a7f4601f7444753a208065458efc40d24060dfc5aca2d5b3a66869136a42e143676366334c5d49ef6913b2ad15583b2a3e3f diff --git a/media-sound/tuxguitar/files/tuxguitar-fixed-ant-files.patch b/media-sound/tuxguitar/files/tuxguitar-fixed-ant-files.patch new file mode 100644 index 000000000000..9e1cbf778e57 --- /dev/null +++ b/media-sound/tuxguitar/files/tuxguitar-fixed-ant-files.patch @@ -0,0 +1,237 @@ +diff -purN a/TuxGuitar/build.properties b/TuxGuitar/build.properties +--- a/TuxGuitar/build.properties 2016-03-16 21:26:23.000000000 +0000 ++++ b/TuxGuitar/build.properties 2016-08-23 10:55:06.271917712 +0100 +@@ -5,4 +5,5 @@ ant.build.javac.source=1.5 + ant.build.javac.target=1.5 + + path.tuxguitar-lib=../TuxGuitar-lib/tuxguitar-lib.jar ++path.tuxguitar-editor-utils=../TuxGuitar-editor-utils/tuxguitar-editor-utils.jar + path.swt=../TuxGuitar/lib/swt.jar +diff -purN a/TuxGuitar/build.xml b/TuxGuitar/build.xml +--- a/TuxGuitar/build.xml 2016-03-16 21:26:23.000000000 +0000 ++++ b/TuxGuitar/build.xml 2016-08-23 08:59:03.987797193 +0100 +@@ -12,6 +12,7 @@ + + + ++ + + + +diff -purN a/TuxGuitar-awt-graphics/build.properties b/TuxGuitar-awt-graphics/build.properties +--- a/TuxGuitar-awt-graphics/build.properties 1970-01-01 01:00:00.000000000 +0100 ++++ b/TuxGuitar-awt-graphics/build.properties 2016-08-23 09:11:06.737851049 +0100 +@@ -0,0 +1,7 @@ ++### ANT Flags ++# ++# build.compiler=gcj ++ant.build.javac.source=1.5 ++ant.build.javac.target=1.5 ++ ++path.tuxguitar-lib=../TuxGuitar-lib/tuxguitar-lib.jar +diff -purN a/TuxGuitar-awt-graphics/build.xml b/TuxGuitar-awt-graphics/build.xml +--- a/TuxGuitar-awt-graphics/build.xml 1970-01-01 01:00:00.000000000 +0100 ++++ b/TuxGuitar-awt-graphics/build.xml 2016-08-23 12:40:24.005858183 +0100 +@@ -0,0 +1,45 @@ ++ ++ ++ ++ ++ TuxGuitar AWT Graphics ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +-------------------------------------------------+ ++ | B U I L D I N G P L U G I N | ++ +-------------------------------------------------+ ++ ++ ++ ++ ++ ++ ++ +-----------------------------------------------+ ++ | P A C K A G I N G P L U G I N | ++ +-----------------------------------------------+ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff -purN a/TuxGuitar-editor-utils/build.properties b/TuxGuitar-editor-utils/build.properties +--- a/TuxGuitar-editor-utils/build.properties 1970-01-01 01:00:00.000000000 +0100 ++++ b/TuxGuitar-editor-utils/build.properties 2016-08-23 08:46:42.164749665 +0100 +@@ -0,0 +1,7 @@ ++### ANT Flags ++# ++# build.compiler=gcj ++ant.build.javac.source=1.5 ++ant.build.javac.target=1.5 ++ ++path.tuxguitar-lib=../TuxGuitar-lib/tuxguitar-lib.jar +diff -purN a/TuxGuitar-editor-utils/build.xml b/TuxGuitar-editor-utils/build.xml +--- a/TuxGuitar-editor-utils/build.xml 1970-01-01 01:00:00.000000000 +0100 ++++ b/TuxGuitar-editor-utils/build.xml 2016-08-23 10:51:44.533478977 +0100 +@@ -0,0 +1,45 @@ ++ ++ ++ ++ ++ TuxGuitar Editor Utils ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +-------------------------------------------------+ ++ | B U I L D I N G L I B R A R Y | ++ +-------------------------------------------------+ ++ ++ ++ ++ ++ ++ ++ +-----------------------------------------------+ ++ | P A C K A G I N G L I B R A R Y | ++ +-----------------------------------------------+ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +diff -purN a/TuxGuitar-gtp-ui/build.xml b/TuxGuitar-gtp-ui/build.xml +--- a/TuxGuitar-gtp-ui/build.xml 2016-03-16 21:26:23.000000000 +0000 ++++ b/TuxGuitar-gtp-ui/build.xml 2016-08-23 15:21:38.068032721 +0100 +@@ -9,7 +9,7 @@ + + + +- ++ + + + +diff -purN a/TuxGuitar-jsa/build.properties b/TuxGuitar-jsa/build.properties +--- a/TuxGuitar-jsa/build.properties 2016-03-16 21:26:23.000000000 +0000 ++++ b/TuxGuitar-jsa/build.properties 2016-08-23 12:45:00.324325595 +0100 +@@ -7,4 +7,5 @@ ant.build.javac.target=1.5 + path.tuxguitar=../TuxGuitar/tuxguitar.jar + path.tuxguitar-lib=../TuxGuitar-lib/tuxguitar-lib.jar + path.tuxguitar-gm-utils=../TuxGuitar-gm-utils/tuxguitar-gm-utils.jar ++path.tuxguitar-editor-utils=../TuxGuitar-editor-utils/tuxguitar-editor-utils.jar + path.swt=../TuxGuitar/lib/swt.jar +diff -purN a/TuxGuitar-jsa/build.xml b/TuxGuitar-jsa/build.xml +--- a/TuxGuitar-jsa/build.xml 2016-03-16 21:26:23.000000000 +0000 ++++ b/TuxGuitar-jsa/build.xml 2016-08-23 12:46:07.932440095 +0100 +@@ -14,6 +14,7 @@ + + + ++ + + + +diff -purN a/TuxGuitar-pdf/build.properties b/TuxGuitar-pdf/build.properties +--- a/TuxGuitar-pdf/build.properties 2016-03-16 21:26:23.000000000 +0000 ++++ b/TuxGuitar-pdf/build.properties 2016-08-23 13:37:17.230856507 +0100 +@@ -7,5 +7,7 @@ ant.build.javac.target=1.5 + path.tuxguitar=../TuxGuitar/tuxguitar.jar + path.tuxguitar-lib=../TuxGuitar-lib/tuxguitar-lib.jar + path.tuxguitar-gm-utils=../TuxGuitar-gm-utils/tuxguitar-gm-utils.jar ++path.tuxguitar-editor-utils=../TuxGuitar-editor-utils/tuxguitar-editor-utils.jar ++path.tuxguitar-awt-graphics=../TuxGuitar-awt-graphics/tuxguitar-awt-graphics.jar + path.itext=../TuxGuitar/lib/itext.jar + path.swt=../TuxGuitar/lib/swt.jar +diff -purN a/TuxGuitar-pdf/build.xml b/TuxGuitar-pdf/build.xml +--- a/TuxGuitar-pdf/build.xml 2016-03-16 21:26:23.000000000 +0000 ++++ b/TuxGuitar-pdf/build.xml 2016-08-23 13:37:40.843895665 +0100 +@@ -17,6 +17,8 @@ + + + ++ ++ + + + +diff -purN a/TuxGuitar-tray/build.properties b/TuxGuitar-tray/build.properties +--- a/TuxGuitar-tray/build.properties 2016-03-16 21:26:23.000000000 +0000 ++++ b/TuxGuitar-tray/build.properties 2016-08-23 13:41:10.241259782 +0100 +@@ -6,4 +6,6 @@ ant.build.javac.target=1.5 + + path.tuxguitar=../TuxGuitar/tuxguitar.jar + path.tuxguitar-lib=../TuxGuitar-lib/tuxguitar-lib.jar ++path.tuxguitar-gm-utils=../TuxGuitar-gm-utils/tuxguitar-gm-utils.jar ++path.tuxguitar-editor-utils=../TuxGuitar-editor-utils/tuxguitar-editor-utils.jar + path.swt=../TuxGuitar/lib/swt.jar +diff -purN a/TuxGuitar-tray/build.xml b/TuxGuitar-tray/build.xml +--- a/TuxGuitar-tray/build.xml 2016-03-16 21:26:23.000000000 +0000 ++++ b/TuxGuitar-tray/build.xml 2016-08-23 13:41:41.262315895 +0100 +@@ -15,6 +15,8 @@ + + + ++ ++ + + + +diff -purN a/TuxGuitar-tuner/build.properties b/TuxGuitar-tuner/build.properties +--- a/TuxGuitar-tuner/build.properties 2016-03-16 21:26:14.000000000 +0000 ++++ b/TuxGuitar-tuner/build.properties 2016-08-23 13:42:25.501396719 +0100 +@@ -6,4 +6,5 @@ ant.build.javac.target=1.5 + + path.tuxguitar=../TuxGuitar/tuxguitar.jar + path.tuxguitar-lib=../TuxGuitar-lib/tuxguitar-lib.jar ++path.tuxguitar-gm-utils=../TuxGuitar-gm-utils/tuxguitar-gm-utils.jar + path.swt=../TuxGuitar/lib/swt.jar +diff -purN a/TuxGuitar-tuner/build.xml b/TuxGuitar-tuner/build.xml +--- a/TuxGuitar-tuner/build.xml 2016-03-16 21:26:14.000000000 +0000 ++++ b/TuxGuitar-tuner/build.xml 2016-08-23 13:42:50.180442190 +0100 +@@ -12,6 +12,7 @@ + + + ++ + + + diff --git a/media-sound/tuxguitar/metadata.xml b/media-sound/tuxguitar/metadata.xml new file mode 100644 index 000000000000..67a86a3f2fe2 --- /dev/null +++ b/media-sound/tuxguitar/metadata.xml @@ -0,0 +1,42 @@ + + + + + j.scruggs@gmail.com + Jonathan Scruggs + + + proxy-maint@gentoo.org + Proxy Maintainers + + + A multitrack tablature editor and player that allows you to + compose music using the following features: + - Tablature editor + - Score Viewer + - Multitrack display + - Autoscroll while playing + - Note duration management + - Various effects (bend, slide, vibrato, hammer-on/pull-off) + - Support for triplets (5,6,7,9,10,11,12) + - Repeat open and close + - Time signature management + - Tempo management + - Imports and exports gp3,gp4 and gp5 files + + + + Enables Fluidsynth MIDI software synthesis (with external sound fonts). + JSA must be disabled in the plug-ins menu to use this. + + + Exports the score in a lilypond compatible format. + + + Exports the score as a PDF file using dev-java/itext. + + + Adds an icon to the tray that controls midi playback. + + + diff --git a/media-sound/tuxguitar/tuxguitar-1.3.2.ebuild b/media-sound/tuxguitar/tuxguitar-1.3.2.ebuild new file mode 100644 index 000000000000..001b67cc0c2d --- /dev/null +++ b/media-sound/tuxguitar/tuxguitar-1.3.2.ebuild @@ -0,0 +1,130 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $id$ + +EAPI="6" +JAVA_PKG_IUSE="source" + +inherit eutils java-pkg-2 java-ant-2 toolchain-funcs flag-o-matic fdo-mime gnome2-utils + +MY_P="${P}-src" +DESCRIPTION="TuxGuitar is a multitrack guitar tablature editor and player written in Java-SWT" +HOMEPAGE="http://tuxguitar.herac.com.ar/" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" +LICENSE="LGPL-2.1" +SLOT="0" + +IUSE="alsa fluidsynth jack lilypond oss pdf timidity tray" + +KEYWORDS="~amd64 ~x86" + +CDEPEND="dev-java/swt:3.7[cairo] + alsa? ( media-libs/alsa-lib ) + pdf? ( dev-java/itext:5 ) + fluidsynth? ( media-sound/fluidsynth ) + lilypond? ( media-sound/lilypond )" + +RDEPEND=">=virtual/jre-1.5 + timidity? ( media-sound/timidity++[alsa?,oss?] ) + ${CDEPEND}" + +DEPEND=">=virtual/jdk-1.5 + ${CDEPEND}" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( "${FILESDIR}"/${PN}-fixed-ant-files.patch ) + +LIBRARY_LIST=() +PLUGIN_LIST=() + +src_prepare() { + java-pkg-2_src_prepare + default_src_prepare + + sed -e "s|../TuxGuitar/lib/swt.jar|$(java-pkg_getjar swt-3.7 swt.jar)|" \ + -i TuxGuitar*/build.properties || die "sed TuxGuitar*/build.properties failed" + + if use pdf; then + sed -e "s|../TuxGuitar/lib/itext.jar|$(java-pkg_getjar itext-5 itext.jar)|" \ + -i TuxGuitar-pdf/build.properties || die "sed TuxGuitar-pdf/build.properties failed" + fi + + LIBRARY_LIST=( TuxGuitar-lib TuxGuitar-awt-graphics TuxGuitar-editor-utils + TuxGuitar-gm-utils TuxGuitar + ) + + PLUGIN_LIST=( $(usev alsa) ascii browser-ftp community compat + converter $(usev fluidsynth) gm-settings gpx gtp gtp-ui image + $(usev jack) $(usex jack jack-ui "") jsa $(usev lilypond) midi + musicxml $(usev oss) $(usev pdf) ptb svg tef $(usev tray) tuner + ) +} + +src_compile() { + local build_order=( ${LIBRARY_LIST[@]} ${PLUGIN_LIST[@]/#/TuxGuitar-} ) + local directory + + for directory in ${build_order[@]}; do + cd "${S}"/${directory} || die "cd ${directory} failed" + eant + if [[ -d jni ]]; then + append-flags -fPIC $(java-pkg_get-jni-cflags) + CC=$(tc-getCC) emake -C jni + fi + done +} + +src_install() { + local tuxguitar_inst_path="/usr/share/${PN}" + local library + local plugin + + for library in ${LIBRARY_LIST[@]}; do + cd "${S}"/${library} || die "cd ${library} failed" + java-pkg_dojar ${library,,}.jar + use source && java-pkg_dosrc src/org + done + + java-pkg_dolauncher ${PN} \ + --main org.herac.tuxguitar.app.TGMainSingleton \ + --java_args "-Xmx512m -Dtuxguitar.share.path=${tuxguitar_inst_path}/share" + + # Images and Files + insinto ${tuxguitar_inst_path} + doins -r share + + java-pkg_sointo ${tuxguitar_inst_path}/lib + insinto ${tuxguitar_inst_path}/share/plugins + for plugin in ${PLUGIN_LIST[@]/#/TuxGuitar-}; do + cd "${S}"/${plugin} || die "cd ${plugin} failed" + doins ${plugin,,}.jar + + #TuxGuitar has its own classloader. No need to register the plugins. + if [[ -d jni ]]; then + java-pkg_doso jni/lib${plugin,,}-jni.so + fi + done + + insinto ${tuxguitar_inst_path}/share + doins -r "${S}"/TuxGuitar-resources/resources/soundfont + doman "${S}/misc/${PN}.1" + insinto /usr/share/mime/packages + doins "${S}/misc/${PN}.xml" + doicon "${S}/misc/${PN}.xpm" + domenu "${S}/misc/${PN}.desktop" +} + +pkg_postinst() { + fdo-mime_desktop_database_update + gnome2_icon_cache_update + if use fluidsynth; then + ewarn "Fluidsynth plugin blocks behavior of JSA plugin." + ewarn "Enable only one of them in \"Tools > Plugins\"" + fi +} + +pkg_postrm() { + fdo-mime_desktop_database_update + gnome2_icon_cache_update +}