commit:     a6b8db91d0d358d9713a5d398dea3808dbfd999d
Author:     Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr>
AuthorDate: Wed Jun 18 15:03:56 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun 22 09:46:29 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6b8db91

media-sound/mixxx: add 2.5.2

One change since ebuild 2.5.1:
Patch for X useflag rebased with two PR merged.

It also includes another patch to fix a minor UI regression.

Although the changelog announces a fix for lto, the use of
lto-guarantee-fat is still required for some env (still to be precisely
defined, WI(low)P).

Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr>
Part-of: https://github.com/gentoo/gentoo/pull/42655
Closes: https://github.com/gentoo/gentoo/pull/42655
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-sound/mixxx/Manifest                         |   1 +
 .../mixxx/files/mixxx-2.5.2-fix_col_headers.patch  |  52 ++++++
 media-sound/mixxx/files/mixxx-2.5.2-x11_opt.patch  | 123 +++++++++++++++
 media-sound/mixxx/mixxx-2.5.2.ebuild               | 175 +++++++++++++++++++++
 4 files changed, 351 insertions(+)

diff --git a/media-sound/mixxx/Manifest b/media-sound/mixxx/Manifest
index d710bf041e2a..8d34c73e7171 100644
--- a/media-sound/mixxx/Manifest
+++ b/media-sound/mixxx/Manifest
@@ -1 +1,2 @@
 DIST mixxx-2.5.1.tar.gz 39957616 BLAKE2B 
a1541e74753ba97aa5faf0785f987619b60e061faf21500723568eb599fd72cc03b3948a1a8012dcfeb111a2e2e20256aa39dbeb15e49355830bb94aeef7d625
 SHA512 
14ca19b58e5f3bb2502a3a79125c2e4f149d002ff6e89bd3bad61a6bb268cfcecaaf1ee31eac3eb39bfdcdf77bae38ea6ef0ad3cdb8df9bfb842070b642b3ffc
+DIST mixxx-2.5.2.tar.gz 40033028 BLAKE2B 
f9ff48c45af4092ef8fcba5220d31d80b639d06b2803573b433b307d0062d6295337cde490b50ca1d9dfcab91d34ed9a6e299ffc9e84dfa39df3c15cc40006ef
 SHA512 
3ea8faef80c5a8b28ffd1bd6384d2b60b318da6b77dc34d1a68a626e48756e235fe854cb5a7b1bbfab1f8c2b8be2489dd238c11f072b08d0fde86618ddd55c0f

