From patchwork Thu Oct 7 14:29:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinicius Monego X-Patchwork-Id: 33676 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 75F0627BBE3; Thu, 7 Oct 2021 15:31:26 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 54F0F27BBE1 for ; Thu, 7 Oct 2021 15:31:25 +0100 (BST) Received: from localhost ([::1]:37228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYUQe-0001D8-Dd for patchwork@mira.cbaines.net; Thu, 07 Oct 2021 10:31:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50236) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYUQK-0000aY-RD for guix-patches@gnu.org; Thu, 07 Oct 2021 10:31:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36705) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYUQK-00033J-IA for guix-patches@gnu.org; Thu, 07 Oct 2021 10:31:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mYUQK-00043R-FT for guix-patches@gnu.org; Thu, 07 Oct 2021 10:31:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51085] [PATCH 7/7] gnu: Add mixxx. Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 07 Oct 2021 14:31:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51085 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51085@debbugs.gnu.org Cc: Vinicius Monego Received: via spool by 51085-submit@debbugs.gnu.org id=B51085.163361703715503 (code B ref 51085); Thu, 07 Oct 2021 14:31:04 +0000 Received: (at 51085) by debbugs.gnu.org; 7 Oct 2021 14:30:37 +0000 Received: from localhost ([127.0.0.1]:48245 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYUPs-00041y-Qk for submit@debbugs.gnu.org; Thu, 07 Oct 2021 10:30:37 -0400 Received: from mout02.posteo.de ([185.67.36.66]:41351) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYUPo-00041L-FV for 51085@debbugs.gnu.org; Thu, 07 Oct 2021 10:30:36 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id B5C41240109 for <51085@debbugs.gnu.org>; Thu, 7 Oct 2021 16:30:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1633617026; bh=Vt6lrcuaoP8PfpgZts5bDVRiwzPRto6FfsdcQjuLpQY=; h=From:To:Cc:Subject:Date:From; b=mHH3UNQJnmrF5seio+iG0jxOSGa0ZHtJ+mZJA0qZbagDisvmOuW8y8ONbwpAQLJ43 jIs2r+QwXdTlJflS17AKnFiLxtLBEBkRNnySMmiq+jlCKhSLVNi2hzkX2DUg0dr+B8 7BDUtawVzKzGObSovCiiAeFi2AJ7K3rGiJIRtOM3ykKeRcqAUgoYSOwBbv+MsN+ETb iljAKGfbrjmNpjpeRc0zyA87l9uGVM0tiq/wN4g9m8KSAe+AWyDk12ADMS2BRelsYB NxJHREokzCD7gj130EqSnzFqR2CXE4ncNWaEdSFsdY2VjAp5FSRHzqEgo7not+SlRl Q6g5vBkcxNrCg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4HQDHz5VKTz9rxr; Thu, 7 Oct 2021 16:30:23 +0200 (CEST) From: Vinicius Monego Date: Thu, 7 Oct 2021 14:29:41 +0000 Message-Id: <20211007142941.46591-7-monego@posteo.net> In-Reply-To: <20211007142941.46591-1-monego@posteo.net> References: <20211007142941.46591-1-monego@posteo.net> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/music.scm (mixxx): New variable. * gnu/packages/patches/mixxx-link-qtscriptbytearray-qtscript.patch: New patch. * gnu/packages/patches/mixxx-system-googletest-benchmark.patch: New patch. * gnu/local.mk (dist_patch_DATA): Add patches. --- gnu/local.mk | 2 + gnu/packages/music.scm | 116 ++++++++++++++++++ ...ixxx-link-qtscriptbytearray-qtscript.patch | 25 ++++ .../mixxx-system-googletest-benchmark.patch | 43 +++++++ 4 files changed, 186 insertions(+) create mode 100644 gnu/packages/patches/mixxx-link-qtscriptbytearray-qtscript.patch create mode 100644 gnu/packages/patches/mixxx-system-googletest-benchmark.patch diff --git a/gnu/local.mk b/gnu/local.mk index d415b892e9..36ed1bb755 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1476,6 +1476,8 @@ dist_patch_DATA = \ %D%/packages/patches/minisat-install.patch \ %D%/packages/patches/mit-krb5-hurd.patch \ %D%/packages/patches/mit-krb5-qualify-short-hostnames.patch \ + %D%/packages/patches/mixxx-link-qtscriptbytearray-qtscript.patch \ + %D%/packages/patches/mixxx-system-googletest-benchmark.patch \ %D%/packages/patches/mpc123-initialize-ao.patch \ %D%/packages/patches/mpg321-CVE-2019-14247.patch \ %D%/packages/patches/module-init-tools-moduledir.patch \ diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index ae4626dc8a..759b56d5e0 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -71,6 +71,7 @@ #:use-module (guix build-system meson) #:use-module (guix build-system perl) #:use-module (guix build-system python) + #:use-module (guix build-system qt) #:use-module (guix build-system scons) #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system qt) @@ -88,6 +89,7 @@ #:use-module (gnu packages backup) #:use-module (gnu packages base) ;libbdf #:use-module (gnu packages bash) + #:use-module (gnu packages benchmark) #:use-module (gnu packages bison) #:use-module (gnu packages boost) #:use-module (gnu packages build-tools) @@ -2219,6 +2221,120 @@ Editor. It is compatible with Power Tab Editor 1.7 and Guitar Pro.") users to select LV2 plugins and run them with jalv.") (license license:public-domain))) +(define-public mixxx + (package + (name "mixxx") + (version "2.3.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/mixxxdj/mixxx") + (commit version))) + (file-name (git-file-name name version)) + (patches + (search-patches "mixxx-link-qtscriptbytearray-qtscript.patch" + "mixxx-system-googletest-benchmark.patch")) + (sha256 + (base32 "04781s4ajdlwgvf12v2mvh6ia5grhc5pn9d75b468qci3ilnmkg8")))) + (build-system qt-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + ;; Delete libraries that we already have or don't need. + (add-after 'unpack 'delete-third-parties + (lambda _ + (let ((third-parties '("apple" "benchmark" "googletest" "hidapi" + "libebur128"))) + (with-directory-excursion "lib" + (map (lambda (third-party) + (delete-file-recursively third-party)) + third-parties))))) + ;; Tests need a running X server. + (add-before 'check 'prepare-x-for-test + (lambda _ + (system "Xvfb &") + (setenv "DISPLAY" ":0"))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + ;; This test fails. I don't know why. + (invoke "ctest" "-E" "TagLibTest.WriteID3v2Tag")))) + (add-after 'install 'wrap-executable + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (faad2 (assoc-ref inputs "faad2"))) + (wrap-program (string-append out "/bin/mixxx") + `("LD_LIBRARY_PATH" ":" prefix + ,(list (string-append faad2 "/lib")))))))))) + (native-inputs + `(("benchmark" ,benchmark) + ("googletest" ,googletest) + ("python" ,python-wrapper) + ("qttools" ,qttools) + ("xorg-server" ,xorg-server-for-tests))) + (inputs + `(("bash" ,bash-minimal) + ("chromaprint" ,chromaprint) + ("faad2" ,faad2) + ("ffmpeg" ,ffmpeg) + ("fftw" ,fftw) + ("flac" ,flac) + ("glu" ,glu) + ("hidapi" ,hidapi) + ("jack" ,jack-1) + ("lame" ,lame) + ("libdjinterop" ,libdjinterop) + ("libebur128" ,libebur128) + ("libid3tag" ,libid3tag) + ("libkeyfinder" ,libkeyfinder) + ("libmad" ,libmad) + ("libmp4v2" ,libmp4v2) + ("libmodplug" ,libmodplug) + ("libsndfile" ,libsndfile) + ("libshout" ,libshout) + ;; TODO: Mixxx requires libshout-idjc >= 2.4.6 which was not released + ;; at the time of packaging. + ;; ("libshout-idjc" ,libshout-idjc) + ("libusb" ,libusb) + ("libvorbis" ,libvorbis) + ("lilv" ,lilv) + ("mp3guessenc" ,mp3guessenc) + ("openssl" ,openssl) + ("opus" ,opus) ;for opus_multistream.h + ("opusfile" ,opusfile) + ("portaudio" ,portaudio) + ("portmidi" ,portmidi) + ("protobuf" ,protobuf) + ("qtbase" ,qtbase-5) + ("qtdeclarative" ,qtdeclarative) + ("qtkeychain" ,qtkeychain) + ("qtscript" ,qtscript) + ("qtsvg" ,qtsvg) + ("qtx11extras" ,qtx11extras) + ("rubberband" ,rubberband) + ("soundtouch" ,soundtouch) + ("sqlite" ,sqlite) + ("taglib" ,taglib) + ("upower" ,upower) + ("vamp" ,vamp) + ("wavpack" ,wavpack))) + (home-page "https://www.mixxx.org/") + (synopsis "DJ software to perform live mixes") + (description "Mixxx integrates the tools DJs need to perform creative live +mixes with digital music files. + +Whether you are a new DJ with just a laptop or an experienced turntablist, +Mixxx can support your style and techniques of mixing.") + ;; TODO: Try to unbundle some of these (see lib/). + (license (list license:gpl2+ ; Mixxx, fidlib, qm-dsp + license:gpl2 ; xwax + license:gpl3+ ; reverb + license:expat ; kaitai, scspqueue, portaudio + license:bsd-3 ; qtbytescriptarray + license:lgpl2.1+ ; replaygain, mp3guessenc + license:lgpl2.0+)))) ; libshout-idjc (Library, not Lesser) + (define-public synthv1 (package (name "synthv1") diff --git a/gnu/packages/patches/mixxx-link-qtscriptbytearray-qtscript.patch b/gnu/packages/patches/mixxx-link-qtscriptbytearray-qtscript.patch new file mode 100644 index 0000000000..d7cd1c0d28 --- /dev/null +++ b/gnu/packages/patches/mixxx-link-qtscriptbytearray-qtscript.patch @@ -0,0 +1,25 @@ +From 7554aefc886d4ebc4b4c139a5cddcab6163cf72f Mon Sep 17 00:00:00 2001 +From: Vinicius Monego +Date: Thu, 30 Sep 2021 23:37:29 -0300 +Subject: [PATCH] Link QtScriptByteArray with QtScript. + +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 492ccae..05fec08 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2077,7 +2077,7 @@ add_library(QtScriptByteArray STATIC EXCLUDE_FROM_ALL + lib/qtscript-bytearray/bytearrayprototype.cpp + ) + set_target_properties(QtScriptByteArray PROPERTIES AUTOMOC ON) +-target_link_libraries(QtScriptByteArray Qt5::Core) ++target_link_libraries(QtScriptByteArray Qt5::Core Qt5::Script) + target_include_directories(mixxx-lib SYSTEM PUBLIC lib/qtscript-bytearray) + target_link_libraries(mixxx-lib PRIVATE QtScriptByteArray) + +-- +2.30.2 + diff --git a/gnu/packages/patches/mixxx-system-googletest-benchmark.patch b/gnu/packages/patches/mixxx-system-googletest-benchmark.patch new file mode 100644 index 0000000000..7adbe66208 --- /dev/null +++ b/gnu/packages/patches/mixxx-system-googletest-benchmark.patch @@ -0,0 +1,43 @@ +From eb2079d467f8658eea13e2ed86cc69d864632866 Mon Sep 17 00:00:00 2001 +From: Vinicius Monego +Date: Wed, 29 Sep 2021 19:07:35 -0300 +Subject: [PATCH] Use system googletest and benchmark. + +--- + CMakeLists.txt | 13 +++---------- + 1 file changed, 3 insertions(+), 10 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 10e9b0a..492ccae 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1467,12 +1467,7 @@ set(gtest_force_shared_crt ON CACHE BOOL "Pass Mixxx compiler/linker options to + # Prevent installation of GoogleTest libraries + set(INSTALL_GTEST OFF CACHE BOOL "Disable installation of GoogleTest" FORCE) + +-# Add googletest directly to our build. This adds the following targets: +-# gtest, gtest_main, gmock and gmock_main +-add_subdirectory( +- "${CMAKE_CURRENT_SOURCE_DIR}/lib/googletest" +- "${CMAKE_CURRENT_BINARY_DIR}/lib/googletest" +-) ++find_package(GTest CONFIG REQUIRED) + + add_executable(mixxx-test + src/test/analyserwaveformtest.cpp +@@ -1582,10 +1577,8 @@ set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE) + # Prevent installation of google/benchmark artifacts + set(BENCHMARK_ENABLE_INSTALL OFF CACHE BOOL "Disable installation of google/benchmark" FORCE) + +-add_subdirectory( +- "${CMAKE_CURRENT_SOURCE_DIR}/lib/benchmark" +- "${CMAKE_CURRENT_BINARY_DIR}/lib/benchmark" +-) ++find_package(benchmark CONFIG REQUIRED) ++ + target_link_libraries(mixxx-test PRIVATE benchmark) + + # Test Suite +-- +2.30.2 +