@@ -8,7 +8,7 @@ export NO_CDL=1
8
8
# Compile libs for macOS 10.9 or later
9
9
export MACOSX_DEPLOYMENT_TARGET=" 10.9"
10
10
export NETCDF_VERSION=" 4.9.0"
11
- export HDF5_VERSION=" 1.12.2 "
11
+ export HDF5_VERSION=" 1.12.1 "
12
12
# old openssl, since building new version requires perl 5.10.0
13
13
export OPENSSL_ROOT=openssl-1.0.2u
14
14
export OPENSSL_HASH=ecd0c6ffb493dd06707d38b14bb4d8c2288bb7033735606569d8f90f89669d16
@@ -104,30 +104,44 @@ function build_netcdf {
104
104
if [ -e netcdf-stamp ]; then return ; fi
105
105
fetch_unpack https://downloads.unidata.ucar.edu/netcdf-c/${NETCDF_VERSION} /netcdf-c-${NETCDF_VERSION} .tar.gz
106
106
# cmake build
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 )
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 )
118
118
# autotools build
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
119
+ if [[ ! -z " IS_OSX" ]]; then
120
+ if [[ ! -z " IS_OSX" && " $PLAT " = " arm64" ]] && [[ " $CROSS_COMPILING " = " 1" ]]; then
121
+ (cd netcdf-c-${NETCDF_VERSION} \
122
+ && ./configure --prefix=$BUILD_PREFIX --enable-netcdf-4 --enable-shared --enable-dap \
123
+ && make -j4 \
124
+ && make install )
125
+ else
126
+ (cd netcdf-c-${NETCDF_VERSION} \
127
+ && export HDF5_PLUGIN_PATH=$BUILD_PREFIX /lib/netcdf-plugins \
128
+ && ./configure --prefix=$BUILD_PREFIX --enable-netcdf-4 --enable-shared --enable-dap --with-plugin-dir=$HDF5_PLUGIN_PATH \
129
+ && make -j4 \
130
+ && make install )
131
+ fi
132
+ else
133
+ (cd netcdf-c-${NETCDF_VERSION} \
134
+ && curl https://raw.githubusercontent.com/MacPython/netcdf4-python-wheels/master/CMakeLists.txt.patch -o CMakeLists.txt.patch \
135
+ && patch -p0 < CMakeLists.txt.patch \
136
+ && mkdir build \
137
+ && cd build \
138
+ && export HDF5_PLUGIN_PATH=$BUILD_PREFIX /lib/netcdf-plugins \
139
+ && mkdir -p $HDF5_PLUGIN_PATH \
140
+ && cmake ../ -DCMAKE_INSTALL_PREFIX=${BUILD_PREFIX} -DENABLE_NETCDF_4=ON -DENABLE_DAP=ON -DBUILD_SHARED_LIBS=ON -DPLUGIN_INSTALL_DIR=YES \
141
+ && make -j4 \
142
+ && make install \
143
+ && ls -l $HDF5_PLUGIN_PATH )
144
+ fi
131
145
touch netcdf-stamp
132
146
}
133
147
0 commit comments