diff options
Diffstat (limited to 'ports/cfitsio')
| -rw-r--r-- | ports/cfitsio/0001-correct-headers-for-getcwd.patch | 40 | ||||
| -rw-r--r-- | ports/cfitsio/CONTROL | 3 | ||||
| -rw-r--r-- | ports/cfitsio/portfile.cmake | 4 |
3 files changed, 44 insertions, 3 deletions
diff --git a/ports/cfitsio/0001-correct-headers-for-getcwd.patch b/ports/cfitsio/0001-correct-headers-for-getcwd.patch new file mode 100644 index 000000000..afd63b61a --- /dev/null +++ b/ports/cfitsio/0001-correct-headers-for-getcwd.patch @@ -0,0 +1,40 @@ +From 67400fcbd3ab2f7e68a8e7a60139b1b615debae2 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca <mazzucan@outlook.com> +Date: Wed, 23 Sep 2020 10:27:43 -0700 +Subject: [PATCH] correct headers for getcwd + +--- + fitsio.h | 3 +++ + group.c | 2 +- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/fitsio.h b/fitsio.h +index ec26d9d..792bb95 100644 +--- a/fitsio.h ++++ b/fitsio.h +@@ -39,6 +39,9 @@ SERVICES PROVIDED HEREUNDER." + #define CFITSIO_MAJOR 3 + #define CFITSIO_SONAME 5 + ++/* Required for getcwd() */ ++#define _POSIX_C_SOURCE 200112L ++ + /* the SONAME is incremented in a new release if the binary shared */ + /* library (on linux and Mac systems) is not backward compatible */ + /* with the previous release of CFITSIO */ +diff --git a/group.c b/group.c +index 9326c57..cec0f6a 100644 +--- a/group.c ++++ b/group.c +@@ -24,7 +24,7 @@ + #include <direct.h> /* defines the getcwd function on Windows PCs */ + #endif + +-#if defined(unix) || defined(__unix__) || defined(__unix) || defined(HAVE_UNISTD_H) ++#if defined(unix) || defined(__unix__) || defined(__unix) || defined(__APPLE__) || defined(HAVE_UNISTD_H) + #include <unistd.h> /* needed for getcwd prototype on unix machines */ + #endif + +-- +2.24.3 (Apple Git-128) + diff --git a/ports/cfitsio/CONTROL b/ports/cfitsio/CONTROL index c46eaadfe..e7a638303 100644 --- a/ports/cfitsio/CONTROL +++ b/ports/cfitsio/CONTROL @@ -1,4 +1,5 @@ Source: cfitsio -Version: 3.410-3 +Version: 3.410 +Port-Version: 4 Homepage: https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c Description: Library of C and Fortran subroutines for reading and writing data files in FITS (Flexible Image Transport System) data format diff --git a/ports/cfitsio/portfile.cmake b/ports/cfitsio/portfile.cmake index c14b6743c..12e3e2d4a 100644 --- a/ports/cfitsio/portfile.cmake +++ b/ports/cfitsio/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_download_distfile(ARCHIVE URLS "http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio3410.tar.gz" FILENAME "cfitsio3410.tar.gz" @@ -9,6 +7,8 @@ vcpkg_download_distfile(ARCHIVE vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} + PATCHES + 0001-correct-headers-for-getcwd.patch ) vcpkg_configure_cmake( |
