summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-09-08 06:06:15 +0100
committerSam James <sam@gentoo.org>2021-09-08 06:06:32 +0100
commitdf3e6bd9f56dd0d323e19abe242182f37fe802a2 (patch)
tree6fadd296472bc8c5cdbb9018732a637b428dbec8 /sci-libs
parentsci-visualization/opendx: eutils->desktop inherit (diff)
downloadgentoo-df3e6bd9f56dd0d323e19abe242182f37fe802a2.tar.gz
gentoo-df3e6bd9f56dd0d323e19abe242182f37fe802a2.tar.bz2
gentoo-df3e6bd9f56dd0d323e19abe242182f37fe802a2.zip
sci-libs/netcdf-cxx: fix build with slibtool
Closes: https://bugs.gentoo.org/778200 Thanks-to: orbea <orbea@riseup.net> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/netcdf-cxx/files/netcdf-cxx-4.3.1-slibtool.patch42
-rw-r--r--sci-libs/netcdf-cxx/netcdf-cxx-4.3.1.ebuild4
2 files changed, 46 insertions, 0 deletions
diff --git a/sci-libs/netcdf-cxx/files/netcdf-cxx-4.3.1-slibtool.patch b/sci-libs/netcdf-cxx/files/netcdf-cxx-4.3.1-slibtool.patch
new file mode 100644
index 000000000000..72db4dbd2c76
--- /dev/null
+++ b/sci-libs/netcdf-cxx/files/netcdf-cxx-4.3.1-slibtool.patch
@@ -0,0 +1,42 @@
+https://github.com/Unidata/netcdf-cxx4/pull/103
+https://bugs.gentoo.org/778200
+
+From: orbea <orbea@riseup.net>
+Date: Thu, 25 Mar 2021 12:24:57 -0700
+Subject: [PATCH 1/2] cxx4: Move -lnetcdf to LIBADD so its used.
+
+--- a/cxx4/Makefile.am
++++ b/cxx4/Makefile.am
+@@ -3,15 +3,13 @@
+
+ # This file builds the new C++-4 interface.
+
+-# Point pre-preprocessor to netcdf-4 directory (libsrc4).
+-LDADD = $(top_builddir)/cxx4/libnetcdf_c++4.la -lnetcdf
+-
+ # This is our output library.
+ lib_LTLIBRARIES = libnetcdf_c++4.la
+
+ # For rules updating the version info, see
+ # http://www.gnu.org/s/libtool/manual/html_node/Updating-version-info.html
+ libnetcdf_c__4_la_LDFLAGS = -version-info 2:0:1 -no-undefined
++libnetcdf_c__4_la_LIBADD = -lnetcdf
+
+ # These headers will be installed in the users header directory.
+ include_HEADERS = netcdf ncAtt.h ncCheck.h ncDim.h ncException.h \
+
+From a6dd5eb862d9a845b8458591b957b07c527e0d20 Mon Sep 17 00:00:00 2001
+From: orbea <orbea@riseup.net>
+Date: Thu, 25 Mar 2021 12:25:33 -0700
+Subject: [PATCH 2/2] plugins: Add a missing -lhdf5 linker flag.
+
+--- a/plugins/Makefile.am
++++ b/plugins/Makefile.am
+@@ -20,6 +20,7 @@ lib_LTLIBRARIES = libh5bzip2.la
+
+ libh5bzip2_la_SOURCES = ${HDF5PLUGINSRC}
+ libh5bzip2_la_LDFLAGS = -module -avoid-version -shared -export-dynamic -no-undefined
++libh5bzip2_la_LIBADD = -lhdf5
+
+ libmisc_la_SOURCES = H5Zmisc.c H5Zutil.c h5misc.h
+ libmisc_la_LDFLAGS = -module -avoid-version -shared -export-dynamic -no-undefined -rpath ${abs_builddir}
diff --git a/sci-libs/netcdf-cxx/netcdf-cxx-4.3.1.ebuild b/sci-libs/netcdf-cxx/netcdf-cxx-4.3.1.ebuild
index 31c7a79c7e93..11abdd911ef6 100644
--- a/sci-libs/netcdf-cxx/netcdf-cxx-4.3.1.ebuild
+++ b/sci-libs/netcdf-cxx/netcdf-cxx-4.3.1.ebuild
@@ -20,6 +20,10 @@ DEPEND="${RDEPEND}"
S="${WORKDIR}/${MYP}"
+PATCHES=(
+ "${FILESDIR}"/${P}-slibtool.patch
+)
+
src_configure() {
econf --disable-static
}