summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eden <sven.eden@prydeworx.com>2020-12-14 17:37:48 +0100
committerJoonas Niilola <juippis@gentoo.org>2020-12-17 17:04:42 +0200
commit8bb288997adf7e4dbe498bfa4ff3baed3e42c455 (patch)
treef02bcc4bb97d0ab70695537f915aa75785260142 /dev-libs/s2n/s2n-0.10.21-r1.ebuild
parentsys-libs/libunwind: don't enable USE=static-libs by default (diff)
downloadgentoo-8bb288997adf7e4dbe498bfa4ff3baed3e42c455.tar.gz
gentoo-8bb288997adf7e4dbe498bfa4ff3baed3e42c455.tar.bz2
gentoo-8bb288997adf7e4dbe498bfa4ff3baed3e42c455.zip
dev-libs/s2n: Fix USE="test" and remove -Werror
USE="test" was broken, because building of a shared library does not work at the moment. Fixed by removing hidden default visibility. See: https://github.com/awslabs/s2n/issues/2401 -Werror is not recommended for releases and should always be disabled when encountered in build-logs, because there are numerous cases where this breaks without purpose. Closes: https://bugs.gentoo.org/759796 Closes: https://bugs.gentoo.org/759799 Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Sven Eden <sven.eden@prydeworx.com> Closes: https://github.com/gentoo/gentoo/pull/18651 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'dev-libs/s2n/s2n-0.10.21-r1.ebuild')
-rw-r--r--dev-libs/s2n/s2n-0.10.21-r1.ebuild54
1 files changed, 54 insertions, 0 deletions
diff --git a/dev-libs/s2n/s2n-0.10.21-r1.ebuild b/dev-libs/s2n/s2n-0.10.21-r1.ebuild
new file mode 100644
index 000000000000..270991d36e4d
--- /dev/null
+++ b/dev-libs/s2n/s2n-0.10.21-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="simple, small, fast and secure C99 implementation of the TLS/SSL protocols"
+HOMEPAGE="https://github.com/awslabs/s2n"
+SRC_URI="https://github.com/awslabs/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="libressl static-libs test"
+
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ !libressl? ( dev-libs/openssl:0=[static-libs=] )
+ libressl? ( dev-libs/libressl:0=[static-libs=] )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-remove_Werror.patch
+)
+
+src_prepare() {
+ cmake_src_prepare
+
+ # Fix
+ # QA Notice: The following files contain writable and executable sections (...)
+ sed \
+ -e '$a\\n#if defined(__linux__) && defined(__ELF__)\n.section .note.GNU-stack,"",%progbits\n#endif' \
+ -i "${S}"/pq-crypto/sike_r2/fp_x64_asm.S || die "sed failed"
+
+ # Fix shared library building, needed for USE="test"
+ # See: https://github.com/awslabs/s2n/issues/2401
+ if use test; then
+ sed -i -e 's, -fvisibility=hidden,,' "${S}"/CMakeLists.txt || die "sed failed"
+ # Remove s2n_self_talk_nonblocking_test, it is broken.
+ # See: https://github.com/awslabs/s2n/issues/2051#issuecomment-744543724
+ rm "${S}"/tests/unit/s2n_self_talk_nonblocking_test.c
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_SHARED_LIBS=$(usex !static-libs)
+ -DBUILD_TESTING=$(usex test)
+ )
+ cmake_src_configure
+}