summaryrefslogtreecommitdiff
path: root/sci-libs/cdf
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-05-31 20:59:14 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-05-31 20:59:14 +0100
commite748ba9741f6540f4675c23e3e37b73e822c13a4 (patch)
tree23dece8beabb3a3d7c6c0273b0eb40b21c62a889 /sci-libs/cdf
parent908778078736bd36f7a60a2d576d415cb8e000fa (diff)
gentoo resync : 31.05.2021
Diffstat (limited to 'sci-libs/cdf')
-rw-r--r--sci-libs/cdf/Manifest13
-rw-r--r--sci-libs/cdf/cdf-3.5.0.2.ebuild1
-rw-r--r--sci-libs/cdf/cdf-3.8.0.ebuild133
-rw-r--r--sci-libs/cdf/files/cdf-3.8.0-respect-flags.patch96
4 files changed, 242 insertions, 1 deletions
diff --git a/sci-libs/cdf/Manifest b/sci-libs/cdf/Manifest
index 2b78dc445a4e..63a89ad3bdb9 100644
--- a/sci-libs/cdf/Manifest
+++ b/sci-libs/cdf/Manifest
@@ -1,6 +1,7 @@
AUX 50cdf 124 BLAKE2B 93acfc3dd493c8518497ed7dafa35cc61f66501bd9d7c4db1f4072cdda9742f2927b5f388dde26d33e76d4d33405a8a92fbf133a1ed729ce8cba21458f552123 SHA512 4fe515d03379f2b6e1723c771f73e65be9f67365a46e75dbeb3358bbdc6f3446b91efd989363bf229b7ae93a446ddedeefd883a0d59d28c1480a10a8994eeadc
AUX cdf-3.2-soname.patch 738 BLAKE2B 4c6a94feeefa623e88622b6dfd76581ef6d0c0d91c376e597bfa1e0130a734ea6dd40ad5235272788d7338220710d26e634639383d8cf5cdbd1901778484a580 SHA512 f3bb09e43b3b36ed346dc7690cc0c75a28e8dcfb2c1ebbf8a0577abdc2d15bbcbce7b0da9c5de23ef65e669bd118692db498aef230e9395dd4b67dba48258a8d
AUX cdf-3.5.0.2-Makefile.patch 3973 BLAKE2B 2106f52abb639b4f31f08372de81db5cb96dbdccd0a55821605e659b7f85fad554cd8d4212fa4b9e6fd6225e5f3fd6c98e76d7aa7c2fe05dd96ea49d3c8444fe SHA512 9842d43d8e2910f8d7cc00c27711f84cde622ab69084ce1c798625475034b73db857410d6fc1311933512bb3a235cfe2fb0808d2eebfc6165e3962e04aaed4e1
+AUX cdf-3.8.0-respect-flags.patch 3080 BLAKE2B 1a89fef44861e1954d42fa68f8dc9398299656eaa08686ea07577e329c70f28ea5967079a94819c8f8b4d99369ec8041fa37443a9be0d3e580fe396dacb1b3fd SHA512 7d6dd822f81a2d80b73cc55b76b46c0016ab1dc4c754a90b57c2d2c99912c045853cf132d7c26dbfe804fc4cc908647ad7832b3048edfe5b2b4e735b23499953
DIST cdf350crm.pdf 2139671 BLAKE2B fbfcc12d919ca07beb1df621f967bbe69b33d0c403613e1b12c01354e53e86f93920104d24dab4f3d1260d72f5e6de663ae3a87ef310dfabf46af2c216424f07 SHA512 382c3cfd73b7c75a017f0c563c61473fccc11ca344f33f4f5a543f4c339a52879400532dbff9956ae8c2b7706f63223132666c3154ad7ada281cd4418e48b4dd
DIST cdf350frm.pdf 2194293 BLAKE2B 40b269a7987a1522ec7f92eae8efba1117993e459df574afe89d5325d21c3e685a5ed09216bfa56e22f40e831c99bf6d69faa14b9d3a1014d1cbceba43dc3bc9 SHA512 1c1db067f42b56ddb01399821103ced7207da1dc191f62f7acf6776a05c15a992f7be060790233e1b94444724aedb6f83ba687f60b7a20b4988f9d591b40d481
DIST cdf350jrm.pdf 4009791 BLAKE2B 5b0ea4fcfe2237b4105707d2a3a9945e13333c4ee073d7d9a5a2b839a250308697aa9291aa1e224b886f821235b4d6c4f5f5304a1ad61d45436e1dc4f2b0425a SHA512 cf42de6d94168337936403fc2e504b03fdd676ae8daf8020186d3261bc7331822d47b7c509c804ca5fd637af3696308d09c5db102aaa546138d0630c3df999c3
@@ -9,5 +10,15 @@ DIST cdf350ug.pdf 1396156 BLAKE2B 39f3e3b0441ef103c9131b3c5523c5a387eb785d545c68
DIST cdf35_0-dist-cdf.tar.gz 1137065 BLAKE2B df3235338e63686dd0446663b8738618c45c4e86c858b4f41d3326ebf14d391ecce43309cf5d6a3db4a9f9e53820bf8a73acb77549a0432594859b24acb7eb84 SHA512 f26bd1e298494563cb30c52751bd175124814dca2fe2c05ae056d6c2ad905fb5ddc7da35888c6a07d69914f52481cb4e9fcab9684c9a8a0ca4b80ca449ad3406
DIST cdf35_0-dist-java.tar.gz 724055 BLAKE2B 563542821106b040bb0eaefa303cbda46ace5a127cda1936c55e5eaf3b395eb67073a622e84d1bfc33cb65faa4b51710008cfbae86fd680e5cca2c80dbc5162b SHA512 2e69447e9c36ced39a6bfcd1f2a5dfa7c36c04e9a5acac12952c1b415c5191471efbf2cc432b5b31eb37c8ee31bda3e27bce0fa266c5549fb1b0ab86c4dd6c4f
DIST cdf35ifd.pdf 560458 BLAKE2B c44722d30c4217b492fe140833ae9c58721040b629cf414fe8d9d7d44433b3f62241d621d4b6d634f54e4f0ecb4c026b66a1e752a1d868b0861eed54d4a95bee SHA512 018a524f7fc8dc5b8b3512ed8bdea42bae141eb65d24b4fbbdac6ecebaeac5c458caf3a476fc4b7c0313b17441cbe7dce32d1002f9344d056cd46853ee3cd438
-EBUILD cdf-3.5.0.2.ebuild 3205 BLAKE2B 7932444280df28afa7142c3f79befbe9764257410d35173d5fd604c6897de15ab365b14662630b720f79a8ea3e2c49859af4033f38672a80094d328ef03adfef SHA512 f4cef0a15d1ee771abb614d5244a69a1d6209ce6fe65a337ed59c0c621f964d89643a279192df5a07edd74666b53ddc0d7e52c5bd282439237e6e52426a655a6
+DIST cdf380crm.pdf 2671048 BLAKE2B 2605d6465c744b57f11d08605aa888ead724b7553a0efd8830dae759eb54c6d0df807cca1c6611fd40b4c5eb9327fbfcd66f0f7cf82b69bf7619385928ebc6dd SHA512 fc1eef589ff0f3cd989d8743cc1d6cfeb5946cf9ae8e4a328ba746b33fe0f6a286cf7b7b7e7cab5e0231bef566c03d7b68afe6c0879e5fb32fc1e6c980f7e081
+DIST cdf380csrm.pdf 2409166 BLAKE2B 7e97e61865531b788553ca9747513ec32bc5e1a743e10e5bad5f62980a883d00cfeede975b83826ad72327071062080cd1db611fd40c4e5b3d22caf7d4dd3d0f SHA512 d669f032722e270d3f16f8d9a8920d4536430bd83a509591cf82b447770d16a9c6d9aba17e096f78445c4f0b7f4ab85082cf2480bc9384b46677a2325be0f163
+DIST cdf380frm.pdf 2570409 BLAKE2B c8fb1444c7e02297af0c3bffbf58c048077e0d69c4aca8cb3e48331f496dba1551289d2e2b95f9f2d9fabe8048bd56f73a72bab58a52772cae22f184a6b39745 SHA512 de90e4893b976ab9e77f1e9512b2f310b043b8dc921ca43cf1d37e767bf5cbae5d06f91388ff5f4fb1258db5a1149712fa9a5dbc1c2d18f78705021fc31087bb
+DIST cdf380prm.pdf 1521804 BLAKE2B 4afa792f3b5f2bda7e896e10ccb6b2b073e127fca9ece229bb3dbe3b8e8920ef5b8cce5a45a15fa648525c8241fbcc678c8eea0a32a3dabad4cd3b9e959e0913 SHA512 413ce06f36d151cc5380884111376fb54108fcf692ac56ed4d96204f56d4d434ca695d42114e1e89626288802cb4d5d48097664e8e0411a041950aff8199fea0
+DIST cdf380ug.pdf 1716882 BLAKE2B e36f0a9624756d6d5bf71fcc0958d33d060b7f32dd7bbb93fcf6a58a33a5154017fd0ba8a598fe652919785398d306e84fe7a89b5c4aa0d305ee0bc2fbf20b8f SHA512 f2e865b55d293a17a5d85c36e04d14050b7f17adc97dfc284d95db36ae1b94678e31b107cbab32ad690630bbde0f3f0caf558ecdb4e1d0e60cd5f53b30faa0fc
+DIST cdf380vbrm.pdf 2260048 BLAKE2B 30abdf365763df753569289a74013033e0dc56c3ce0a787bcdb9d179d334f4cb79f2b5c6d98427ab9a6451b44e333f48932c152674ce7c9229291b3b714e0f70 SHA512 8552d1f1a83a0f327bc20e8dc03f8728aad132e5765084839ee02900d19c93f9c7f67a1e3f4429cc01d51d75ab00b666d18a247522da2b4fda529cf6333889b5
+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
+EBUILD cdf-3.5.0.2.ebuild 3224 BLAKE2B 9df2c75735c47956c48404dfe407b90fd85b3409f0f97b162711206cd21d25ac78c622f3448423b73f037eff31b9e7e80e469a31b5697f6c29794a569045e113 SHA512 4d5c92f58891aeb519ddf4a0975d642cc2166e87b79fb137bf97b265491d678ead449f6f07f28574f568e269fb216e82c9ad23811dfc109879a77148fb4adcbd
+EBUILD cdf-3.8.0.ebuild 3250 BLAKE2B d8aae20b0039338238f3331368966779e82a77eb55035728a3f198ba8a6bf2e7ab337bc44c4f6c6e9982919fc45bcf35e7032d613c4d1f4c7e9e9185a049bdcb SHA512 20819048c9c075111701f20f2189722fdcf5c709e9ed8518ae8dfb0ce4cb6aa89dd0743d8c154ca30c86f8fa84882833cc89038ec68591aac95c0dc5f0e3b47a
MISC metadata.xml 1025 BLAKE2B b93e6e8c52f2ac85ac66c6aa1a9a4075c11d6d6ae4c28e540a33b2964f911e5c118510f0b57d25ead76aa3bf07be70b309af1079425bf786c18f70e00930c143 SHA512 26992a8b0ce0aff229d7dc4e87440dc15e0a0143ef88ba6d910a8e4f6372803ae8e3bd007a53b554509220bdb41fe8a804f9b606a4dca47f03d88d39f2164549
diff --git a/sci-libs/cdf/cdf-3.5.0.2.ebuild b/sci-libs/cdf/cdf-3.5.0.2.ebuild
index 1bdd8d2b12b9..2942136cd5fb 100644
--- a/sci-libs/cdf/cdf-3.5.0.2.ebuild
+++ b/sci-libs/cdf/cdf-3.5.0.2.ebuild
@@ -27,6 +27,7 @@ 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.5:= )
diff --git a/sci-libs/cdf/cdf-3.8.0.ebuild b/sci-libs/cdf/cdf-3.8.0.ebuild
new file mode 100644
index 000000000000..4350f3e58cc9
--- /dev/null
+++ b/sci-libs/cdf/cdf-3.8.0.ebuild
@@ -0,0 +1,133 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit java-pkg-opt-2 multilib 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
+ )"
+
+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:0= )
+"
+DEPEND="
+ ${RDEPEND}
+ ncurses? ( virtual/pkgconfig )
+"
+
+S="${WORKDIR}/${MY_P}-dist"
+
+# respect cflags, ldflags, soname
+PATCHES=(
+ "${FILESDIR}"/${P}-respect-flags.patch
+)
+
+src_prepare() {
+ default
+
+ # use proper lib dir
+ sed -i \
+ -e "s:\$(INSTALLDIR)/lib:\$(INSTALLDIR)/$(get_libdir):g" \
+ Makefile || die "sed failed"
+}
+
+src_compile() {
+ PV_SO=${PV:0:1}
+ emake \
+ OS=linux \
+ CC=$(tc-getCC) \
+ ENV=gnu \
+ SHARED=yes \
+ SHAREDEXT_linux=so.${PV_SO} \
+ CURSESLIB_linux_gnu="$(usex ncurses "$($(tc-getPKG_CONFIG) --libs ncurses)" "")" \
+ 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 /usr/share/doc/${PF}/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 /usr/share/doc/${PF}/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.8.0-respect-flags.patch b/sci-libs/cdf/files/cdf-3.8.0-respect-flags.patch
new file mode 100644
index 000000000000..8ffd226a1ed1
--- /dev/null
+++ b/sci-libs/cdf/files/cdf-3.8.0-respect-flags.patch
@@ -0,0 +1,96 @@
+diff --git a/Makefile b/Makefile
+index 9857fa9..6dc0953 100644
+--- a/Makefile
++++ b/Makefile
+@@ -896,7 +896,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) MAKE=$(MAKE) "INSTALLDIR=$(INSTALLDIR)" install.lib.so ; \
+ else \
+ $(NULL) ; \
+@@ -1010,10 +1010,10 @@ copy.include:
+ cp $(INCsrcDIR)/cdfconfig.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
+diff --git a/src/lib/Makefile b/src/lib/Makefile
+index 2017c46..b666ce3 100644
+--- 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
+
+@@ -120,13 +120,13 @@ ranlib.yes:
+
+ shared.yes: libcdf.$(SHAREDEXT)
+
+-libcdf.so \
++libcdf.$(SHAREDEXT) \
+ 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)
+ # @if [ $(MACVERSION) -gt 0 ]; then \
+ # rm -f $(MACLIB)/$@; \
+ # cp $@ $(MACLIB)/libcdf.$(VERSION).dylib; \
+@@ -134,8 +134,8 @@ libcdf.sl: $(OBJs)
+ # fi
+
+ 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 \
+diff --git a/src/tools/Makefile b/src/tools/Makefile
+index bac4ca0..ef44264 100644
+--- 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")