commit:     4733b9592526853eea19cef96917ba314a902296
Author:     Violet Purcell <vimproved <AT> inventati <DOT> org>
AuthorDate: Mon Jan 26 21:18:32 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Feb 11 03:04:29 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4733b959

media-sound/zynaddsubfx: make zest location respect eprefix/libdir

Previously, our patches hardcoded the path
/usr/lib64/zynaddsubfx/libzest.so. This would obviously break on a
prefix or a profile that does not use lib64. Change the patch to instead
patch in the placeholder @GENTOO_LIBDIR@ and then replace that with
$(get_libdir) via a sed. Additionally, add @GENTOO_PORTAGE_EPREFIX@ to
the path and call eprefixify on the relevant files.

Signed-off-by: Violet Purcell <vimproved <AT> inventati.org>
Part-of: https://github.com/gentoo/gentoo/pull/45535
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/zyn-fusion-ui-3.0.6-libzest_location.patch         |  2 +-
 .../files/zynaddsubfx-3.0.6-libzest_location.patch           |  2 +-
 media-sound/zynaddsubfx/zynaddsubfx-3.0.6-r6.ebuild          | 12 ++++++++++--
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git 
a/media-sound/zynaddsubfx/files/zyn-fusion-ui-3.0.6-libzest_location.patch 
b/media-sound/zynaddsubfx/files/zyn-fusion-ui-3.0.6-libzest_location.patch
index a24921196fe6..4652217bf331 100644
--- a/media-sound/zynaddsubfx/files/zyn-fusion-ui-3.0.6-libzest_location.patch
+++ b/media-sound/zynaddsubfx/files/zyn-fusion-ui-3.0.6-libzest_location.patch
@@ -5,7 +5,7 @@
          handle = dlopen("libzest.so", RTLD_LAZY);
      if(!handle)
 -        handle = dlopen("/opt/zyn-fusion/libzest.so", RTLD_LAZY);
-+        handle = dlopen("/usr/lib64/zynaddsubfx/libzest.so", RTLD_LAZY);
++        handle = 
dlopen("@GENTOO_PORTAGE_EPREFIX@/usr/@GENTOO_LIBDIR@/zynaddsubfx/libzest.so", 
RTLD_LAZY);
  #endif
      if(!handle) {
          printf("[ERROR] Cannot Open libzest.so\n");

diff --git 
a/media-sound/zynaddsubfx/files/zynaddsubfx-3.0.6-libzest_location.patch 
b/media-sound/zynaddsubfx/files/zynaddsubfx-3.0.6-libzest_location.patch
index 79e9e30083e5..93c6694f8ceb 100644
--- a/media-sound/zynaddsubfx/files/zynaddsubfx-3.0.6-libzest_location.patch
+++ b/media-sound/zynaddsubfx/files/zynaddsubfx-3.0.6-libzest_location.patch
@@ -5,7 +5,7 @@
          handle = dlopen("./libzest.so", RTLD_LAZY);
          if(!handle)
 -            handle = dlopen("/opt/zyn-fusion/libzest.so", RTLD_LAZY);
-+            handle = dlopen("/usr/lib64/zynaddsubfx/libzest.so", RTLD_LAZY);
++            handle = 
dlopen("@GENTOO_PORTAGE_EPREFIX@/usr/@GENTOO_LIBDIR@/zynaddsubfx/libzest.so", 
RTLD_LAZY);
          if(!handle)
              handle = dlopen("libzest.so", RTLD_LAZY);
  #endif

diff --git a/media-sound/zynaddsubfx/zynaddsubfx-3.0.6-r6.ebuild 
b/media-sound/zynaddsubfx/zynaddsubfx-3.0.6-r6.ebuild
index cc5a97d35598..21d8be1c3eef 100644
--- a/media-sound/zynaddsubfx/zynaddsubfx-3.0.6-r6.ebuild
+++ b/media-sound/zynaddsubfx/zynaddsubfx-3.0.6-r6.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2025 Gentoo Authors
+# Copyright 1999-2026 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
-inherit cmake flag-o-matic
+inherit cmake flag-o-matic prefix
 
 DESCRIPTION="Software synthesizer capable of making a countless number of 
instruments"
 HOMEPAGE="https://zynaddsubfx.sourceforge.net/";
@@ -77,6 +77,14 @@ src_prepare() {
 
        cd ../zyn-fusion-ui-src-${PV}
        eapply "${ZYN_FUSION_UI_PATCHES[@]}"
+
+       sed -i "s|@GENTOO_LIBDIR@|$(get_libdir)|" \
+               "${S}/src/Plugin/ZynAddSubFX/ZynAddSubFX-UI-Zest.cpp" \
+               test-libversion.c || die
+
+       eprefixify \
+               "${S}/src/Plugin/ZynAddSubFX/ZynAddSubFX-UI-Zest.cpp" \
+               test-libversion.c
 }
 
 src_configure() {

Reply via email to