mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
kmix: update to 24.02.2.
This commit is contained in:
parent
dfe5a96cd3
commit
ca1357d03a
2 changed files with 7 additions and 159 deletions
|
@ -1,156 +0,0 @@
|
||||||
From 917774de0d42632827671acc821888e15e87fc2b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Piotr Wójcik <chocimier@tlen.pl>
|
|
||||||
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 <jonathan.marten@kdemail.net>
|
|
||||||
+ * Copyright (C) 2023 Piotr Wójcik <chocimier@tlen.pl>
|
|
||||||
*
|
|
||||||
* 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 <jonathan.marten@kdemail.net>
|
|
||||||
+ * Copyright (C) 2023 Piotr Wójcik <chocimier@tlen.pl>
|
|
||||||
+ *
|
|
||||||
+ * 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 <stdio.h>
|
|
||||||
+#ifdef HAVE_SOUNDCARD_H
|
|
||||||
+#include <soundcard.h>
|
|
||||||
+#else
|
|
||||||
+#ifdef HAVE_SYS_SOUNDCARD_H
|
|
||||||
+#include <sys/soundcard.h>
|
|
||||||
+#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
|
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
# Template file for 'kmix'
|
# Template file for 'kmix'
|
||||||
pkgname=kmix
|
pkgname=kmix
|
||||||
version=23.08.5
|
version=24.02.2
|
||||||
revision=1
|
revision=1
|
||||||
build_style=cmake
|
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
|
hostmakedepends="extra-cmake-modules pkg-config qt5-qmake qt5-host-tools
|
||||||
kdoctools kcoreaddons kconfig gettext"
|
kdoctools kcoreaddons kconfig gettext"
|
||||||
makedepends="plasma-framework-devel kinit-devel alsa-lib-devel pulseaudio-devel
|
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/"
|
homepage="https://www.kde.org/applications/multimedia/kmix/"
|
||||||
changelog="https://kde.org/announcements/changelogs/gear/${version}/#kmix"
|
changelog="https://kde.org/announcements/changelogs/gear/${version}/#kmix"
|
||||||
distfiles="${KDE_SITE}/release-service/${version}/src/kmix-${version}.tar.xz"
|
distfiles="${KDE_SITE}/release-service/${version}/src/kmix-${version}.tar.xz"
|
||||||
checksum=8671aca9dbe50c82885c2b346461488dc491645eb09728fa75c33492e42c8180
|
checksum=83841126e8c2ff56038282ddefc200f7bac70eb607a56a971155f42f5ab856b0
|
||||||
|
|
Loading…
Add table
Reference in a new issue