early-access version 2853
This commit is contained in:
39
externals/vcpkg/ports/cfitsio/0001-fix-dependencies.patch
vendored
Executable file
39
externals/vcpkg/ports/cfitsio/0001-fix-dependencies.patch
vendored
Executable file
@@ -0,0 +1,39 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 6d6af49..9e7d2ee 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -94,9 +94,8 @@ IF (NOT MSVC)
|
||||
|
||||
# Find curl library, for HTTPS support:
|
||||
IF (UseCurl)
|
||||
- FIND_PACKAGE(CURL)
|
||||
+ FIND_PACKAGE(CURL CONFIG REQUIRED)
|
||||
IF (CURL_FOUND)
|
||||
- INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIR})
|
||||
ADD_DEFINITIONS(-DCFITSIO_HAVE_CURL)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
@@ -128,18 +127,20 @@ SET(SRC_FILES
|
||||
|
||||
# Only include zlib source files if we are building a shared library.
|
||||
# Users will need to link their executable with zlib independently.
|
||||
-IF (BUILD_SHARED_LIBS)
|
||||
+IF (0)
|
||||
set(SRC_FILES ${SRC_FILES}
|
||||
zlib/adler32.c zlib/crc32.c zlib/deflate.c zlib/infback.c
|
||||
zlib/inffast.c zlib/inflate.c zlib/inftrees.c zlib/trees.c
|
||||
zlib/uncompr.c zlib/zutil.c
|
||||
)
|
||||
+ELSE()
|
||||
+ FIND_PACKAGE(ZLIB REQUIRED)
|
||||
ENDIF()
|
||||
|
||||
ADD_LIBRARY(${LIB_NAME} ${LIB_TYPE} ${H_FILES} ${SRC_FILES})
|
||||
-TARGET_LINK_LIBRARIES(${LIB_NAME} ${PTHREADS_LIBRARY} ${M_LIB})
|
||||
+TARGET_LINK_LIBRARIES(${LIB_NAME} ${PTHREADS_LIBRARY} ${M_LIB} ZLIB::ZLIB)
|
||||
IF (CURL_FOUND)
|
||||
- TARGET_LINK_LIBRARIES(${LIB_NAME} ${CURL_LIBRARIES})
|
||||
+ TARGET_LINK_LIBRARIES(${LIB_NAME} CURL::libcurl)
|
||||
ENDIF(CURL_FOUND)
|
||||
|
||||
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES VERSION ${${PROJECT_NAME}_VERSION} SOVERSION ${${PROJECT_NAME}_MAJOR_VERSION})
|
||||
48
externals/vcpkg/ports/cfitsio/0002-export-cmake-targets.patch
vendored
Executable file
48
externals/vcpkg/ports/cfitsio/0002-export-cmake-targets.patch
vendored
Executable file
@@ -0,0 +1,48 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 9e7d2ee..5b37adc 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -24,7 +24,7 @@ OPTION(UseCurl "UseCurl" ON)
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}")
|
||||
set (LIB_DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
|
||||
-set (INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/")
|
||||
+set (INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/cfitsio")
|
||||
|
||||
# Define project version
|
||||
SET(${PROJECT_NAME}_MAJOR_VERSION 3)
|
||||
@@ -138,19 +138,31 @@ ELSE()
|
||||
ENDIF()
|
||||
|
||||
ADD_LIBRARY(${LIB_NAME} ${LIB_TYPE} ${H_FILES} ${SRC_FILES})
|
||||
-TARGET_LINK_LIBRARIES(${LIB_NAME} ${PTHREADS_LIBRARY} ${M_LIB} ZLIB::ZLIB)
|
||||
+TARGET_INCLUDE_DIRECTORIES(${LIB_NAME} PUBLIC $<INSTALL_INTERFACE:include/cfitsio>)
|
||||
+TARGET_LINK_LIBRARIES(${LIB_NAME} PUBLIC ${PTHREADS_LIBRARY} ${M_LIB} ZLIB::ZLIB)
|
||||
IF (CURL_FOUND)
|
||||
- TARGET_LINK_LIBRARIES(${LIB_NAME} CURL::libcurl)
|
||||
+ TARGET_LINK_LIBRARIES(${LIB_NAME} PUBLIC CURL::libcurl)
|
||||
ENDIF(CURL_FOUND)
|
||||
|
||||
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES VERSION ${${PROJECT_NAME}_VERSION} SOVERSION ${${PROJECT_NAME}_MAJOR_VERSION})
|
||||
-install(TARGETS ${LIB_NAME} DESTINATION ${LIB_DESTINATION})
|
||||
install(TARGETS ${LIB_NAME}
|
||||
+ EXPORT unofficial-${LIB_NAME}-config
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib)
|
||||
install(FILES ${H_FILES} DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel)
|
||||
|
||||
+set(CFITSIO_VERSION 3.49)
|
||||
+include(CMakePackageConfigHelpers)
|
||||
+write_basic_package_version_file(unofficial-${LIB_NAME}-version.cmake VERSION ${CFITSIO_VERSION} COMPATIBILITY ExactVersion)
|
||||
+
|
||||
+install(FILES ${CMAKE_BINARY_DIR}/unofficial-${LIB_NAME}-version.cmake DESTINATION share/unofficial-${LIB_NAME})
|
||||
+
|
||||
+install(
|
||||
+ EXPORT unofficial-${LIB_NAME}-config
|
||||
+ DESTINATION share/unofficial-${LIB_NAME}
|
||||
+)
|
||||
+
|
||||
# Only build test code and executables if building a shared library:
|
||||
IF (BUILD_SHARED_LIBS)
|
||||
|
||||
27
externals/vcpkg/ports/cfitsio/0003-add-Wno-error-implicit-funciton-declaration-to-cmake.patch
vendored
Executable file
27
externals/vcpkg/ports/cfitsio/0003-add-Wno-error-implicit-funciton-declaration-to-cmake.patch
vendored
Executable file
@@ -0,0 +1,27 @@
|
||||
From af09ca45ad71a540aafc4989676e9a0b88bf2948 Mon Sep 17 00:00:00 2001
|
||||
From: Nicole Mazzuca <mazzucan@outlook.com>
|
||||
Date: Fri, 16 Oct 2020 12:28:37 -0700
|
||||
Subject: [PATCH] add `-Wno-error=implicit-funciton-declaration` to cmake
|
||||
|
||||
---
|
||||
CMakeLists.txt | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 5b37adc..fead70c 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -6,6 +6,10 @@ SET(CMAKE_LEGACY_CYGWIN_WIN32 0)
|
||||
PROJECT(CFITSIO)
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0)
|
||||
|
||||
+if (NOT MSVC)
|
||||
+ add_compile_options(-Wno-error=implicit-function-declaration)
|
||||
+endif()
|
||||
+
|
||||
# Allow @rpath token in target install name on Macs.
|
||||
# See "cmake --help-policy CMP0042" for more information.
|
||||
IF(POLICY CMP0042)
|
||||
--
|
||||
2.28.0.windows.1
|
||||
|
||||
13
externals/vcpkg/ports/cfitsio/0004-pkg-config.patch
vendored
Executable file
13
externals/vcpkg/ports/cfitsio/0004-pkg-config.patch
vendored
Executable file
@@ -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}
|
||||
73
externals/vcpkg/ports/cfitsio/portfile.cmake
vendored
Executable file
73
externals/vcpkg/ports/cfitsio/portfile.cmake
vendored
Executable file
@@ -0,0 +1,73 @@
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-3.49.tar.gz"
|
||||
FILENAME "cfitsio-3.49.tar.gz"
|
||||
SHA512 9836a4af3bbbfed1ea1b4c70b9d500ac485d7c3d8131eb8a25ee6ef6662f46ba52b5161c45c709ed9a601ff0e9ec36daa5650eaaf4f2cc7d6f4bb5640f10da15
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE ${ARCHIVE}
|
||||
PATCHES
|
||||
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
|
||||
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)
|
||||
if (VCPKG_TARGET_IS_WINDOWS)
|
||||
set(WITH_PTHREADS ON)
|
||||
set(FIND_PTHREADS_DEPENDENCY "find_dependency(pthreads)")
|
||||
else()
|
||||
message(WARNING "Feature pthreads only support Windows, disable it now.")
|
||||
set(WITH_PTHREADS OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
${FEATURE_OPTIONS}
|
||||
-DUSE_PTHREADS=${WITH_PTHREADS}
|
||||
"-DPKG_CONFIG_REQUIRES_PRIVATE=${PKG_CONFIG_REQUIRES_PRIVATE}"
|
||||
-DPKG_CONFIG_LIBS=-lcfitsio
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES m)
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-cfitsio TARGET_PATH share/unofficial-cfitsio)
|
||||
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/share/unofficial-cfitsio/unofficial-cfitsio-config.cmake ASSIMP_CONFIG)
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/share/unofficial-cfitsio/unofficial-cfitsio-config.cmake "
|
||||
include(CMakeFindDependencyMacro)
|
||||
${FIND_CURL_DEPENDENCY}
|
||||
${FIND_PTHREADS_DEPENDENCY}
|
||||
find_dependency(ZLIB)
|
||||
${ASSIMP_CONFIG}
|
||||
")
|
||||
|
||||
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/unofficial-cfitsio/unofficial-cfitsio-config.cmake
|
||||
"cmake_policy(VERSION 2.6)"
|
||||
"cmake_policy(VERSION 2.6)\r\n\
|
||||
# Required for the evaluation of \"if(@BUILD_SHARED_LIBS@)\" below to function\r\n\
|
||||
cmake_policy(SET CMP0012 NEW)\r\n"
|
||||
)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/include/unistd.h ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
||||
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)
|
||||
27
externals/vcpkg/ports/cfitsio/vcpkg.json
vendored
Executable file
27
externals/vcpkg/ports/cfitsio/vcpkg.json
vendored
Executable file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "cfitsio",
|
||||
"version": "3.49",
|
||||
"port-version": 2,
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user