PKGBUILDs/extra/portmidi/PKGBUILD

64 lines
2.3 KiB
Bash
Raw Normal View History

2019-12-08 19:54:49 +00:00
# Maintainer: David Runge <dvzrv@archlinux.org>
2019-05-30 23:45:36 +00:00
# Contributor: Eric Bélanger <eric@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - set !makeflags - parallel builds fail
pkgname=portmidi
pkgver=217
2019-12-08 19:54:49 +00:00
pkgrel=9
2019-05-30 23:45:36 +00:00
pkgdesc="Platform independent library for real-time MIDI input/output"
arch=('x86_64')
url="http://portmedia.sourceforge.net/"
license=('MIT')
depends=('alsa-lib')
2019-12-08 19:54:49 +00:00
makedepends=('cmake' 'java-environment=13')
optdepends=('java-runtime=13: for using pmdefaults'
2019-08-08 23:52:49 +00:00
'sh: for using pmdefaults')
provides=('libpmjni.so' 'libportmidi.so' 'libporttime.so')
2019-05-30 23:45:36 +00:00
options=('!makeflags')
source=("https://downloads.sourceforge.net/project/portmedia/${pkgname}/${pkgver}/${pkgname}-src-${pkgver}.zip"
2019-08-08 23:52:49 +00:00
'pmdefaults.sh'
2019-05-30 23:45:36 +00:00
'portmidi-217-build-fix.patch')
sha512sums=('d08d4d57429d26d292b5fe6868b7c7a32f2f1d2428f6695cd403a697e2d91629bd4380242ab2720e8f21c895bb75cb56b709fb663a20e8e623120e50bfc5d90b'
2019-12-08 19:54:49 +00:00
'4f9bd7f2f3bc31f989c8981b6e32dab8371f6365fbc98f728bc0881a0433220529296ec364a7c5a53ee61dc3f09bb6ec057f7a6385d9fbc79bf1419bea87848d'
2019-05-30 23:45:36 +00:00
'643d249d53780519c9773c88974a34127ba64982ed75d2d0f55e99faf3bb7c8c97ba185412e70794319c8253de659b8658de95a8eb6fbfa3648c1be384bafbc1')
prepare() {
mv -v "${pkgname}" "${pkgname}-${pkgver}"
cd "${pkgname}-${pkgver}"
mkdir -vp pm_java/Release
# fix hardcoding of output directories
sed -e "s|/usr/local|/usr|g" \
-i */CMakeLists.txt pm_python/setup.py
# build fix for "pm_java/CMakeLists.txt" (FS#27118)
patch -Np1 -i "../${pkgname}-217-build-fix.patch"
}
build() {
cd "${pkgname}-${pkgver}"
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=Release \
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=Release \
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=Release \
.
make VERBOSE=1
}
package() {
cd "${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
2019-08-08 23:52:49 +00:00
# install custom launcher script, so java-runtime can be pinned
install -vDm 755 ../pmdefaults.sh "${pkgdir}/usr/bin/pmdefaults"
2019-05-30 23:45:36 +00:00
# Fix missing symlink for libporttime.so (FS#21528).
2019-12-08 19:54:49 +00:00
ln -sv libportmidi.so "${pkgdir}/usr/lib/libporttime.so"
2019-05-30 23:45:36 +00:00
install -vDm 644 license.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
install -vDm 644 {CHANGELOG,README}.txt \
-t "${pkgdir}/usr/share/doc/${pkgname}"
2019-12-08 19:54:49 +00:00
install -vDm 644 pm_java/README.txt \
"${pkgdir}/usr/share/doc/${pkgname}/README_JAVA.txt"
2019-05-30 23:45:36 +00:00
}