commit:     02e84fabb69adae3954e1ef4716dc692dc93bb35
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 11 21:30:36 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Sep 11 22:29:17 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02e84fab

media-video/vlc: Use patch to disable vlc-cache-gen from build

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../vlc/files/vlc-3.0.22-no-vlc-cache-gen.patch    | 39 ++++++++++++++++++++++
 .../vlc/files/vlc-9999-no-vlc-cache-gen.patch      | 39 ++++++++++++++++++++++
 media-video/vlc/vlc-3.0.9999.ebuild                |  5 +--
 media-video/vlc/vlc-9999.ebuild                    |  5 +--
 4 files changed, 80 insertions(+), 8 deletions(-)

diff --git a/media-video/vlc/files/vlc-3.0.22-no-vlc-cache-gen.patch 
b/media-video/vlc/files/vlc-3.0.22-no-vlc-cache-gen.patch
new file mode 100644
index 000000000000..8960d3bfa000
--- /dev/null
+++ b/media-video/vlc/files/vlc-3.0.22-no-vlc-cache-gen.patch
@@ -0,0 +1,39 @@
+Disable vlc-cache-gen, to run it later manually from pkg_postinst
+https://bugs.gentoo.org/564842
+https://bugs.gentoo.org/608256
+
+Signed-off-by: Andreas Sturmlechner <[email protected]>
+---
+ Makefile.am     | 2 +-
+ bin/Makefile.am | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index eb00a3c..9f9891c 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -163,7 +163,7 @@ if BUILD_VLC
+ # Installing plugins cache
+ 
###############################################################################
+ install-exec-hook:
+-      if test "$(build)" = "$(host)"; then \
++      if test "$(build)" = "nothanks"; then \
+               PATH="$(DESTDIR)$(bindir):$$PATH" \
+               LD_LIBRARY_PATH="$(DESTDIR)$(libdir):$$LD_LIBRARY_PATH" \
+               DYLD_LIBRARY_PATH="$(DESTDIR)$(libdir):$$DYLD_LIBRARY_PATH" \
+diff --git a/bin/Makefile.am b/bin/Makefile.am
+index 4de299d..e9794b5 100644
+--- a/bin/Makefile.am
++++ b/bin/Makefile.am
+@@ -144,7 +144,7 @@ endif
+ 
+ ../modules/plugins.dat: vlc-cache-gen$(EXEEXT)
+       $(AM_V_at)rm -f ../modules/plugins.dat
+-      $(AM_V_GEN)if test "$(build)" = "$(host)"; then \
++      $(AM_V_GEN)if test "$(build)" = "nothanks"; then \
+               ./vlc-cache-gen$(EXEEXT) `realpath ../modules` ; \
+       else \
+               echo "Cross-compilation: cache generation skipped!" ; \
+-- 
+2.51.0
+

diff --git a/media-video/vlc/files/vlc-9999-no-vlc-cache-gen.patch 
b/media-video/vlc/files/vlc-9999-no-vlc-cache-gen.patch
new file mode 100644
index 000000000000..e71fa5d1e435
--- /dev/null
+++ b/media-video/vlc/files/vlc-9999-no-vlc-cache-gen.patch
@@ -0,0 +1,39 @@
+Disable vlc-cache-gen, to run it later manually from pkg_postinst
+https://bugs.gentoo.org/564842
+https://bugs.gentoo.org/608256
+
+Signed-off-by: Andreas Sturmlechner <[email protected]>
+---
+ Makefile.am     | 2 +-
+ bin/Makefile.am | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index eb00a3c..9f9891c 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -163,7 +163,7 @@ if BUILD_VLC
+ # Installing plugins cache
+ 
###############################################################################
+ install-exec-hook:
+-      if test "$(build)" = "$(host)"; then \
++      if test "$(build)" = "nothanks"; then \
+               PATH="$(DESTDIR)$(bindir):$$PATH" \
+               LD_LIBRARY_PATH="$(DESTDIR)$(libdir):$$LD_LIBRARY_PATH" \
+               DYLD_LIBRARY_PATH="$(DESTDIR)$(libdir):$$DYLD_LIBRARY_PATH" \
+diff --git a/bin/Makefile.am b/bin/Makefile.am
+index 4de299d..e9794b5 100644
+--- a/bin/Makefile.am
++++ b/bin/Makefile.am
+@@ -144,7 +144,7 @@ endif
+ 
+ ../modules/plugins.dat: vlc-cache-gen$(EXEEXT)
+       $(AM_V_at)rm -f ../modules/plugins.dat
+-      $(AM_V_GEN)if test "$(build)" = "$(host)"; then \
++      $(AM_V_GEN)if test "$(build)" = "nothanks"; then \
+               ./vlc-cache-gen$(EXEEXT) `cd "../modules" ; pwd -P` ; \
+       else \
+               echo "Cross-compilation: cache generation skipped!" ; \
+-- 
+2.51.0
+

diff --git a/media-video/vlc/vlc-3.0.9999.ebuild 
b/media-video/vlc/vlc-3.0.9999.ebuild
index dc3843c98084..0ee773e70882 100644
--- a/media-video/vlc/vlc-3.0.9999.ebuild
+++ b/media-video/vlc/vlc-3.0.9999.ebuild
@@ -232,6 +232,7 @@ DEPEND="${RDEPEND}
 "
 
 PATCHES=(
+       "${FILESDIR}"/${PN}-3.0.22-no-vlc-cache-gen.patch # bugs 564842, 608256
        "${FILESDIR}"/${PN}-2.1.0-fix-libtremor-libs.patch # build system
        "${FILESDIR}"/${PN}-3.0.6-fdk-aac-2.0.0.patch # bug 672290
        "${FILESDIR}"/${PN}-3.0.11.1-configure_lua_version.patch
@@ -269,10 +270,6 @@ src_prepare() {
                sed -i 's/ --started-from-file//' share/vlc.desktop.in || die
        fi
 
-       # Disable running of vlc-cache-gen, we do that in pkg_postinst
-       sed -e "/test.*build.*host/s/\$(host)/nothanks/" \
-               -i Makefile.am -i bin/Makefile.am || die "Failed to disable 
vlc-cache-gen"
-
        # Fix gettext version mismatch errors.
        sed -i -e s/GETTEXT_VERSION/GETTEXT_REQUIRE_VERSION/ configure.ac || die
 

diff --git a/media-video/vlc/vlc-9999.ebuild b/media-video/vlc/vlc-9999.ebuild
index 948cd4477408..042870c79405 100644
--- a/media-video/vlc/vlc-9999.ebuild
+++ b/media-video/vlc/vlc-9999.ebuild
@@ -235,6 +235,7 @@ DEPEND="${RDEPEND}
 "
 
 PATCHES=(
+       "${FILESDIR}"/${PN}-9999-no-vlc-cache-gen.patch # bugs 564842, 608256
        "${FILESDIR}"/${PN}-9999-fix-libtremor-libs.patch # build system
        "${FILESDIR}"/${PN}-9999-configure-lua-version.patch
 )
@@ -269,10 +270,6 @@ src_prepare() {
                sed -i 's/ --started-from-file//' share/vlc.desktop.in || die
        fi
 
-       # Disable running of vlc-cache-gen, we do that in pkg_postinst
-       sed -e "/test.*build.*host/s/\$(host)/nothanks/" \
-               -i Makefile.am -i bin/Makefile.am || die "Failed to disable 
vlc-cache-gen"
-
        # Fix gettext version mismatch errors.
        sed -i -e s/GETTEXT_VERSION/GETTEXT_REQUIRE_VERSION/ configure.ac || die
 

Reply via email to