diff --git a/media-sound/mixxx/files/mixxx-2.5.2-fix_col_headers.patch 
b/media-sound/mixxx/files/mixxx-2.5.2-fix_col_headers.patch
new file mode 100644
index 000000000000..c9298d890549
--- /dev/null
+++ b/media-sound/mixxx/files/mixxx-2.5.2-fix_col_headers.patch
@@ -0,0 +1,52 @@
+https://github.com/mixxxdj/mixxx/pull/14944.patch
+From d2a59762740c4adbc8bc95685504f2ce8dbe19ad Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= <[email protected]>
+Date: Sun, 15 Jun 2025 12:04:40 +0200
+Subject: [PATCH] Fix colum header text asignment
+
+A regression form #13782
+---
+ src/library/columncache.cpp | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/src/library/columncache.cpp b/src/library/columncache.cpp
+index eb0dd4da589..1a40363d249 100644
+--- a/src/library/columncache.cpp
++++ b/src/library/columncache.cpp
+@@ -68,8 +68,8 @@ constexpr ColumnProperties kColumnPropertiesByEnum[] = {
+                 QT_TRANSLATE_NOOP("BaseTrackTableModel", "Track #"),
+                 kDefaultColumnWidth},
+         DI(ColumnCache::COLUMN_LIBRARYTABLE_FILETYPE){&LIBRARYTABLE_FILETYPE,
+-                nullptr,
+-                0},
++                QT_TRANSLATE_NOOP("BaseTrackTableModel", "Type"),
++                kDefaultColumnWidth},
+         DI(ColumnCache::COLUMN_LIBRARYTABLE_COMMENT){&LIBRARYTABLE_COMMENT,
+                 QT_TRANSLATE_NOOP("BaseTrackTableModel", "Comment"),
+                 kDefaultColumnWidth * 6},
+@@ -110,11 +110,11 @@ constexpr ColumnProperties kColumnPropertiesByEnum[] = {
+                 nullptr,
+                 0},
+         
DI(ColumnCache::COLUMN_LIBRARYTABLE_TIMESPLAYED){&LIBRARYTABLE_TIMESPLAYED,
+-                nullptr,
+-                0},
+-        DI(ColumnCache::COLUMN_LIBRARYTABLE_PLAYED){&LIBRARYTABLE_PLAYED,
+                 QT_TRANSLATE_NOOP("BaseTrackTableModel", "Played"),
+                 kDefaultColumnWidth * 2},
++        DI(ColumnCache::COLUMN_LIBRARYTABLE_PLAYED){&LIBRARYTABLE_PLAYED,
++                nullptr,
++                0},
+         DI(ColumnCache::COLUMN_LIBRARYTABLE_RATING){&LIBRARYTABLE_RATING,
+                 QT_TRANSLATE_NOOP("BaseTrackTableModel", "Rating"),
+                 kDefaultColumnWidth * 2},
+@@ -140,8 +140,8 @@ constexpr ColumnProperties kColumnPropertiesByEnum[] = {
+                 nullptr,
+                 0},
+         
DI(ColumnCache::COLUMN_LIBRARYTABLE_COVERART_TYPE){&LIBRARYTABLE_COVERART_TYPE,
+-                QT_TRANSLATE_NOOP("BaseTrackTableModel", "Type"),
+-                kDefaultColumnWidth},
++                nullptr,
++                0},
+         
DI(ColumnCache::COLUMN_LIBRARYTABLE_COVERART_LOCATION){&LIBRARYTABLE_COVERART_LOCATION,
+                 nullptr,
+                 0},

