File netcdf-pkgconfig.patch of Package netcdf
diff -Naur netcdf-c-4.8.0-orig/nc-config.in netcdf-c-4.8.0/nc-config.in
--- netcdf-c-4.8.0-orig/nc-config.in 2021-03-30 21:28:37.000000000 +0200
+++ netcdf-c-4.8.0/nc-config.in 2021-04-17 21:46:38.323883214 +0200
@@ -6,13 +6,10 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
-libdir=@libdir@
includedir=@includedir@
cc="@CC@"
cflags="-I${includedir} @CPPFLAGS@"
-libs="-L${libdir} @NC_LIBS@"
-libsprivate="@LIBS@"
has_dap="@HAS_DAP@"
@@ -94,7 +91,6 @@
--has-parallel whether has parallel IO support via HDF5 or PnetCDF
--has-nczarr whether nczarr enabled
--libs library linking information for netcdf
- --static library linking information for statically-compiled netcdf
--prefix Install prefix
--includedir Include directory
--libdir Library directory
@@ -134,7 +130,6 @@
echo " --cc -> $cc"
echo " --cflags -> $cflags"
echo " --libs -> $libs"
- echo " --static -> $libsprivate"
echo
echo " --has-c++ -> $has_cxx"
echo " --cxx -> $cxx"
@@ -187,17 +182,6 @@
usage 1
fi
-for i in "$@"; do
- case $i in
- --static)
- HAS_STATIC="TRUE"
- ;;
- *)
- ;;
- esac
-done
-
-
while test $# -gt 0; do
case "$1" in
# this deals with options in the style
@@ -282,15 +266,11 @@
;;
--libs)
- if [ "x$HAS_STATIC" = "xTRUE" ]; then
- echo $libs $libsprivate
- else
- echo $libs
- fi
+ pkg-config netcdf --libs
;;
- --static)
- ;;
+ --static)
+ ;;
--prefix)
echo "${prefix}"