From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id CCudGzrsrl7EFAAA0tVLHw (envelope-from ) for ; Sun, 03 May 2020 16:07:22 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id oCa9DUXsrl6VSwAAbx9fmQ (envelope-from ) for ; Sun, 03 May 2020 16:07:33 +0000 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 40EDD9445DA for ; Sun, 3 May 2020 16:07:31 +0000 (UTC) Received: from localhost ([::1]:33502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVH9P-0001ed-Ar for larch@yhetil.org; Sun, 03 May 2020 12:07:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36516) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVH8w-0001e0-P6 for guix-patches@gnu.org; Sun, 03 May 2020 12:07:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46170) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jVH8w-00064s-Fk for guix-patches@gnu.org; Sun, 03 May 2020 12:07:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jVH8w-0000Yl-Ak for guix-patches@gnu.org; Sun, 03 May 2020 12:07:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41053] [PATCH 1/2] gnu: Add ableton-link. References: <7ab14d0b64acca502e134f57bd1c4ac9@autistici.org> In-Reply-To: <7ab14d0b64acca502e134f57bd1c4ac9@autistici.org> Resent-From: Giacomo Leidi Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 03 May 2020 16:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41053 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41053@debbugs.gnu.org Cc: Giacomo Leidi Received: via spool by 41053-submit@debbugs.gnu.org id=B41053.15885219882094 (code B ref 41053); Sun, 03 May 2020 16:07:02 +0000 Received: (at 41053) by debbugs.gnu.org; 3 May 2020 16:06:28 +0000 Received: from localhost ([127.0.0.1]:57714 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVH8N-0000Xi-MN for submit@debbugs.gnu.org; Sun, 03 May 2020 12:06:28 -0400 Received: from devianza.investici.org ([198.167.222.108]:23047) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVH8I-0000XV-Ag for 41053@debbugs.gnu.org; Sun, 03 May 2020 12:06:25 -0400 Received: from mx2.investici.org (unknown [127.0.0.1]) by devianza.investici.org (Postfix) with ESMTP id F1612E0658; Sun, 3 May 2020 16:06:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1588521980; bh=jxDTzpve9YQC68g/F+vzSqY9biWctTW5pK3tRhLIZT8=; h=From:To:Cc:Subject:Date:From; b=OM5fj9jJCfVrO3otrcaBmEppkTiY8s0q2q2MGKUzEs6dE2YiTw/ooSJZ2+arEcp+Y 4/9CJvmpU0ay7j71MGbFkBSSrv3uD9UbniHoTjCHPjNGtFWYu3eMTlb7ZwRSmb7eYR 8dXbgNJa0D75u6xde4luMCfIHw+X+BRCTku6QA2A= Received: from [198.167.222.108] (mx2.investici.org [198.167.222.108]) (Authenticated sender: goodoldpaul@autistici.org) by localhost (Postfix) with ESMTPSA id 91315E065A; Sun, 3 May 2020 16:06:20 +0000 (UTC) From: Giacomo Leidi Date: Sun, 3 May 2020 18:06:07 +0200 Message-Id: <20200503160608.5905-1-goodoldpaul@autistici.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 X-Spam-Score: 0.99 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=autistici.org header.s=stigmate header.b=OM5fj9jJ; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Scan-Result: default: False [0.99 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.49381870891039]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2001:470:142::/48:c]; R_DKIM_REJECT(1.00)[autistici.org:s=stigmate]; DWL_DNSWL_FAIL(0.00)[2001:470:142::17:server fail]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.14), country: US(-0.00), ip: 2001:470:142::17(-0.49)]; DKIM_TRACE(0.00)[autistici.org:-]; RCPT_COUNT_TWO(0.00)[2]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_IN_DNSWL_FAIL(0.00)[2001:470:142::17:server fail]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:22989, ipnet:2001:470:142::/48, country:US]; TAGGED_FROM(0.00)[larch=yhetil.org]; FROM_NEQ_ENVFROM(0.00)[goodoldpaul@autistici.org,guix-patches-bounces@gnu.org]; ARC_NA(0.00)[]; URIBL_BLOCKED(0.00)[dep.debian.net:url,rowetel.com:url]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[autistici.org]; HAS_LIST_UNSUB(-0.01)[]; MID_CONTAINS_FROM(1.00)[]; RCVD_COUNT_SEVEN(0.00)[9]; FORGED_SENDER_MAILLIST(0.00)[] X-TUID: MBS5VuTJo+5Y * gnu/packages/audio.scm (ableton-link): New variable. * gnu/packages/patches/ableton-link-system-libraries-debian.patch: Patch CMakeLists.txt to use system libraries. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/audio.scm | 103 ++++++++++++++++++ ...ableton-link-system-libraries-debian.patch | 27 +++++ 3 files changed, 131 insertions(+) create mode 100644 gnu/packages/patches/ableton-link-system-libraries-debian.patch diff --git a/gnu/local.mk b/gnu/local.mk index 3c9a10b6bc..5aba7ed124 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -721,6 +721,7 @@ dist_patch_DATA = \ %D%/packages/patches/a2ps-CVE-2014-0466.patch \ %D%/packages/patches/a2ps-CVE-2015-8107.patch \ %D%/packages/patches/abcl-fix-build-xml.patch \ + %D%/packages/patches/ableton-link-system-libraries-debian.patch \ %D%/packages/patches/abiword-explictly-cast-bools.patch \ %D%/packages/patches/adb-add-libraries.patch \ %D%/packages/patches/aegis-constness-error.patch \ diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 3a452f1458..52ebb51fc4 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -88,6 +88,7 @@ #:use-module (gnu packages multiprecision) #:use-module (gnu packages music) #:use-module (gnu packages ncurses) + #:use-module (gnu packages networking) #:use-module (gnu packages onc-rpc) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) @@ -4283,3 +4284,105 @@ between 700 and 3200 bit/s. The main application is low bandwidth HF/VHF digital radio.") (home-page "https://www.rowetel.com/?page_id=452") (license license:lgpl2.1))) + +(define-public ableton-link + (package + (name "ableton-link") + (version "3.0.2") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Ableton/link.git") + (commit (string-append "Link-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0262vm0v7hmqjhqx5xikh529p3c065p1yld6ymaiz74yq1dnnjir")) + (modules '((guix build utils))) + (patches + (search-patches "ableton-link-system-libraries-debian.patch")) + (snippet + '(begin + ;; Fix tests + (substitute* "ci/run-tests.py" + (("root_dir,") "root_dir, os.pardir,")) + ;; Unbundle dependencies + (delete-file-recursively "third_party") + (delete-file-recursively "modules") + #t)))) + (build-system cmake-build-system) + (native-inputs + `(("catch" ,catch-framework) + ("python" ,python) ;; For running tests + ("portaudio" ,portaudio) ;; For portaudio examples + ("qtbase" ,qtbase) ;; For Qt examples + ("qtdeclarative" ,qtdeclarative) + ("qttools" ,qttools))) + (inputs + `(("jack" ,jack-1) ;; For JACK examples + ("qtquickcontrols" ,qtquickcontrols))) ;; For Qt examples + (propagated-inputs + `(("asio" ,asio))) + (arguments + `(#:configure-flags + '("-DBUILD_TYPE=Release" + "-DLINK_BUILD_QT_EXAMPLES=ON" + "-DLINK_BUILD_JACK=ON") + #:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key inputs #:allow-other-keys) + (let* ((python (string-append (assoc-ref inputs "python") + "/bin/python3")) + (version ,(package-version ableton-link)) + (run-tests (string-append "../ableton-link-" + version + "-checkout/ci/run-tests.py"))) + (and (invoke python run-tests "--target" "LinkCoreTest") + (invoke python run-tests "--target" "LinkDiscoveryTest"))))) + (add-before 'install 'patch-cmake + (lambda* (#:key inputs #:allow-other-keys) + (let* ((version ,(package-version ableton-link)) + (source (string-append "../ableton-link-" + version + "-checkout/"))) + (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")) + #t))) + (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")) + (version ,(package-version ableton-link)) + (source (string-append "../ableton-link-" version "-checkout"))) + (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")) + #t)))))) + (home-page "https://github.com/Ableton/link") + (synopsis "Synchronizes musical beat, tempo, and phase across multiple applications") + (description + "Ableton Link is a C++ library that synchronizes musical beat, tempo, and phase +across multiple applications running on one or more devices. Applications on devices +connected to a local network discover each other automatically and form a musical +session in which each participant can perform independently: anyone can start or stop +while still staying in time.") + (license license:gpl2+))) diff --git a/gnu/packages/patches/ableton-link-system-libraries-debian.patch b/gnu/packages/patches/ableton-link-system-libraries-debian.patch new file mode 100644 index 0000000000..0c12c62546 --- /dev/null +++ b/gnu/packages/patches/ableton-link-system-libraries-debian.patch @@ -0,0 +1,27 @@ +Description: Drop dependencies on included 3rd-party libs + upstream includes git-submodules for Catch and ASIO (not found in the tarball). + on Debian we want to use the system provided libraries. +Author: IOhannes m zmölnig +Origin: Debian +Forwarded: not-needed +Last-Update: 2016-10-26 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- ableton-link.orig/cmake_include/AsioStandaloneConfig.cmake ++++ ableton-link/cmake_include/AsioStandaloneConfig.cmake +@@ -1,6 +1,2 @@ + add_library(AsioStandalone::AsioStandalone IMPORTED INTERFACE) + +-set_property(TARGET AsioStandalone::AsioStandalone APPEND PROPERTY +- INTERFACE_INCLUDE_DIRECTORIES +- ${CMAKE_CURRENT_LIST_DIR}/../modules/asio-standalone/asio/include +-) +--- ableton-link.orig/cmake_include/CatchConfig.cmake ++++ ableton-link/cmake_include/CatchConfig.cmake +@@ -1,6 +1,2 @@ + add_library(Catch::Catch IMPORTED INTERFACE) + +-set_property(TARGET Catch::Catch APPEND PROPERTY +- INTERFACE_INCLUDE_DIRECTORIES +- ${CMAKE_SOURCE_DIR}/third_party/catch +-) -- 2.26.2