Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cfitsio] Fix pc files #17696

Merged
merged 8 commits into from
May 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions ports/cfitsio/0004-pkg-config.patch
Original file line number Diff line number Diff line change
@@ -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}
13 changes: 0 additions & 13 deletions ports/cfitsio/CONTROL

This file was deleted.

14 changes: 11 additions & 3 deletions ports/cfitsio/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()
Expand Down
27 changes: 27 additions & 0 deletions ports/cfitsio/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
}
}
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@
},
"cfitsio": {
"baseline": "3.49",
"port-version": 0
"port-version": 1
},
"cgal": {
"baseline": "5.2",
Expand Down
5 changes: 5 additions & 0 deletions versions/c-/cfitsio.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "0ed894cb8efbfd277570991a78f29b70e4e931cd",
"version": "3.49",
"port-version": 1
},
{
"git-tree": "cd71c6293e902542ed6cb0c146b5de5d6d7906a9",
"version-string": "3.49",
Expand Down