Archived
1
0
Fork 0

gnu: Add mixxx.

* gnu/packages/music.scm (mixxx): New variable.
* gnu/packages/patches/mixxx-link-qtscriptbytearray-qtscript.patch,
gnu/packages/patches/mixxx-system-googletest-benchmark.patch: New files.
* gnu/local.mk (dist_patch_DATA): Add them.

Signed-off-by: Leo Famulari <leo@famulari.name>
This commit is contained in:
Vinicius Monego 2021-10-09 15:28:20 +00:00 committed by Leo Famulari
parent 747b98b32f
commit 8c55fdf80a
No known key found for this signature in database
GPG key ID: 2646FA30BACA7F08
4 changed files with 178 additions and 0 deletions

View file

@ -1492,6 +1492,8 @@ dist_patch_DATA = \
%D%/packages/patches/minisat-install.patch \ %D%/packages/patches/minisat-install.patch \
%D%/packages/patches/mit-krb5-hurd.patch \ %D%/packages/patches/mit-krb5-hurd.patch \
%D%/packages/patches/mit-krb5-qualify-short-hostnames.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/mpc123-initialize-ao.patch \
%D%/packages/patches/mpg321-CVE-2019-14247.patch \ %D%/packages/patches/mpg321-CVE-2019-14247.patch \
%D%/packages/patches/module-init-tools-moduledir.patch \ %D%/packages/patches/module-init-tools-moduledir.patch \

View file

@ -72,6 +72,7 @@
#:use-module (guix build-system meson) #:use-module (guix build-system meson)
#:use-module (guix build-system perl) #:use-module (guix build-system perl)
#:use-module (guix build-system python) #:use-module (guix build-system python)
#:use-module (guix build-system qt)
#:use-module (guix build-system scons) #:use-module (guix build-system scons)
#:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system qt) #:use-module (guix build-system qt)
@ -89,6 +90,7 @@
#:use-module (gnu packages backup) #:use-module (gnu packages backup)
#:use-module (gnu packages base) ;libbdf #:use-module (gnu packages base) ;libbdf
#:use-module (gnu packages bash) #:use-module (gnu packages bash)
#:use-module (gnu packages benchmark)
#:use-module (gnu packages bison) #:use-module (gnu packages bison)
#:use-module (gnu packages boost) #:use-module (gnu packages boost)
#:use-module (gnu packages build-tools) #:use-module (gnu packages build-tools)
@ -2176,6 +2178,112 @@ Editor. It is compatible with Power Tab Editor 1.7 and Guitar Pro.")
users to select LV2 plugins and run them with jalv.") users to select LV2 plugins and run them with jalv.")
(license license:public-domain))) (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 license:gpl2+)))
(define-public synthv1 (define-public synthv1
(package (package
(name "synthv1") (name "synthv1")

View file

@ -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

View file

@ -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