mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 01:57:17 +08:00
fix LINK2019 error (#33484)
This commit is contained in:
parent
aa315719c4
commit
7ec387ac32
25
ports/cfitsio/0005-fix-link2019-error.patch
Normal file
25
ports/cfitsio/0005-fix-link2019-error.patch
Normal file
@ -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
|
@ -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")
|
||||
|
@ -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": [
|
||||
|
@ -1474,7 +1474,7 @@
|
||||
},
|
||||
"cfitsio": {
|
||||
"baseline": "3.49",
|
||||
"port-version": 3
|
||||
"port-version": 4
|
||||
},
|
||||
"cgal": {
|
||||
"baseline": "5.6",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "b2df854891a5beda50e8cf8004a7af0766c5c5bc",
|
||||
"version": "3.49",
|
||||
"port-version": 4
|
||||
},
|
||||
{
|
||||
"git-tree": "b3f1a4860fc51b43140dc7139dd262f93e4a949d",
|
||||
"version": "3.49",
|
||||
|
Loading…
x
Reference in New Issue
Block a user