diff options
author | Tony Theodore <tonyt@logyst.com> | 2018-07-01 10:52:17 (GMT) |
---|---|---|
committer | Tony Theodore <tonyt@logyst.com> | 2018-07-01 10:52:17 (GMT) |
commit | 858a7456ff04f5b23785a94a44ab6c6072e5efe2 (patch) | |
tree | 915dd5c6667939f8190c150d57a661f469c4112a /src/netcdf.mk | |
parent | 69fefbadd16780a493ead573b0105c0ea899c7d7 (diff) | |
download | mxe-858a7456ff04f5b23785a94a44ab6c6072e5efe2.zip mxe-858a7456ff04f5b23785a94a44ab6c6072e5efe2.tar.gz mxe-858a7456ff04f5b23785a94a44ab6c6072e5efe2.tar.bz2 |
netcdf: update, switch to cmake and github, add test
Diffstat (limited to 'src/netcdf.mk')
-rw-r--r-- | src/netcdf.mk | 53 |
1 files changed, 22 insertions, 31 deletions
diff --git a/src/netcdf.mk b/src/netcdf.mk index 7da924f..ca1182d 100644 --- a/src/netcdf.mk +++ b/src/netcdf.mk @@ -4,38 +4,29 @@ PKG := netcdf $(PKG)_WEBSITE := https://www.unidata.ucar.edu/software/netcdf/ $(PKG)_DESCR := NetCDF $(PKG)_IGNORE := -$(PKG)_VERSION := 4.3.0 -$(PKG)_CHECKSUM := e796413d27da6b053e07a18f567a1d0c23d2a317cef905faa2a05fe4f725fc63 -$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) -$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := ftp://ftp.unidata.ucar.edu/pub/netcdf/old/$($(PKG)_FILE) -$(PKG)_DEPS := cc curl hdf4 hdf5 portablexdr zlib - -define $(PKG)_UPDATE - $(WGET) -q -O- 'https://www.unidata.ucar.edu/downloads/netcdf/index.jsp' | \ - grep netcdf | \ - $(SED) -n 's,.*href="netcdf-\([0-9_]*\)">.*,\1,p' | \ - head -1 | \ - tr '_' '.' -endef - -# NetCDF uses '#ifdef IGNORE' as a synonym to '#if 0' in several places. -# IGNORE is assumed to never be defined, but winbase.h defines it... -# We just replace '#ifdef IGNORE' with '#if 0' to work around this. +$(PKG)_VERSION := 4.6.1 +$(PKG)_CHECKSUM := a2fabf27c72a5ee746e3843e1debbaad37cd035767eaede2045371322211eebb +$(PKG)_GH_CONF := Unidata/netcdf-c/releases,v +$(PKG)_DEPS := cc curl hdf4 hdf5 jpeg portablexdr zlib define $(PKG)_BUILD - cd '$(1)' && \ - $(SED) -i -e 's/#ifdef IGNORE/#if 0/' libsrc4/nc4hdf.c libsrc4/ncfunc.c libsrc/attr.c ncgen/cvt.c && \ - ./configure \ - $(MXE_CONFIGURE_OPTS) \ - --enable-netcdf-4 \ - --enable-hdf4 \ - --disable-testsets \ - --disable-examples \ - CPPFLAGS="-D_DLGS_H -DWIN32_LEAN_AND_MEAN" \ - LIBS="-lmfhdf -ldf -lportablexdr -lws2_32" - - $(MAKE) -C '$(1)' -j '$(JOBS)' LDFLAGS=-no-undefined + # build and install the library + cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)' \ + -DENABLE_DOXYGEN=OFF \ + -DENABLE_EXAMPLES=OFF \ + -DENABLE_TESTS=OFF \ + -DBUILD_UTILITIES=OFF \ + -DENABLE_HDF4=ON \ + -DENABLE_HDF4_FILE_TESTS=OFF \ + -DENABLE_NETCDF_4=ON \ + -DENABLE_CDF5=ON \ + -DUSE_HDF5=ON + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 install - $(MAKE) -C '$(1)' -j 1 install + # compile test, pkg-config support incomplete + '$(TARGET)-gcc' \ + -W -Wall -Werror -ansi -pedantic \ + '$(SOURCE_DIR)/examples/C/simple.c' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `'$(TARGET)-pkg-config' $(PKG) jpeg libcurl --cflags --libs` -lportablexdr endef |