diff --git a/.gitignore b/.gitignore index c4e8266..2e8e404 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,7 @@ /audacity-manual-3.0.0.zip /audacity-minsrc-3.0.2.tar.xz /audacity-manual-3.0.2.zip +/audacity-3.1.2-source.tar.gz +/audacity-manual-3.1.2.tar.gz +/audacity-manual-3.1.3.tar.gz +/audacity-3.1.3-source.tar.gz diff --git a/audacity.spec b/audacity.spec index 1d5bd92..7ea4b30 100644 --- a/audacity.spec +++ b/audacity.spec @@ -6,34 +6,34 @@ #global commit0 53a5c930a4b5b053ab06a8b975458fc51cf41f6c #global shortcommit0 #(c=#{commit0}; echo ${c:0:7}) -# Disable rpath checking until upstream fixes the rpath: https://github.com/audacity/audacity/issues/1008 -%global __brp_check_rpaths %{nil} +# Ignore these libraries because they are internal-only and should never be exposed in the RPM database +%global __requires_exclude ^lib-audio-devices.so|^lib-basic-ui.so|^lib-components.so|^lib-exceptions.so|^lib-ffmpeg-support.so|^lib-files.so|^lib-math.so|^lib-preferences.so|^lib-project-rate.so|^lib-project.so|^lib-registries.so|^lib-screen-geometry.so|^lib-string-utils.so|^lib-strings.so|^lib-theme.so|^lib-utility.so|^lib-uuid.so|^lib-xml.so +%global __provides_exclude ^lib-audio-devices.so|^lib-basic-ui.so|^lib-components.so|^lib-exceptions.so|^lib-ffmpeg-support.so|^lib-files.so|^lib-math.so|^lib-preferences.so|^lib-project-rate.so|^lib-project.so|^lib-registries.so|^lib-screen-geometry.so|^lib-string-utils.so|^lib-strings.so|^lib-theme.so|^lib-utility.so|^lib-uuid.so|^lib-xml.so Name: audacity -Version: 3.0.2 -Release: 6%{?dist} +Version: 3.1.3 +Release: 1%{?dist} Summary: Multitrack audio editor License: GPLv2 URL: https://www.audacityteam.org/ -Source0: http://www.fosshub.com/Audacity.html/%{name}-minsrc-%{version}.tar.xz -# For alpha git snapshots for testing use the github archive as upstream source: -#Source0: https://github.com/audacity/#{name}/archive/#{commit0}/#{name}-#{commit0}.tar.gz -# ie wget https://github.com/audacity/audacity/archive/ecdb1d81c9312789c6233aba2190572344b22188/audacity-ecdb1d81c9312789c6233aba2190572344b22188.tar.gz +Source0: https://github.com/audacity/audacity/releases/download/Audacity-%{version}/%{name}-%{version}-source.tar.gz +Source1: https://github.com/audacity/audacity/releases/download/Audacity-%{version}/%{name}-manual-%{version}.tar.gz -%define tartopdir audacity-minsrc-%{version} -#define tartopdir audacity-#{commit0} +# Use the X11 backend in GTK to make the waveform viewer work properly (RHBZ: 2024019) +Patch0: gdk_x11_backend.patch -Source1: http://www.fosshub.com/Audacity.html/%{name}-manual-%{version}.zip +# Needed because the build system is trying to use the libjpeg-turbo-devel package when it really shouldn't +# Reported upstream https://github.com/audacity/audacity/issues/2210 +Patch1: wx_lib_fix.patch -Patch0: system-wx.patch +Patch2: fix_data_path.patch -# Fix CMake find of the Jack module (RHBZ 1972963) - Remove for 3.0.3 (backported from master branch - https://github.com/audacity/audacity/commit/b4b5cc812483b311627bba48e26b91ae389ce713) -Patch1: find-jack.patch - -# Fix CVE-2020-1867 - Remove for 3.0.3 (backported from https://github.com/audacity/audacity/pull/700) -Patch2: permissions-fix.patch +# Patches needed to compile against wxWidgets 3.1.6. +# Sent upstream in https://github.com/audacity/audacity/pull/2776 +Patch3: wx316_bitmaps.patch +Patch4: wx316_customLanguages.patch BuildRequires: cmake BuildRequires: gettext-devel @@ -43,6 +43,7 @@ BuildRequires: devtoolset-7-toolchain, devtoolset-7-libatomic-devel %endif BuildRequires: gcc BuildRequires: gcc-c++ +BuildRequires: chrpath BuildRequires: alsa-lib-devel BuildRequires: desktop-file-utils @@ -63,10 +64,12 @@ BuildRequires: twolame-devel BuildRequires: libogg-devel BuildRequires: libsndfile-devel BuildRequires: libvorbis-devel +BuildRequires: libuuid-devel BuildRequires: portaudio-devel >= 19-16 BuildRequires: portmidi-devel BuildRequires: soundtouch-devel BuildRequires: soxr-devel +BuildRequires: sqlite-devel >= 3.32 BuildRequires: vamp-plugin-sdk-devel >= 2.0 BuildRequires: zip BuildRequires: zlib-devel @@ -99,6 +102,9 @@ BuildRequires: suil-devel >= 0.10.6 # For new symbols in portaudio Requires: portaudio%{?_isa} >= 19-16 +# We force the GDK backend to be X11 in the launcher, so we need to ensure we have Xwayland available +Requires: xorg-x11-server-Xwayland + ExcludeArch: s390x %description @@ -121,13 +127,13 @@ For the most up to date manual content, use the on-line manual. %prep -%setup -q -n %{tartopdir} +%setup -q -n Audacity-%{version}-Source %patch0 -p0 - -# Remove both for 3.0.3 -%patch1 -p1 -%patch2 -p0 +%patch1 -p0 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 %build %if 0%{?rhel} == 7 @@ -138,17 +144,20 @@ export WX_CONFIG=wx-config-3.0 . /opt/rh/devtoolset-7/enable %endif -%if (0%{?fedora} && 0%{?fedora} < 33) -mkdir build -cd build %cmake \ - .. \ -%else -# Need bundled sqlite for now (RHBZ: 1973455) -%cmake \ -%endif - -Daudacity_use_sqlite=local \ - -Daudacity_use_sndfile=system \ + -DwxWidgets_CONFIG_EXECUTABLE="$(which wx-config-3.1)" \ + -DAUDACITY_BUILD_LEVEL:STRING=2 \ + -Daudacity_conan_enabled=Off \ + -Daudacity_has_networking=Off \ + -Daudacity_has_crashreports=Off \ + -Daudacity_has_updates_check=Off \ + -Daudacity_has_sentry_reporting=Off \ + -Daudacity_lib_preference=system \ + -Daudacity_obey_system_dependencies=On \ + -Daudacity_use_wxwidgets=system \ + -Daudacity_use_uuid=system \ + -Daudacity_use_sqlite=system \ + -Daudacity_use_libsndfile=system \ -Daudacity_use_soxr=system \ -Daudacity_use_lame=system \ %if 0%{?rhel} == 8 @@ -156,17 +165,17 @@ cd build %else -Daudacity_use_twolame=system \ %endif - -Daudacity_use_flac=system \ + -Daudacity_use_libflac=system \ -Daudacity_use_ladspa=on \ - -Daudacity_use_vorbis=system \ - -Daudacity_use_id3tag=system \ + -Daudacity_use_libvorbis=system \ + -Daudacity_use_libid3tag=system \ -Daudacity_use_expat=system \ -Daudacity_use_soundtouch=system \ -Daudacity_use_vamp=system \ -Daudacity_use_lv2=system \ - -Daudacity_use_portaudio=local \ + -Daudacity_use_portaudio=system \ -Daudacity_use_midi=system \ - -Daudacity_use_ogg=system \ + -Daudacity_use_libogg=system \ %if %{with ffmpeg} %if ! %{with local_ffmpeg} -Daudacity_use_ffmpeg=loaded \ @@ -174,22 +183,47 @@ cd build %else -Daudacity_use_ffmpeg=off \ %endif + -Daudacity_use_portsmf=local \ + -Daudacity_use_sbsms=local \ %cmake_build %install -%if (0%{?fedora} && 0%{?fedora} < 33) -cd build -%endif - %cmake_install -%if (0%{?fedora} && 0%{?fedora} < 33) -cd - -%endif +rm -Rf %{buildroot}%{_datadir}/%{name}/include +rm -Rf %{buildroot}%{_bindir}/../%{name} + +# Remove the RPATH from all the private libraries provided with Audacity and +# make them all executable so that debug symbol extraction happens. +# CMake could do this on its own using the install target for the library, +# but the Audacity build system manually copies around the libraries so it +# doesn't use the install target. This is very involved to fix in the code, +# so this work around is easier and more maintainable than patching the build +# system. +pushd %{buildroot}%{_libdir}/%{name} +for libFile in *; +do + if [[ ! -d $libFile ]]; + then + chrpath --delete $libFile + chmod 755 $libFile + fi +done +popd + +pushd %{buildroot}%{_libdir}/%{name}/modules +for libFile in *; +do + if [[ ! -d $libFile ]]; + then + chrpath --delete $libFile + chmod 755 $libFile + fi +done +popd -rm -Rf $RPM_BUILD_ROOT%{_datadir}/%{name}/include %if 0%{?rhel} >= 8 || 0%{?fedora} if appstream-util --help | grep -q replace-screenshots ; then @@ -199,20 +233,20 @@ if appstream-util --help | grep -q replace-screenshots ; then # # See http://people.freedesktop.org/~hughsient/appdata/#screenshots for more details. # -appstream-util replace-screenshots $RPM_BUILD_ROOT%{_datadir}/appdata/audacity.appdata.xml \ +appstream-util replace-screenshots %{buildroot}%{_metainfodir}/audacity.appdata.xml \ https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/audacity/a.png fi %endif -mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}/help/manual -# audacity manual must be unzipped to correct location -unzip %{SOURCE1} -d $RPM_BUILD_ROOT%{_datadir}/%{name}/help - +# audacity manual must be extracted to correct location +pushd %{buildroot}%{_datadir}/%{name} +gzip -dc %{SOURCE1} | tar -xvvf - +popd %{find_lang} %{name} -desktop-file-install --dir $RPM_BUILD_ROOT%{_datadir}/applications \ - $RPM_BUILD_ROOT%{_datadir}/applications/audacity.desktop +desktop-file-install --dir %{buildroot}{_datadir}/applications \ + %{buildroot}%{_datadir}/applications/audacity.desktop mkdir %{buildroot}%{_datadir}/doc/%{name}/nyquist cp -pr lib-src/libnyquist/nyquist/license.txt %{buildroot}%{_datadir}/doc/%{name}/nyquist @@ -224,13 +258,12 @@ rm %{buildroot}%{_datadir}/doc/%{name}/LICENSE.txt %{_libdir}/%{name} %dir %{_datadir}/%{name} %{_datadir}/%{name}/EQDefaultCurves.xml -%{_datadir}/%{name}/modules/ %{_datadir}/%{name}/nyquist/ %{_datadir}/%{name}/plug-ins/ %exclude %{_datadir}/%{name}/help %{_mandir}/man*/* +%{_metainfodir}/%{name}.appdata.xml %{_datadir}/applications/* -%{_datadir}/appdata/%{name}.appdata.xml %{_datadir}/pixmaps/* %{_datadir}/icons/hicolor/*/%{name}.png %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg @@ -245,6 +278,13 @@ rm %{buildroot}%{_datadir}/doc/%{name}/LICENSE.txt %changelog +* Sun Apr 10 2022 Ian McInerney - 3.1.3-1 +- Update to upstream release 3.1.3 +- Remove conditionals for Fedora 33 (it is now EOL) +- Unbundle sqlite and use the system version (rhbz: #1973455) +- Force X11 backend in GTK to fix cursor scroll (rhbz: #2024019) +- Fix builds when using wxWidgets 3.1.6 (rhbz: #2072823) + * Wed Jan 19 2022 Fedora Release Engineering - 3.0.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/find-jack.patch b/find-jack.patch deleted file mode 100644 index 8f9676e..0000000 --- a/find-jack.patch +++ /dev/null @@ -1,22 +0,0 @@ -From b4b5cc812483b311627bba48e26b91ae389ce713 Mon Sep 17 00:00:00 2001 -From: SteveDaulton -Date: Mon, 26 Apr 2021 15:45:40 +0100 -Subject: [PATCH] Bug 2757 - No support for Jack Audio System - ---- - cmake-proxies/portaudio-v19/CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/cmake-proxies/portaudio-v19/CMakeLists.txt b/cmake-proxies/portaudio-v19/CMakeLists.txt -index d8930ff8ce5..9baf5f6a8eb 100644 ---- a/cmake-proxies/portaudio-v19/CMakeLists.txt -+++ b/cmake-proxies/portaudio-v19/CMakeLists.txt -@@ -88,7 +88,7 @@ cmd_option( ${_OPT}use_pa_jack - - if( NOT ${_OPT}use_pa_jack STREQUAL "off" ) - # Find it -- find_package( jack ) -+ find_package( Jack ) - if( NOT JACK_FOUND) - set_cache_value( ${_OPT}use_pa_jack "off" ) - endif() diff --git a/fix_data_path.patch b/fix_data_path.patch new file mode 100644 index 0000000..5a615b0 --- /dev/null +++ b/fix_data_path.patch @@ -0,0 +1,42 @@ +From 77e3733af8653059b5a758e6b2260479fa6d83ef Mon Sep 17 00:00:00 2001 +From: Ian McInerney +Date: Wed, 1 Dec 2021 18:00:18 +0000 +Subject: [PATCH] Remove trailing slash from directory definition to remove // + from install command + +The install directive with a directory will prepend a slash, so the +directory installs ended up as ${_PKGDATA}//dir. +--- + CMakeLists.txt | 2 +- + src/CMakeLists.txt | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8fd7dc459..80d09ab97 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -336,7 +336,7 @@ set( INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" ) + set( _LIBDIR "${CMAKE_INSTALL_LIBDIR}" ) + set( _DATADIR "${CMAKE_INSTALL_DATADIR}" ) + set( _PKGLIB "${_LIBDIR}/audacity" ) +-set( _PKGDATA "${_DATADIR}/audacity/" ) ++set( _PKGDATA "${_DATADIR}/audacity" ) + set( _MANDIR "${CMAKE_INSTALL_MANDIR}" ) + set( _MODDIR "${_DEST}/modules" ) + set( _EXEDIR "${_DEST}" ) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 13589f5c1..af90921cc 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -1392,7 +1392,7 @@ else() + install( FILES "${_SRCDIR}/audacity.xml" + DESTINATION "${_DATADIR}/mime/packages" ) + install( FILES "${topdir}/presets/EQDefaultCurves.xml" +- DESTINATION "${_PKGDATA}" ) ++ DESTINATION "${_PKGDATA}/" ) + install( PROGRAMS "${PROJECT_SOURCE_DIR}/linux/audacity.sh" + DESTINATION "." + RENAME "audacity" ) +-- +2.33.1 + diff --git a/gdk_x11_backend.patch b/gdk_x11_backend.patch new file mode 100644 index 0000000..9b7ff36 --- /dev/null +++ b/gdk_x11_backend.patch @@ -0,0 +1,11 @@ +--- src/audacity_old.desktop.in 2021-11-16 12:13:48.000000000 +0000 ++++ src/audacity.desktop.in 2021-12-01 11:26:07.677458317 +0000 +@@ -50,7 +50,7 @@ + Type=Application + Categories=AudioVideo;Audio;AudioVideoEditing; + +-Exec=env UBUNTU_MENUPROXY=0 @AUDACITY_NAME@ %F ++Exec=env GDK_BACKEND=x11 UBUNTU_MENUPROXY=0 @AUDACITY_NAME@ %F + StartupNotify=false + Terminal=false + MimeType=@MIMETYPES@; diff --git a/permissions-fix.patch b/permissions-fix.patch deleted file mode 100644 index 4a97035..0000000 --- a/permissions-fix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/AudacityApp.cpp 2021-04-11 11:29:19.000000000 +0100 -+++ src/AudacityApp.cpp 2021-06-17 23:41:43.333628774 +0100 -@@ -1692,7 +1692,7 @@ - // The permissions don't always seem to be set on - // some platforms. Hopefully this fixes it... - #ifdef __UNIX__ -- chmod(OSFILENAME(temp), 0755); -+ chmod(OSFILENAME(temp), 0700); - #endif - - TempDirectory::ResetTempDir(); diff --git a/sources b/sources index 40fa7f7..ad802ff 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (audacity-minsrc-3.0.2.tar.xz) = 9fb57b218ff9fdedc21a18feae7a7cac68db4ddcf92b4292ff11e516528f58e9a3c52cccb55b6e40af1e03f1eba0315ea97f77312709cce8d17eb43771a896aa -SHA512 (audacity-manual-3.0.2.zip) = f6671d614b81143eaef9df4e6912dc31479cf583f683475bb85a063f1bd84cee9b4391f44dbd8a78abc97491ccb37928cbe295bd957ae685b43453edd9902767 +SHA512 (audacity-3.1.3-source.tar.gz) = f3bb9a6cbf90c40d50f47bc296cf677e799fb8beb74e21ea3cd389de35a58ccd7df898f176a9326b682736b5dd9a9cfe56e83f56f2428f8ababb32037397fb53 +SHA512 (audacity-manual-3.1.3.tar.gz) = 077fcf3b3d1650c7eab62d9e324d13e5b2f14079ab4b0b105bd3689fee1cc3c56936997b8f4b5c3d44b9d003419acb604f4065129a6cfd6b254b5e10a857887f diff --git a/wx316_bitmaps.patch b/wx316_bitmaps.patch new file mode 100644 index 0000000..53e51d5 --- /dev/null +++ b/wx316_bitmaps.patch @@ -0,0 +1,31 @@ +From 342c4b588f2f069a2df2157ac166237a54277b3a Mon Sep 17 00:00:00 2001 +From: Ian McInerney +Date: Fri, 8 Apr 2022 01:27:52 +0100 +Subject: [PATCH 2/2] Call the proper wxBitmap constructor for XPM data + +wxBitmap back to at least 3.0.0 did not have a constructor for an XPM +image that took a size parameter, it would only take the XPM data +itself. + +I don't know how this compiled until now, but it doesn't anymore when +the size is included and built against wx 3.1.6 in Fedora. +--- + src/MixerBoard.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/MixerBoard.cpp b/src/MixerBoard.cpp +index 54b5f146c..7fe816154 100644 +--- a/src/MixerBoard.cpp ++++ b/src/MixerBoard.cpp +@@ -1307,7 +1307,7 @@ void MixerBoard::LoadMusicalInstruments() + wxMemoryDC dc; + + for (const auto &data : table) { +- auto bmp = std::make_unique(data.bitmap,24); ++ auto bmp = std::make_unique(data.bitmap); + dc.SelectObject(*bmp); + AColor::Bevel(dc, false, bev); + mMusicalInstruments.push_back(std::make_unique( +-- +2.35.1 + diff --git a/wx316_customLanguages.patch b/wx316_customLanguages.patch new file mode 100644 index 0000000..ddbae98 --- /dev/null +++ b/wx316_customLanguages.patch @@ -0,0 +1,44 @@ +From efc11c4ac50ac51cd71d4dcfa84e63b11000c3f5 Mon Sep 17 00:00:00 2001 +From: Ian McInerney +Date: Fri, 8 Apr 2022 01:08:12 +0100 +Subject: [PATCH 1/2] Remove custom languages in wx 3.1.6 and above + +Basque was added as a language with identifier "eu" into wx 3.1.6, so +there is no more need to provide custom languages. Additionally, this +struct changed formatting in 3.1.6, meaning it threw a compile error +when included (so it would have to be fixed if still needed). +--- + src/AudacityApp.cpp | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +diff --git a/src/AudacityApp.cpp b/src/AudacityApp.cpp +index d6e2576bf..e3979249c 100644 +--- a/src/AudacityApp.cpp ++++ b/src/AudacityApp.cpp +@@ -992,12 +992,10 @@ void AudacityApp::OnTimer(wxTimerEvent& WXUNUSED(event)) + #define WL(lang,sublang) + #endif + +-#if wxCHECK_VERSION(3, 0, 1) ++#if wxCHECK_VERSION(3, 0, 1) && !wxCHECK_VERSION(3, 1, 6) + wxLanguageInfo userLangs[] = + { +- // Bosnian is defined in wxWidgets already +-// { wxLANGUAGE_USER_DEFINED, wxT("bs"), WL(0, SUBLANG_DEFAULT) wxT("Bosnian"), wxLayout_LeftToRight }, +- ++ // Included upstream in version 3.1.6 + { wxLANGUAGE_USER_DEFINED, wxT("eu"), WL(0, SUBLANG_DEFAULT) wxT("Basque"), wxLayout_LeftToRight }, + }; + #endif +@@ -1332,7 +1330,7 @@ bool AudacityApp::OnInit() + // + // TODO: The whole Language initialization really need to be reworked. + // It's all over the place. +-#if wxCHECK_VERSION(3, 0, 1) ++#if wxCHECK_VERSION(3, 0, 1) && !wxCHECK_VERSION(3, 1, 6) + for (size_t i = 0, cnt = WXSIZEOF(userLangs); i < cnt; i++) + { + wxLocale::AddLanguage(userLangs[i]); +-- +2.35.1 + diff --git a/wx_lib_fix.patch b/wx_lib_fix.patch new file mode 100644 index 0000000..7f3922c --- /dev/null +++ b/wx_lib_fix.patch @@ -0,0 +1,11 @@ +--- cmake-proxies/CMakeLists_old.txt 2021-12-01 12:01:56.445087469 +0000 ++++ cmake-proxies/CMakeLists.txt 2021-12-01 12:01:18.524811160 +0000 +@@ -37,7 +37,7 @@ + find_required_package( PNG "libpng-dev" ) + set( wx_png "sys" ) + # And, for consistency +- find_required_package( JPEG "libjpeg-turbo8-dev" ) ++ #find_required_package( JPEG "libjpeg-turbo8-dev" ) + set( wx_jpeg "sys" ) + + set( id3tag_zlib "system" )