diff --git a/ports/cfitsio/0005-fix-link2019-error.patch b/ports/cfitsio/0005-fix-link2019-error.patch new file mode 100644 index 0000000000..0ab5886985 --- /dev/null +++ b/ports/cfitsio/0005-fix-link2019-error.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fead70c..f05ae92 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -68,6 +68,7 @@ IF (USE_PTHREADS) + FIND_PACKAGE(pthreads REQUIRED) + INCLUDE_DIRECTORIES(${PTHREADS_INCLUDE_DIR}) + ADD_DEFINITIONS(-D_REENTRANT) ++ set(PTHREADS_LIBRARY PThreads4W::PThreads4W) + ENDIF() + + # Math library (not available in MSVC or MINGW) +diff --git a/fitsio2.h b/fitsio2.h +index 1adb17b..19f8511 100644 +--- a/fitsio2.h ++++ b/fitsio2.h +@@ -26,7 +26,7 @@ extern int Fitsio_Pthread_Status; + #define FFUNLOCK1(lockname) (Fitsio_Pthread_Status = pthread_mutex_unlock(&lockname)) + #define FFLOCK FFLOCK1(Fitsio_Lock) + #define FFUNLOCK FFUNLOCK1(Fitsio_Lock) +-#define ffstrtok(str, tok, save) strtok_r(str, tok, save) ++#define ffstrtok(str, tok, save) strtok_s(str, tok, save) + + #else + #define FFLOCK diff --git a/ports/cfitsio/portfile.cmake b/ports/cfitsio/portfile.cmake index 13c3a18349..75c5d5bc08 100644 --- a/ports/cfitsio/portfile.cmake +++ b/ports/cfitsio/portfile.cmake @@ -12,6 +12,7 @@ vcpkg_extract_source_archive( 0002-export-cmake-targets.patch 0003-add-Wno-error-implicit-funciton-declaration-to-cmake.patch 0004-pkg-config.patch + 0005-fix-link2019-error.patch ) vcpkg_check_features( @@ -69,4 +70,4 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_ file(INSTALL "${SOURCE_PATH}/FindPthreads.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/unofficial-cfitsio") -file(INSTALL "${SOURCE_PATH}/License.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/License.txt") diff --git a/ports/cfitsio/vcpkg.json b/ports/cfitsio/vcpkg.json index 7c47f6b373..fe638417c4 100644 --- a/ports/cfitsio/vcpkg.json +++ b/ports/cfitsio/vcpkg.json @@ -1,7 +1,7 @@ { "name": "cfitsio", "version": "3.49", - "port-version": 3, + "port-version": 4, "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": [ diff --git a/versions/baseline.json b/versions/baseline.json index f637254c45..aab4bc47e8 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1474,7 +1474,7 @@ }, "cfitsio": { "baseline": "3.49", - "port-version": 3 + "port-version": 4 }, "cgal": { "baseline": "5.6", diff --git a/versions/c-/cfitsio.json b/versions/c-/cfitsio.json index af756dc2b5..5014d8acf6 100644 --- a/versions/c-/cfitsio.json +++ b/versions/c-/cfitsio.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "b2df854891a5beda50e8cf8004a7af0766c5c5bc", + "version": "3.49", + "port-version": 4 + }, { "git-tree": "b3f1a4860fc51b43140dc7139dd262f93e4a949d", "version": "3.49",