dev-libs/openssl: Apply CoreOS changes

Port of f50deaff to openssl-1.0.2o.
This commit is contained in:
James Forcier 2018-06-26 12:02:58 -07:00
parent 64c8210a60
commit 8579447043

View File

@ -3,7 +3,7 @@
EAPI="6"
inherit eutils flag-o-matic toolchain-funcs multilib multilib-minimal
inherit eutils flag-o-matic toolchain-funcs multilib multilib-minimal systemd
PATCH_SET="openssl-1.0.2-patches-1.4"
MY_P=${P/_/-}
@ -17,8 +17,7 @@ SRC_URI="mirror://openssl/source/${MY_P}.tar.gz
LICENSE="openssl"
SLOT="0"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
IUSE="+asm bindist gmp kerberos rfc3779 sctp cpu_flags_x86_sse2 sslv2 +sslv3 static-libs test +tls-heartbeat vanilla zlib"
RESTRICT="!bindist? ( bindist )"
IUSE="+asm gmp kerberos rfc3779 sctp cpu_flags_x86_sse2 sslv2 +sslv3 static-libs test +tls-heartbeat vanilla zlib"
RDEPEND=">=app-misc/c_rehash-1.7-r1
gmp? ( >=dev-libs/gmp-5.1.3-r1[static-libs(+)?,${MULTILIB_USEDEP}] )
@ -140,7 +139,6 @@ multilib_src_configure() {
${sslout} \
$(use cpu_flags_x86_sse2 || echo "no-sse2") \
enable-camellia \
$(use_ssl !bindist ec) \
${ec_nistp_64_gcc_128} \
enable-idea \
enable-mdc2 \
@ -211,11 +209,6 @@ multilib_src_install_all() {
# twice; once with shared lib support enabled and once without.
use static-libs || rm -f "${ED}"/usr/lib*/lib*.a
# create the certs directory
dodir ${SSL_CNF_DIR}/certs
cp -RP certs/* "${ED}"${SSL_CNF_DIR}/certs/ || die
rm -r "${ED}"${SSL_CNF_DIR}/certs/{demo,expired}
# Namespace openssl programs to prevent conflicts with other man pages
cd "${ED}"/usr/share/man
local m d s
@ -241,12 +234,15 @@ multilib_src_install_all() {
dodir /etc/sandbox.d #254521
echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl
diropts -m0700
keepdir ${SSL_CNF_DIR}/private
}
# Don't keep the sample CA files and their ilk in /etc.
rm -r "${ED}"${SSL_CNF_DIR}
pkg_postinst() {
ebegin "Running 'c_rehash ${EROOT%/}${SSL_CNF_DIR}/certs/' to rebuild hashes #333069"
c_rehash "${EROOT%/}${SSL_CNF_DIR}/certs" >/dev/null
eend $?
# Save the default openssl.cnf in /usr and link it into place.
dodir /usr/share/ssl
insinto /usr/share/ssl
doins "${S}"/apps/openssl.cnf
systemd_dotmpfilesd "${FILESDIR}"/openssl.conf
# Package the tmpfiles.d setup for SDK bootstrapping.
systemd-tmpfiles --create --root="${ED}" "${FILESDIR}"/openssl.conf
}