portmidi: upgrade to 2.0.3
This commit is contained in:
@@ -2,60 +2,69 @@
|
||||
|
||||
_realname=portmidi
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=234
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
pkgver=2.0.3
|
||||
pkgrel=1
|
||||
pkgdesc="Platform independent library for real-time MIDI input/output (mingw-w64)"
|
||||
epoch=1
|
||||
pkgdesc="Cross-platform MIDI input/output library (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
|
||||
url="https://portmedia.sourceforge.io/"
|
||||
license=("custom")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
|
||||
"${MINGW_PACKAGE_PREFIX}-cmake"
|
||||
"${MINGW_PACKAGE_PREFIX}-pkg-config")
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
|
||||
source=("https://sourceforge.net/projects/portmedia/files/portmedia-code-r${pkgver}.zip"
|
||||
enable-install-on-windows.patch)
|
||||
sha256sums=('d737d3f10a70ad6a79fd8a6556015bacf8e8223d4ef8b79a621ec6ac1e44f1bc'
|
||||
'fabd4660901f16d4c97ab1a8d1346b946e9dc06b3158cb237dbf14264895c53e')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
|
||||
url='https://github.com/PortMidi/portmidi'
|
||||
license=('custom')
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
|
||||
"${MINGW_PACKAGE_PREFIX}-ninja"
|
||||
"${MINGW_PACKAGE_PREFIX}-cc")
|
||||
source=("${_realname}-${pkgver}.tar.gz"::"${url}/archive/refs/tags/v${pkgver}.tar.gz")
|
||||
sha256sums=('934f80e1b09762664d995e7ab5a9932033bc70639e8ceabead817183a54c60d0')
|
||||
|
||||
prepare() {
|
||||
cd portmedia-code-r${pkgver}/portmidi/trunk
|
||||
patch -p1 -i "${srcdir}/enable-install-on-windows.patch"
|
||||
cd "${srcdir}"/${_realname}-${pkgver}
|
||||
}
|
||||
|
||||
build() {
|
||||
# we don't have Java yet, so we fake it
|
||||
cd "${srcdir}/${_realname}-${pkgver}"
|
||||
|
||||
[[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}"
|
||||
mkdir -p "build-${MINGW_CHOST}"
|
||||
cd "build-${MINGW_CHOST}"
|
||||
declare -a extra_config
|
||||
if check_option "debug" "n"; then
|
||||
extra_config+=("-DCMAKE_BUILD_TYPE=Release")
|
||||
else
|
||||
extra_config+=("-DCMAKE_BUILD_TYPE=Debug")
|
||||
fi
|
||||
|
||||
mkdir -p "${srcdir}/build-${MSYSTEM}-static" && cd "${srcdir}/build-${MSYSTEM}-static"
|
||||
|
||||
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
|
||||
${MINGW_PREFIX}/bin/cmake \
|
||||
-Wno-dev \
|
||||
-G "MSYS Makefiles" \
|
||||
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DJAVA_INCLUDE_PATH= \
|
||||
-DJAVA_INCLUDE_PATH2= \
|
||||
-DJAVA_JVM_LIBRARY= \
|
||||
../portmedia-code-r${pkgver}/portmidi/trunk
|
||||
${MINGW_PREFIX}/bin/cmake \
|
||||
-GNinja \
|
||||
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
|
||||
"${extra_config[@]}" \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
../${_realname}-${pkgver}
|
||||
|
||||
make -t pmjni
|
||||
make
|
||||
${MINGW_PREFIX}/bin/cmake --build .
|
||||
|
||||
mkdir -p "${srcdir}/build-${MSYSTEM}-shared" && cd "${srcdir}/build-${MSYSTEM}-shared"
|
||||
|
||||
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
|
||||
${MINGW_PREFIX}/bin/cmake \
|
||||
-GNinja \
|
||||
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
|
||||
"${extra_config[@]}" \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DBUILD_PORTMIDI_TESTS=ON \
|
||||
../${_realname}-${pkgver}
|
||||
|
||||
${MINGW_PREFIX}/bin/cmake --build .
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "build-${MINGW_CHOST}"
|
||||
make DESTDIR=${pkgdir} install
|
||||
cd "${srcdir}/build-${MSYSTEM}-static"
|
||||
|
||||
# install executables
|
||||
for exe in latency.exe midiclock.exe midithread.exe midithru.exe mm.exe qtest.exe sysex.exe test.exe; do
|
||||
install -Dm0755 "pm_test/${exe}" "${pkgdir}${MINGW_PREFIX}/bin/pm-${exe}"
|
||||
done
|
||||
DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/cmake --install .
|
||||
|
||||
# install license
|
||||
install -Dm0755 "${srcdir}/portmedia-code-r${pkgver}/portmidi/trunk/license.txt" \
|
||||
"${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/license.txt"
|
||||
cd "${srcdir}/build-${MSYSTEM}-shared"
|
||||
|
||||
DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/cmake --install .
|
||||
|
||||
install -Dm644 "${srcdir}/${_realname}-${pkgver}/license.txt" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/license.txt"
|
||||
}
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
diff -waur portmidi.orig/pm_common/CMakeLists.txt portmidi/pm_common/CMakeLists.txt
|
||||
--- portmidi.orig/pm_common/CMakeLists.txt 2010-09-20 21:57:48.000000000 +0200
|
||||
+++ portmidi/pm_common/CMakeLists.txt 2015-05-22 20:36:22.411620600 +0200
|
||||
@@ -106,7 +106,7 @@
|
||||
|
||||
# now add the shared files to make the complete list of library sources
|
||||
add_library(portmidi-static ${LIBSRC})
|
||||
-set_target_properties(portmidi-static PROPERTIES OUTPUT_NAME "portmidi_s")
|
||||
+set_target_properties(portmidi-static PROPERTIES OUTPUT_NAME "portmidi")
|
||||
target_link_libraries(portmidi-static ${PM_NEEDED_LIBS})
|
||||
|
||||
# define the jni library
|
||||
@@ -124,4 +118,9 @@
|
||||
# .h files installed by pm_dylib/CMakeLists.txt, so don't need them here
|
||||
# INSTALL(FILES portmidi.h ../porttime/porttime.h
|
||||
# DESTINATION /usr/local/include)
|
||||
+else(UNIX)
|
||||
+ INSTALL(TARGETS portmidi-static pmjni
|
||||
+ RUNTIME DESTINATION bin
|
||||
+ LIBRARY DESTINATION lib
|
||||
+ ARCHIVE DESTINATION lib)
|
||||
endif(UNIX)
|
||||
diff -waur portmidi.orig/pm_dylib/CMakeLists.txt portmidi/pm_dylib/CMakeLists.txt
|
||||
--- portmidi.orig/pm_dylib/CMakeLists.txt 2009-11-20 06:41:09.000000000 +0100
|
||||
+++ portmidi/pm_dylib/CMakeLists.txt 2015-05-22 20:36:15.356939500 +0200
|
||||
@@ -124,4 +124,11 @@
|
||||
ARCHIVE DESTINATION /usr/local/lib)
|
||||
INSTALL(FILES ../pm_common/portmidi.h ../porttime/porttime.h
|
||||
DESTINATION /usr/local/include)
|
||||
+else(UNIX)
|
||||
+ INSTALL(TARGETS portmidi-dynamic
|
||||
+ RUNTIME DESTINATION bin
|
||||
+ LIBRARY DESTINATION lib
|
||||
+ ARCHIVE DESTINATION lib)
|
||||
+ INSTALL(FILES ../pm_common/portmidi.h ../porttime/porttime.h
|
||||
+ DESTINATION include)
|
||||
endif(UNIX)
|
||||
Reference in New Issue
Block a user