31 lines
1.1 KiB
Plaintext
31 lines
1.1 KiB
Plaintext
|
# Description: C++ bindings for PortAudio
|
||
|
# URL: http://portaudio.com
|
||
|
# Maintainer: John McQuah, jmcquah at disroot dot org
|
||
|
# Depends on: portaudio
|
||
|
|
||
|
name=portaudio-cpp
|
||
|
version=19.8.0
|
||
|
_commit=e951915d05d90d08dd759fa7636c22c250ca685d
|
||
|
release=1
|
||
|
source=(https://github.com/PortAudio/${name%-cpp}/archive/$_commit/${name%-cpp}-$version.tar.gz)
|
||
|
|
||
|
build() {
|
||
|
cd ${name%-cpp}-$_commit/bindings/cpp
|
||
|
|
||
|
PKGMK_PACPP=(-DCMAKE_BUILD_TYPE=Release
|
||
|
-DCMAKE_INSTALL_PREFIX="/usr"
|
||
|
-DCMAKE_INSTALL_LIBDIR=lib
|
||
|
-DBUILD_SHARED_LIBS=ON
|
||
|
-DCMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS")
|
||
|
|
||
|
# camel-case is applied inconsistently; must be fixed downstream for now
|
||
|
sed -e "s/::portaudio/::PortAudio/g" -i cmake/modules/FindPortAudio.cmake
|
||
|
sed -e "/^target_link_libraries/s/::portaudio/::PortAudio/" -i CMakeLists.txt
|
||
|
cmake -S . -B build -G Ninja "${PKGMK_PACPP[@]}"
|
||
|
|
||
|
# eschewing autotools allows us to build successfully with multiple jobs
|
||
|
# https://github.com/PortAudio/portaudio/issues/540
|
||
|
ninja -C build -j ${JOBS-1}
|
||
|
DESTDIR=$PKG ninja -C build install
|
||
|
}
|