Date: Thursday, August 26, 2021 @ 11:44:18 Author: alucryd Revision: 422563
soundtouch 2.3.0-2: switch to cmake Added: soundtouch/trunk/soundtouch-cmake.patch Modified: soundtouch/trunk/PKGBUILD ------------------------+ PKGBUILD | 47 +++++++++++++++++++++++++++++------------------ soundtouch-cmake.patch | 22 ++++++++++++++++++++++ 2 files changed, 51 insertions(+), 18 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2021-08-26 11:24:18 UTC (rev 422562) +++ PKGBUILD 2021-08-26 11:44:18 UTC (rev 422563) @@ -3,40 +3,51 @@ pkgname=soundtouch pkgver=2.3.0 -pkgrel=1 +pkgrel=2 pkgdesc='An audio processing library' arch=(x86_64) url=https://www.surina.net/soundtouch/ -license=(LGPL) +license=(LGPL2.1) depends=(gcc-libs) -makedepends=(git) +makedepends=( + cmake + git + ninja +) _tag=c65afe49f697fcea87d9a134870c8d115d7700cc -source=(git+https://gitlab.com/soundtouch/soundtouch.git#tag=${_tag}) -sha256sums=(SKIP) +source=( + git+https://gitlab.com/soundtouch/soundtouch.git#tag=${_tag} + soundtouch-cmake.patch +) +b2sums=( + SKIP + 995f751615848acd46da4420d3f243f5b4887879b5a654f546a52629443cdec8249bbcb53cf800600d65ecfe0cf114249b63e0c53e8f75478e7f8bc060ae1e40 +) -pkgver() { +prepare() { cd soundtouch - - git describe --tags + # set soname, install autotools files + patch -Np1 -i ../soundtouch-cmake.patch + # cmake doesn't generate files for autotools + autoreconf -fiv + ./configure --prefix=/usr --enable-shared } -prepare() { +pkgver() { cd soundtouch - - ./bootstrap + git describe --tags } build() { - cd soundtouch - - ./configure \ - --prefix=/usr \ - --enable-shared - make + cmake -S soundtouch -B build -G Ninja \ + -DCMAKE_BUILD_TYPE='' \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DBUILD_SHARED_LIBS=ON + cmake --build build } package() { - make DESTDIR="${pkgdir}" pkgdocdir=/usr/share/doc/soundtouch -C soundtouch install + DESTDIR="${pkgdir}" cmake --install build } # vim: ts=2 sw=2 et: Added: soundtouch-cmake.patch =================================================================== --- soundtouch-cmake.patch (rev 0) +++ soundtouch-cmake.patch 2021-08-26 11:44:18 UTC (rev 422563) @@ -0,0 +1,22 @@ +diff '--color=auto' -rupN soundtouch.orig/CMakeLists.txt soundtouch/CMakeLists.txt +--- soundtouch.orig/CMakeLists.txt 2021-08-26 13:11:17.958981063 +0200 ++++ soundtouch/CMakeLists.txt 2021-08-26 13:16:35.308990428 +0200 +@@ -34,6 +34,7 @@ target_include_directories(SoundTouch PU + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> + ) ++set_target_properties(SoundTouch PROPERTIES VERSION 1.0.0 SOVERSION 1) + + target_compile_definitions(SoundTouch PRIVATE ${COMPILE_DEFINITIONS}) + target_compile_options(SoundTouch PRIVATE ${COMPILE_OPTIONS}) +@@ -121,6 +122,10 @@ endif() + + ######################## + ++# autotools ++install(FILES include/soundtouch_config.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/soundtouch") ++install(FILES soundtouch.m4 DESTINATION "${CMAKE_INSTALL_DATADIR}/aclocal") ++ + # pkgconfig + set(prefix "${CMAKE_INSTALL_PREFIX}") + set(execprefix "\${prefix}")
