git » portmidi.git » commit a7b86a2

Upgrade to 2.0.4.

author David Runge
2023-03-19 08:19:46 UTC
committer David Runge
2023-03-19 08:19:46 UTC
parent 04b1d4d651605e2ecb12a58954d91730e0d80636

Upgrade to 2.0.4.

Switch back to original upstream (now active again).
Add cmake options in local bash array for better handling.
Remove unnecesary quotes and curly braces.

PKGBUILD +35 -26

diff --git a/PKGBUILD b/PKGBUILD
index 3cb0617..f0b458e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,41 +2,50 @@
 # Contributor: Eric BĂ©langer <eric@archlinux.org>
 
 pkgname=portmidi
-pkgver=236
+pkgver=2.0.4
 pkgrel=1
+epoch=1
 pkgdesc="Cross platform library for interfacing with OS MIDI I/O APIs"
-arch=('x86_64')
-url="https://github.com/mixxxdj/portmidi"
-license=('MIT')
-depends=('glibc')
-makedepends=('alsa-lib' 'cmake')
-provides=('libportmidi.so' 'libporttime.so')
-source=("${pkgname}-${pkgver}.tar.gz::https://github.com/mixxxdj/portmidi/archive/refs/tags/${pkgver}.tar.gz")
-sha512sums=('901729440c4b8c654ab17c4c4f1e3986813bf1e4ad1a874f46e7b1ee0c9ef4ee9f1ecfdf71012fb56b055a6185194dd22c520ae87b9f2259c18af5d189ca57da')
-b2sums=('618c3778b8b2170a145ec956cd4721e731cc135d0192e4b1c35b2c93b6b0f0e74085d044beafe2095b3d8e02e1776f442ae174d342c3f391d04a2aab378b547a')
+arch=(x86_64)
+url="https://github.com/portmidi/portmidi"
+license=(MIT)
+depends=(
+  glibc
+)
+makedepends=(
+  alsa-lib
+  cmake
+)
+provides=(
+  libportmidi.so
+)
+source=($url/archive/v$pkgver/$pkgname-v$pkgver.tar.gz)
+sha512sums=('d9f22d161e1dd9a4bde1971bb2b6e5352da51545f4fe5ecad11c55e7a535f0d88efce18d1c8fd91e93b70a7926150f86a0f53972ad92370e86556a8dd72dc194')
+b2sums=('fd8b002880ccfcff9f233e2fa5021fe4cf9da2f91b3ceaa36fe70f96818e174578f9a14b69bdbb58fab777c9a9e4ff939b86814a403860c7ec264dddc6f26e85')
 
 build() {
-  cd "${pkgname}-${pkgver}"
-  cmake -DCMAKE_INSTALL_PREFIX=/usr \
-        -DCMAKE_BUILD_TYPE='None' \
-        -DBUILD_TESTING=ON \
-        -Wno-dev \
-        -B build \
-        -S .
-  make VERBOSE=1 -C build
+  local cmake_options=(
+    -B build
+    -D CMAKE_INSTALL_PREFIX=/usr
+    -D CMAKE_BUILD_TYPE=None
+    -S $pkgname-$pkgver
+    -W no-dev
+  )
+
+  cmake "${cmake_options[@]}"
+  cmake --build build --verbose
 }
 
 check() {
-  cd "${pkgname}-${pkgver}"
-  make VERBOSE=1 test -C build
+  ctest --test-dir build --output-on-failure
 }
 
 package() {
-  depends+=('libasound.so')
+  depends+=(
+    alsa-lib libasound.so
+  )
 
-  cd "${pkgname}-${pkgver}"
-  make DESTDIR="${pkgdir}" install -C build
-  install -vDm 644 license.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
-  install -vDm 644 {CHANGELOG,README}.txt \
-    -t "${pkgdir}/usr/share/doc/${pkgname}"
+  DESTDIR="$pkgdir" cmake --install build
+  install -vDm 644 $pkgname-$pkgver/license.txt -t "$pkgdir/usr/share/licenses/$pkgname/"
+  install -vDm 644 $pkgname-$pkgver/{CHANGELOG,README}.txt -t "$pkgdir/usr/share/doc/$pkgname/"
 }