summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2018-07-01 13:21:28 (GMT)
committerTony Theodore <tonyt@logyst.com>2018-07-01 13:21:28 (GMT)
commitb9722e9abebae6c801c9b72201b72c039c73e0b0 (patch)
treeafb2624a89d0af791792e4b264e6d20c8f1d6555
parent4a8e3ef549408cac9ccfb794c608f319cbe7362b (diff)
downloadmxe-b9722e9abebae6c801c9b72201b72c039c73e0b0.zip
mxe-b9722e9abebae6c801c9b72201b72c039c73e0b0.tar.gz
mxe-b9722e9abebae6c801c9b72201b72c039c73e0b0.tar.bz2
add package netcdf-cxx4
closes #2150
-rw-r--r--src/netcdf-cxx4-1-fixes.patch21
-rw-r--r--src/netcdf-cxx4.mk25
2 files changed, 46 insertions, 0 deletions
diff --git a/src/netcdf-cxx4-1-fixes.patch b/src/netcdf-cxx4-1-fixes.patch
new file mode 100644
index 0000000..161ec48
--- /dev/null
+++ b/src/netcdf-cxx4-1-fixes.patch
@@ -0,0 +1,21 @@
+This file is part of MXE. See LICENSE.md for licensing information.
+
+Contains ad hoc patches for cross building.
+
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Tony Theodore <tonyt@logyst.com>
+Date: Sun, 1 Jul 2018 23:03:49 +1000
+Subject: [PATCH 1/1] specify correct *.dll install directory
+
+see: https://github.com/Unidata/netcdf-cxx4/issues/57
+
+diff --git a/cxx4/CMakeLists.txt b/cxx4/CMakeLists.txt
+index 1111111..2222222 100644
+--- a/cxx4/CMakeLists.txt
++++ b/cxx4/CMakeLists.txt
+@@ -44,4 +44,5 @@ INSTALL(
+ INSTALL(
+ TARGETS netcdf-cxx4
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ )
diff --git a/src/netcdf-cxx4.mk b/src/netcdf-cxx4.mk
new file mode 100644
index 0000000..bd66d10
--- /dev/null
+++ b/src/netcdf-cxx4.mk
@@ -0,0 +1,25 @@
+# This file is part of MXE. See LICENSE.md for licensing information.
+
+PKG := netcdf-cxx4
+$(PKG)_WEBSITE := https://www.unidata.ucar.edu/software/netcdf/
+$(PKG)_DESCR := NetCDF-CXX4
+$(PKG)_IGNORE :=
+$(PKG)_VERSION := 4.3.0
+$(PKG)_CHECKSUM := 25da1c97d7a01bc4cee34121c32909872edd38404589c0427fefa1301743f18f
+$(PKG)_GH_CONF := Unidata/netcdf-cxx4/releases,v
+$(PKG)_DEPS := cc netcdf
+
+define $(PKG)_BUILD
+ # build and install the library
+ cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)' \
+ -DENABLE_DOXYGEN=OFF \
+ -DNCXX_ENABLE_TESTS=OFF
+ $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)'
+ $(MAKE) -C '$(BUILD_DIR)' -j 1 install
+
+ # compile test, pkg-config support incomplete
+ '$(TARGET)-g++' \
+ -W -Wall -Werror -ansi -pedantic \
+ '$(SOURCE_DIR)/examples/simple_xy_rd.cpp' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \
+ -l$(PKG) `'$(TARGET)-pkg-config' netcdf jpeg libcurl --cflags --libs` -lportablexdr
+endef