From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id IA5pEwOksV7bXwAA0tVLHw (envelope-from ) for ; Tue, 05 May 2020 17:36:03 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id CCjnLg6ksV4fZgAA1q6Kng (envelope-from ) for ; Tue, 05 May 2020 17:36:14 +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 E0EC5940DDA for ; Tue, 5 May 2020 17:36:10 +0000 (UTC) Received: from localhost ([::1]:60826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jW1UJ-0005DF-0e for larch@yhetil.org; Tue, 05 May 2020 13:36:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43358) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jW1UA-0005Ct-Jo for guix-patches@gnu.org; Tue, 05 May 2020 13:36:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53980) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jW1UA-0006Oa-AM for guix-patches@gnu.org; Tue, 05 May 2020 13:36:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jW1UA-00060k-7j for guix-patches@gnu.org; Tue, 05 May 2020 13:36:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41053] [PATCH 1/2] gnu: Add ableton-link. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 05 May 2020 17:36: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: Giacomo Leidi , 41053@debbugs.gnu.org Cc: Giacomo Leidi Received: via spool by 41053-submit@debbugs.gnu.org id=B41053.158870010523038 (code B ref 41053); Tue, 05 May 2020 17:36:02 +0000 Received: (at 41053) by debbugs.gnu.org; 5 May 2020 17:35:05 +0000 Received: from localhost ([127.0.0.1]:37293 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jW1TB-0005z6-7U for submit@debbugs.gnu.org; Tue, 05 May 2020 13:35:05 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:51593) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jW1T6-0005yr-DY for 41053@debbugs.gnu.org; Tue, 05 May 2020 13:35:00 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 09BAE5C00A1; Tue, 5 May 2020 13:34:51 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 05 May 2020 13:34:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm2; bh=i//gHe4jxp8mKjE9y++Yk6A2X/ 8i9ni6DFraQLpCJ7k=; b=O5BeDlb0KQufyl5DcvwUZ5xSvCroU1oALsEc9Wtkhs 4u1o1YFzOr+5PquAuoJ9vUAAO2njKxAFBG8jole0B0i8n9blvGtonpL7rb4nmqNN fju1/5UCtSDmhK5tl4E8PaNLKkwri+Zq8sC80t0JnWl25b1yjfKhz52RpQquFk37 IAh+3wcCTgyCnahM0NTh+1z4KkTtCG7HK1gwqncV1SyFAmNdEYxaAnJdpgkWQPNf cxBBYyyU/qGbH2vksX3y+nOuyLo74gk6BE1mFPYMz7DXPQp45HYZitvobDKiERrO Ejy3P86vS7KNpjtZQbduROHcoZqHRyfzUjLMbAVe21Jw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=i//gHe 4jxp8mKjE9y++Yk6A2X/8i9ni6DFraQLpCJ7k=; b=H5S6/Tv5uLd9Nl7oMmPySO Gv3N9kkvQoFCAu+T3ebNJDjoKQmHHCCq4h9XKbunvuXRfE6HPPv2kkZcSf/f/uU8 fpdAvxmNY/JGjr0jHrorWqIlEWq5wGQJDfDE/dQhJjXNYC5AN1VdMoNXjFpbnoZ6 pyRQ/Qcb3Fr227iTfgKHuxE2cYyVktPVbm0lVPpVss7D3MKJckSYBwo4DMF3yPWP e00XZ6qSR960cJq59e6Ncz8Cd86FZlbsW9USkjk4DgLhq4/QTDiuLdFTaA58c0Kq hBeLfawuf4exhaKHW6jhSOy3WVgYi4zT1BDSzi0s3nW5CzgCdfxhqYuL40gVESFg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrjeeigdduudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffujghffgffkfggtgesghdtre ertderjeenucfhrhhomhepofgrrhhiuhhsuceurghkkhgvuceomhgsrghkkhgvsehfrghs thhmrghilhdrtghomheqnecuggftrfgrthhtvghrnhepuddvgfdtvdefudehhfeljeekge duffetheeufeekvdfhvdeuueegveetffelkeelnecuffhomhgrihhnpehgihhthhhusgdr tghomhdpuggvsghirghnrdhnvghtnecukfhppeekgedrvddtvddrieekrdejheenucevlh hushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmsggrkhhkvges fhgrshhtmhgrihhlrdgtohhm X-ME-Proxy: Received: from localhost (ti0006q161-2604.bb.online.no [84.202.68.75]) by mail.messagingengine.com (Postfix) with ESMTPA id 6FDD33280067; Tue, 5 May 2020 13:34:50 -0400 (EDT) From: Marius Bakke In-Reply-To: <20200503160608.5905-1-goodoldpaul@autistici.org> References: <7ab14d0b64acca502e134f57bd1c4ac9@autistici.org> <20200503160608.5905-1-goodoldpaul@autistici.org> User-Agent: Notmuch/0.29.3 (https://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu) Date: Tue, 05 May 2020 19:34:49 +0200 Message-ID: <87368ez3nq.fsf@devup.no> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.7 (-) 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: -2.01 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=fastmail.com header.s=fm2 header.b=O5BeDlb0; dkim=fail (rsa verify failed) header.d=messagingengine.com header.s=fm2 header.b=H5S6/Tv5; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fastmail.com (policy=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 [-2.01 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.49559472080269]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2001:470:142::/48:c]; R_DKIM_REJECT(1.00)[fastmail.com:s=fm2,messagingengine.com:s=fm2]; DWL_DNSWL_BLOCKED(0.00)[2001:470:142::17:from]; FREEMAIL_FROM(0.00)[fastmail.com]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.12), country: US(-0.00), ip: 2001:470:142::17(-0.50)]; DKIM_TRACE(0.00)[fastmail.com:-,messagingengine.com:-]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; MAILLIST(-0.20)[mailman]; SIGNED_PGP(-2.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_IN_DNSWL_FAIL(0.00)[2001:470:142::17:server fail]; MIME_TRACE(0.00)[0:+,1:+,2:~]; 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)[mbakke@fastmail.com,guix-patches-bounces@gnu.org]; ARC_NA(0.00)[]; URIBL_BLOCKED(0.00)[dep.debian.net:url,autistici.org:email]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; HAS_LIST_UNSUB(-0.01)[]; RCVD_COUNT_SEVEN(0.00)[10]; FORGED_SENDER_MAILLIST(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[fastmail.com : SPF not aligned (relaxed),none] X-TUID: CiKSe7z67LoL --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Giacomo Leidi writes: > * 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. [...] > +(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.pat= ch")) > + (snippet > + '(begin > + ;; Fix tests > + (substitute* "ci/run-tests.py" > + (("root_dir,") "root_dir, os.pardir,")) Can you expand on the comment with what this substitution does, i.e. how it fixes tests? > + (native-inputs > + `(("catch" ,catch-framework) > + ("python" ,python) ;; For running tests > + ("portaudio" ,portaudio) ;; For portaudio examples > + ("qtbase" ,qtbase) ;; For Qt examples Nit-pick: only one semicolon for margin comments. We typically also do not add a space between the semicolon and the comment in that case. > + ("qtdeclarative" ,qtdeclarative) > + ("qttools" ,qttools))) > + (inputs > + `(("jack" ,jack-1) ;; For JACK examples > + ("qtquickcontrols" ,qtquickcontrols))) ;; For Qt examples > + (propagated-inputs > + `(("asio" ,asio))) Can you add a comment about why asio is propagated? We try to avoid propagation where possible. > + (arguments > + `(#:configure-flags > + '("-DBUILD_TYPE=3DRelease" You can use #:build-type instead of passing -DCMAKE_BUILD_TYPE. Is there a particular reason why the default "RelWithDebInfo" does not cut it? > + "-DLINK_BUILD_QT_EXAMPLES=3DON" > + "-DLINK_BUILD_JACK=3DON") > + #: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)) You can simply unquote version where needed instead of adding a let binding. > + (run-tests (string-append "../ableton-link-" > + version I.e.: ,version > + "-checkout/ci/run-tests.py"= ))) > + (and (invoke python run-tests "--target" "LinkCoreTest") > + (invoke python run-tests "--target" "LinkDiscoveryTe= st"))))) Nit-pick: The (and ...) is unnecessary because INVOKE would throw an exception upon failure instead of #f. > + (add-before 'install 'patch-cmake > + (lambda* (#:key inputs #:allow-other-keys) > + (let* ((version ,(package-version ableton-link)) > + (source (string-append "../ableton-link-" > + version Use ,version here too. > + "-checkout/"))) > + (substitute* (string-append source > + "cmake_include/AsioStandalone= Config.cmake") Note: if you run this phase immediately after 'unpack, you don't have to add a binding for the source directory as you can refer to this file by just (substitute* "cmake_include/AsioStandaloneConfig.cmake"). But perhaps that will break things? > + (((string-append "\\$\\{CMAKE_CURRENT_LIST_DIR\\}/\\.\\= ./" > + "modules/asio-standalone/asio/include"= )) > + (string-append (assoc-ref inputs "asio") > + "/include"))) > + (substitute* (string-append source "AbletonLinkConfig.cma= ke") > + (("\\$\\{CMAKE_CURRENT_LIST_DIR\\}/include") > + "${CMAKE_CURRENT_LIST_DIR}/../../../include") > + (("\\$\\{CMAKE_CURRENT_LIST_DIR\\}/include/ableton/Link= \\.hpp") > + "${CMAKE_CURRENT_LIST_DIR}/../../../include/ableton/Li= nk.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-li= nk")) > + (version ,(package-version ableton-link)) > + (source (string-append "../ableton-link-" version "-= checkout"))) Use ,version here too. > + (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.c= make") > + lib-cmake) > + (install-file (string-append source > + "/cmake_include/AsioStandalo= neConfig.cmake") > + (string-append lib-cmake "/cmake_include")) Terrible that we have to install "manually" here! But oh well. > + #t)))))) > + (home-page "https://github.com/Ableton/link") > + (synopsis "Synchronizes musical beat, tempo, and phase across multip= le applications") s/Synchronizes/Synchronize/ > + (description > + "Ableton Link is a C++ library that synchronizes musical beat, temp= o, and phase > +across multiple applications running on one or more devices. Applicatio= ns 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.") Pretty cool stuff! :-) > + (license license:gpl2+))) > diff --git a/gnu/packages/patches/ableton-link-system-libraries-debian.pa= tch 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 t= arball). > + on Debian we want to use the system provided libraries. > +Author: IOhannes m zm=C3=B6lnig > +Origin: Debian > +Forwarded: not-needed > +Last-Update: 2016-10-26 > +--- > +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ Great that you took care to unbundle dependencies. Can you add a link to where you found this patch? Otherwise LGTM, thanks! --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl6xo7kACgkQoqBt8qM6 VPqZKAgAqrPKux121xqy4pfgf6j7/FuCaku9ebxJgFvmik+5N+SKmSfHPgWmQiuk Rfz4QTh7voTyJwjQGs+ZJUax6FCEZ8KngdM4fEpETIjOK0h1bvVU8TozhRA1Z2fX ayMpSL41SicQRikmsw/lwsCCqmHdJaI1wEnPbYX4y/gHOaoBTjXcsQ2jGMa2hfxc 9NkJgifWiqCqiyZ6qocqP4RZZRLpMzFJEb73xICcRn0pNCWsu6DAej6D3jWksCIU 5zt2CyTc2LhGoL1CLFBim8J3WXOBxXROkSvVIEAeUEHSYPZF+pc0NEBDaksiyGFX kauw0JfttTkaEVyWd4EyPaFQnqorcg== =jb33 -----END PGP SIGNATURE----- --=-=-=--