gnu: extempore: Update to 0.8.6.
* gnu/packages/music.scm (extempore): Update to 0.8.6. [snippets]: Delete bundled dependencies. [patches]: Add it. * gnu/packages/patches/extempore-unbundle-external-dependencies.patch: Patch CMakeLists.txt to use system libraries. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
fc570fab80
commit
3ff2d2708c
3 changed files with 188 additions and 40 deletions
|
@ -879,6 +879,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/evolution-data-server-libical-compat.patch \
|
%D%/packages/patches/evolution-data-server-libical-compat.patch \
|
||||||
%D%/packages/patches/exiv2-CVE-2017-14860.patch \
|
%D%/packages/patches/exiv2-CVE-2017-14860.patch \
|
||||||
%D%/packages/patches/exiv2-CVE-2017-14859-14862-14864.patch \
|
%D%/packages/patches/exiv2-CVE-2017-14859-14862-14864.patch \
|
||||||
|
%D%/packages/patches/extempore-unbundle-external-dependencies.patch \
|
||||||
%D%/packages/patches/extundelete-e2fsprogs-1.44.patch \
|
%D%/packages/patches/extundelete-e2fsprogs-1.44.patch \
|
||||||
%D%/packages/patches/fastcap-mulGlobal.patch \
|
%D%/packages/patches/fastcap-mulGlobal.patch \
|
||||||
%D%/packages/patches/fastcap-mulSetup.patch \
|
%D%/packages/patches/fastcap-mulSetup.patch \
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
;;; Copyright © 2019, 2020 Alexandros Theodotou <alex@zrythm.org>
|
;;; Copyright © 2019, 2020 Alexandros Theodotou <alex@zrythm.org>
|
||||||
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
|
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
|
||||||
;;; Copyright © 2020 Lars-Dominik Braun <lars@6xq.net>
|
;;; Copyright © 2020 Lars-Dominik Braun <lars@6xq.net>
|
||||||
|
;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -625,63 +626,73 @@ MusePack, Monkey's Audio, and WavPack files.")
|
||||||
(define-public extempore
|
(define-public extempore
|
||||||
(package
|
(package
|
||||||
(name "extempore")
|
(name "extempore")
|
||||||
(version "0.7.0")
|
(version "0.8.6")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
(url "https://github.com/digego/extempore.git")
|
(url "https://github.com/digego/extempore.git")
|
||||||
(commit version)))
|
(commit (string-append "v" version))))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"12fsp7zkfxb9kykwq46l88kcbbici9arczrrsl4qn87m6vm5349l"))
|
"182jy23qv115dipny7kglwbn21z55dp253w1ykm0kh8n6vkgs7gp"))
|
||||||
(file-name (string-append name "-" version "-checkout"))))
|
(file-name (git-file-name name version))
|
||||||
|
(patches (search-patches
|
||||||
|
"extempore-unbundle-external-dependencies.patch"))
|
||||||
|
(modules '((guix build utils)))
|
||||||
|
(snippet
|
||||||
|
'(begin
|
||||||
|
;; Remove bundled sources.
|
||||||
|
(map delete-file-recursively
|
||||||
|
'("src/portaudio"
|
||||||
|
"src/pcre"))
|
||||||
|
#t))))
|
||||||
(build-system cmake-build-system)
|
(build-system cmake-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(;; The default target also includes ahead-of-time compilation of the
|
`(#:configure-flags (list "-DJACK=ON"
|
||||||
;; standard libraries. However, during the "install" phase this would
|
"-DPACKAGE=ON"
|
||||||
;; happen *again* for unknown reasons. Hence we only build the
|
"-DEXTERNAL_SHLIBS_AUDIO=OFF"
|
||||||
;; extempore executable during the build phase.
|
"-DEXTERNAL_SHLIBS_GRAPHICS=OFF"
|
||||||
#:make-flags '("extempore")
|
"-DCMAKE_BUILD_TYPE=Release"
|
||||||
#:configure-flags '("-DJACK=ON"
|
(string-append "-DEXT_SHARE_DIR="
|
||||||
;; We want to distribute.
|
(assoc-ref %outputs "out")
|
||||||
"-DIN_TREE=OFF"
|
"/share"))
|
||||||
;; Don't download any dependencies.
|
|
||||||
"-DBUILD_DEPS=OFF")
|
|
||||||
#:modules ((ice-9 match)
|
#:modules ((ice-9 match)
|
||||||
(guix build cmake-build-system)
|
(guix build cmake-build-system)
|
||||||
(guix build utils))
|
(guix build utils))
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
|
(add-after 'build 'build-aot-libs
|
||||||
|
(lambda _
|
||||||
|
(for-each (lambda (target)
|
||||||
|
(invoke "make" target))
|
||||||
|
'("aot_base"
|
||||||
|
"aot_math"
|
||||||
|
"aot_instruments"))
|
||||||
|
#t))
|
||||||
|
(add-after 'unpack 'patch-install-locations
|
||||||
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
|
(substitute* "CMakeLists.txt"
|
||||||
|
(("EXT_SHARE_DIR=\"\\.\"\\)")
|
||||||
|
"EXT_SHARE_DIR=\"${EXT_SHARE_DIR}/extempore\")")
|
||||||
|
(("DESTINATION \"\\.\"\\)") "DESTINATION bin)")
|
||||||
|
(("DESTINATION \"\\.\"\n") "DESTINATION share/extempore\n"))
|
||||||
|
#t))
|
||||||
(add-after 'unpack 'patch-directories
|
(add-after 'unpack 'patch-directories
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
;; Rewrite default path to runtime directory
|
|
||||||
(substitute* "src/Extempore.cpp"
|
|
||||||
(("runtimedir \\+= \"runtime\"")
|
|
||||||
(string-append "runtimedir = \""
|
|
||||||
(assoc-ref outputs "out")
|
|
||||||
"/lib/extempore/runtime\"")))
|
|
||||||
(substitute* "extras/extempore.el"
|
(substitute* "extras/extempore.el"
|
||||||
(("\\(runtime-directory \\(concat default-directory \"runtime\"\\)\\)")
|
(("\\(runtime-directory \\(concat default-directory \"runtime\"\\)\\)")
|
||||||
(string-append "(runtime-directory \""
|
(string-append "(runtime-directory \""
|
||||||
(assoc-ref outputs "out")
|
(assoc-ref outputs "out")
|
||||||
"/lib/extempore/runtime"
|
"/share/extempore/runtime"
|
||||||
"\")")))
|
"\")")))
|
||||||
#t))
|
#t))
|
||||||
(add-after 'unpack 'link-with-additional-libs
|
(add-after 'unpack 'link-with-additional-libs
|
||||||
(lambda _
|
(lambda _
|
||||||
;; The executable must be linked with libffi and zlib.
|
;; The executable must be linked with libffi and zlib.
|
||||||
(substitute* "CMakeLists.txt"
|
(substitute* "CMakeLists.txt"
|
||||||
(("add_dependencies\\(aot_extended extended_deps\\)") "")
|
|
||||||
(("target_link_libraries\\(extempore PRIVATE dl" line)
|
(("target_link_libraries\\(extempore PRIVATE dl" line)
|
||||||
(string-append line " ffi z")))
|
(string-append line " ffi z")))
|
||||||
#t))
|
#t))
|
||||||
;; FIXME: AOT compilation of the nanovg bindings fail with the error:
|
|
||||||
;; "Compiler Error could not bind _nvgLinearGradient"
|
|
||||||
(add-after 'unpack 'disable-nanovg
|
|
||||||
(lambda _
|
|
||||||
(substitute* "CMakeLists.txt"
|
|
||||||
(("aotcompile_lib\\(libs/external/nanovg.xtm.*") ""))
|
|
||||||
#t))
|
|
||||||
;; FIXME: All examples that are used as tests segfault for some
|
;; FIXME: All examples that are used as tests segfault for some
|
||||||
;; unknown reason.
|
;; unknown reason.
|
||||||
(add-after 'unpack 'disable-broken-tests
|
(add-after 'unpack 'disable-broken-tests
|
||||||
|
@ -710,20 +721,16 @@ MusePack, Monkey's Audio, and WavPack files.")
|
||||||
("gl/glcompat-directbind" "libGL.so" "mesa")))
|
("gl/glcompat-directbind" "libGL.so" "mesa")))
|
||||||
#t))
|
#t))
|
||||||
(add-after 'unpack 'use-own-llvm
|
(add-after 'unpack 'use-own-llvm
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(setenv "EXT_LLVM_DIR" (assoc-ref inputs "llvm"))
|
(setenv "EXT_LLVM_DIR" (assoc-ref inputs "llvm"))
|
||||||
;; Our LLVM builds shared libraries, so Extempore should use
|
;; Our LLVM builds shared libraries, so Extempore should use
|
||||||
;; those.
|
;; those.
|
||||||
(substitute* "CMakeLists.txt"
|
(substitute* "CMakeLists.txt"
|
||||||
(("CMAKE_STATIC_LIBRARY") "CMAKE_SHARED_LIBRARY"))
|
(("CMAKE_STATIC_LIBRARY") "CMAKE_SHARED_LIBRARY"))
|
||||||
#t))
|
#t))
|
||||||
(add-after 'unpack 'fix-aot-compilation
|
(add-after 'unpack 'fix-aot-compilation
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(substitute* "CMakeLists.txt"
|
(substitute* "CMakeLists.txt"
|
||||||
;; EXT_SHARE_DIR does not exist before installation, so the
|
|
||||||
;; working directory should be the source directory instead.
|
|
||||||
(("WORKING_DIRECTORY \\$\\{EXT_SHARE_DIR\\}")
|
|
||||||
"WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}")
|
|
||||||
;; Extempore needs to be told where the runtime is to be found.
|
;; Extempore needs to be told where the runtime is to be found.
|
||||||
;; While we're at it we disable automatic tuning for a specific
|
;; While we're at it we disable automatic tuning for a specific
|
||||||
;; CPU to make binary substitution possible.
|
;; CPU to make binary substitution possible.
|
||||||
|
|
|
@ -0,0 +1,140 @@
|
||||||
|
Remove build machinery for bundled dependencies.
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 89e6125e..c5e90750 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -36,7 +36,7 @@ endif()
|
||||||
|
if(PACKAGE)
|
||||||
|
# this needs to be set before project() is called
|
||||||
|
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.12)
|
||||||
|
- set(ASSETS ON) # necessary for packaging
|
||||||
|
+ set(ASSETS OFF) # necessary for packaging
|
||||||
|
message(STATUS "Building Extempore for binary distribution (assets directory will be downloaded)")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
@@ -134,71 +134,6 @@ else()
|
||||||
|
message(FATAL_ERROR "Sorry, Extempore isn't supported on this platform - macOS, Linux & Windows only.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
-########
|
||||||
|
-# PCRE #
|
||||||
|
-########
|
||||||
|
-
|
||||||
|
-# current in-tree PCRE version: 8.38
|
||||||
|
-
|
||||||
|
-add_library(pcre STATIC
|
||||||
|
- # headers
|
||||||
|
- src/pcre/config.h
|
||||||
|
- src/pcre/pcre.h
|
||||||
|
- src/pcre/ucp.h
|
||||||
|
- # source files
|
||||||
|
- src/pcre/pcre_chartables.c
|
||||||
|
- src/pcre/pcre_compile.c
|
||||||
|
- src/pcre/pcre_exec.c
|
||||||
|
- src/pcre/pcre_globals.c
|
||||||
|
- src/pcre/pcre_internal.h
|
||||||
|
- src/pcre/pcre_newline.c
|
||||||
|
- src/pcre/pcre_tables.c
|
||||||
|
- )
|
||||||
|
-
|
||||||
|
-target_compile_definitions(pcre
|
||||||
|
- PRIVATE -DHAVE_CONFIG_H
|
||||||
|
- )
|
||||||
|
-
|
||||||
|
-if(PACKAGE)
|
||||||
|
- target_compile_options(pcre
|
||||||
|
- PRIVATE -mtune=generic)
|
||||||
|
-endif()
|
||||||
|
-
|
||||||
|
-#############
|
||||||
|
-# portaudio #
|
||||||
|
-#############
|
||||||
|
-
|
||||||
|
-add_library(portaudio STATIC
|
||||||
|
- src/portaudio/src/common/pa_allocation.c
|
||||||
|
- src/portaudio/src/common/pa_allocation.h
|
||||||
|
- src/portaudio/src/common/pa_converters.c
|
||||||
|
- src/portaudio/src/common/pa_converters.h
|
||||||
|
- src/portaudio/src/common/pa_cpuload.c
|
||||||
|
- src/portaudio/src/common/pa_cpuload.h
|
||||||
|
- src/portaudio/src/common/pa_debugprint.c
|
||||||
|
- src/portaudio/src/common/pa_debugprint.h
|
||||||
|
- src/portaudio/src/common/pa_dither.c
|
||||||
|
- src/portaudio/src/common/pa_dither.h
|
||||||
|
- src/portaudio/src/common/pa_endianness.h
|
||||||
|
- src/portaudio/src/common/pa_front.c
|
||||||
|
- src/portaudio/src/common/pa_hostapi.h
|
||||||
|
- src/portaudio/src/common/pa_memorybarrier.h
|
||||||
|
- src/portaudio/src/common/pa_process.c
|
||||||
|
- src/portaudio/src/common/pa_process.h
|
||||||
|
- src/portaudio/src/common/pa_ringbuffer.c
|
||||||
|
- src/portaudio/src/common/pa_ringbuffer.h
|
||||||
|
- src/portaudio/src/common/pa_stream.c
|
||||||
|
- src/portaudio/src/common/pa_stream.h
|
||||||
|
- src/portaudio/src/common/pa_trace.c
|
||||||
|
- src/portaudio/src/common/pa_trace.h
|
||||||
|
- src/portaudio/src/common/pa_types.h
|
||||||
|
- src/portaudio/src/common/pa_util.h
|
||||||
|
- )
|
||||||
|
-
|
||||||
|
-target_include_directories(portaudio
|
||||||
|
- PRIVATE src/portaudio/include
|
||||||
|
- PRIVATE src/portaudio/src/common)
|
||||||
|
-
|
||||||
|
# platform-specific
|
||||||
|
|
||||||
|
if(APPLE)
|
||||||
|
@@ -224,25 +159,8 @@ if(APPLE)
|
||||||
|
|
||||||
|
elseif(UNIX AND NOT APPLE)
|
||||||
|
# use ALSA on Linux
|
||||||
|
- target_sources(portaudio
|
||||||
|
- PRIVATE src/portaudio/src/hostapi/alsa/pa_linux_alsa.c
|
||||||
|
- PRIVATE src/portaudio/src/os/unix/pa_unix_hostapis.c
|
||||||
|
- PRIVATE src/portaudio/src/os/unix/pa_unix_util.c
|
||||||
|
- )
|
||||||
|
- target_include_directories(portaudio
|
||||||
|
- PRIVATE src/portaudio/src/os/unix)
|
||||||
|
- target_compile_definitions(portaudio
|
||||||
|
- PRIVATE -DPA_USE_ALSA)
|
||||||
|
- target_link_libraries(portaudio
|
||||||
|
- PRIVATE asound)
|
||||||
|
|
||||||
|
if(JACK)
|
||||||
|
- target_sources(portaudio
|
||||||
|
- PRIVATE src/portaudio/src/hostapi/jack/pa_jack.c)
|
||||||
|
- target_compile_definitions(portaudio
|
||||||
|
- PRIVATE -DPA_USE_JACK)
|
||||||
|
- target_link_libraries(portaudio
|
||||||
|
- PRIVATE jack)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
elseif(WIN32)
|
||||||
|
@@ -292,8 +210,6 @@ if(ASIO)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(PACKAGE)
|
||||||
|
- target_compile_options(portaudio
|
||||||
|
- PRIVATE -mtune=generic)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
##############
|
||||||
|
@@ -411,8 +327,6 @@ endif()
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
|
||||||
|
-add_dependencies(extempore pcre portaudio)
|
||||||
|
-
|
||||||
|
if(BUILD_LLVM)
|
||||||
|
if(WIN32)
|
||||||
|
add_dependencies(extempore LLVM-install)
|
||||||
|
@@ -553,7 +467,7 @@ else()
|
||||||
|
install(TARGETS extempore
|
||||||
|
RUNTIME
|
||||||
|
DESTINATION ".")
|
||||||
|
- install(DIRECTORY assets runtime libs examples tests
|
||||||
|
+ install(DIRECTORY runtime libs examples
|
||||||
|
DESTINATION "."
|
||||||
|
PATTERN ".DS_Store" EXCLUDE)
|
||||||
|
endif()
|
Reference in a new issue