[cfitsio] Fix pc files (#17696)

* Add missing details to cfitsio pc files

* Modernize vcpkg_check_features usage

* Add CMAKE_DEBUG_SUFFIX=d

* x-add-version

* Revert CMAKE_DEBUG_SUFFIX

* x-add-version

* Use Requires.private instead of Requires

* Update version
This commit is contained in:
Kai Pastor 2021-05-21 10:12:28 +02:00 committed by GitHub
parent 1ee6b340a3
commit 8e820ffb19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 57 additions and 17 deletions

View File

@ -0,0 +1,13 @@
diff -urw cfitsio-3-7822097674.clean/cfitsio.pc.cmake cfitsio-3-7822097674/cfitsio.pc.cmake
--- cfitsio-3-7822097674.clean/cfitsio.pc.cmake 2020-08-12 20:01:04.000000000 +0200
+++ cfitsio-3-7822097674/cfitsio.pc.cmake 2021-05-06 08:46:49.160351519 +0200
@@ -6,7 +6,8 @@
Name: cfitsio
Description: FITS File Subroutine Library
URL: https://heasarc.gsfc.nasa.gov/fitsio/
-Version: @CFITSIO_MAJOR@.@CFITSIO_MINOR@
+Version: @CFITSIO_VERSION@
+Requires.private: @PKG_CONFIG_REQUIRES_PRIVATE@
Libs: -L${libdir} @PKG_CONFIG_LIBS@
Libs.private: -lm
Cflags: -I${includedir}

View File

@ -1,13 +0,0 @@
Source: cfitsio
Version: 3.49
Homepage: https://heasarc.gsfc.nasa.gov/fitsio/
Description: Library of C and Fortran subroutines for reading and writing data files in FITS (Flexible Image Transport System) data format
Build-Depends: zlib
Feature: curl
Description: UseCurl
Build-Depends: curl
Feature: pthreads
Description: Thread-safe build (using pthreads)
Build-Depends: pthreads (windows)

View File

@ -11,14 +11,19 @@ vcpkg_extract_source_archive_ex(
0001-fix-dependencies.patch
0002-export-cmake-targets.patch
0003-add-Wno-error-implicit-funciton-declaration-to-cmake.patch
0004-pkg-config.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
curl UseCurl
vcpkg_check_features(
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
curl UseCurl
)
set(PKG_CONFIG_REQUIRES_PRIVATE zlib)
if ("curl" IN_LIST FEATURES)
set(FIND_CURL_DEPENDENCY "find_dependency(CURL CONFIG)")
string(APPEND PKG_CONFIG_REQUIRES_PRIVATE " libcurl")
endif()
if ("pthreads" IN_LIST FEATURES)
@ -34,8 +39,11 @@ endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS ${FEATURE_OPTIONS}
OPTIONS
${FEATURE_OPTIONS}
-DUSE_PTHREADS=${WITH_PTHREADS}
"-DPKG_CONFIG_REQUIRES_PRIVATE=${PKG_CONFIG_REQUIRES_PRIVATE}"
-DPKG_CONFIG_LIBS=-lcfitsio
)
vcpkg_install_cmake()

27
ports/cfitsio/vcpkg.json Normal file
View File

@ -0,0 +1,27 @@
{
"name": "cfitsio",
"version": "3.49",
"port-version": 1,
"description": "Library of C and Fortran subroutines for reading and writing data files in FITS (Flexible Image Transport System) data format",
"homepage": "https://heasarc.gsfc.nasa.gov/fitsio/",
"dependencies": [
"zlib"
],
"features": {
"curl": {
"description": "UseCurl",
"dependencies": [
"curl"
]
},
"pthreads": {
"description": "Thread-safe build (using pthreads)",
"dependencies": [
{
"name": "pthreads",
"platform": "windows"
}
]
}
}
}

View File

@ -1166,7 +1166,7 @@
},
"cfitsio": {
"baseline": "3.49",
"port-version": 0
"port-version": 1
},
"cgal": {
"baseline": "5.2",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "0ed894cb8efbfd277570991a78f29b70e4e931cd",
"version": "3.49",
"port-version": 1
},
{
"git-tree": "cd71c6293e902542ed6cb0c146b5de5d6d7906a9",
"version-string": "3.49",