diff --git a/media-sound/mixxx/files/mixxx-2.5.2-x11_opt.patch 
b/media-sound/mixxx/files/mixxx-2.5.2-x11_opt.patch
new file mode 100644
index 000000000000..70894ba34460
--- /dev/null
+++ b/media-sound/mixxx/files/mixxx-2.5.2-x11_opt.patch
@@ -0,0 +1,123 @@
+PR merged in main branch
+https://github.com/mixxxdj/mixxx/pull/14574.patch
+https://github.com/mixxxdj/mixxx/pull/14949.patch
+From 3d974f7c0617ccd41961484f6572ec4618571c71 Mon Sep 17 00:00:00 2001
+From: Nicolas PARLANT <[email protected]>
+Date: Mon, 31 Mar 2025 13:33:13 +0000
+Subject: [PATCH] X11-less - Use FindWrapOpenGL
+
+Use FindWrapOpenGL.cmake. It allows X11-less system.
+Set link_target to OpenGL::OpenGL, GLVND-based. If not found, use
+OpenGL:GL.
+
+Furthermore, adding a __X11__ definition so that the screensaver that
+requires Xlib is now optional.
+
+Signed-off-by: Nicolas PARLANT <[email protected]>
+---
+ CMakeLists.txt           | 10 ++++++++--
+ src/util/screensaver.cpp |  5 +++--
+ 2 files changed, 11 insertions(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b7a48247f97a..dc54ed5fad34 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -3187,8 +3187,8 @@ else()
+     set(CMAKE_FIND_FRAMEWORK FIRST)
+   endif()
+   set(OpenGL_GL_PREFERENCE "GLVND")
+-  find_package(OpenGL REQUIRED)
+   if(EMSCRIPTEN)
++    find_package(OpenGL REQUIRED)
+     # Emscripten's FindOpenGL.cmake does not create OpenGL::GL
+     target_link_libraries(mixxx-lib PRIVATE ${OPENGL_gl_LIBRARY})
+     target_compile_definitions(mixxx-lib PUBLIC QT_OPENGL_ES_2)
+@@ -3200,7 +3200,12 @@ else()
+       PUBLIC -sMIN_WEBGL_VERSION=2 -sMAX_WEBGL_VERSION=2 -sFULL_ES2=1
+     )
+   else()
+-    target_link_libraries(mixxx-lib PRIVATE OpenGL::GL)
++    find_package(WrapOpenGL REQUIRED)
++    if(OPENGL_opengl_LIBRARY)
++      target_link_libraries(mixxx-lib PRIVATE OpenGL::OpenGL)
++    else()
++      target_link_libraries(mixxx-lib PRIVATE OpenGL::GL)
++    endif()
+   endif()
+   if(UNIX AND QGLES2)
+     target_compile_definitions(mixxx-lib PUBLIC QT_OPENGL_ES_2)
+@@ -3841,6 +3846,7 @@ elseif(UNIX AND NOT APPLE AND NOT EMSCRIPTEN)
+   if(${X11_FOUND})
+     target_include_directories(mixxx-lib SYSTEM PUBLIC "${X11_INCLUDE_DIR}")
+     target_link_libraries(mixxx-lib PRIVATE "${X11_LIBRARIES}")
++    target_compile_definitions(mixxx-lib PUBLIC __X11__)
+   endif()
+   find_package(Qt${QT_VERSION_MAJOR} COMPONENTS DBus REQUIRED)
+   target_link_libraries(mixxx-lib PUBLIC Qt${QT_VERSION_MAJOR}::DBus)
+diff --git a/src/util/screensaver.cpp b/src/util/screensaver.cpp
+index 9eae4a1b4cd0..88f6e880ea56 100644
+--- a/src/util/screensaver.cpp
++++ b/src/util/screensaver.cpp
+@@ -36,7 +36,8 @@ With the help of the following source codes:
+ #  include <X11/extensions/scrnsaver.h>
+ #endif
+ 
+-#if defined(__LINUX__) || (defined(HAVE_XSCREENSAVER_SUSPEND) && 
HAVE_XSCREENSAVER_SUSPEND)
++#if (defined(__LINUX__) && defined(__X11__)) || \
++        (defined(HAVE_XSCREENSAVER_SUSPEND) && HAVE_XSCREENSAVER_SUSPEND)
+ #  define None XNone
+ #  define Window XWindow
+ #  include <X11/Xlib.h>
+@@ -146,7 +147,7 @@ void ScreenSaverHelper::uninhibitInternal()
+     s_enabled = false;
+ }
+ 
+-#elif defined(Q_OS_LINUX)
++#elif (defined(Q_OS_LINUX) && defined(__X11__))
+ const char *SCREENSAVERS[][4] = {
+     // org.freedesktop.ScreenSaver is the standard. should work for gnome and 
kde too, 
+     // but I add their specific names too
+From ebeff352f22f4d1dbc35d7f7e3c2c88f1965dc4e Mon Sep 17 00:00:00 2001
+From: Nicolas PARLANT <[email protected]>
+Date: Mon, 16 Jun 2025 11:00:46 +0200
+Subject: [PATCH] Don't try localeFromXkbSymbol w/o __X11__ defined
+
+Because X11/XKBlib.h is a part of libX11
+
+Signed-off-by: Nicolas PARLANT <[email protected]>
+---
+ src/coreservices.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/coreservices.cpp b/src/coreservices.cpp
+index 20fb1c240c6..0837d603907 100644
+--- a/src/coreservices.cpp
++++ b/src/coreservices.cpp
+@@ -63,7 +63,7 @@
+ #include "util/sandbox.h"
+ #endif
+ 
+-#ifdef Q_OS_LINUX
++#if defined(Q_OS_LINUX) && defined(__X11__)
+ #include <X11/XKBlib.h>
+ #endif
+ 
+@@ -118,7 +118,7 @@ Bool __xErrorHandler(Display* display, XErrorEvent* event, 
xError* error) {
+ 
+ #endif
+ 
+-#if defined(Q_OS_LINUX)
++#if defined(Q_OS_LINUX) && defined(__X11__)
+ QLocale localeFromXkbSymbol(const QString& xkbLayout) {
+     // This maps XKB layouts to locales of keyboard mappings that are shipped 
with Mixxx
+     static const QMap<QString, QLocale> xkbToLocaleMap = {
+@@ -268,7 +268,7 @@ QString getCurrentXkbLayoutName() {
+ // to "ibus engine". QGuiApplication::inputMethod() does not work with GNOME 
and XFCE
+ // https://bugreports.qt.io/browse/QTBUG-137302
+ inline QLocale inputLocale() {
+-#if defined(Q_OS_LINUX)
++#if defined(Q_OS_LINUX) && defined(__X11__)
+     QString layoutName = getCurrentXkbLayoutName();
+     if (!layoutName.isEmpty()) {
+         qDebug() << "Keyboard Layout from XKB:" << layoutName;

diff --git a/media-sound/mixxx/mixxx-2.5.2.ebuild 
b/media-sound/mixxx/mixxx-2.5.2.ebuild
new file mode 100644
index 000000000000..5f426916db7f
--- /dev/null
+++ b/media-sound/mixxx/mixxx-2.5.2.ebuild
@@ -0,0 +1,175 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake dot-a udev xdg
+
+DESCRIPTION="Advanced Digital DJ tool based on Qt"
+HOMEPAGE="https://mixxx.org/";
+if [[ ${PV} == *9999 ]] ; then
+       inherit git-r3
+       if [[ ${PV} == ?.?.9999 ]] ; then
+               EGIT_BRANCH=${PV%.9999}
+       fi
+       EGIT_REPO_URI="https://github.com/mixxxdj/${PN}.git";
+else
+       SRC_URI="https://github.com/mixxxdj/${PN}/archive/${PV}.tar.gz -> 
${P}.tar.gz"
+       KEYWORDS="~amd64 ~arm64 ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+# gles2-only: at least not before 2.6 for keyworded ebuild
+IUSE="aac benchmark ffmpeg keyfinder lv2 midi modplug mp3 mp4 opus"
+IUSE+=" qtkeychain rubberband shout test upower wavpack +X"
+REQUIRED_USE="
+       benchmark? ( test )
+       qtkeychain? ( shout )
+       test? ( aac ffmpeg midi mp3 opus rubberband )
+"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       dev-db/sqlite:3
+       dev-cpp/abseil-cpp:=
+       dev-libs/hidapi
+       dev-libs/protobuf:=
+       dev-qt/qt5compat:6
+       
dev-qt/qtbase:6[concurrent,dbus,-gles2-only,gui,icu,network,opengl,sql,sqlite,ssl,widgets,xml,X?]
+       dev-qt/qtdeclarative:6
+       dev-qt/qtshadertools:6
+       dev-qt/qtsvg:6
+       media-libs/chromaprint:=
+       media-libs/flac:=
+       media-libs/libebur128:=
+       media-libs/libglvnd[X?]
+       media-libs/libogg
+       media-libs/libsndfile
+       media-libs/libsoundtouch:=
+       media-libs/libvorbis
+       media-libs/portaudio
+       media-libs/taglib:=
+       media-sound/lame
+       virtual/libusb:1
+       virtual/udev
+       aac? (
+               media-libs/faad2
+               media-libs/libmp4v2
+       )
+       benchmark? (
+               dev-cpp/benchmark:=
+               dev-cpp/gtest:=
+               dev-util/google-perftools:=
+       )
+       ffmpeg? ( media-video/ffmpeg:= )
+       keyfinder? ( media-libs/libkeyfinder )
+       lv2? ( media-libs/lilv )
+       midi? ( media-libs/portmidi )
+       modplug? ( media-libs/libmodplug )
+       mp3? (
+               media-libs/libid3tag:=
+               media-libs/libmad
+       )
+       mp4? ( media-libs/libmp4v2 )
+       opus? (
+               media-libs/opus
+               media-libs/opusfile
+       )
+       qtkeychain? ( >=dev-libs/qtkeychain-0.14.2:=[qt6(+)] )
+       rubberband? ( media-libs/rubberband:= )
+       shout? ( dev-libs/openssl:= )
+       upower? (
+               dev-libs/glib:2
+               sys-power/upower:=
+       )
+       wavpack? ( media-sound/wavpack )
+       X? ( x11-libs/libX11 )
+"
+DEPEND="${RDEPEND}
+       dev-cpp/gtest
+       dev-cpp/ms-gsl
+"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+       # Fix strict-aliasing violations in vendored katai_cpp_stl_runtime
+       # 
https://github.com/kaitai-io/kaitai_struct_cpp_stl_runtime/commit/c01f530.patch
+       "${FILESDIR}"/${PN}-2.5.0-fix-strict-aliasing-kaitai.patch
+       # Try OpenGL::OpenGL first for X11-less system
+       # Make libX11 optional. Merged in main branch.
+       "${FILESDIR}"/${PN}-2.5.2-x11_opt.patch
+       # Fix colum header text asignment. From upstream.
+       "${FILESDIR}"/${P}-fix_col_headers.patch
+)
+
+CMAKE_SKIP_TESTS=(
+       # need HID controller
+       LegacyControllerMappingValidationTest.HidMappingsValid
+       # randomly fails
+       # https://github.com/mixxxdj/mixxx/issues/12554
+       EngineBufferE2ETest
+)
+
+src_configure() {
+       # prevent ld error as package builds static libs.
+       lto-guarantee-fat
+
+       local mycmakeargs=(
+               -DBATTERY="$(usex upower)"
+               -DBROADCAST="$(usex shout)"
+               -DBUILD_SHARED_LIBS=ON
+               -DBUILD_TESTING="$(usex test)"
+               -DBUILD_BENCH="$(usex benchmark)"
+               # prevent duplicate call
+               -DCCACHE_SUPPORT=OFF
+               -DCMAKE_DISABLE_FIND_PACKAGE_X11=$(usex !X)
+               -DENGINEPRIME=OFF
+               -DFAAD="$(usex aac)"
+               -DFFMPEG="$(usex ffmpeg)"
+               -DGPERFTOOLS="$(usex benchmark)"
+               -DGPERFTOOLSPROFILER="$(usex benchmark)"
+               -DHID=ON
+               -DINSTALL_USER_UDEV_RULES=OFF
+               -DKEYFINDER="$(usex keyfinder)"
+               -DLILV="$(usex lv2)"
+               -DMAD="$(usex mp3)"
+               -DMODPLUG="$(usex modplug)"
+               -DOPTIMIZE=OFF
+               -DOPUS="$(usex opus)"
+               -DPORTMIDI="$(usex midi)"
+               # new QML-UI, experimental and not functionnal for now
+               -DQML=OFF
+               -DQTKEYCHAIN="$(usex qtkeychain)"
+               -DRUBBERBAND="$(usex rubberband)"
+               -DVINYLCONTROL=ON
+               -DWAVPACK="$(usex wavpack)"
+       )
+
+       cmake_src_configure
+}
+
+src_install() {
+       cmake_src_install
+       use benchmark && dobin "${BUILD_DIR}"/mixxx-test
+       udev_newrules "${S}"/res/linux/mixxx-usb-uaccess.rules 
69-mixxx-usb-uaccess.rules
+}
+
+pkg_postinst() {
+       xdg_pkg_postinst
+       udev_reload
+
+       elog "Manuals are no longer part of the package."
+       elog "Please refer to https://downloads.mixxx.org/manual/ for 
up-to-date manuals."
+       if use benchmark; then
+               elog ""
+               elog "Launch benchmark : ${EROOT}/usr/bin/mixxx-test 
--benchmark"
+               elog "Launch Unittests : ${EROOT}/usr/bin/mixxx-test"
+               elog "Some test suites may not be available without source 
files."
+       fi
+}
+
+pkg_postrm() {
+       xdg_pkg_postrm
+       udev_reload
+}

Reply via email to