diff options
Diffstat (limited to 'ports/ned14-internal-quickcpplib')
| -rw-r--r-- | ports/ned14-internal-quickcpplib/CONTROL | 5 | ||||
| -rw-r--r-- | ports/ned14-internal-quickcpplib/portfile.cmake | 74 | ||||
| -rw-r--r-- | ports/ned14-internal-quickcpplib/quicklib-depheaders.patch | 29 | ||||
| -rw-r--r-- | ports/ned14-internal-quickcpplib/sha_manifest.cmake | 5 | ||||
| -rw-r--r-- | ports/ned14-internal-quickcpplib/usage | 2 |
5 files changed, 115 insertions, 0 deletions
diff --git a/ports/ned14-internal-quickcpplib/CONTROL b/ports/ned14-internal-quickcpplib/CONTROL new file mode 100644 index 000000000..ee47c924e --- /dev/null +++ b/ports/ned14-internal-quickcpplib/CONTROL @@ -0,0 +1,5 @@ +Source: ned14-internal-quickcpplib +Version: 0.0.0-24d92c71 +Homepage: https://github.com/ned14/quickcpplib +Description: NOT FOR EXTERNAL CONSUMPTION, a set of internal scripts used by ned14's libraries. +Build-Depends: byte-lite, gsl-lite diff --git a/ports/ned14-internal-quickcpplib/portfile.cmake b/ports/ned14-internal-quickcpplib/portfile.cmake new file mode 100644 index 000000000..57cb70c7f --- /dev/null +++ b/ports/ned14-internal-quickcpplib/portfile.cmake @@ -0,0 +1,74 @@ +# QuickCppLib is composed of other third party libraries: +# <= quickcpplib +# <= byte-lite +# <= gsl-lite +# <= Optional +# +# byte-lite and gsl-lite are in vcpkg, but may not be versions +# known to be compatible with QuickCppLib. It has occurred in the +# past that newer versions were severely broken with QuickCppLib. + +include(${CURRENT_PORT_DIR}/sha_manifest.cmake) + +message(WARNING [=[ +QuickCppLib and its downstream dependencies Outcome and LLFIO were tested against gsl-lite version 0.37.0 and byte-lite version 0.2.0. They are not guaranteed to work with newer versions, with failures experienced in the past up-to-and-including runtime crashes. You can pin the versions as verified to work in QuickCppLib's CI in your manifest file by adding: + "overrides": [ + { "name": "gsl-lite", "version": "0.37.0" }, + { "name": "byte-lite", "version": "0.2.0" } + ] +Do not report issues to upstream without first pinning these previous versions. +]=]) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ned14/quickcpplib + REF ${QUICKCPPLIB_REF} + SHA512 ${QUICKCPPLIB_SHA512} + HEAD_REF master + PATCHES + quicklib-depheaders.patch +) + +# Quickcpplib deploys subsets of the dependency headers into a private subdirectory +file(COPY "${CURRENT_INSTALLED_DIR}/include/nonstd/byte.hpp" + DESTINATION "${SOURCE_PATH}/include/quickcpplib/byte/include/nonstd") +file(COPY "${CURRENT_INSTALLED_DIR}/include/gsl/gsl-lite.hpp" + DESTINATION "${SOURCE_PATH}/include/quickcpplib/gsl-lite/include/gsl") +file(COPY "${CURRENT_INSTALLED_DIR}/include/gsl-lite/gsl-lite.hpp" + DESTINATION "${SOURCE_PATH}/include/quickcpplib/gsl-lite/include/gsl-lite") + +vcpkg_from_github( + OUT_SOURCE_PATH OPT_SOURCE_PATH + REPO akrzemi1/Optional + REF ${OPTIONAL_REF} + SHA512 ${OPTIONAL_SHA512} + HEAD_REF master +) + +file(COPY "${OPT_SOURCE_PATH}/." DESTINATION "${SOURCE_PATH}/include/quickcpplib/optional") + +# Because quickcpplib's deployed files are header-only, the debug build it not necessary +set(VCPKG_BUILD_TYPE release) + +# Use QuickCppLib's own build process, skipping examples and tests. +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + -DPROJECT_IS_DEPENDENCY=On + -DQUICKCPPLIB_USE_VCPKG_BYTE_LITE=ON + -DQUICKCPPLIB_USE_VCPKG_GSL_LITE=ON + -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON + -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/quickcpplib) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") +file(RENAME "${CURRENT_PACKAGES_DIR}/share/cmakelib" "${CURRENT_PACKAGES_DIR}/share/ned14-internal-quickcpplib/cmakelib") +file(RENAME "${CURRENT_PACKAGES_DIR}/share/scripts" "${CURRENT_PACKAGES_DIR}/share/ned14-internal-quickcpplib/scripts") + +file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${SOURCE_PATH}/Licence.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/ned14-internal-quickcpplib/quicklib-depheaders.patch b/ports/ned14-internal-quickcpplib/quicklib-depheaders.patch new file mode 100644 index 000000000..6e7ea0a5d --- /dev/null +++ b/ports/ned14-internal-quickcpplib/quicklib-depheaders.patch @@ -0,0 +1,29 @@ +diff --git a/cmake/headers.cmake b/cmake/headers.cmake
+index 1aad359..e5053ed 100644
+--- a/cmake/headers.cmake
++++ b/cmake/headers.cmake
+@@ -13,8 +13,6 @@ set(quickcpplib_HEADERS
+ "include/quickcpplib/boost/test/unit_test.hpp"
+ "include/quickcpplib/byte.hpp"
+ "include/quickcpplib/byte/include/nonstd/byte.hpp"
+- "include/quickcpplib/byte/test/byte-main.t.hpp"
+- "include/quickcpplib/byte/test/lest_cpp03.hpp"
+ "include/quickcpplib/config.hpp"
+ "include/quickcpplib/console_colours.hpp"
+ "include/quickcpplib/cpp_feature.h"
+@@ -25,15 +23,8 @@ set(quickcpplib_HEADERS
+ "include/quickcpplib/erasure_cast.hpp"
+ "include/quickcpplib/execinfo_win64.h"
+ "include/quickcpplib/function_ptr.hpp"
+- "include/quickcpplib/gsl-lite/gsl-lite.natvis"
+ "include/quickcpplib/gsl-lite/include/gsl-lite/gsl-lite.hpp"
+- "include/quickcpplib/gsl-lite/include/gsl.h"
+- "include/quickcpplib/gsl-lite/include/gsl.hpp"
+- "include/quickcpplib/gsl-lite/include/gsl/gsl-lite-vc6.hpp"
+- "include/quickcpplib/gsl-lite/include/gsl/gsl-lite.h"
+ "include/quickcpplib/gsl-lite/include/gsl/gsl-lite.hpp"
+- "include/quickcpplib/gsl-lite/test/gsl-lite.t.hpp"
+- "include/quickcpplib/gsl-lite/test/lest_cpp03.hpp"
+ "include/quickcpplib/import.h"
+ "include/quickcpplib/in_place_detach_attach.hpp"
+ "include/quickcpplib/mem_flush_loads_stores.hpp"
diff --git a/ports/ned14-internal-quickcpplib/sha_manifest.cmake b/ports/ned14-internal-quickcpplib/sha_manifest.cmake new file mode 100644 index 000000000..72a1188df --- /dev/null +++ b/ports/ned14-internal-quickcpplib/sha_manifest.cmake @@ -0,0 +1,5 @@ +set(QUICKCPPLIB_REF 24d92c71ef5d2200f7e42bc47e6dd59ad6d99fe3)
+set(QUICKCPPLIB_SHA512 9e39237833dea8288fbc5fda4189d971dff76284e3f352c7a0762e71a4bf311f4550fefd0f8926b6d971ca1c62acc3d055af233912de0adb0c6821995b6ce7e7)
+
+set(OPTIONAL_REF 2b43315458a99fc5de1da6e7bc0ddd364b26d643)
+set(OPTIONAL_SHA512 1952386cd3c7b963861f9634055e1baa4181d398d6f1b068a8a3f411368432bdcd42e47aadfa856584ed9a7c724a1c83369243ccb653e650af5c9155b42a84f4)
diff --git a/ports/ned14-internal-quickcpplib/usage b/ports/ned14-internal-quickcpplib/usage new file mode 100644 index 000000000..91f1dff7e --- /dev/null +++ b/ports/ned14-internal-quickcpplib/usage @@ -0,0 +1,2 @@ +You should NOT DIRECTLY USE quickcpplib in your own libraries!
+It is intended for internal use by ned14's vcpkg libraries only.
|
