Skip to content

Commit 194f8ae

Browse files
author
Jeff Whitaker
committed
try patched cmake build
1 parent edc5c82 commit 194f8ae

File tree

2 files changed

+34
-21
lines changed

2 files changed

+34
-21
lines changed

CMakeLists.txt.patch

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- CMakeLists.txt.orig 2022-06-22 06:06:21.000000000 -0600
2+
+++ CMakeLists.txt 2022-06-22 06:06:57.000000000 -0600
3+
@@ -39,7 +39,7 @@
4+
SET(PACKAGE_VERSION ${VERSION})
5+
6+
# These values should match those in configure.ac
7+
-SET(netCDF_LIB_VERSION 19})
8+
+SET(netCDF_LIB_VERSION 19)
9+
SET(netCDF_SO_VERSION 19)
10+
11+
# Version of the dispatch table. This must match the value in

config.sh

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -104,28 +104,30 @@ function build_netcdf {
104104
if [ -e netcdf-stamp ]; then return; fi
105105
fetch_unpack https://downloads.unidata.ucar.edu/netcdf-c/${NETCDF_VERSION}/netcdf-c-${NETCDF_VERSION}.tar.gz
106106
# cmake build
107-
#(cd netcdf-c-${NETCDF_VERSION} \
108-
# && mkdir build \
109-
# && cd build \
110-
# && export HDF5_PLUGIN_PATH=$BUILD_PREFIX/lib/netcdf-plugins \
111-
# && mkdir -p $HDF5_PLUGIN_PATH \
112-
# && cmake ../ -DCMAKE_INSTALL_PREFIX=${BUILD_PREFIX} -DENABLE_NETCDF_4=ON -DENABLE_DAP=ON -DBUILD_SHARED_LIBS=ON -DPLUGIN_INSTALL_DIR=YES \
113-
# && make -j4 \
114-
# && make install \
115-
# && ls -l $HDF5_PLUGIN_PATH )
107+
(cd netcdf-c-${NETCDF_VERSION} \
108+
&& curl https://raw.githubusercontent.com/MacPython/netcdf4-python-wheels/master/CMakeLists.txt.patch -o CMakeLists.txt.patch \
109+
&& patch -p0 < CMakeLists.txt.patch \
110+
&& mkdir build \
111+
&& cd build \
112+
&& export HDF5_PLUGIN_PATH=$BUILD_PREFIX/lib/netcdf-plugins \
113+
&& mkdir -p $HDF5_PLUGIN_PATH \
114+
&& cmake ../ -DCMAKE_INSTALL_PREFIX=${BUILD_PREFIX} -DENABLE_NETCDF_4=ON -DENABLE_DAP=ON -DBUILD_SHARED_LIBS=ON -DPLUGIN_INSTALL_DIR=YES \
115+
&& make -j4 \
116+
&& make install \
117+
&& ls -l $HDF5_PLUGIN_PATH )
116118
# autotools build
117-
if [[ ! -z "IS_OSX" && "$PLAT" = "arm64" ]] && [[ "$CROSS_COMPILING" = "1" ]]; then
118-
(cd netcdf-c-${NETCDF_VERSION} \
119-
&& ./configure --prefix=$BUILD_PREFIX --enable-netcdf-4 --enable-shared --enable-dap --disable-libxml2 \
120-
&& make -j4 \
121-
&& make install )
122-
else
123-
(cd netcdf-c-${NETCDF_VERSION} \
124-
&& export HDF5_PLUGIN_PATH=$BUILD_PREFIX/lib/netcdf-plugins \
125-
&& ./configure --prefix=$BUILD_PREFIX --enable-netcdf-4 --enable-shared --enable-dap --disable-libxml2 --with-plugin-dir=$HDF5_PLUGIN_PATH \
126-
&& make -j4 \
127-
&& make install )
128-
fi
119+
#if [[ ! -z "IS_OSX" && "$PLAT" = "arm64" ]] && [[ "$CROSS_COMPILING" = "1" ]]; then
120+
# (cd netcdf-c-${NETCDF_VERSION} \
121+
# && ./configure --prefix=$BUILD_PREFIX --enable-netcdf-4 --enable-shared --enable-dap \
122+
# && make -j4 \
123+
# && make install )
124+
#else
125+
# (cd netcdf-c-${NETCDF_VERSION} \
126+
# && export HDF5_PLUGIN_PATH=$BUILD_PREFIX/lib/netcdf-plugins \
127+
# && ./configure --prefix=$BUILD_PREFIX --enable-netcdf-4 --enable-shared --enable-dap --with-plugin-dir=$HDF5_PLUGIN_PATH \
128+
# && make -j4 \
129+
# && make install )
130+
#fi
129131
touch netcdf-stamp
130132
}
131133

0 commit comments

Comments
 (0)