guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#51085] [PATCH v2 7/7] gnu: Add mixxx.


From: Vinicius Monego
Subject: [bug#51085] [PATCH v2 7/7] gnu: Add mixxx.
Date: Sat, 9 Oct 2021 15:28:20 +0000

* 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.
---
Deleted bundles in a snippet instead of a phase. Removed opus from inputs. 
Changed comment about libshout-idjc. Changed description. Removed www from 
home-page.

 gnu/local.mk                                  |   2 +
 gnu/packages/music.scm                        | 114 ++++++++++++++++++
 ...ixxx-link-qtscriptbytearray-qtscript.patch |  25 ++++
 .../mixxx-system-googletest-benchmark.patch   |  43 +++++++
 4 files changed, 184 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 b1f0cab55e..a3eceabc9e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1475,6 +1475,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 fa3b70f8c1..697a272eb8 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -72,6 +72,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)
@@ -89,6 +90,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)
@@ -2176,6 +2178,118 @@ 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"))
+       (modules '((guix build utils)))
+       (snippet
+        ;; Delete libraries that we already have or don't need.
+        ;; TODO: try to unbundle more (see lib/).
+        `(begin
+           (let ((third-parties '("apple" "benchmark" "googletest" "hidapi"
+                                  "libebur128")))
+             (with-directory-excursion "lib"
+               (map (lambda (third-party)
+                      (delete-file-recursively third-party))
+                    third-parties)))
+           #t))))
+    (build-system qt-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         ;; 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)
+       ;; XXX: Mixxx complains the libshout-idjc package suffers from bug
+       ;; lp1833225 and refuses to use it.  Use the bundle for now.
+       ;; ("libshout-idjc" ,libshout-idjc)
+       ("libusb" ,libusb)
+       ("libvorbis" ,libvorbis)
+       ("lilv" ,lilv)
+       ("mp3guessenc" ,mp3guessenc)
+       ("openssl" ,openssl)
+       ("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://mixxx.org/";)
+    (synopsis "DJ software to perform live mixes")
+    (description "Mixxx is a DJ software.  It integrates the tools DJs need to
+perform creative live mixes with digital music files.")
+    (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 <monego@posteo.net>
+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 <monego@posteo.net>
+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
+
-- 
2.30.2






reply via email to

[Prev in Thread] Current Thread [Next in Thread]