diff options
author | Okamura Kazuya <gentoo-guru@danceylove.net> | 2023-06-28 00:04:07 +0900 |
---|---|---|
committer | Okamura Kazuya <gentoo-guru@danceylove.net> | 2023-06-28 00:04:07 +0900 |
commit | a45331733cf318e1e81901bc64a64540afe2ad59 (patch) | |
tree | c07a19f6c3b57db5b8ae6b5dd85d2dddefac8b45 /dev-libs | |
parent | dev-libs/lsquic: new package, add 3.2.0 (diff) | |
download | guru-a45331733cf318e1e81901bc64a64540afe2ad59.tar.gz guru-a45331733cf318e1e81901bc64a64540afe2ad59.tar.bz2 guru-a45331733cf318e1e81901bc64a64540afe2ad59.zip |
dev-libs/boringssl-fips: new package, add 20230428
Signed-off-by: Okamura Kazuya <gentoo-guru@danceylove.net>
Diffstat (limited to 'dev-libs')
3 files changed, 105 insertions, 0 deletions
diff --git a/dev-libs/boringssl-fips/boringssl-fips-20230428.ebuild b/dev-libs/boringssl-fips/boringssl-fips-20230428.ebuild new file mode 100644 index 000000000..13fac1a4f --- /dev/null +++ b/dev-libs/boringssl-fips/boringssl-fips-20230428.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake go-module git-r3 + +EGIT_REPO_URI="https://github.com/google/boringssl" +EGIT_BRANCH="fips-${PV}" + +DESCRIPTION="BoringSSL is a fork of OpenSSL that is designed to meet Google's needs." +HOMEPAGE="https://github.com/google/boringssl" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" +IUSE="static-libs" + +DEPEND=" + dev-libs/openssl:=[static-libs=] +" + +PATCHES=( + "${FILESDIR}"/fix-${PN}-collisions-openssl.patch +) + +src_configure() { + local mycmakeargs=( + -DBUILD_SHARED_LIBS=$(usex !static-libs) + ) + cmake_src_configure +} + +pkg_preinst() { + mkdir -p ${D}/usr/lib64/boringssl/ + cp ${WORKDIR}/${PN}-${PV}_build/crypto/libcrypto.so ${D}/usr/lib64/boringssl/libcrypto.so + cp ${WORKDIR}/${PN}-${PV}_build/ssl/libssl.so ${D}/usr/lib64/boringssl/libssl.so + return +} diff --git a/dev-libs/boringssl-fips/files/fix-boringssl-fips-collisions-openssl.patch b/dev-libs/boringssl-fips/files/fix-boringssl-fips-collisions-openssl.patch new file mode 100644 index 000000000..ce26756a5 --- /dev/null +++ b/dev-libs/boringssl-fips/files/fix-boringssl-fips-collisions-openssl.patch @@ -0,0 +1,55 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -589,11 +589,11 @@ add_custom_target( + DEPENDS all_tests bssl_shim handshaker fips_specific_tests_if_any + USES_TERMINAL) + +-install_if_enabled(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) ++install_if_enabled(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/boringssl) + +-install_if_enabled(EXPORT OpenSSLTargets +- FILE OpenSSLTargets.cmake +- NAMESPACE OpenSSL:: +- DESTINATION lib/cmake/OpenSSL +-) ++#install_if_enabled(EXPORT OpenSSLTargets ++# FILE OpenSSLTargets.cmake ++# NAMESPACE OpenSSL:: ++# DESTINATION lib/cmake/OpenSSL ++#) + install_if_enabled(FILES cmake/OpenSSLConfig.cmake DESTINATION lib/cmake/OpenSSL) +--- a/crypto/CMakeLists.txt ++++ b/crypto/CMakeLists.txt +@@ -304,8 +304,8 @@ target_include_directories(crypto PUBLIC + $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> + $<INSTALL_INTERFACE:include> + ) +-install_if_enabled(TARGETS crypto EXPORT OpenSSLTargets ${INSTALL_DESTINATION_DEFAULT}) +-set_property(TARGET crypto PROPERTY EXPORT_NAME Crypto) ++#install_if_enabled(TARGETS crypto EXPORT OpenSSLTargets ${INSTALL_DESTINATION_DEFAULT}) ++#set_property(TARGET crypto PROPERTY EXPORT_NAME Crypto) + + if(FIPS_SHARED) + # Rewrite libcrypto.so to inject the correct module hash value. This assumes +--- a/ssl/CMakeLists.txt ++++ b/ssl/CMakeLists.txt +@@ -42,8 +42,8 @@ add_library( + # Although libssl also provides headers that require an include directory, the + # flag is already specified by libcrypto, so we omit target_include_directories + # here. +-install_if_enabled(TARGETS ssl EXPORT OpenSSLTargets ${INSTALL_DESTINATION_DEFAULT}) +-set_property(TARGET ssl PROPERTY EXPORT_NAME SSL) ++#install_if_enabled(TARGETS ssl EXPORT OpenSSLTargets ${INSTALL_DESTINATION_DEFAULT}) ++#set_property(TARGET ssl PROPERTY EXPORT_NAME SSL) + target_link_libraries(ssl crypto) + + add_executable( +--- a/tool/CMakeLists.txt ++++ b/tool/CMakeLists.txt +@@ -19,5 +19,5 @@ add_executable( + tool.cc + transport_common.cc + ) +-install_if_enabled(TARGETS bssl DESTINATION ${INSTALL_DESTINATION_DEFAULT}) ++#install_if_enabled(TARGETS bssl DESTINATION ${INSTALL_DESTINATION_DEFAULT}) + target_link_libraries(bssl ssl crypto) diff --git a/dev-libs/boringssl-fips/metadata.xml b/dev-libs/boringssl-fips/metadata.xml new file mode 100644 index 000000000..524d87ec9 --- /dev/null +++ b/dev-libs/boringssl-fips/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>gentoo-guru@danceylove.net</email> + <name>Okamura Kazuya</name> + </maintainer> + <upstream> + <remote-id type="github">google/boringssl</remote-id> + </upstream> +</pkgmetadata> |