netcdf fix (#3515)

* ...

* compiler for test
This commit is contained in:
Andrew 2023-10-03 19:53:22 +03:00 committed by GitHub
parent 587441621e
commit aaa455a539
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,6 +26,14 @@ build:
cmake --build build_static cmake --build build_static
cmake --install build_static cmake --install build_static
- install build_static/liblib/libnetcdf.a {{prefix}}/lib/ - install build_static/liblib/libnetcdf.a {{prefix}}/lib/
- run: |
sed -E -i.bak \
-e "s:{{pkgx.prefix}}:\$\{_IMPORT_PREFIX\}/../../..:g" \
-e '/^ INTERFACE_INCLUDE_DIRECTORIES/ s|/v([0-9]+)(\.[0-9]+)*[a-z]?/include|/v\1/include|g' \
-e '/^ INTERFACE_LINK_LIBRARIES/ s|/v([0-9]+)(\.[0-9]+)*[a-z]?/lib|/v\1/lib|g' \
*.cmake
rm *.cmake.bak
working-directory: ${{prefix}}/lib/cmake/netCDF
- run: | - run: |
sed -i.bak \ sed -i.bak \
-e "s|$PKGX_DIR|\${PKGX_DIR}|g" \ -e "s|$PKGX_DIR|\${PKGX_DIR}|g" \
@ -60,7 +68,9 @@ provides:
- bin/ncgen - bin/ncgen
- bin/ncgen3 - bin/ncgen3
test: test:
dependencies:
gnu.org/gcc: '*'
script: script:
- cc test.c -lnetcdf -o test - gcc test.c -lnetcdf -o test
- ./test | grep {{version}} - ./test | grep {{version}}
- nc-config --version | grep {{version}} - nc-config --version | grep {{version}}