commit:     02f3b7274ed135a62f48821833e86413d42ad947
Author:     Aliaksei Urbanski <aliaksei.urbanski <AT> gmail <DOT> com>
AuthorDate: Tue Apr  2 10:19:47 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Apr  2 10:28:03 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02f3b727

media-sound/audacity: fix build with USE="-lv2" in 3.4.2

Due to a bug in the upstream, Audacity 3.4.2 can't be built with USE="-lv2".
At the same time, there is a fix available in the upstream.

Closes: https://bugs.gentoo.org/928380
Co-authored-by: Chris Mayo <aklhfex <AT> gmail.com>
Signed-off-by: Aliaksei Urbanski <aliaksei.urbanski <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/35887
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-sound/audacity/audacity-3.4.2.ebuild         |  3 ++
 ...audacity-3.4.2-fix-build-with-use-lv2-off.patch | 36 ++++++++++++++++++++++
 2 files changed, 39 insertions(+)

diff --git a/media-sound/audacity/audacity-3.4.2.ebuild 
b/media-sound/audacity/audacity-3.4.2.ebuild
index 27f06abecfde..69a039bc866a 100644
--- a/media-sound/audacity/audacity-3.4.2.ebuild
+++ b/media-sound/audacity/audacity-3.4.2.ebuild
@@ -128,6 +128,9 @@ PATCHES=(
 
        # #920363
        "${FILESDIR}/audacity-3.4.2-audiocom-std-string.patch"
+
+       # Fix build with USE="-lv2"
+       "${FILESDIR}/audacity-3.4.2-fix-build-with-use-lv2-off.patch"
 )
 
 src_prepare() {

diff --git 
a/media-sound/audacity/files/audacity-3.4.2-fix-build-with-use-lv2-off.patch 
b/media-sound/audacity/files/audacity-3.4.2-fix-build-with-use-lv2-off.patch
new file mode 100644
index 000000000000..8c47ff8642d7
--- /dev/null
+++ b/media-sound/audacity/files/audacity-3.4.2-fix-build-with-use-lv2-off.patch
@@ -0,0 +1,36 @@
+From e10034c19ed1911b730637fbc722030eb3dfd04b Mon Sep 17 00:00:00 2001
+From: Chris Mayo <aklh...@gmail.com>
+Date: Wed, 22 Nov 2023 19:29:05 +0000
+Subject: [PATCH] Fix build with -Daudacity_use_lv2=off
+
+libraries/lib-lv2/LV2Utils.h:18:10: fatal error: lilv/lilv.h: No such file or 
directory
+   18 | #include "lilv/lilv.h" // for lilv_free
+      |          ^~~~~~~~~~~~~
+compilation terminated.
+---
+ libraries/CMakeLists.txt | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/libraries/CMakeLists.txt b/libraries/CMakeLists.txt
+index b1ebefa1b023..879cd948791d 100644
+--- a/libraries/CMakeLists.txt
++++ b/libraries/CMakeLists.txt
+@@ -50,7 +50,6 @@ set( LIBRARIES
+    lib-vst3
+    lib-snapping
+    lib-vst
+-   lib-lv2
+    lib-ladspa
+    lib-audio-unit
+    lib-playable-track
+@@ -63,6 +62,10 @@ set( LIBRARIES
+    lib-viewport
+ )
+ 
++if ( ${_OPT}use_lv2 )
++   list( APPEND LIBRARIES lib-lv2)
++endif()
++
+ if ( ${_OPT}has_networking )
+    list( APPEND LIBRARIES lib-network-manager)
+ endif()

Reply via email to