mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-04-30 10:41:01 +02:00
openssl-chacha: v20170512 bump
This commit is contained in:
parent
91c390ff32
commit
8c277f9c08
1 changed files with 26 additions and 71 deletions
|
|
@ -5,20 +5,17 @@ EAPI="5"
|
|||
|
||||
inherit eutils flag-o-matic toolchain-funcs multilib multilib-minimal git-r3
|
||||
|
||||
#MY_P=${P/_/-}
|
||||
|
||||
DESCRIPTION="full-strength general purpose cryptography library (including SSL and TLS)"
|
||||
HOMEPAGE="http://www.openssl.org/"
|
||||
#SRC_URI="mirror://openssl/source/${MY_P}.tar.gz"
|
||||
DESCRIPTION="Extra featured OpenSSL with ChaCha20 and Poly1305 support"
|
||||
HOMEPAGE="https://github.com/PeterMosmans/openssl"
|
||||
EGIT_REPO_URI="https://github.com/PeterMosmans/openssl.git"
|
||||
EGIT_BRANCH="1.0.2-chacha"
|
||||
EGIT_COMMIT="118f16ee8df5906026e4a41b9bed7902da259175"
|
||||
EGIT_COMMIT="e90b60086e4ed9649cb3aab08f2b4c6529e7a95a"
|
||||
|
||||
|
||||
LICENSE="openssl"
|
||||
SLOT="0"
|
||||
SLOT="1.0.2"
|
||||
KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-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"
|
||||
IUSE="+asm bindist gmp kerberos rfc3779 sctp cpu_flags_x86_sse2 +sslv2 +sslv3 +static-libs test +tls-heartbeat vanilla zlib"
|
||||
RESTRICT="!bindist? ( bindist )"
|
||||
|
||||
RDEPEND=">=app-misc/c_rehash-1.7-r1
|
||||
|
|
@ -34,11 +31,11 @@ DEPEND="${RDEPEND}
|
|||
)"
|
||||
PDEPEND="app-misc/ca-certificates"
|
||||
|
||||
#S="${WORKDIR}/${MY_P}"
|
||||
|
||||
MULTILIB_WRAPPED_HEADERS=(
|
||||
usr/include/openssl/opensslconf.h
|
||||
)
|
||||
# Do not install any docs
|
||||
DOCS=()
|
||||
|
||||
src_prepare() {
|
||||
# keep this in sync with app-misc/c_rehash
|
||||
|
|
@ -76,6 +73,14 @@ src_prepare() {
|
|||
# show the actual commands in the log
|
||||
sed -i '/^SET_X/s:=.*:=set -x:' Makefile.shared
|
||||
|
||||
#blshkv test
|
||||
# update the enginedir path.
|
||||
# punt broken config we don't care about as it fails sanity check.
|
||||
sed -i \
|
||||
-e '/^"debug-ben-debug-64"/d' \
|
||||
-e "/foo.*engines/s|/lib/engines|/$(get_libdir)/engines|" \
|
||||
Configure || die
|
||||
|
||||
# since we're forcing $(CC) as makedep anyway, just fix
|
||||
# the conditional as always-on
|
||||
# helps clang (#417795), and versioned gcc (#499818)
|
||||
|
|
@ -154,6 +159,9 @@ multilib_src_configure() {
|
|||
enable-mdc2 \
|
||||
enable-rc5 \
|
||||
enable-tlsext \
|
||||
enable-gost \
|
||||
enable-cast \
|
||||
enable-ripemd \
|
||||
$(use_ssl asm) \
|
||||
$(use_ssl gmp gmp -lgmp) \
|
||||
$(use_ssl kerberos krb5 --with-krb5-flavor=${krb5}) \
|
||||
|
|
@ -163,6 +171,7 @@ multilib_src_configure() {
|
|||
$(use_ssl sslv3 ssl3) \
|
||||
$(use_ssl tls-heartbeat heartbeats) \
|
||||
$(use_ssl zlib) \
|
||||
no-zlib-dynamic \
|
||||
--prefix="${EPREFIX}"/usr \
|
||||
--openssldir="${EPREFIX}"${SSL_CNF_DIR} \
|
||||
--libdir=$(get_libdir) \
|
||||
|
|
@ -188,10 +197,7 @@ multilib_src_compile() {
|
|||
# depend is needed to use $confopts; it also doesn't matter
|
||||
# that it's -j1 as the code itself serializes subdirs
|
||||
emake -j1 depend
|
||||
emake all
|
||||
# rehash is needed to prep the certs/ dir; do this
|
||||
# separately to avoid parallel build issues.
|
||||
emake rehash
|
||||
emake -j1 build_libs
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
|
|
@ -199,61 +205,10 @@ multilib_src_test() {
|
|||
}
|
||||
|
||||
multilib_src_install() {
|
||||
emake INSTALL_PREFIX="${D}" install
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
# openssl installs perl version of c_rehash by default, but
|
||||
# we provide a shell version via app-misc/c_rehash
|
||||
rm "${ED}"/usr/bin/c_rehash || die
|
||||
|
||||
dodoc CHANGES* FAQ NEWS README doc/*.txt doc/c-indentation.el
|
||||
dohtml -r doc/*
|
||||
use rfc3779 && dodoc engines/ccgost/README.gost
|
||||
|
||||
# This is crappy in that the static archives are still built even
|
||||
# when USE=static-libs. But this is due to a failing in the openssl
|
||||
# build system: the static archives are built as PIC all the time.
|
||||
# Only way around this would be to manually configure+compile openssl
|
||||
# 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
|
||||
for m in $(find . -type f | xargs grep -L '#include') ; do
|
||||
d=${m%/*} ; d=${d#./} ; m=${m##*/}
|
||||
[[ ${m} == openssl.1* ]] && continue
|
||||
[[ -n $(find -L ${d} -type l) ]] && die "erp, broken links already!"
|
||||
mv ${d}/{,ssl-}${m}
|
||||
# fix up references to renamed man pages
|
||||
sed -i '/^[.]SH "SEE ALSO"/,/^[.]/s:\([^(, ]*(1)\):ssl-\1:g' ${d}/ssl-${m}
|
||||
ln -s ssl-${m} ${d}/openssl-${m}
|
||||
# locate any symlinks that point to this man page ... we assume
|
||||
# that any broken links are due to the above renaming
|
||||
for s in $(find -L ${d} -type l) ; do
|
||||
s=${s##*/}
|
||||
rm -f ${d}/${s}
|
||||
ln -s ssl-${m} ${d}/ssl-${s}
|
||||
ln -s ssl-${s} ${d}/openssl-${s}
|
||||
done
|
||||
done
|
||||
[[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :("
|
||||
|
||||
dodir /etc/sandbox.d #254521
|
||||
echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl
|
||||
|
||||
diropts -m0700
|
||||
keepdir ${SSL_CNF_DIR}/private
|
||||
}
|
||||
|
||||
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 $?
|
||||
dolib.so lib{crypto,ssl}.so.1.0.2
|
||||
|
||||
if use static-libs ; then
|
||||
newlib.a libcrypto.a libcrypto.a.1.0.2
|
||||
newlib.a libssl.a libssl.a.1.0.2
|
||||
fi
|
||||
}
|
||||
Loading…
Reference in a new issue