[arch-commits] Commit in csound/trunk (PKGBUILD)

David Runge dvzrv at archlinux.org
Tue Jun 18 22:05:57 UTC 2019


    Date: Tuesday, June 18, 2019 @ 22:05:57
  Author: dvzrv
Revision: 482219

upgpkg: csound 6.12.2-8

Rebuilding against default java-environment by generically passing JAVA_AWT_LIBRARY and JAVA_JVM_LIBRARY options to cmake. Moving created .jar to /usr/share/java.

Modified:
  csound/trunk/PKGBUILD

----------+
 PKGBUILD |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-06-18 21:52:48 UTC (rev 482218)
+++ PKGBUILD	2019-06-18 22:05:57 UTC (rev 482219)
@@ -6,7 +6,7 @@
 pkgbase=csound
 pkgname=('csound' 'csound-doc')
 pkgver=6.12.2
-pkgrel=7
+pkgrel=8
 pkgdesc="A programming language for sound rendering and signal processing."
 arch=('x86_64')
 url="https://csound.com"
@@ -14,7 +14,7 @@
 # libpd needs to be packaged: https://github.com/libpd/libpd/releases
 # current gmm doesn't work https://github.com/csound/csound/issues/920
 makedepends=('boost' 'cmake' 'cunit' 'doxygen' 'dssi' 'eigen' 'faust' 'fltk'
-'fluidsynth' 'git' 'hdf5' 'java-environment=8' 'ladspa' 'libmusicxml'
+'fluidsynth' 'git' 'hdf5' 'java-environment' 'ladspa' 'libmusicxml'
 'libwebsockets' 'llvm' 'luajit' 'portmidi' 'portsmf' 'python2' 'stk' 'swig'
 'wiiuse')
 source=("${pkgbase}-${pkgver}.tar.gz::https://github.com/${pkgbase}/${pkgbase}/archive/${pkgver}.tar.gz"
@@ -38,10 +38,11 @@
 }
 
 build() {
+  local _java_major=$(java --version 2>/dev/null |grep 'openjdk'| cut -d ' ' -f2| cut -d '.' -f1)
   cd "${pkgbase}-${pkgver}/build"
   cmake -DCMAKE_INSTALL_PREFIX=/usr \
-        -DJAVA_AWT_LIBRARY=/usr/lib/jvm/java-8-openjdk/jre/lib/amd64/libawt.so \
-        -DJAVA_JVM_LIBRARY=/usr/lib/jvm/java-8-openjdk/jre/lib/amd64 \
+        -DJAVA_AWT_LIBRARY="/usr/lib/jvm/java-${_java_major}-openjdk/jre/lib/libawt.so" \
+        -DJAVA_JVM_LIBRARY="/usr/lib/jvm/java-${_java_major}-openjdk/jre/lib" \
         -DLUA_MODULE_INSTALL_DIR=/usr/lib/lua/5.1/ \
         -DLUAJIT_LIBRARY=/usr/lib/libluajit-5.1.so \
         -DLUA_H_PATH=/usr/include/luajit-2.0/ \
@@ -75,6 +76,9 @@
   # rename extract executable due to name conflict with libextractor
   # https://github.com/csound/csound/issues/985
   mv -v "${pkgdir}/usr/bin/extract" "${pkgdir}/usr/bin/${pkgname}-extract"
+  # moving csnd6.jar to /usr/share/java
+  install -vdm 755 "${pkgdir}/usr/share/java/"
+  mv -v "${pkgdir}/usr/lib/"*.jar "${pkgdir}/usr/share/java/"
 }
 
 package_csound-doc() {


More information about the arch-commits mailing list