diff options
| author | Alexander Täschner <AlexanderTaeschner@users.noreply.github.com> | 2019-08-07 18:29:14 +0200 |
|---|---|---|
| committer | Curtis J Bezault <curtbezault@gmail.com> | 2019-08-07 12:29:14 -0400 |
| commit | 3405bfd2fb0a4c7c4fc8fa2025d115a24acdb85c (patch) | |
| tree | 84efda640bfbde87cfad746688a1c8c82cae5969 | |
| parent | 6a6d89ffd80f28c9bd7ad170d0a08657a10fa9d6 (diff) | |
| download | vcpkg-3405bfd2fb0a4c7c4fc8fa2025d115a24acdb85c.tar.gz vcpkg-3405bfd2fb0a4c7c4fc8fa2025d115a24acdb85c.zip | |
[libcerf] Add new port (#7320)
* Add port for libcerf.
* Indicate that static linkage is not available.
* Patch to enable static build.
| -rw-r--r-- | ports/libcerf/001-fix-static-build.patch | 13 | ||||
| -rw-r--r-- | ports/libcerf/CONTROL | 4 | ||||
| -rw-r--r-- | ports/libcerf/portfile.cmake | 35 |
3 files changed, 52 insertions, 0 deletions
diff --git a/ports/libcerf/001-fix-static-build.patch b/ports/libcerf/001-fix-static-build.patch new file mode 100644 index 000000000..ffaeaedfb --- /dev/null +++ b/ports/libcerf/001-fix-static-build.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f79581f..4fc9457 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -56,6 +56,8 @@ if(MSVC)
+ # set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin/$<CONFIG>)
+ if(BUILD_SHARED_LIBS)
+ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
++ else()
++ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
+ endif()
+ else()
+ add_compile_options(-O2 -Wno-sign-compare -fno-omit-frame-pointer)
diff --git a/ports/libcerf/CONTROL b/ports/libcerf/CONTROL new file mode 100644 index 000000000..72b1324d3 --- /dev/null +++ b/ports/libcerf/CONTROL @@ -0,0 +1,4 @@ +Source: libcerf
+Version: 1.13
+Description: A self-contained numeric library that provides an efficient and accurate implementation of complex error functions, along with Dawson, Faddeeva, and Voigt functions.
+Homepage: https://jugit.fz-juelich.de/mlz/libcerf
diff --git a/ports/libcerf/portfile.cmake b/ports/libcerf/portfile.cmake new file mode 100644 index 000000000..20e3c7c70 --- /dev/null +++ b/ports/libcerf/portfile.cmake @@ -0,0 +1,35 @@ +include(vcpkg_common_functions)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ set(BUILD_SHARED_LIBS ON)
+else()
+ set(BUILD_SHARED_LIBS OFF)
+endif()
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://jugit.fz-juelich.de/mlz/libcerf/uploads/924b8d245ad3461107ec630734dfc781/libcerf-1.13.tgz"
+ FILENAME "libcerf-1.13.tgz"
+ SHA512 4df711d3e9fd00de99959c3253a9565d1dc2c41f75a5800ced9c52f89cbd13185fbdca3ad75de788fd16c044082738ab345b7fb6a8820ac588edafe1812944aa
+)
+
+vcpkg_extract_source_archive_ex(
+ OUT_SOURCE_PATH SOURCE_PATH
+ ARCHIVE ${ARCHIVE}
+ PATCHES 001-fix-static-build.patch
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DCERF_CPP=ON
+ -DLIB_MAN=OFF
+ -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libcerf RENAME copyright)
+
+vcpkg_test_cmake(PACKAGE_NAME libcerf)
|
