commit:     133a5fab561cdd253fcf32b426c8838ede7efba5
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 17 14:26:07 2022 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Thu Mar 17 14:26:22 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=133a5fab

sci-mathematics/octave: add upstream patch for slibtool support.

Closes: https://bugs.gentoo.org/776583
Bug: https://savannah.gnu.org/bugs/?61905
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 .../octave/files/octave-6.4.0-slibtool.patch       | 37 ++++++++++++++++++++++
 sci-mathematics/octave/octave-6.4.0.ebuild         |  1 +
 2 files changed, 38 insertions(+)

diff --git a/sci-mathematics/octave/files/octave-6.4.0-slibtool.patch 
b/sci-mathematics/octave/files/octave-6.4.0-slibtool.patch
new file mode 100644
index 000000000000..1558b334d522
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-6.4.0-slibtool.patch
@@ -0,0 +1,37 @@
+
+# HG changeset patch
+# User Markus Mützel <markus.muet...@gmx.de>
+# Date 1647451226 -3600
+# Node ID 2d394460429ff8313004ddaeea31437e90d16799
+# Parent  d3123b682f63723c111a50b77716fe9349d8fb7d
+build: Parse .la files in build tree when installing .oct files (bug #61905).
+
+* Makefile.am (install-oct): Parse .la files in build tree when installing .oct
+files. That should improve compatibility with tools like `slibtool` that don't
+install .la files.
+
+diff --git a/Makefile.am b/Makefile.am
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -460,17 +460,18 @@
+       if [ -n "`cat $(OCT_FILE_PKG_ADD_FILES)`" ]; then \
+         $(INSTALL_DATA) oct-file-pkg-add $(DESTDIR)$(octfiledir)/PKG_ADD; \
+       fi
++      top_build_dir=`pwd` && \
+       cd $(DESTDIR)$(octlibdir) && \
+       for ltlib in $(OCT_FILE_LIBS); do \
+         f=`echo $$ltlib | $(SED) 's,.*/,,'`; \
+-        dl=`$(SED) -n -e "s/dlname='\([^']*\)'/\1/p" < $$f`; \
++        dl=`$(SED) -n -e "s/dlname='\([^']*\)'/\1/p" < 
$$top_build_dir/$$ltlib`; \
+         if [ -n "$$dl" ]; then \
+           $(INSTALL_PROGRAM) $$dl $(DESTDIR)$(octfiledir)/`echo $$f | $(SED) 
's,^lib,,; s,\.la$$,.oct,'`; \
+         else \
+           echo "error: dlname is empty in $$ltlib!"; \
+           exit 1; \
+         fi; \
+-        lnames=`$(SED) -n -e "s/library_names='\([^']*\)'/\1/p" < $$f`; \
++        lnames=`$(SED) -n -e "s/library_names='\([^']*\)'/\1/p" < 
$$top_build_dir/$$ltlib`; \
+         if [ -n "$$lnames" ]; then \
+           rm -f $$f $$lnames $$dl; \
+         fi \
+

diff --git a/sci-mathematics/octave/octave-6.4.0.ebuild 
b/sci-mathematics/octave/octave-6.4.0.ebuild
index 4b0b6832a769..bc0547dacdd3 100644
--- a/sci-mathematics/octave/octave-6.4.0.ebuild
+++ b/sci-mathematics/octave/octave-6.4.0.ebuild
@@ -97,6 +97,7 @@ DEPEND="${RDEPEND}
 PATCHES=(
        "${FILESDIR}"/${PN}-5.1.0-pkgbuilddir.patch
        "${FILESDIR}"/${PN}-4.2.2-ncurses-pkgconfig.patch
+       "${FILESDIR}/${PN}-6.4.0-slibtool.patch"
 )
 
 src_prepare() {

Reply via email to