From ca1357d03a3f36da678863c7dcc65b728d875b04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sun, 19 May 2024 09:33:15 +0700 Subject: [PATCH] kmix: update to 24.02.2. --- .../23.08.0--oss-version-detection.patch | 156 ------------------ srcpkgs/kmix/template | 10 +- 2 files changed, 7 insertions(+), 159 deletions(-) delete mode 100644 srcpkgs/kmix/patches/23.08.0--oss-version-detection.patch diff --git a/srcpkgs/kmix/patches/23.08.0--oss-version-detection.patch b/srcpkgs/kmix/patches/23.08.0--oss-version-detection.patch deleted file mode 100644 index 8e9792afa57..00000000000 --- a/srcpkgs/kmix/patches/23.08.0--oss-version-detection.patch +++ /dev/null @@ -1,156 +0,0 @@ -From 917774de0d42632827671acc821888e15e87fc2b Mon Sep 17 00:00:00 2001 -From: Piotr Wójcik -Date: Sat, 9 Sep 2023 13:31:56 +0200 -Subject: oss-version-detection - - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index ca9d7af..5c7c81d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -112,21 +112,21 @@ if (HAVE_SOUNDCARD_H OR HAVE_SYS_SOUNDCARD_H) - add_definitions(-DHAVE_SYS_SOUNDCARD_H) - endif () - -- # Running a program is hopefully more reliable than trying to -- # grep through header files to find a definition. Need try_run() -- # here so as to be able to read the output result. -- try_run(TEST_RUN_RESULT TEST_COMPILE_RESULT -+ # Comparing with preprocessor is hopefully more reliable than trying to -+ # grep through header files to find a definition. Unlike try_run(), -+ # causes no problem for cross-compilation. -+ try_compile(OSS3_COMPILE_RESULT - ${CMAKE_CURRENT_BINARY_DIR} -- SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/ossversion.c -- COMPILE_DEFINITIONS "${TEST_COMPILE_FLAGS}" -- RUN_OUTPUT_VARIABLE TEST_RESULT_VERSION) -- #message(STATUS "TEST_RUN_RESULT= ${TEST_RUN_RESULT}") -- #message(STATUS "TEST_COMPILE_RESULT= ${TEST_COMPILE_RESULT}") -- #message(STATUS "TEST_RESULT_VERSION= ${TEST_RESULT_VERSION}") -- -- if (${TEST_COMPILE_RESULT} AND (${TEST_RUN_RESULT} EQUAL 0)) -- message(STATUS "Detected OSS version ${TEST_RESULT_VERSION}") -- if (${TEST_RESULT_VERSION} GREATER_EQUAL 0x040000) -+ SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/cmake/ossversion3.c -+ COMPILE_DEFINITIONS "${TEST_COMPILE_FLAGS}") -+ try_compile(OSS4_COMPILE_RESULT -+ ${CMAKE_CURRENT_BINARY_DIR} -+ SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/cmake/ossversion4.c -+ COMPILE_DEFINITIONS "${TEST_COMPILE_FLAGS}") -+ #message(STATUS "OSS3_COMPILE_RESULT= ${OSS3_COMPILE_RESULT}") -+ #message(STATUS "OSS4_COMPILE_RESULT= ${OSS4_COMPILE_RESULT}") -+ -+ if (${OSS4_COMPILE_RESULT}) - message(STATUS "Building with OSS 4 support") - set(HAVE_OSS_4 true) - add_definitions(-DHAVE_OSS_4) -@@ -137,20 +137,19 @@ if (HAVE_SOUNDCARD_H OR HAVE_SYS_SOUNDCARD_H) - # to have sys/soundcard.h and not soundcard.h installed. - check_struct_has_member(oss_mixerinfo devnode sys/soundcard.h HAVE_MIXERINFO_DEVNODE) - if (HAVE_MIXERINFO_DEVNODE) -- add_definitions(-DHAVE_MIXERINFO_DEVNODE) -+ add_definitions(-DHAVE_MIXERINFO_DEVNODE) - endif () -- else () -+ elseif (${OSS3_COMPILE_RESULT}) - message(STATUS "Building with OSS 3 support") - set(HAVE_OSS_3 true) - add_definitions(-DHAVE_OSS_3) - set(SUPPORTED_BACKENDS ${SUPPORTED_BACKENDS} "OSS") -+ else () -+ message(STATUS "Unable to get OSS version, assuming 3") -+ set(HAVE_OSS_3 true) -+ add_definitions(-DHAVE_OSS_3) -+ set(SUPPORTED_BACKENDS ${SUPPORTED_BACKENDS} "OSS") - endif () -- else () -- message(STATUS "Unable to get OSS version, assuming 3") -- set(HAVE_OSS_3 true) -- add_definitions(-DHAVE_OSS_3) -- set(SUPPORTED_BACKENDS ${SUPPORTED_BACKENDS} "OSS") -- endif () - endif () - - # PulseAudio, optional -diff --git a/ossversion.c b/cmake/ossversion3.c -similarity index 83% -rename from ossversion.c -rename to cmake/ossversion3.c -index 8ab612e..e3a5ff1 100644 ---- a/ossversion.c -+++ b/cmake/ossversion3.c -@@ -2,6 +2,7 @@ - * KMix -- KDE's full featured mini mixer - * - * Copyright (C) 2023 Jonathan Marten -+ * Copyright (C) 2023 Piotr Wójcik - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public -@@ -27,8 +28,14 @@ - #endif - #endif - -+ -+#if SOUND_VERSION < 0x030000 -+#error "SOUND_VERSION < 0x030000" -+#endif -+#if 0x040000 <= SOUND_VERSION -+#error "0x040000 <= SOUND_VERSION" -+#endif -+ - int main() - { -- printf("0x%06X", SOUND_VERSION); -- return (0); - } -diff --git a/cmake/ossversion4.c b/cmake/ossversion4.c -new file mode 100644 -index 0000000..637d894 ---- /dev/null -+++ b/cmake/ossversion4.c -@@ -0,0 +1,41 @@ -+/* -+ * KMix -- KDE's full featured mini mixer -+ * -+ * Copyright (C) 2023 Jonathan Marten -+ * Copyright (C) 2023 Piotr Wójcik -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Library General Public -+ * License as published by the Free Software Foundation; either -+ * version 2 of the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Library General Public License for more details. -+ * -+ * You should have received a copy of the GNU Library General Public -+ * License along with this program; if not, write to the Free -+ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+ */ -+ -+#include -+#ifdef HAVE_SOUNDCARD_H -+#include -+#else -+#ifdef HAVE_SYS_SOUNDCARD_H -+#include -+#endif -+#endif -+ -+ -+#if SOUND_VERSION < 0x040000 -+#error "SOUND_VERSION < 0x040000" -+#endif -+#if 0x050000 <= SOUND_VERSION -+#error "0x050000 <= SOUND_VERSION" -+#endif -+ -+int main() -+{ -+} --- -2.41.0 - diff --git a/srcpkgs/kmix/template b/srcpkgs/kmix/template index b571e662fa8..b8dbe294b85 100644 --- a/srcpkgs/kmix/template +++ b/srcpkgs/kmix/template @@ -1,9 +1,13 @@ # Template file for 'kmix' pkgname=kmix -version=23.08.5 +version=24.02.2 revision=1 build_style=cmake -configure_args="-DSYSCONF_INSTALL_DIR=/etc -DDESKTOPTOJSON_EXECUTABLE=/usr/bin/desktoptojson" +configure_args="-DSYSCONF_INSTALL_DIR=/etc + -DBUILD_TESTING=OFF -DKF6_HOST_TOOLING=/usr/lib/cmake + -DKDE_INSTALL_QTPLUGINDIR=lib/qt6/plugins + -DKDE_INSTALL_QMLDIR=lib/qt6/qml + -DECM_MKSPECS_INSTALL_DIR=/usr/lib/qt6/mkspecs/modules" hostmakedepends="extra-cmake-modules pkg-config qt5-qmake qt5-host-tools kdoctools kcoreaddons kconfig gettext" makedepends="plasma-framework-devel kinit-devel alsa-lib-devel pulseaudio-devel @@ -14,4 +18,4 @@ license="GPL-2.0-or-later, LGPL-2.0-or-later, GFDL-1.2-only" homepage="https://www.kde.org/applications/multimedia/kmix/" changelog="https://kde.org/announcements/changelogs/gear/${version}/#kmix" distfiles="${KDE_SITE}/release-service/${version}/src/kmix-${version}.tar.xz" -checksum=8671aca9dbe50c82885c2b346461488dc491645eb09728fa75c33492e42c8180 +checksum=83841126e8c2ff56038282ddefc200f7bac70eb607a56a971155f42f5ab856b0