git » portmidi.git » commit c6f8e7a

upgpkg: 217-8

author David Runge
2019-08-08 20:43:15 UTC
committer David Runge
2019-08-08 20:43:15 UTC
parent 4b8b6aa5508fba0cecdc456733e76f412b1a8eab

upgpkg: 217-8

Adding libpmjni.so, libportmidi.so and libporttime.so to provides. Pinning java-runtime with custom launcher script (portmidi doesn't specify its language level properly and therefore will only work with the same version of jre/jdk. Adding sh to optdepends for pmdefaults.

PKGBUILD +10 -3
pmdefaults.sh +5 -0

diff --git a/PKGBUILD b/PKGBUILD
index 9843515..ef1cccd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,17 +3,21 @@
 
 pkgname=portmidi
 pkgver=217
-pkgrel=7
+pkgrel=8
 pkgdesc="Platform independent library for real-time MIDI input/output"
 arch=('x86_64')
 url="http://portmedia.sourceforge.net/"
 license=('MIT')
 depends=('alsa-lib')
-makedepends=('cmake' 'jdk8-openjdk')
-optdepends=('java-runtime: for using pmdefaults')
+makedepends=('cmake' 'java-environment=12')
+optdepends=('java-runtime=12: for using pmdefaults'
+            'sh: for using pmdefaults')
+provides=('libpmjni.so' 'libportmidi.so' 'libporttime.so')
 source=("https://downloads.sourceforge.net/project/portmedia/${pkgname}/${pkgver}/${pkgname}-src-${pkgver}.zip"
+        'pmdefaults.sh'
         'portmidi-217-build-fix.patch')
 sha512sums=('d08d4d57429d26d292b5fe6868b7c7a32f2f1d2428f6695cd403a697e2d91629bd4380242ab2720e8f21c895bb75cb56b709fb663a20e8e623120e50bfc5d90b'
+            '83e2f93b084d2068980947f399b44efd02efd6d466b604b1f9ea3c0ba8e1abd90108efff3648992d63c0f710f816933c03953a4a2930050c8627cce14cbc7ad3'
             '643d249d53780519c9773c88974a34127ba64982ed75d2d0f55e99faf3bb7c8c97ba185412e70794319c8253de659b8658de95a8eb6fbfa3648c1be384bafbc1')
 
 prepare() {
@@ -41,6 +45,9 @@ package() {
   cd "${pkgname}-${pkgver}"
   make DESTDIR="${pkgdir}" install
 
+  # install custom launcher script, so java-runtime can be pinned
+  install -vDm 755 ../pmdefaults.sh "${pkgdir}/usr/bin/pmdefaults"
+
   # Fix missing symlink for libporttime.so (FS#21528).
   ln -s libportmidi.so "${pkgdir}/usr/lib/libporttime.so"
 
diff --git a/pmdefaults.sh b/pmdefaults.sh
new file mode 100644
index 0000000..ba9a5b6
--- /dev/null
+++ b/pmdefaults.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+export PATH="/usr/lib/jvm/java-12-openjdk/bin/:${PATH}"
+
+java -jar /usr/share/java/pmdefaults.jar > /dev/null