From f528815c332f51e266338f65336e9d85d134105b Mon Sep 17 00:00:00 2001 From: Matthew White Date: Tue, 1 Aug 2023 17:05:54 +0000 Subject: media-sound/audacity-3.3.3: version bump and new 9999 ebuild NOTE: Upstream planned the removal of libmad support with the merge of the https://github.com/audacity/audacity/pull/4384 PR. Closes: https://bugs.gentoo.org/906959 Closes: https://bugs.gentoo.org/910398 Package-Manager: portage-3.0.49-r1 Signed-off-by: Matteo Bianco Closes: https://github.com/gentoo/gentoo/pull/32129 Signed-off-by: Sam James --- .../audacity/files/audacity-3.3.3-Findlibmad.patch | 52 ++++++++++++ .../files/audacity-3.3.3-fix-includes.patch | 55 +++++++++++++ .../audacity/files/audacity-3.3.3-fix-rpaths.patch | 95 ++++++++++++++++++++++ .../files/audacity-3.3.3-gettext-0.22.patch | 27 ++++++ ...audacity-3.3.3-local-threadpool-libraries.patch | 30 +++++++ .../audacity-3.3.3-upstream-fix-rapidjson.patch | 60 ++++++++++++++ 6 files changed, 319 insertions(+) create mode 100644 media-sound/audacity/files/audacity-3.3.3-Findlibmad.patch create mode 100644 media-sound/audacity/files/audacity-3.3.3-fix-includes.patch create mode 100644 media-sound/audacity/files/audacity-3.3.3-fix-rpaths.patch create mode 100644 media-sound/audacity/files/audacity-3.3.3-gettext-0.22.patch create mode 100644 media-sound/audacity/files/audacity-3.3.3-local-threadpool-libraries.patch create mode 100644 media-sound/audacity/files/audacity-3.3.3-upstream-fix-rapidjson.patch (limited to 'media-sound/audacity/files') diff --git a/media-sound/audacity/files/audacity-3.3.3-Findlibmad.patch b/media-sound/audacity/files/audacity-3.3.3-Findlibmad.patch new file mode 100644 index 000000000000..9bf4176a39e0 --- /dev/null +++ b/media-sound/audacity/files/audacity-3.3.3-Findlibmad.patch @@ -0,0 +1,52 @@ +From b42dfbe2be1994ccfeff449b5c5cbe49994ffb38 Mon Sep 17 00:00:00 2001 +From: Matthew White +Date: Fri, 14 Jul 2023 21:17:45 +0000 +Subject: [PATCH] Add missing Findlibmad.cmake file + +This fixes compiling against the system installed libmad. +--- + cmake-proxies/cmake-modules/Findlibmad.cmake | 35 ++++++++++++++++++++ + 1 file changed, 35 insertions(+) + create mode 100644 cmake-proxies/cmake-modules/Findlibmad.cmake + +diff --git a/cmake-proxies/cmake-modules/Findlibmad.cmake b/cmake-proxies/cmake-modules/Findlibmad.cmake +new file mode 100644 +index 000000000000..0858c2d93e24 +--- /dev/null ++++ b/cmake-proxies/cmake-modules/Findlibmad.cmake +@@ -0,0 +1,35 @@ ++#[[ ++A module to look for libmad ++]] ++ ++if( NOT libmad_FOUND ) ++ find_path( libmad_INCLUDE_DIR mad.h ) ++ find_library( libmad_LIBRARIES NAMES mad ) ++ ++ if( libmad_INCLUDE_DIR AND libmad_LIBRARIES ) ++ set( libmad_FOUND Yes ) ++ endif() ++ ++ if( libmad_FOUND ) ++ if( NOT libmad_FIND_QUIETLY ) ++ message( STATUS "Found mad: \n\tlibmad_INCLUDE_DIR: ${libmad_INCLUDE_DIR}\n\tlibmad_LIBRARIES: ${libmad_LIBRARIES}" ) ++ endif() ++ ++ if( NOT TARGET libmad::libmad ) ++ add_library( libmad::libmad INTERFACE IMPORTED GLOBAL) ++ ++ target_include_directories( libmad::libmad INTERFACE ${libmad_INCLUDE_DIR} ) ++ target_link_libraries( libmad::libmad INTERFACE ${libmad_LIBRARIES} ) ++ endif() ++ else() ++ if( libmad_FIND_REQUIRED ) ++ message( FATAL_ERROR "Could not find libmad") ++ endif() ++ endif() ++ ++ mark_as_advanced( ++ libmad_FOUND ++ libmad_INCLUDE_DIR ++ libmad_LIBRARIES ++ ) ++endif() diff --git a/media-sound/audacity/files/audacity-3.3.3-fix-includes.patch b/media-sound/audacity/files/audacity-3.3.3-fix-includes.patch new file mode 100644 index 000000000000..2e8685a09a3f --- /dev/null +++ b/media-sound/audacity/files/audacity-3.3.3-fix-includes.patch @@ -0,0 +1,55 @@ +From 78ef36996c348b1c47f75e9885a56ac46b0aeec1 Mon Sep 17 00:00:00 2001 +From: Matthew White +Date: Fri, 14 Jul 2023 21:08:52 +0000 +Subject: [PATCH] Fix ImportMP3_MAD and ImportQT include directives + +This fixes 'file not found' errors. +--- + src/import/ImportMP3_MAD.cpp | 6 +++--- + src/import/ImportQT.cpp | 8 ++++---- + 2 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/src/import/ImportMP3_MAD.cpp b/src/import/ImportMP3_MAD.cpp +index fa26eaca49dd..9e6dfdf3a534 100644 +--- a/src/import/ImportMP3_MAD.cpp ++++ b/src/import/ImportMP3_MAD.cpp +@@ -62,10 +62,10 @@ static Importer::RegisteredUnusableImportPlugin registered + #include + + #include "Prefs.h" +-#include "../Tags.h" ++#include "Tags.h" + #include "WaveTrack.h" +-#include "../widgets/AudacityMessageBox.h" +-#include "../widgets/ProgressDialog.h" ++#include "AudacityMessageBox.h" ++#include "ProgressDialog.h" + + // PRL: include these last, + // and correct some preprocessor namespace pollution from wxWidgets that +diff --git a/src/import/ImportQT.cpp b/src/import/ImportQT.cpp +index f931b5a63fc1..5b49c1630b7f 100644 +--- a/src/import/ImportQT.cpp ++++ b/src/import/ImportQT.cpp +@@ -17,8 +17,8 @@ + + #include "Import.h" + #include "ImportPlugin.h" +-#include "../widgets/AudacityMessageBox.h" +-#include "../widgets/ProgressDialog.h" ++#include "AudacityMessageBox.h" ++#include "ProgressDialog.h" + + #define DESC XO("QuickTime files") + +@@ -76,8 +76,8 @@ static Importer::RegisteredUnusableImportPlugin registered{ + // There's a name collision between our Track and QuickTime's...workaround it + #undef Track + +-#include "../Tags.h" +-#include "../WaveTrack.h" ++#include "Tags.h" ++#include "WaveTrack.h" + + #define kQTAudioPropertyID_MaxAudioSampleSize 'mssz' + diff --git a/media-sound/audacity/files/audacity-3.3.3-fix-rpaths.patch b/media-sound/audacity/files/audacity-3.3.3-fix-rpaths.patch new file mode 100644 index 000000000000..b3fcdb85b022 --- /dev/null +++ b/media-sound/audacity/files/audacity-3.3.3-fix-rpaths.patch @@ -0,0 +1,95 @@ +This is an adapted version of: + +From: Benjamin Drung +Date: Thu, 22 Sep 2022 19:52:43 +0200 +Subject: Fix rpath for private libraries on Linux + +Fixes: https://github.com/audacity/audacity/issues/3289 +Forwarded: https://github.com/audacity/audacity/pull/3671 +[1] https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling#caveats + +diff -Nuar a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2023-06-08 15:17:02.000000000 +0200 ++++ b/CMakeLists.txt 2023-07-14 01:18:46.452163033 +0200 +@@ -412,6 +412,7 @@ + set( _LIBDIR "${CMAKE_INSTALL_LIBDIR}" ) + set( _DATADIR "${CMAKE_INSTALL_DATADIR}" ) + set( _PKGLIB "${_LIBDIR}/audacity" ) ++set( _PKGMODULE "${_PKGLIB}/modules" ) + set( _PKGDATA "${_DATADIR}/audacity/" ) + set( _MANDIR "${CMAKE_INSTALL_MANDIR}" ) + set( _MODDIR "${_PKGLIB}/modules" ) +diff -Nuar a/cmake-proxies/cmake-modules/AudacityFunctions.cmake b/cmake-proxies/cmake-modules/AudacityFunctions.cmake +--- a/cmake-proxies/cmake-modules/AudacityFunctions.cmake 2023-06-08 15:17:02.000000000 +0200 ++++ b/cmake-proxies/cmake-modules/AudacityFunctions.cmake 2023-07-14 01:23:42.025628702 +0200 +@@ -338,6 +338,17 @@ + set( "${var}" "${node}" PARENT_SCOPE ) + endfunction() + ++# Call install(TARGETS...) only on Linux systems (i.e. exclude MacOS and Windows) ++macro( install_target_linux target destination ) ++ if( NOT "${CMAKE_GENERATOR}" MATCHES "Xcode|Visual Studio*" AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin" ) ++ install( TARGETS "${target}" DESTINATION "${destination}" ) ++ endif() ++endmacro() ++ ++macro( install_audacity_module target ) ++ install_target_linux( "${target}" "${_PKGMODULE}" ) ++endmacro() ++ + define_property(TARGET PROPERTY AUDACITY_GRAPH_DEPENDENCIES + BRIEF_DOCS + "Propagates information used in generating a target dependency diagram" +@@ -420,6 +431,13 @@ + list( APPEND GRAPH_EDGES "\"${TARGET}\" -> \"${IMPORT}\" ${attributes}" ) + endforeach() + set( GRAPH_EDGES "${GRAPH_EDGES}" PARENT_SCOPE ) ++ ++ # Note: Some modules set EXCLUDE_FROM_ALL afterwards to not be installed. ++ # Therefore only install libraries, but not modules here. ++ if( NOT REAL_LIBTYPE STREQUAL "MODULE" ) ++ install_target_linux( "${TARGET}" "${_PKGLIB}" ) ++ endif() ++ + endfunction() + + function ( make_interface_alias TARGET REAL_LIBTYTPE ) +@@ -487,6 +505,7 @@ + PROPERTIES + PREFIX "" + FOLDER "modules" # for IDE organization ++ INSTALL_RPATH "$ORIGIN/.." + ) + + if( NOT CMAKE_SYSTEM_NAME MATCHES "Windows|Darwin" ) +@@ -501,6 +520,7 @@ + PROPERTIES + PREFIX "" + FOLDER "libraries" # for IDE organization ++ INSTALL_RPATH "$ORIGIN" + ) + + if( NOT CMAKE_SYSTEM_NAME MATCHES "Windows|Darwin" ) +diff -Nuar a/modules/mod-script-pipe/CMakeLists.txt b/modules/mod-script-pipe/CMakeLists.txt +--- a/modules/mod-script-pipe/CMakeLists.txt 2023-06-08 15:17:02.000000000 +0200 ++++ b/modules/mod-script-pipe/CMakeLists.txt 2023-07-14 01:25:10.730068564 +0200 +@@ -15,3 +15,4 @@ + ) + audacity_module( mod-script-pipe "${SOURCES}" "Audacity" + "${DEFINES}" "" ) ++install_audacity_module( mod-script-pipe ) +diff -Nuar a/src/CMakeLists.txt b/src/CMakeLists.txt +--- a/src/CMakeLists.txt 2023-06-08 15:17:02.000000000 +0200 ++++ b/src/CMakeLists.txt 2023-07-14 01:26:23.098427419 +0200 +@@ -1557,11 +1557,6 @@ + RUNTIME + RESOURCE DESTINATION "${_PKGDATA}" ) + +- install( DIRECTORY "${_DEST}/${_LIBDIR}/" +- DESTINATION "${_LIBDIR}" +- USE_SOURCE_PERMISSIONS +- FILES_MATCHING PATTERN "*.so*" ) +- + install( FILES "${_INTDIR}/audacity.desktop" + DESTINATION "${_DATADIR}/applications" ) + install( FILES "${topdir}/LICENSE.txt" "${topdir}/README.md" diff --git a/media-sound/audacity/files/audacity-3.3.3-gettext-0.22.patch b/media-sound/audacity/files/audacity-3.3.3-gettext-0.22.patch new file mode 100644 index 000000000000..9dad40d3e9e1 --- /dev/null +++ b/media-sound/audacity/files/audacity-3.3.3-gettext-0.22.patch @@ -0,0 +1,27 @@ +This is an adapted version of: + +https://bugs.gentoo.org/909201 +upstream fix: https://github.com/audacity/audacity/pull/4866 + +--- a/locale/be.po ++++ b/locale/be.po +@@ -3097,7 +3097,7 @@ + #: src/FileFormats.cpp + #, c-format + msgid "Error (file may not have been written): %s" +-msgstr "Памылка (магчыма, файл не запісаны): %hs" ++msgstr "Памылка (магчыма, файл не запісаны): %s" + + #: src/FileFormats.cpp + #, fuzzy +--- a/locale/fa.po ++++ b/locale/fa.po +@@ -3053,7 +3053,7 @@ + #: src/FileFormats.cpp + #, c-format + msgid "Error (file may not have been written): %s" +-msgstr "خطا (ممکن است در پرونده نوشته شده باشد) : %hs" ++msgstr "خطا (ممکن است در پرونده نوشته شده باشد) : %s" + + #: src/FileFormats.cpp + msgid "&Copy uncompressed files into the project (safer)" diff --git a/media-sound/audacity/files/audacity-3.3.3-local-threadpool-libraries.patch b/media-sound/audacity/files/audacity-3.3.3-local-threadpool-libraries.patch new file mode 100644 index 000000000000..a3ef6cf3859d --- /dev/null +++ b/media-sound/audacity/files/audacity-3.3.3-local-threadpool-libraries.patch @@ -0,0 +1,30 @@ +This is an adapted version of: + +From 7b5f56ec441fb472b61bae14e1efa353db4d7aca Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= +Date: Sun, 18 Dec 2022 13:37:35 +0100 +Subject: [PATCH] Allow using local dependency for threadpool + +diff -Nuar a/cmake-proxies/cmake-modules/DependenciesList.cmake b/cmake-proxies/cmake-modules/DependenciesList.cmake +--- a/cmake-proxies/cmake-modules/DependenciesList.cmake 2023-07-14 03:40:22.518292749 +0200 ++++ b/cmake-proxies/cmake-modules/DependenciesList.cmake 2023-07-14 03:40:43.790398232 +0200 +@@ -56,7 +56,6 @@ + audacity_find_package(PortAudio REQUIRED) + + if( ${_OPT}has_networking ) +- audacity_find_package(ThreadPool REQUIRED) + audacity_find_package(CURL REQUIRED CONAN_PACKAGE_NAME libcurl) + endif() + +diff -Nuar a/libraries/lib-network-manager/CMakeLists.txt b/libraries/lib-network-manager/CMakeLists.txt +--- a/libraries/lib-network-manager/CMakeLists.txt 2023-07-14 03:38:42.061794613 +0200 ++++ b/libraries/lib-network-manager/CMakeLists.txt 2023-07-14 03:38:27.913724456 +0200 +@@ -43,4 +43,8 @@ + + set ( DEFINES INTERFACE "HAS_NETWORKING" ) + ++add_library ( threadpool::threadpool INTERFACE IMPORTED GLOBAL ) ++target_include_directories ( threadpool::threadpool INTERFACE ++ ${CMAKE_SOURCE_DIR}/lib-src/threadpool ++) + audacity_library( ${TARGET} "${SOURCES}" "${LIBRARIES}" "${DEFINES}" "" ) diff --git a/media-sound/audacity/files/audacity-3.3.3-upstream-fix-rapidjson.patch b/media-sound/audacity/files/audacity-3.3.3-upstream-fix-rapidjson.patch new file mode 100644 index 000000000000..cb9da30bf423 --- /dev/null +++ b/media-sound/audacity/files/audacity-3.3.3-upstream-fix-rapidjson.patch @@ -0,0 +1,60 @@ +From 6edaa3f26b34adc65c109c1a5a85923e04330e2d Mon Sep 17 00:00:00 2001 +From: Dmitry Vedenko +Date: Mon, 7 Aug 2023 17:12:49 +0300 +Subject: [PATCH] Fixes RapidJSON missing from Linux builds + +--- + .../cmake-modules/dependencies/rapidjson.cmake | 15 +++++++++++++-- + linux/packages/arch/dependencies.sh | 1 + + linux/packages/fedora34/dependencies.sh | 1 + + 3 files changed, 15 insertions(+), 2 deletions(-) + +diff --git a/cmake-proxies/cmake-modules/dependencies/rapidjson.cmake b/cmake-proxies/cmake-modules/dependencies/rapidjson.cmake +index c44aad81b8e4..ba95962a6eb6 100644 +--- a/cmake-proxies/cmake-modules/dependencies/rapidjson.cmake ++++ b/cmake-proxies/cmake-modules/dependencies/rapidjson.cmake +@@ -1,7 +1,18 @@ + # CCI pakage appears to set the wrong value for the `cmake_target_name` + +-if(${_OPT}use_rapidjson STREQUAL "local") ++if(NOT ${_OPT}use_rapidjson STREQUAL "off") + if(NOT TARGET rapidjson::rapidjson) +- add_library( rapidjson::rapidjson ALIAS rapidjson ) ++ if(TARGET rapidjson) ++ add_library( rapidjson::rapidjson ALIAS rapidjson ) ++ else() ++ # At least on Arch RapidJSONConfig.cmake does not define a target at all ++ # so we have to do it ourselves ++ add_library( rapidjson::rapidjson INTERFACE IMPORTED GLOBAL) ++ if (RAPIDJSON_INCLUDE_DIRS ) ++ target_include_directories( rapidjson::rapidjson INTERFACE ${RAPIDJSON_INCLUDE_DIRS} ) ++ elseif(RapidJSON_INCLUDE_DIR) ++ target_include_directories( rapidjson::rapidjson INTERFACE ${RapidJSON_INCLUDE_DIR} ) ++ endif() ++ endif() + endif() + endif() +diff --git a/linux/packages/arch/dependencies.sh b/linux/packages/arch/dependencies.sh +index d34012442efd..8aa8792057d4 100755 +--- a/linux/packages/arch/dependencies.sh ++++ b/linux/packages/arch/dependencies.sh +@@ -44,6 +44,7 @@ deps=( + wavpack + wxwidgets-gtk3 + vst3sdk ++ rapidjson + ) + + pacman -Syu --noconfirm \ +diff --git a/linux/packages/fedora34/dependencies.sh b/linux/packages/fedora34/dependencies.sh +index 8f6ce8ff2eb8..1e039612b095 100755 +--- a/linux/packages/fedora34/dependencies.sh ++++ b/linux/packages/fedora34/dependencies.sh +@@ -54,6 +54,7 @@ deps=( + mesa-libEGL-devel + mpg123-devel + wavpack-devel ++ rapidjson + ) + + dnf install -y \ -- cgit v1.2.3-65-gdbad