blob: 32bcfbd2b9002fa24a048ad4a0adab0a54cac704 [file] [log] [blame]
Patrick Williams520786c2023-06-25 16:20:36 -05001Upstream-Status: Pending
2
Andrew Geisslerbffdb3e2020-08-21 16:13:29 -05003diff -urN -x .git orig/cmake/LibreSSL.cmake patched/cmake/LibreSSL.cmake
4--- orig/cmake/LibreSSL.cmake 2020-08-07 21:58:34.660773928 +0900
5+++ patched/cmake/LibreSSL.cmake 2020-08-07 22:51:18.620767245 +0900
6@@ -18,6 +18,9 @@
7 function(use_libre_ssl SOURCE_DIR BINARY_DIR)
8 message("Using bundled LibreSSL from release")
9
10+ find_package(Patch REQUIRED)
11+ set(PATCH "${Patch_EXECUTABLE}" -p1 -i "${SOURCE_DIR}/thirdparty/libressl/avoid-BSWAP-assembly-for-ARM-v6.patch")
12+
13 set(BYPRODUCT_PREFIX "lib" CACHE STRING "" FORCE)
14 set(BYPRODUCT_SUFFIX ".a" CACHE STRING "" FORCE)
15
16@@ -27,16 +30,29 @@
17 set(BYPRODUCT_PREFIX "" CACHE STRING "" FORCE)
18 set(BUILD_ARGS " -GVisual Studio 15 2017")
19 endif(WIN32)
20+
21+ set(BYPRODUCTS
22+ "lib/${BYPRODUCT_PREFIX}crypto${BYPRODUCT_SUFFIX}"
23+ "lib/${BYPRODUCT_PREFIX}ssl${BYPRODUCT_SUFFIX}"
24+ "lib/${BYPRODUCT_PREFIX}tls${BYPRODUCT_SUFFIX}"
25+ )
26+ set(LIBRESSL_INSTALL_DIR "${BINARY_DIR}/thirdparty/libressl-install" CACHE STRING "" FORCE)
27+ FOREACH(BYPRODUCT ${BYPRODUCTS})
28+ LIST(APPEND LIBRESSL_LIBRARIES_LIST "${LIBRESSL_INSTALL_DIR}/${BYPRODUCT}")
29+ ENDFOREACH(BYPRODUCT)
30+
31 ExternalProject_Add(
32 libressl-portable
33 URL https://cdn.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.8.3.tar.gz https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.8.3.tar.gz https://gentoo.osuosl.org/distfiles/libressl-2.8.3.tar.gz
34 URL_HASH "SHA256=9b640b13047182761a99ce3e4f000be9687566e0828b4a72709e9e6a3ef98477"
35 SOURCE_DIR "${BINARY_DIR}/thirdparty/libressl-src"
36+ PATCH_COMMAND ${PATCH}
37 CMAKE_ARGS ${PASSTHROUGH_CMAKE_ARGS}
38 "-DCMAKE_INSTALL_PREFIX=${BINARY_DIR}/thirdparty/libressl-install"
39 "-DLIBRESSL_APPS=OFF"
40 "-DLIBRESSL_TESTS=OFF"
41 "${BUILD_ARGS}"
42+ BUILD_BYPRODUCTS ${LIBRESSL_LIBRARIES_LIST}
43 )
44
45 add_library(crypto STATIC IMPORTED)