mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 20:58:01 +08:00
[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:
parent
1ee6b340a3
commit
8e820ffb19
13
ports/cfitsio/0004-pkg-config.patch
Normal file
13
ports/cfitsio/0004-pkg-config.patch
Normal 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}
|
@ -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)
|
|
@ -11,14 +11,19 @@ vcpkg_extract_source_archive_ex(
|
|||||||
0001-fix-dependencies.patch
|
0001-fix-dependencies.patch
|
||||||
0002-export-cmake-targets.patch
|
0002-export-cmake-targets.patch
|
||||||
0003-add-Wno-error-implicit-funciton-declaration-to-cmake.patch
|
0003-add-Wno-error-implicit-funciton-declaration-to-cmake.patch
|
||||||
|
0004-pkg-config.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
vcpkg_check_features(
|
||||||
curl UseCurl
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||||
|
FEATURES
|
||||||
|
curl UseCurl
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(PKG_CONFIG_REQUIRES_PRIVATE zlib)
|
||||||
if ("curl" IN_LIST FEATURES)
|
if ("curl" IN_LIST FEATURES)
|
||||||
set(FIND_CURL_DEPENDENCY "find_dependency(CURL CONFIG)")
|
set(FIND_CURL_DEPENDENCY "find_dependency(CURL CONFIG)")
|
||||||
|
string(APPEND PKG_CONFIG_REQUIRES_PRIVATE " libcurl")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if ("pthreads" IN_LIST FEATURES)
|
if ("pthreads" IN_LIST FEATURES)
|
||||||
@ -34,8 +39,11 @@ endif()
|
|||||||
vcpkg_configure_cmake(
|
vcpkg_configure_cmake(
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
PREFER_NINJA
|
PREFER_NINJA
|
||||||
OPTIONS ${FEATURE_OPTIONS}
|
OPTIONS
|
||||||
|
${FEATURE_OPTIONS}
|
||||||
-DUSE_PTHREADS=${WITH_PTHREADS}
|
-DUSE_PTHREADS=${WITH_PTHREADS}
|
||||||
|
"-DPKG_CONFIG_REQUIRES_PRIVATE=${PKG_CONFIG_REQUIRES_PRIVATE}"
|
||||||
|
-DPKG_CONFIG_LIBS=-lcfitsio
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_install_cmake()
|
vcpkg_install_cmake()
|
||||||
|
27
ports/cfitsio/vcpkg.json
Normal file
27
ports/cfitsio/vcpkg.json
Normal 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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1166,7 +1166,7 @@
|
|||||||
},
|
},
|
||||||
"cfitsio": {
|
"cfitsio": {
|
||||||
"baseline": "3.49",
|
"baseline": "3.49",
|
||||||
"port-version": 0
|
"port-version": 1
|
||||||
},
|
},
|
||||||
"cgal": {
|
"cgal": {
|
||||||
"baseline": "5.2",
|
"baseline": "5.2",
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{
|
{
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "0ed894cb8efbfd277570991a78f29b70e4e931cd",
|
||||||
|
"version": "3.49",
|
||||||
|
"port-version": 1
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"git-tree": "cd71c6293e902542ed6cb0c146b5de5d6d7906a9",
|
"git-tree": "cd71c6293e902542ed6cb0c146b5de5d6d7906a9",
|
||||||
"version-string": "3.49",
|
"version-string": "3.49",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user