diff options
author | Sam James <sam@gentoo.org> | 2024-03-22 07:10:53 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-03-22 07:11:55 +0000 |
commit | 3e1d16eb94174d187d5db3417b786f476f78efeb (patch) | |
tree | 68b1bc9b9fb2ac14ce984c775a17033f2a78d32a /sci-libs/cdf | |
parent | dev-ruby/dry-monads: add missing test dependency (diff) | |
download | gentoo-3e1d16eb94174d187d5db3417b786f476f78efeb.tar.gz gentoo-3e1d16eb94174d187d5db3417b786f476f78efeb.tar.bz2 gentoo-3e1d16eb94174d187d5db3417b786f476f78efeb.zip |
sci-libs/cdf: add 3.9.0
Reported the aliasing issue upstream by email.
Closes: https://bugs.gentoo.org/804951
Closes: https://bugs.gentoo.org/862675
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-libs/cdf')
-rw-r--r-- | sci-libs/cdf/Manifest | 9 | ||||
-rw-r--r-- | sci-libs/cdf/cdf-3.9.0.ebuild | 148 | ||||
-rw-r--r-- | sci-libs/cdf/files/cdf-3.9.0-respect-flags.patch | 85 |
3 files changed, 242 insertions, 0 deletions
diff --git a/sci-libs/cdf/Manifest b/sci-libs/cdf/Manifest index 84ce1596aca8..5540c04bb014 100644 --- a/sci-libs/cdf/Manifest +++ b/sci-libs/cdf/Manifest @@ -7,3 +7,12 @@ DIST cdf380vbrm.pdf 2260048 BLAKE2B 30abdf365763df753569289a74013033e0dc56c3ce0a DIST cdf38_0-dist-cdf.tar.gz 1251571 BLAKE2B d51463fcf196e0c35617b93725104b34a9047ee7ef22d5d5b7ed9ed5816903e435f130b8ebb0d75e0f05c4908b71de3a4c9bab910a9472b3111be22f659e1bc8 SHA512 cc13358ddd5dfa90731ec6d9da0985697ff9e297be0bc03d8132761d479f5ff062c822085d3141a2fa4320ccd7d1b59064fc236f143a00f24b22c6edf0f618ce DIST cdf38_0-dist-java.tar.gz 1007414 BLAKE2B 64fb991d937e9242d42a9b6524facff35acefe4fb2279b92942faf6a9403fae98c3a6b8e9881a916e8669ead5bca4a404dbc250d3a95be26cbe761b6dfa48227 SHA512 12b4d98561f4c07ef4837daa0fc90e1d1cb78622b3837d3cdc30643eae3e9f1ffe50dfa22e8be56615aa4cf4b983df6bde2d1c9fbe2115142d9fdfa653bee2be DIST cdf38ifd.pdf 881707 BLAKE2B b80e15e631eb5025317d324893c16838b3a44218cf2c592692eff4d0b778494f2555cf79d2d35b54d66606a82c3835ad896fe809ef363f85ab8261879bf55167 SHA512 2dd3ff5867f5faba3502f877057e9d3110e7be03219dcf5aa657c6685e4a63f847b3d3fbea8d201ae5601a78773c636799cc1ab53e77e12d0ffd5c543322340c +DIST cdf390crm.pdf 2029732 BLAKE2B 011652b3c55910dea6c4e7b47e003335826e3471bfab41e27a1baf44397b4efd684f75b8e09018279cf9ee53f3d3de65a8c5905769e04aa93b893bbc470117a8 SHA512 b1b60c0b77bece7f0f722505bff1abba1798a220627216f04c84163a3efb51fdd31bc3abe2f8dacd0bb31e6aee585301939d38dc9353fda0535475ba973593be +DIST cdf390csrm.pdf 1865382 BLAKE2B 83bc066468867b946e3962f1c4b2717f218ea2b92100b43ff18457c1759e2bd71028919aa6403030b840aaa5709a0fafa3e5e6a8843df52e44b3ff335e44dff0 SHA512 f614e1cea672c69eb08e0559e6d1b743f1eaf4f20c1e9dda8ca372ece3040676ba312b5800640b6f202aa9cc45b90e3ce9fbf07fcf621ed8591cbcbfc4e42a24 +DIST cdf390frm.pdf 1896169 BLAKE2B 26cafadaaaf861a4556d54c2fcd09f74c763a8d56e170a75b1247ac700c4082b1d09c446568e814b8b126b5ca2c4d1d0c3cc658ceb49fa6823fcbfe6db7326b2 SHA512 a696a1a774d31f1b023e15d9d510baa7407ea0f6a76bd065bb7c69bb85a3ea5aff6999949a6ed8ce21c418928eca6d90d22e0439ab959f3c1d2b7b9f0a33878e +DIST cdf390prm.pdf 1226869 BLAKE2B c07bb0f0a078c3e68a9811d36bfb459840c6396cf67e129b2b138d0f194ab2637b32a9826709fff03a58e5b43d680197df27fa09182a03ff1501eca62e6fac6f SHA512 38dbff0fbf05c21270395d2207d171c4746d016a6a8051d39d3c66603aedd3d73b1b4e83924af53aaf391f9108770647c56f380fd98fdae3a3f027fe3cf88de3 +DIST cdf390ug.pdf 1566123 BLAKE2B 639f800454e8f27286d769d505001e07e972b194d589a189b291c51f322d3995c7a4040f319ca50ccd1a27bc0a494e356722071db058da52816d44af9eb685b5 SHA512 980e995534da349f7b38480924ace002ccd1b41c1d3468d7a7741f28edda6c65fb3bdb3b9a43a3b29d92195283c42eecc0d494be4a77275dec85430b9bffb54b +DIST cdf390vbrm.pdf 1729074 BLAKE2B d30d177202b516891dba0cb99113d6d19af41d950384469ec8a35d96dd2f7418646d1622bbf35376f02cabe686d6da0382e65b98a5beef0bcf81eb827dab5270 SHA512 98379bb4f30c8073ea1d43b7b4b75559722b6de1c7a500bb79b25162cb1bbc82afd9eec443af4645e369de6f59bf031fd097bc802896ad7310b7614a73486961 +DIST cdf39_0-dist-cdf.tar.gz 1290187 BLAKE2B 03f7c7840c44514046df0d63ff6086be7263858f90225debfb8a4fe6c4d6e5b03c95faa2762f76e2ffc198ac77359b3494520258ec17678746fd7f619e362853 SHA512 e054b763d86c09c53375ef60a8690f43fcb106be1dc6fd907763379db1ab4c9677692671a63da74d955aec8ce3f866f420ddc7217a59ed68e51c4623562af387 +DIST cdf39_0-dist-java.tar.gz 1162924 BLAKE2B 4e6416ec5a2a2eede428fa00906ca0e42460916506e7b2075d622e322ffe53e337a77bf81aa871e1559fb6b9339f2f49e365ca835874e060da33cd7c68e45177 SHA512 860468257c70bd6cb9592f40e495b5efb9092fc6fa3ab68c2fdc729c46d9ea4f0499a0b29904fe9c1ae07c13958e551b4e5cc8b9b71c2401ca833f2020073606 +DIST cdf39ifd.pdf 656522 BLAKE2B 2ec3831f27e92fcec8191bedb1617c9f590b726732e02dd8ca317b814c369b46d50dd19e7bfc81df233e1e32ca6fb8191bf7e075ce67dda1ddd50645d5fc754b SHA512 f4de5bea46b7d1ea2621b9fa0ac1ab0f9904ada9a1625ce613f6fdb68ad25ca52398cbf75bb27902e54ba5ee7820f3ea1a563c655186047b8954cb53b4cd8197 diff --git a/sci-libs/cdf/cdf-3.9.0.ebuild b/sci-libs/cdf/cdf-3.9.0.ebuild new file mode 100644 index 000000000000..041ee9765e53 --- /dev/null +++ b/sci-libs/cdf/cdf-3.9.0.ebuild @@ -0,0 +1,148 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic java-pkg-opt-2 toolchain-funcs + +MY_DP="${PN}$(ver_cut 1)$(ver_cut 2)" +MY_P="${MY_DP}_$(ver_cut 3)" + +DESCRIPTION="Common Data Format I/O library for multi-dimensional data sets" +HOMEPAGE="https://cdf.gsfc.nasa.gov" +SRC_BASE="https://spdf.gsfc.nasa.gov/pub/software/${PN}/dist/${MY_P}/unix/" +SRC_URI=" + ${SRC_BASE}/${MY_P}-dist-${PN}.tar.gz + java? ( ${SRC_BASE}/${MY_P}-dist-java.tar.gz ) + doc? ( + ${SRC_BASE}/${MY_DP}_documentation/${MY_DP}ifd.pdf + ${SRC_BASE}/${MY_DP}_documentation/${MY_DP}0crm.pdf + ${SRC_BASE}/${MY_DP}_documentation/${MY_DP}0csrm.pdf + ${SRC_BASE}/${MY_DP}_documentation/${MY_DP}0frm.pdf + ${SRC_BASE}/${MY_DP}_documentation/${MY_DP}0prm.pdf + ${SRC_BASE}/${MY_DP}_documentation/${MY_DP}0ug.pdf + ${SRC_BASE}/${MY_DP}_documentation/${MY_DP}0vbrm.pdf + ) +" +S="${WORKDIR}/${MY_P}-dist" + +LICENSE="CDF" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux" +IUSE="doc examples java ncurses static-libs" +RESTRICT="bindist" + +RDEPEND=" + java? ( >=virtual/jre-1.8:= ) + ncurses? ( sys-libs/ncurses:= ) +" +DEPEND=" + ${RDEPEND} +" +BDEPEND=" + ncurses? ( virtual/pkgconfig ) +" + +PATCHES=( + # Respect cflags, ldflags, soname + "${FILESDIR}"/${PN}-3.9.0-respect-flags.patch +) + +src_prepare() { + default + + # Use proper lib dir + sed -i \ + -e "s:\$(INSTALLDIR)/lib:\$(INSTALLDIR)/$(get_libdir):g" \ + Makefile || die "sed failed" + # Uses the wide variant of *curses functions + sed -i \ + -e "s:-I/usr/include/ncurses:$($(tc-getPKG_CONFIG) --cflags-only-I ncursesw):g" \ + Makefile src/tools/Makefile || die "sed failed" +} + +src_compile() { + # Reported upstream by email in 2024-03-22 (bug #862675) + append-flags -fno-strict-aliasing + filter-lto + + PV_SO=${PV:0:1} + + emake \ + OS=linux \ + AR="$(tc-getAR)" \ + CC="$(tc-getCC)" \ + LD="$(tc-getCC)" \ + RANLIB="$(tc-getRANLIB)" \ + RANLIBcmd="$(tc-getRANLIB)" \ + ENV=gnu \ + SHARED=yes \ + SHAREDEXT_linux=so.${PV_SO} \ + CURSESLIB_linux_gnu="$(usex ncurses "$($(tc-getPKG_CONFIG) --libs ncursesw)" "")" \ + CURSES=$(usex ncurses) \ + ${myconf} \ + all + + if use java; then + export CDF_BASE="${S}" + export CDF_LIB="${S}/src/lib" + cd cdfjava/jni + $(tc-getCC) \ + ${CFLAGS} -fPIC \ + -I${CDF_BASE}/src/include \ + -I$(java-config -O)/include \ + -I$(java-config -O)/include/linux \ + -c cdfNativeLibrary.c \ + -o cdfNativeLibrary.o \ + || die "compiling java lib failed" + $(tc-getCC) \ + ${LDFLAGS} \ + -shared cdfNativeLibrary.o \ + -Wl,-soname=libcdfNativeLibrary.so.${PV_SO} \ + -L${CDF_LIB} -lcdf -lm \ + -o libcdfNativeLibrary.so.${PV_SO} \ + || die "linking java lib failed" + fi +} + +src_test() { + emake -j1 test +} + +src_install() { + dodir /usr/bin /usr/$(get_libdir) + # -j1 (fragile non-autotooled make) + emake -j1 \ + INSTALLDIR="${ED}/usr" \ + SHAREDEXT=so.${PV_SO} \ + install + dosym libcdf.so.${PV_SO} /usr/$(get_libdir)/libcdf.so + use static-libs || rm "${ED}"/usr/$(get_libdir)/libcdf.a + dodoc Release.notes CHANGES.txt Welcome.txt + doenvd "${FILESDIR}"/50cdf + + if use doc; then + dodoc "${DISTDIR}"/${MY_DP}{0{crm,csrm,frm,prm,ug,vbrm},ifd}.pdf + fi + + if use examples; then + docinto examples + dodoc samples/* + fi + + if use java; then + cd cdfjava || die + dolib.so jni/libcdfNativeLibrary.so.${PV_SO} + dosym libcdfNativeLibrary.so.${PV_SO} \ + /usr/$(get_libdir)/libcdfNativeLibrary.so + java-pkg_dojar */*.jar + if use examples; then + docinto examples/java + dodoc examples/* + fi + fi + + # move this to a better location + dodir "/usr/share/${PF}" + mv "${ED}/usr/CDFLeapSeconds.txt" "${ED}/usr/share/${PF}/" || die +} diff --git a/sci-libs/cdf/files/cdf-3.9.0-respect-flags.patch b/sci-libs/cdf/files/cdf-3.9.0-respect-flags.patch new file mode 100644 index 000000000000..b47d5f1e9eeb --- /dev/null +++ b/sci-libs/cdf/files/cdf-3.9.0-respect-flags.patch @@ -0,0 +1,85 @@ +--- a/Makefile ++++ b/Makefile +@@ -1051,7 +1051,7 @@ install.tools: create.bin copy.tools + install.help_: create.help copy.help + + install.lib: create.lib copy.lib.a +- @if [ -f $(LIBsrcDIR)/libcdf.so ] ; then \ ++ @if [ -f $(LIBsrcDIR)/libcdf.$(SHAREDEXT) ] ; then \ + $(MAKE) $(EXTRAMAKE) MAKE=$(MAKE) "INSTALLDIR=$(INSTALLDIR)" install.lib.so ; \ + else \ + $(NULL) ; \ +@@ -1200,10 +1200,10 @@ copy.include: + cp $(INCsrcDIR)/cdftools.h $(INSTALLDIR)/include + + copy.lib.so: +- @echo cp $(LIBsrcDIR)/libcdf.so $(INSTALLDIR)/lib +- cp $(LIBsrcDIR)/libcdf.so $(INSTALLDIR)/lib/libcdf.$(VERSION).so +- rm -f $(INSTALLDIR)/lib/libcdf.so +- cd $(INSTALLDIR)/lib && ln -s libcdf.$(VERSION).so libcdf.so ++ @echo cp $(LIBsrcDIR)/libcdf.$(SHAREDEXT) $(INSTALLDIR)/lib ++ cp $(LIBsrcDIR)/libcdf.$(SHAREDEXT) $(INSTALLDIR)/lib/libcdf.$(VERSION).so ++ rm -f $(INSTALLDIR)/lib/libcdf.$(SHAREDEXT) ++ cd $(INSTALLDIR)/lib && ln -s libcdf.$(VERSION).so libcdf.$(SHAREDEXT) + + copy.lib.sl: + @echo cp $(LIBsrcDIR)/libcdf.sl $(INSTALLDIR)/lib +--- a/src/lib/Makefile ++++ b/src/lib/Makefile +@@ -62,9 +62,9 @@ AR=ar + RANLIBcmd=ranlib + MACos=Darwin + +-CFLAGS=$(COPTIONS) $(PIC) -I$(INCLUDEcdf) -I$(ZlibDIR) ++CFLAGS+=$(COPTIONS) $(PIC) -I$(INCLUDEcdf) -I$(ZlibDIR) + CFLAGS2=-DZ_PREFIX +-LDFLAGS=$(LDOPTIONS) ++LDFLAGS+=$(LDOPTIONS) + ARFLAGS=$(AROPTIONS) + ZLIB=zlib + +@@ -108,17 +108,18 @@ ranlib.yes: + + shared.yes: libcdf.$(SHAREDEXT) + ++libcdf.$(SHAREDEXT) \ + libcdf.so \ + libcdf.dylib \ + libcdf.dll \ + libcdf.sl: $(OBJs) + @if [ -f $@ ] ; then rm $@ ; else $(NULL) ; fi +- @echo $(LD) $(LDFLAGS) -o $@ $(OBJs) $(SYSLIBS) +- $(LD) $(LDFLAGS) -o $@ $(OBJs) $(SYSLIBS) ++ @echo $(LD) $(CFLAGS) $(LDFLAGS) -Wl,-soname,libcdf.$(SHAREDEXT) -o $@ $(OBJs) $(SYSLIBS) ++ $(LD) $(CFLAGS) $(LDFLAGS) -Wl,-soname,libcdf.$(SHAREDEXT) -o $@ $(OBJs) $(SYSLIBS) + + libcdf.o: $(OBJs) +- @echo $(CC) $(LDFLAGS) -o $@ $(OBJs) $(SYSLIBS) +- $(CC) $(LDFLAGS) -o $@ $(OBJs) $(SYSLIBS) ++ @echo $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJs) $(SYSLIBS) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJs) $(SYSLIBS) + + .c.o: + @if [ "$<" = "cdfgzip.c" ] || [ "$<" = "cdfgzip64.c" ] ; then \ +--- a/src/tools/Makefile ++++ b/src/tools/Makefile +@@ -33,7 +33,7 @@ + SHELL=/bin/sh + + CURSES=yes +-CCx=gcc ++CCx=$(CC) + COPTIONS=-I/usr/include/ncurses -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -O2 + COPTIONSld= + SYSLIBS=-lgcc +@@ -43,8 +43,8 @@ MAKE=make + INCLUDEcdf= ../include + + CC=$(CCx) +-CFLAGS=$(COPTIONS) -I$(INCLUDEcdf) +-CFLAGSld=$(COPTIONSld) ++CFLAGS+=$(COPTIONS) -I$(INCLUDEcdf) ++CFLAGSld=$(COPTIONSld) $(LDFLAGS) + + WHICHOS=$(shell uname -a | cut -f1 -d" ") + ifeq ("$(WHICHOS)","Darwin") |