1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

gnu: ableton-link: Fix package build under python-3.12.

* gnu/packages/audio.scm (ableton-link)
[arguments]: Relocate field, improve style (use gexps, and
search-input-file).
[native-inputs]: Add python-setuptools.

Change-Id: I7d6773334674ddaec0ab7c611fb64e6e4cb43879
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
This commit is contained in:
Nicolas Graves
2026-02-09 18:23:23 +01:00
committed by Sharlatan Hellseher
parent cf134ae389
commit 3ae3e5c23d

View File

@@ -7782,60 +7782,59 @@ Rate} 3600x2250 bit/s vocoder used in various radio systems.")
(delete-file-recursively "third_party")
(delete-file-recursively "modules")))))
(build-system cmake-build-system)
(arguments
(list
#:configure-flags
#~(list "-DLINK_BUILD_QT_EXAMPLES=ON"
"-DLINK_BUILD_JACK=ON")
#:phases
#~(modify-phases %standard-phases
(replace 'check
(lambda* (#:key inputs tests? #:allow-other-keys)
(when tests?
(let* ((python (search-input-file inputs "/bin/python3"))
(run-tests "../source/ci/run-tests.py"))
(invoke python run-tests "--target" "LinkCoreTest")
(invoke python run-tests "--target" "LinkDiscoveryTest")))))
(add-before 'install 'patch-cmake
(lambda* (#:key inputs #:allow-other-keys)
(let* ((source "../source/"))
(substitute* (string-append source
"cmake_include/AsioStandaloneConfig.cmake")
(((string-append "\\$\\{CMAKE_CURRENT_LIST_DIR\\}/\\.\\./"
"modules/asio-standalone/asio/include"))
(dirname (search-input-file inputs "include/asio.hpp"))))
(substitute* (string-append source "AbletonLinkConfig.cmake")
(("\\$\\{CMAKE_CURRENT_LIST_DIR\\}/include")
"${CMAKE_CURRENT_LIST_DIR}/../../../include")
(("\\$\\{CMAKE_CURRENT_LIST_DIR\\}/include/ableton/Link\\.hpp")
"${CMAKE_CURRENT_LIST_DIR}/../../../include/ableton/Link.hpp")))))
(replace 'install
(lambda _
(let* ((out #$output)
(lib-cmake (string-append out "/lib/cmake/ableton-link"))
(source "../source"))
(for-each delete-file
'("bin/LinkDiscoveryTest" "bin/LinkCoreTest"))
(copy-recursively "bin" (string-append out "/bin"))
(copy-recursively (string-append source "/include/ableton")
(string-append out "/include/ableton"))
(install-file (string-append source "/AbletonLinkConfig.cmake")
lib-cmake)
(install-file (string-append source
"/cmake_include/AsioStandaloneConfig.cmake")
(string-append lib-cmake "/cmake_include"))))))))
(native-inputs
(list catch-framework
python ;for running tests
portaudio)) ;for portaudio examples
portaudio ;for portaudio examples
python ;for running tests
python-setuptools)) ;for running tests
(inputs
(list jack-1)) ;for JACK examples
(propagated-inputs
;; This is because include/ableton/platforms/asio/AsioWrapper.hpp
;; contains '#include <asio.hpp>'.
(list asio-1.28))
(arguments
`(#:configure-flags
'("-DLINK_BUILD_QT_EXAMPLES=ON"
"-DLINK_BUILD_JACK=ON")
#:phases
(modify-phases %standard-phases
(replace 'check
(lambda* (#:key inputs tests? #:allow-other-keys)
(when tests?
(let* ((python (search-input-file inputs "/bin/python3"))
(run-tests "../source/ci/run-tests.py"))
(invoke python run-tests "--target" "LinkCoreTest")
(invoke python run-tests "--target" "LinkDiscoveryTest")))))
(add-before 'install 'patch-cmake
(lambda* (#:key inputs #:allow-other-keys)
(let* ((source "../source/"))
(substitute* (string-append source
"cmake_include/AsioStandaloneConfig.cmake")
(((string-append "\\$\\{CMAKE_CURRENT_LIST_DIR\\}/\\.\\./"
"modules/asio-standalone/asio/include"))
(string-append (assoc-ref inputs "asio")
"/include")))
(substitute* (string-append source "AbletonLinkConfig.cmake")
(("\\$\\{CMAKE_CURRENT_LIST_DIR\\}/include")
"${CMAKE_CURRENT_LIST_DIR}/../../../include")
(("\\$\\{CMAKE_CURRENT_LIST_DIR\\}/include/ableton/Link\\.hpp")
"${CMAKE_CURRENT_LIST_DIR}/../../../include/ableton/Link.hpp")))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin"))
(lib-cmake (string-append out "/lib/cmake/ableton-link"))
(source "../source"))
(for-each (lambda (test-file)
(delete-file test-file))
'("bin/LinkDiscoveryTest" "bin/LinkCoreTest"))
(copy-recursively "bin" bin)
(copy-recursively (string-append source "/include/ableton")
(string-append out "/include/ableton"))
(install-file (string-append source "/AbletonLinkConfig.cmake")
lib-cmake)
(install-file (string-append source
"/cmake_include/AsioStandaloneConfig.cmake")
(string-append lib-cmake "/cmake_include"))))))))
(home-page "https://github.com/Ableton/link")
(synopsis "Synchronize musical beat, tempo, and phase across multiple applications")
(description