commit:     24a7e5c2de5100a0b6124fc3fa61b8914c36e0c1
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Mon Apr  8 03:21:02 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Apr  8 05:21:58 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24a7e5c2

sci-libs/hdf: drop painful dead weight

I am not fighting with Modern C more than I have to, so just prune this.

The key here is that upstream hdf4 doesn't support it and doesn't want
you using it, because it appears to just be an uplifted copy of netcdf
code. So why not, erm, just use netcdf?

Good question, and this package doesn't have an answer to that. Yeet
these vendored tools into the sunset. No need to rename them to private
copies.

Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...do-not-build-the-mfhdf-tools-ncgen-ncdump.patch | 30 ++++++++++++++++++++++
 sci-libs/hdf/hdf-4.2.15-r2.ebuild                  |  8 +++---
 2 files changed, 33 insertions(+), 5 deletions(-)

diff --git 
a/sci-libs/hdf/files/0001-simply-do-not-build-the-mfhdf-tools-ncgen-ncdump.patch
 
b/sci-libs/hdf/files/0001-simply-do-not-build-the-mfhdf-tools-ncgen-ncdump.patch
new file mode 100644
index 000000000000..c57481a6cb84
--- /dev/null
+++ 
b/sci-libs/hdf/files/0001-simply-do-not-build-the-mfhdf-tools-ncgen-ncdump.patch
@@ -0,0 +1,30 @@
+From 5a93f7ba5bea12bd78616a2168035324054ed7b7 Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <[email protected]>
+Date: Sun, 7 Apr 2024 23:11:43 -0400
+Subject: [PATCH] simply do not build the mfhdf tools ncgen/ncdump
+
+They were removed upstream in:
+https://github.com/HDFGroup/hdf4/commit/57b87b9927f0127d0d04ab7cd6c93e01bf54e3ee
+
+With the note that people who want them can get them from... yup, you
+guessed it, netcdf.
+---
+ mfhdf/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mfhdf/Makefile.am b/mfhdf/Makefile.am
+index d62d3af..0963923 100644
+--- a/mfhdf/Makefile.am
++++ b/mfhdf/Makefile.am
+@@ -17,7 +17,7 @@ FORTRAN_DIR =
+ endif
+ 
+ # src folder in root Makefile, build other folders now
+-SUBDIRS = $(XDR_DIR) libsrc $(FORTRAN_DIR) test ncdump ncgen dumper hdfimport 
hdiff hrepack nctest
++SUBDIRS = $(XDR_DIR) libsrc $(FORTRAN_DIR) test dumper hdfimport hdiff 
hrepack nctest
+ 
+ DIST_SUBDIRS = xdr libsrc fortran test ncdump ncgen dumper hdfimport hdiff 
hrepack nctest examples
+ 
+-- 
+2.43.2
+

diff --git a/sci-libs/hdf/hdf-4.2.15-r2.ebuild 
b/sci-libs/hdf/hdf-4.2.15-r2.ebuild
index 6e762b25fff0..01a74e03df73 100644
--- a/sci-libs/hdf/hdf-4.2.15-r2.ebuild
+++ b/sci-libs/hdf/hdf-4.2.15-r2.ebuild
@@ -37,6 +37,9 @@ PATCHES=(
 
        # backport fix for Modern C
        "${FILESDIR}"/hdf4-c99.patch
+
+       # These tools were dropped upstream. Get them from netcdf...
+       
"${FILESDIR}"/0001-simply-do-not-build-the-mfhdf-tools-ncgen-ncdump.patch
 )
 
 src_prepare() {
@@ -78,9 +81,4 @@ src_install() {
        else
                rm -r share/hdf4_examples || die
        fi
-
-       mv bin/ncgen{,-hdf} || die
-       mv bin/ncdump{,-hdf} || die
-       mv share/man/man1/ncgen{,-hdf}.1 || die
-       mv share/man/man1/ncdump{,-hdf}.1 || die
 }

Reply via email to