aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Pastor <dg0yt@darc.de>2021-05-21 10:12:28 +0200
committerGitHub <noreply@github.com>2021-05-21 01:12:28 -0700
commit8e820ffb197b2a9f00f3573e119af0f1f741892b (patch)
tree24b736a557fb330451a5acd9c2ca4ee0399c1e80
parent1ee6b340a3b1b77dbdf37f11ea75eaba222ad700 (diff)
downloadvcpkg-8e820ffb197b2a9f00f3573e119af0f1f741892b.tar.gz
vcpkg-8e820ffb197b2a9f00f3573e119af0f1f741892b.zip
[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
-rw-r--r--ports/cfitsio/0004-pkg-config.patch13
-rw-r--r--ports/cfitsio/CONTROL13
-rw-r--r--ports/cfitsio/portfile.cmake14
-rw-r--r--ports/cfitsio/vcpkg.json27
-rw-r--r--versions/baseline.json2
-rw-r--r--versions/c-/cfitsio.json5
6 files changed, 57 insertions, 17 deletions
diff --git a/ports/cfitsio/0004-pkg-config.patch b/ports/cfitsio/0004-pkg-config.patch
new file mode 100644
index 000000000..65d98b56a
--- /dev/null
+++ b/ports/cfitsio/0004-pkg-config.patch
@@ -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}
diff --git a/ports/cfitsio/CONTROL b/ports/cfitsio/CONTROL
deleted file mode 100644
index 85ff87432..000000000
--- a/ports/cfitsio/CONTROL
+++ /dev/null
@@ -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)
diff --git a/ports/cfitsio/portfile.cmake b/ports/cfitsio/portfile.cmake
index 095a9e62e..05821771a 100644
--- a/ports/cfitsio/portfile.cmake
+++ b/ports/cfitsio/portfile.cmake
@@ -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()
diff --git a/ports/cfitsio/vcpkg.json b/ports/cfitsio/vcpkg.json
new file mode 100644
index 000000000..fe2794b54
--- /dev/null
+++ b/ports/cfitsio/vcpkg.json
@@ -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"
+ }
+ ]
+ }
+ }
+}
diff --git a/versions/baseline.json b/versions/baseline.json
index b428bbab5..c1bede2b2 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -1166,7 +1166,7 @@
},
"cfitsio": {
"baseline": "3.49",
- "port-version": 0
+ "port-version": 1
},
"cgal": {
"baseline": "5.2",
diff --git a/versions/c-/cfitsio.json b/versions/c-/cfitsio.json
index 5763f0add..adf8116dd 100644
--- a/versions/c-/cfitsio.json
+++ b/versions/c-/cfitsio.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "0ed894cb8efbfd277570991a78f29b70e4e931cd",
+ "version": "3.49",
+ "port-version": 1
+ },
+ {
"git-tree": "cd71c6293e902542ed6cb0c146b5de5d6d7906a9",
"version-string": "3.49",
"port-version": 0