tuxguitar: use system icedtea-sound and move ELF files from usr/share to usr/lib

This commit is contained in:
John 2019-11-26 15:27:34 +01:00
parent d31f5cb0da
commit 9fff957548
2 changed files with 27 additions and 7 deletions

View File

@ -0,0 +1,10 @@
--- ./build-scripts/common-resources/common-linux-swt/tuxguitar.sh 2018-08-03 13:48:57.000000000 +0200
+++ - 2019-11-26 14:29:19.912761041 +0100
@@ -18,6 +18,7 @@
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib/jni
+LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib/tuxguitar
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
##CLASSPATH
CLASSPATH=${CLASSPATH}:./lib/tuxguitar.jar

View File

@ -1,11 +1,11 @@
# Template file for 'tuxguitar'
pkgname=tuxguitar
version=1.5.2
revision=1
revision=2
wrksrc="${pkgname}-${version}-src"
hostmakedepends="apache-maven"
hostmakedepends="apache-maven openjdk8"
makedepends="alsa-lib-devel fluidsynth-devel jack-devel"
depends="virtual?java-runtime gtk+3 hicolor-icon-theme desktop-file-utils"
depends="openjdk8-jre icedtea-sound gtk+3 hicolor-icon-theme desktop-file-utils"
short_desc="Multitrack guitar tablature editor and player"
maintainer="John <johnz@posteo.net>"
license="LGPL-2.0-only"
@ -14,12 +14,19 @@ distfiles="${SOURCEFORGE_SITE}/tuxguitar/tuxguitar-${version}-src.tar.gz"
checksum=a9ade566752aa0ac72831a1cd0b18b85d302eca7934e2192ad875f51df755981
case $XBPS_TARGET_MACHINE in
i686) _arch="x86" ;;
x86_64) _arch="x86_64" ;;
armv7l) _arch="armv7hl" ;;
i686*) _arch="x86" ;;
x86_64*) _arch="x86_64" ;;
armv7l*) _arch="armv7hl"
broken="[ERROR] Unable to find artifact. Could not find artifact org.eclipse.swt:org.eclipse.swt.gtk.linux.armv7hl:jar:4.6.1 in swt-repo"
;;
*) broken="package doesn't provide build function for other architectures" ;;
esac
post_extract() {
rm build-scripts/common-resources/common-linux-x86/lib/libicedtea-sound.so
rm build-scripts/common-resources/common-linux-x86_64/lib/libicedtea-sound.so
}
do_build() {
export MAVEN_OPTS="$MAVEN_OPTS -Duser.home=$wrksrc"
export JAVA_HOME="/usr/lib/jvm/java-1.8-openjdk"
@ -43,11 +50,14 @@ _EOF
do_install() {
vmkdir usr/share
vmkdir usr/lib/tuxguitar
vcopy build-scripts/tuxguitar-linux-${_arch}/target/tuxguitar-${version}-linux-${_arch} usr/share/tuxguitar
for _i in alsa oss jack fluidsynth; do
vcopy build-scripts/native-modules/tuxguitar-${_i}-linux-${_arch}/target/build/* usr/share/tuxguitar/
vcopy build-scripts/native-modules/tuxguitar-${_i}-linux-${_arch}/target/build/* usr/share/tuxguitar
done
mv ${DESTDIR}/usr/share/tuxguitar/lib/*.so ${DESTDIR}/usr/lib/tuxguitar
for _i in 16 24 32 48 64 96; do
vmkdir usr/share/icons/hicolor/${_i}x${_i}/mimetypes
vinstall TuxGuitar/share/skins/Lavender/icon-${_i}x${_i}.png 644 usr/share/icons/hicolor/${_i}x${_i}/apps tuxguitar.png