commit:     4386bee9c9478ec8a20805f075ecbfc9c4325403
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 22 13:13:02 2016 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Sep 22 13:15:52 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4386bee9

dev-libs/openssl: Sec bump to versions 1.0.2i and 1.1.0a (bug #594500).

Package-Manager: portage-2.3.1
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 dev-libs/openssl/Manifest                          |   2 +
 .../files/openssl-1.0.2i-parallel-build.patch      | 326 +++++++++++++++++++++
 dev-libs/openssl/openssl-1.0.2i.ebuild             | 249 ++++++++++++++++
 dev-libs/openssl/openssl-1.1.0a.ebuild             | 242 +++++++++++++++
 4 files changed, 819 insertions(+)

diff --git a/dev-libs/openssl/Manifest b/dev-libs/openssl/Manifest
index 732c6d3..467e5d3 100644
--- a/dev-libs/openssl/Manifest
+++ b/dev-libs/openssl/Manifest
@@ -1,4 +1,6 @@
 DIST openssl-0.9.8zh.tar.gz 3818524 SHA256 
f1d9f3ed1b85a82ecf80d0e2d389e1fda3fca9a4dba0bf07adbf231e1a5e2fd6 SHA512 
b97fa2468211f86c0719c68ad1781eff84f772c479ed5193d6da14bac086b4ca706e7d851209d9df3f0962943b5e5333ab0def00110fb2e517caa73c0c6674c6
 WHIRLPOOL 
8ed3362e6aed89cd6ae02438bc3fb58ff3a91afb8a2d401d1d66c1ee4fd96f4befb50558131dd03a60fc15b588172fc1ede5d56bb1f68e184453bfe3b34f9abf
 DIST openssl-1.0.2g.tar.gz 5266102 SHA256 
b784b1b3907ce39abf4098702dade6365522a253ad1552e267a9a0e89594aa33 SHA512 
4d96b6c8a232203483d6e8bee81da01ba10977bfbac92f25304a36dec9ea584b7ef917bc45e097cc7dbe681d71a4570d649c22244c178393ae91fab48323f735
 WHIRLPOOL 
aedbd82af0a550e8329a84312fae492f3bb3cb04af763fc9ef532099b2b2e61a55e4a7cfb06085f045740e2b692bbdb3ecb8bf5ca82f46325c3caf22d2317ffb
 DIST openssl-1.0.2h.tar.gz 5274412 SHA256 
1d4007e53aad94a5b2002fe045ee7bb0b3d98f1a47f8b2bc851dcd1c74332919 SHA512 
780601f6f3f32f42b6d7bbc4c593db39a3575f9db80294a10a68b2b0bb79448d9bd529ca700b9977354cbdfc65887c76af0aa7b90d3ee421f74ab53e6f15c303
 WHIRLPOOL 
41b6cf0c08b547f1432dc8167a4c7835da0b6907f8932969e0a352fab8bdbb4d8f612a5bf431e415d93ff1c8238652b2ee3ce0bd935cc2f59e8ea4f40fe6b5d6
+DIST openssl-1.0.2i.tar.gz 5308232 SHA256 
9287487d11c9545b6efb287cdb70535d4e9b284dd10d51441d9b9963d000de6f SHA512 
41764debd5d64e4e770945f30d682e2c887d9cefb39b358c5c7f9d2cdce34393ed28d49b24e95c4639db2df01c278cbcde71bed2b03f9aafafc76766b03850e3
 WHIRLPOOL 
ba1a4513aaa1de81e36912acfe0b6cf8e0acf7cc71d32b127b5e54eb2f6fc6ce63f4f61e9fc99fecc9e037cdccc496b9d15ea75b594b0fd8721b4478eab1f31d
 DIST openssl-1.1.0.tar.gz 5146831 SHA256 
f5c69ff9ac1472c80b868efc1c1c0d8dcfc746d29ebe563de2365dd56dbd8c82 SHA512 
6a99d391be7708fdc4eb097d27cea4ce79dc83cc7f52d353af1e222773e586405c0848557d7404716b92b23b775abed45e73c66fe9128f4bd7c09864e79317b0
 WHIRLPOOL 
9d38954c65073a8d02caa6aa00b1efc197391b38b341662f0d9967ce883f52eed8c3be84ebd6ecc89c494f725218bfd2bef395891a20b40c8dcdf6b31fba2131
+DIST openssl-1.1.0a.tar.gz 5161414 SHA256 
c2e696e34296cde2c9ec5dcdad9e4f042cd703932591d395c389de488302442b SHA512 
80d6cf795decc923b0ea6a005805993d2a4133a1d41f0208982f4b147471e24782227c77611cc4c6d1e61849ce66c57987ea7a26ea66cd0b0adc66c200b96c21
 WHIRLPOOL 
7cc2dd31dcfc7a34f982dde16a0954b7158ddc8d787e9c8838905c19527d31f4049a31891f33e72bbf142a9062f99bf61874a11a143e4dd3de3b039d7f572f02

diff --git a/dev-libs/openssl/files/openssl-1.0.2i-parallel-build.patch 
b/dev-libs/openssl/files/openssl-1.0.2i-parallel-build.patch
new file mode 100644
index 00000000..387a077
--- /dev/null
+++ b/dev-libs/openssl/files/openssl-1.0.2i-parallel-build.patch
@@ -0,0 +1,326 @@
+--- openssl-1.0.2i/crypto/Makefile
++++ openssl-1.0.2i/crypto/Makefile
+@@ -85,11 +85,11 @@
+       @if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; 
fi
+ 
+ subdirs:
+-      @target=all; $(RECURSIVE_MAKE)
++      +@target=all; $(RECURSIVE_MAKE)
+ 
+ files:
+       $(PERL) $(TOP)/util/files.pl "CPUID_OBJ=$(CPUID_OBJ)" Makefile >> 
$(TOP)/MINFO
+-      @target=files; $(RECURSIVE_MAKE)
++      +@target=files; $(RECURSIVE_MAKE)
+ 
+ links:
+       @$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
+@@ -100,7 +100,7 @@
+ # lib: $(LIB): are splitted to avoid end-less loop
+ lib:  $(LIB)
+       @touch lib
+-$(LIB):       $(LIBOBJ)
++$(LIB):       $(LIBOBJ) | subdirs
+       $(AR) $(LIB) $(LIBOBJ)
+       test -z "$(FIPSLIBDIR)" || $(AR) $(LIB) $(FIPSLIBDIR)fipscanister.o
+       $(RANLIB) $(LIB) || echo Never mind.
+@@ -111,7 +111,7 @@
+       fi
+ 
+ libs:
+-      @target=lib; $(RECURSIVE_MAKE)
++      +@target=lib; $(RECURSIVE_MAKE)
+ 
+ install:
+       @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
+@@ -120,7 +120,7 @@
+       (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
+       chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
+       done;
+-      @target=install; $(RECURSIVE_MAKE)
++      +@target=install; $(RECURSIVE_MAKE)
+ 
+ lint:
+       @target=lint; $(RECURSIVE_MAKE)
+--- openssl-1.0.2i/engines/Makefile
++++ openssl-1.0.2i/engines/Makefile
+@@ -72,7 +72,7 @@
+ 
+ all:  lib subdirs
+ 
+-lib:  $(LIBOBJ)
++lib:  $(LIBOBJ) | subdirs
+       @if [ -n "$(SHARED_LIBS)" ]; then \
+               set -e; \
+               for l in $(LIBNAMES); do \
+@@ -89,7 +89,7 @@
+ 
+ subdirs:
+       echo $(EDIRS)
+-      @target=all; $(RECURSIVE_MAKE)
++      +@target=all; $(RECURSIVE_MAKE)
+ 
+ files:
+       $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
+@@ -128,7 +128,7 @@
+                         mv -f 
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new 
$(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \
+               done; \
+       fi
+-      @target=install; $(RECURSIVE_MAKE)
++      +@target=install; $(RECURSIVE_MAKE)
+ 
+ tags:
+       ctags $(SRC)
+--- openssl-1.0.2i/Makefile.org
++++ openssl-1.0.2i/Makefile.org
+@@ -281,17 +281,17 @@
+ build_libssl: build_ssl libssl.pc
+ 
+ build_crypto:
+-      @dir=crypto; target=all; $(BUILD_ONE_CMD)
++      +@dir=crypto; target=all; $(BUILD_ONE_CMD)
+ build_ssl: build_crypto
+-      @dir=ssl; target=all; $(BUILD_ONE_CMD)
++      +@dir=ssl; target=all; $(BUILD_ONE_CMD)
+ build_engines: build_crypto
+-      @dir=engines; target=all; $(BUILD_ONE_CMD)
++      +@dir=engines; target=all; $(BUILD_ONE_CMD)
+ build_apps: build_libs
+-      @dir=apps; target=all; $(BUILD_ONE_CMD)
++      +@dir=apps; target=all; $(BUILD_ONE_CMD)
+ build_tests: build_libs
+-      @dir=test; target=all; $(BUILD_ONE_CMD)
++      +@dir=test; target=all; $(BUILD_ONE_CMD)
+ build_tools: build_libs
+-      @dir=tools; target=all; $(BUILD_ONE_CMD)
++      +@dir=tools; target=all; $(BUILD_ONE_CMD)
+ 
+ all_testapps: build_libs build_testapps
+ build_testapps:
+@@ -547,7 +547,7 @@
+       (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
+       chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
+       done;
+-      @set -e; target=install; $(RECURSIVE_BUILD_CMD)
++      +@set -e; target=install; $(RECURSIVE_BUILD_CMD)
+       @set -e; liblist="$(LIBS)"; for i in $$liblist ;\
+       do \
+               if [ -f "$$i" ]; then \
+--- openssl-1.0.2i/Makefile.shared
++++ openssl-1.0.2i/Makefile.shared
+@@ -105,6 +105,7 @@
+     SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \
+     LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e 
d | uniq`; \
+     LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
++    [ -e $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX ] && exit 0; \
+     LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
+     $${SHAREDCMD} $${SHAREDFLAGS} \
+       -o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \
+@@ -122,6 +123,7 @@
+                       done; \
+               fi; \
+               if [ -n "$$SHLIB_SOVER" ]; then \
++                      [ -e "$$SHLIB$$SHLIB_SUFFIX" ] || \
+                       ( $(SET_X); rm -f $$SHLIB$$SHLIB_SUFFIX; \
+                         ln -s $$prev $$SHLIB$$SHLIB_SUFFIX ); \
+               fi; \
+--- openssl-1.0.2i/test/Makefile
++++ openssl-1.0.2i/test/Makefile
+@@ -144,7 +144,7 @@
+ tags:
+       ctags $(SRC)
+ 
+-tests:        exe apps $(TESTS)
++tests:        exe $(TESTS)
+ 
+ apps:
+       @(cd ..; $(MAKE) DIRS=apps all)
+@@ -435,136 +435,136 @@
+               link_app.$${shlib_target}
+ 
+ $(RSATEST)$(EXE_EXT): $(RSATEST).o $(DLIBCRYPTO)
+-      @target=$(RSATEST); $(BUILD_CMD)
++      +@target=$(RSATEST); $(BUILD_CMD)
+ 
+ $(BNTEST)$(EXE_EXT): $(BNTEST).o $(DLIBCRYPTO)
+-      @target=$(BNTEST); $(BUILD_CMD)
++      +@target=$(BNTEST); $(BUILD_CMD)
+ 
+ $(ECTEST)$(EXE_EXT): $(ECTEST).o $(DLIBCRYPTO)
+-      @target=$(ECTEST); $(BUILD_CMD)
++      +@target=$(ECTEST); $(BUILD_CMD)
+ 
+ $(EXPTEST)$(EXE_EXT): $(EXPTEST).o $(DLIBCRYPTO)
+-      @target=$(EXPTEST); $(BUILD_CMD)
++      +@target=$(EXPTEST); $(BUILD_CMD)
+ 
+ $(IDEATEST)$(EXE_EXT): $(IDEATEST).o $(DLIBCRYPTO)
+-      @target=$(IDEATEST); $(BUILD_CMD)
++      +@target=$(IDEATEST); $(BUILD_CMD)
+ 
+ $(MD2TEST)$(EXE_EXT): $(MD2TEST).o $(DLIBCRYPTO)
+-      @target=$(MD2TEST); $(BUILD_CMD)
++      +@target=$(MD2TEST); $(BUILD_CMD)
+ 
+ $(SHATEST)$(EXE_EXT): $(SHATEST).o $(DLIBCRYPTO)
+-      @target=$(SHATEST); $(BUILD_CMD)
++      +@target=$(SHATEST); $(BUILD_CMD)
+ 
+ $(SHA1TEST)$(EXE_EXT): $(SHA1TEST).o $(DLIBCRYPTO)
+-      @target=$(SHA1TEST); $(BUILD_CMD)
++      +@target=$(SHA1TEST); $(BUILD_CMD)
+ 
+ $(SHA256TEST)$(EXE_EXT): $(SHA256TEST).o $(DLIBCRYPTO)
+-      @target=$(SHA256TEST); $(BUILD_CMD)
++      +@target=$(SHA256TEST); $(BUILD_CMD)
+ 
+ $(SHA512TEST)$(EXE_EXT): $(SHA512TEST).o $(DLIBCRYPTO)
+-      @target=$(SHA512TEST); $(BUILD_CMD)
++      +@target=$(SHA512TEST); $(BUILD_CMD)
+ 
+ $(RMDTEST)$(EXE_EXT): $(RMDTEST).o $(DLIBCRYPTO)
+-      @target=$(RMDTEST); $(BUILD_CMD)
++      +@target=$(RMDTEST); $(BUILD_CMD)
+ 
+ $(MDC2TEST)$(EXE_EXT): $(MDC2TEST).o $(DLIBCRYPTO)
+-      @target=$(MDC2TEST); $(BUILD_CMD)
++      +@target=$(MDC2TEST); $(BUILD_CMD)
+ 
+ $(MD4TEST)$(EXE_EXT): $(MD4TEST).o $(DLIBCRYPTO)
+-      @target=$(MD4TEST); $(BUILD_CMD)
++      +@target=$(MD4TEST); $(BUILD_CMD)
+ 
+ $(MD5TEST)$(EXE_EXT): $(MD5TEST).o $(DLIBCRYPTO)
+-      @target=$(MD5TEST); $(BUILD_CMD)
++      +@target=$(MD5TEST); $(BUILD_CMD)
+ 
+ $(HMACTEST)$(EXE_EXT): $(HMACTEST).o $(DLIBCRYPTO)
+-      @target=$(HMACTEST); $(BUILD_CMD)
++      +@target=$(HMACTEST); $(BUILD_CMD)
+ 
+ $(WPTEST)$(EXE_EXT): $(WPTEST).o $(DLIBCRYPTO)
+-      @target=$(WPTEST); $(BUILD_CMD)
++      +@target=$(WPTEST); $(BUILD_CMD)
+ 
+ $(RC2TEST)$(EXE_EXT): $(RC2TEST).o $(DLIBCRYPTO)
+-      @target=$(RC2TEST); $(BUILD_CMD)
++      +@target=$(RC2TEST); $(BUILD_CMD)
+ 
+ $(BFTEST)$(EXE_EXT): $(BFTEST).o $(DLIBCRYPTO)
+-      @target=$(BFTEST); $(BUILD_CMD)
++      +@target=$(BFTEST); $(BUILD_CMD)
+ 
+ $(CASTTEST)$(EXE_EXT): $(CASTTEST).o $(DLIBCRYPTO)
+-      @target=$(CASTTEST); $(BUILD_CMD)
++      +@target=$(CASTTEST); $(BUILD_CMD)
+ 
+ $(RC4TEST)$(EXE_EXT): $(RC4TEST).o $(DLIBCRYPTO)
+-      @target=$(RC4TEST); $(BUILD_CMD)
++      +@target=$(RC4TEST); $(BUILD_CMD)
+ 
+ $(RC5TEST)$(EXE_EXT): $(RC5TEST).o $(DLIBCRYPTO)
+-      @target=$(RC5TEST); $(BUILD_CMD)
++      +@target=$(RC5TEST); $(BUILD_CMD)
+ 
+ $(DESTEST)$(EXE_EXT): $(DESTEST).o $(DLIBCRYPTO)
+-      @target=$(DESTEST); $(BUILD_CMD)
++      +@target=$(DESTEST); $(BUILD_CMD)
+ 
+ $(RANDTEST)$(EXE_EXT): $(RANDTEST).o $(DLIBCRYPTO)
+-      @target=$(RANDTEST); $(BUILD_CMD)
++      +@target=$(RANDTEST); $(BUILD_CMD)
+ 
+ $(DHTEST)$(EXE_EXT): $(DHTEST).o $(DLIBCRYPTO)
+-      @target=$(DHTEST); $(BUILD_CMD)
++      +@target=$(DHTEST); $(BUILD_CMD)
+ 
+ $(DSATEST)$(EXE_EXT): $(DSATEST).o $(DLIBCRYPTO)
+-      @target=$(DSATEST); $(BUILD_CMD)
++      +@target=$(DSATEST); $(BUILD_CMD)
+ 
+ $(METHTEST)$(EXE_EXT): $(METHTEST).o $(DLIBCRYPTO)
+-      @target=$(METHTEST); $(BUILD_CMD)
++      +@target=$(METHTEST); $(BUILD_CMD)
+ 
+ $(SSLTEST)$(EXE_EXT): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO)
+-      @target=$(SSLTEST); $(FIPS_BUILD_CMD)
++      +@target=$(SSLTEST); $(FIPS_BUILD_CMD)
+ 
+ $(ENGINETEST)$(EXE_EXT): $(ENGINETEST).o $(DLIBCRYPTO)
+-      @target=$(ENGINETEST); $(BUILD_CMD)
++      +@target=$(ENGINETEST); $(BUILD_CMD)
+ 
+ $(EVPTEST)$(EXE_EXT): $(EVPTEST).o $(DLIBCRYPTO)
+-      @target=$(EVPTEST); $(BUILD_CMD)
++      +@target=$(EVPTEST); $(BUILD_CMD)
+ 
+ $(EVPEXTRATEST)$(EXE_EXT): $(EVPEXTRATEST).o $(DLIBCRYPTO)
+-      @target=$(EVPEXTRATEST); $(BUILD_CMD)
++      +@target=$(EVPEXTRATEST); $(BUILD_CMD)
+ 
+ $(ECDSATEST)$(EXE_EXT): $(ECDSATEST).o $(DLIBCRYPTO)
+-      @target=$(ECDSATEST); $(BUILD_CMD)
++      +@target=$(ECDSATEST); $(BUILD_CMD)
+ 
+ $(ECDHTEST)$(EXE_EXT): $(ECDHTEST).o $(DLIBCRYPTO)
+-      @target=$(ECDHTEST); $(BUILD_CMD)
++      +@target=$(ECDHTEST); $(BUILD_CMD)
+ 
+ $(IGETEST)$(EXE_EXT): $(IGETEST).o $(DLIBCRYPTO)
+-      @target=$(IGETEST); $(BUILD_CMD)
++      +@target=$(IGETEST); $(BUILD_CMD)
+ 
+ $(JPAKETEST)$(EXE_EXT): $(JPAKETEST).o $(DLIBCRYPTO)
+-      @target=$(JPAKETEST); $(BUILD_CMD)
++      +@target=$(JPAKETEST); $(BUILD_CMD)
+ 
+ $(ASN1TEST)$(EXE_EXT): $(ASN1TEST).o $(DLIBCRYPTO)
+-      @target=$(ASN1TEST); $(BUILD_CMD)
++      +@target=$(ASN1TEST); $(BUILD_CMD)
+ 
+ $(SRPTEST)$(EXE_EXT): $(SRPTEST).o $(DLIBCRYPTO)
+-      @target=$(SRPTEST); $(BUILD_CMD)
++      +@target=$(SRPTEST); $(BUILD_CMD)
+ 
+ $(V3NAMETEST)$(EXE_EXT): $(V3NAMETEST).o $(DLIBCRYPTO)
+-      @target=$(V3NAMETEST); $(BUILD_CMD)
++      +@target=$(V3NAMETEST); $(BUILD_CMD)
+ 
+ $(HEARTBEATTEST)$(EXE_EXT): $(HEARTBEATTEST).o $(DLIBCRYPTO)
+-      @target=$(HEARTBEATTEST); $(BUILD_CMD_STATIC)
++      +@target=$(HEARTBEATTEST); $(BUILD_CMD_STATIC)
+ 
+ $(CONSTTIMETEST)$(EXE_EXT): $(CONSTTIMETEST).o
+-      @target=$(CONSTTIMETEST) $(BUILD_CMD)
++      +@target=$(CONSTTIMETEST) $(BUILD_CMD)
+ 
+ $(VERIFYEXTRATEST)$(EXE_EXT): $(VERIFYEXTRATEST).o
+-      @target=$(VERIFYEXTRATEST) $(BUILD_CMD)
++      +@target=$(VERIFYEXTRATEST) $(BUILD_CMD)
+ 
+ $(CLIENTHELLOTEST)$(EXE_EXT): $(CLIENTHELLOTEST).o
+-      @target=$(CLIENTHELLOTEST) $(BUILD_CMD)
++      +@target=$(CLIENTHELLOTEST) $(BUILD_CMD)
+ 
+ $(BADDTLSTEST)$(EXE_EXT): $(BADDTLSTEST).o
+-      @target=$(BADDTLSTEST) $(BUILD_CMD)
++      +@target=$(BADDTLSTEST) $(BUILD_CMD)
+ 
+ $(SSLV2CONFTEST)$(EXE_EXT): $(SSLV2CONFTEST).o
+-      @target=$(SSLV2CONFTEST) $(BUILD_CMD)
++      +@target=$(SSLV2CONFTEST) $(BUILD_CMD)
+ 
+ $(DTLSTEST)$(EXE_EXT): $(DTLSTEST).o ssltestlib.o $(DLIBSSL) $(DLIBCRYPTO)
+-      @target=$(DTLSTEST); exobj=ssltestlib.o; $(BUILD_CMD)
++      +@target=$(DTLSTEST); exobj=ssltestlib.o; $(BUILD_CMD)
+ 
+ #$(AESTEST).o: $(AESTEST).c
+ #     $(CC) -c $(CFLAGS) -DINTERMEDIATE_VALUE_KAT -DTRACE_KAT_MCT $(AESTEST).c
+@@ -577,7 +577,7 @@
+ #     fi
+ 
+ dummytest$(EXE_EXT): dummytest.o $(DLIBCRYPTO)
+-      @target=dummytest; $(BUILD_CMD)
++      +@target=dummytest; $(BUILD_CMD)
+ 
+ # DO NOT DELETE THIS LINE -- make depend depends on it.
+ 

diff --git a/dev-libs/openssl/openssl-1.0.2i.ebuild 
b/dev-libs/openssl/openssl-1.0.2i.ebuild
new file mode 100644
index 00000000..f026079
--- /dev/null
+++ b/dev-libs/openssl/openssl-1.0.2i.ebuild
@@ -0,0 +1,249 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils flag-o-matic toolchain-funcs multilib multilib-minimal
+
+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"
+
+LICENSE="openssl"
+SLOT="0"
+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"
+RESTRICT="!bindist? ( bindist )"
+
+RDEPEND=">=app-misc/c_rehash-1.7-r1
+       gmp? ( >=dev-libs/gmp-5.1.3-r1[static-libs(+)?,${MULTILIB_USEDEP}] )
+       zlib? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] )
+       kerberos? ( >=app-crypt/mit-krb5-1.11.4[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+       >=dev-lang/perl-5
+       sctp? ( >=net-misc/lksctp-tools-1.0.12 )
+       test? (
+               sys-apps/diffutils
+               sys-devel/bc
+       )"
+PDEPEND="app-misc/ca-certificates"
+
+S="${WORKDIR}/${MY_P}"
+
+MULTILIB_WRAPPED_HEADERS=(
+       usr/include/openssl/opensslconf.h
+)
+
+src_prepare() {
+       # keep this in sync with app-misc/c_rehash
+       SSL_CNF_DIR="/etc/ssl"
+
+       # Make sure we only ever touch Makefile.org and avoid patching a file
+       # that gets blown away anyways by the Configure script in src_configure
+       rm -f Makefile
+
+       if ! use vanilla ; then
+               epatch "${FILESDIR}"/${PN}-1.0.0a-ldflags.patch #327421
+               epatch "${FILESDIR}"/${PN}-1.0.2i-parallel-build.patch
+               epatch "${FILESDIR}"/${PN}-1.0.2a-parallel-obj-headers.patch
+               epatch "${FILESDIR}"/${PN}-1.0.2a-parallel-install-dirs.patch
+               epatch "${FILESDIR}"/${PN}-1.0.2a-parallel-symlinking.patch 
#545028
+               epatch "${FILESDIR}"/${PN}-1.0.2-ipv6.patch
+               epatch "${FILESDIR}"/${PN}-1.0.2a-x32-asm.patch #542618
+               epatch "${FILESDIR}"/${PN}-1.0.1p-default-source.patch #554338
+
+               epatch_user #332661
+       fi
+
+       # disable fips in the build
+       # make sure the man pages are suffixed #302165
+       # don't bother building man pages if they're disabled
+       sed -i \
+               -e '/DIRS/s: fips : :g' \
+               -e '/^MANSUFFIX/s:=.*:=ssl:' \
+               -e '/^MAKEDEPPROG/s:=.*:=$(CC):' \
+               -e $(has noman FEATURES \
+                       && echo '/^install:/s:install_docs::' \
+                       || echo '/^MANDIR=/s:=.*:='${EPREFIX}'/usr/share/man:') 
\
+               Makefile.org \
+               || die
+       # show the actual commands in the log
+       sed -i '/^SET_X/s:=.*:=set -x:' Makefile.shared
+
+       # since we're forcing $(CC) as makedep anyway, just fix
+       # the conditional as always-on
+       # helps clang (#417795), and versioned gcc (#499818)
+       sed -i 's/expr.*MAKEDEPEND.*;/true;/' util/domd || die
+
+       # quiet out unknown driver argument warnings since openssl
+       # doesn't have well-split CFLAGS and we're making it even worse
+       # and 'make depend' uses -Werror for added fun (#417795 again)
+       [[ ${CC} == *clang* ]] && append-flags -Qunused-arguments
+
+       # allow openssl to be cross-compiled
+       cp "${FILESDIR}"/gentoo.config-1.0.2 gentoo.config || die
+       chmod a+rx gentoo.config
+
+       append-flags -fno-strict-aliasing
+       append-flags $(test-flags-CC -Wa,--noexecstack)
+       append-cppflags -DOPENSSL_NO_BUF_FREELISTS
+
+       sed -i '1s,^:$,#!'${EPREFIX}'/usr/bin/perl,' Configure #141906
+       # The config script does stupid stuff to prompt the user.  Kill it.
+       sed -i '/stty -icanon min 0 time 50; read waste/d' config || die
+       ./config --test-sanity || die "I AM NOT SANE"
+
+       multilib_copy_sources
+}
+
+multilib_src_configure() {
+       unset APPS #197996
+       unset SCRIPTS #312551
+       unset CROSS_COMPILE #311473
+
+       tc-export CC AR RANLIB RC
+
+       # Clean out patent-or-otherwise-encumbered code
+       # Camellia: Royalty Free            
http://en.wikipedia.org/wiki/Camellia_(cipher)
+       # IDEA:     Expired                 
http://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
+       # EC:       ????????? ??/??/2015    
http://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography
+       # MDC2:     Expired                 http://en.wikipedia.org/wiki/MDC-2
+       # RC5:      Expired                 http://en.wikipedia.org/wiki/RC5
+
+       use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; }
+       echoit() { echo "$@" ; "$@" ; }
+
+       local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo 
"Heimdal")
+
+       # See if our toolchain supports __uint128_t.  If so, it's 64bit
+       # friendly and can use the nicely optimized code paths. #460790
+       local ec_nistp_64_gcc_128
+       # Disable it for now though #469976
+       #if ! use bindist ; then
+       #       echo "__uint128_t i;" > "${T}"/128.c
+       #       if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; 
then
+       #               ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128"
+       #       fi
+       #fi
+
+       local sslout=$(./gentoo.config)
+       einfo "Use configuration ${sslout:-(openssl knows best)}"
+       local config="Configure"
+       [[ -z ${sslout} ]] && config="config"
+
+       echoit \
+       ./${config} \
+               ${sslout} \
+               $(use cpu_flags_x86_sse2 || echo "no-sse2") \
+               enable-camellia \
+               $(use_ssl !bindist ec) \
+               ${ec_nistp_64_gcc_128} \
+               enable-idea \
+               enable-mdc2 \
+               enable-rc5 \
+               enable-tlsext \
+               $(use_ssl asm) \
+               $(use_ssl gmp gmp -lgmp) \
+               $(use_ssl kerberos krb5 --with-krb5-flavor=${krb5}) \
+               $(use_ssl rfc3779) \
+               $(use_ssl sctp) \
+               $(use_ssl sslv2 ssl2) \
+               $(use_ssl sslv3 ssl3) \
+               $(use_ssl tls-heartbeat heartbeats) \
+               $(use_ssl zlib) \
+               --prefix="${EPREFIX}"/usr \
+               --openssldir="${EPREFIX}"${SSL_CNF_DIR} \
+               --libdir=$(get_libdir) \
+               shared threads \
+               || die
+
+       # Clean out hardcoded flags that openssl uses
+       local CFLAG=$(grep ^CFLAG= Makefile | LC_ALL=C sed \
+               -e 's:^CFLAG=::' \
+               -e 's:-fomit-frame-pointer ::g' \
+               -e 's:-O[0-9] ::g' \
+               -e 's:-march=[-a-z0-9]* ::g' \
+               -e 's:-mcpu=[-a-z0-9]* ::g' \
+               -e 's:-m[a-z0-9]* ::g' \
+       )
+       sed -i \
+               -e "/^CFLAG/s|=.*|=${CFLAG} ${CFLAGS}|" \
+               -e "/^SHARED_LDFLAGS=/s|$| ${LDFLAGS}|" \
+               Makefile || die
+}
+
+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
+}
+
+multilib_src_test() {
+       emake -j1 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 $?
+}

diff --git a/dev-libs/openssl/openssl-1.1.0a.ebuild 
b/dev-libs/openssl/openssl-1.1.0a.ebuild
new file mode 100644
index 00000000..0aea4eb
--- /dev/null
+++ b/dev-libs/openssl/openssl-1.1.0a.ebuild
@@ -0,0 +1,242 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic toolchain-funcs multilib multilib-minimal
+
+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"
+
+LICENSE="openssl"
+SLOT="0/1.1" # .so version of libssl/libcrypto
+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 rfc3779 sctp cpu_flags_x86_sse2 static-libs test 
tls-heartbeat vanilla zlib"
+RESTRICT="!bindist? ( bindist )"
+
+RDEPEND=">=app-misc/c_rehash-1.7-r1
+       zlib? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+       >=dev-lang/perl-5
+       sctp? ( >=net-misc/lksctp-tools-1.0.12 )
+       test? (
+               sys-apps/diffutils
+               sys-devel/bc
+       )"
+PDEPEND="app-misc/ca-certificates"
+
+S="${WORKDIR}/${MY_P}"
+
+MULTILIB_WRAPPED_HEADERS=(
+       usr/include/openssl/opensslconf.h
+)
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.1.0-ldflags.patch #327421
+       "${FILESDIR}"/${PN}-1.0.2a-x32-asm.patch #542618
+)
+
+src_prepare() {
+       # keep this in sync with app-misc/c_rehash
+       SSL_CNF_DIR="/etc/ssl"
+
+       # Make sure we only ever touch Makefile.org and avoid patching a file
+       # that gets blown away anyways by the Configure script in src_configure
+       rm -f Makefile
+
+       if ! use vanilla ; then
+               epatch "${PATCHES[@]}"
+               epatch_user #332661
+       fi
+
+       # make sure the man pages are suffixed #302165
+       # don't bother building man pages if they're disabled
+       # Make DOCDIR Gentoo compliant
+       sed -i \
+               -e '/^MANSUFFIX/s:=.*:=ssl:' \
+               -e '/^MAKEDEPPROG/s:=.*:=$(CC):' \
+               -e $(has noman FEATURES \
+                       && echo '/^install:/s:install_docs::' \
+                       || echo '/^MANDIR=/s:=.*:='${EPREFIX}'/usr/share/man:') 
\
+               -e "/^DOCDIR/s@\$(BASENAME)@&-${PF}@" \
+               Configurations/unix-Makefile.tmpl \
+               || die
+
+       # show the actual commands in the log
+       sed -i '/^SET_X/s@=.*@=set -x@' Makefile.shared
+
+       # quiet out unknown driver argument warnings since openssl
+       # doesn't have well-split CFLAGS and we're making it even worse
+       # and 'make depend' uses -Werror for added fun (#417795 again)
+       [[ ${CC} == *clang* ]] && append-flags -Qunused-arguments
+
+       # allow openssl to be cross-compiled
+       cp "${FILESDIR}"/gentoo.config-1.0.2 gentoo.config || die
+       chmod a+rx gentoo.config
+
+       append-flags -fno-strict-aliasing
+       append-flags $(test-flags-CC -Wa,--noexecstack)
+       append-cppflags -DOPENSSL_NO_BUF_FREELISTS
+
+       # Prefixify Configure shebang (#141906)
+       sed \
+               -e "1s,/usr/bin/env,${EPREFIX}&," \
+               -i Configure || die
+       # Remove test target when FEATURES=test isn't set
+       if ! use test ; then
+               sed \
+                       -e '/^$config{dirs}/s@ "test",@@' \
+                       -i Configure || die
+       fi
+       # The config script does stupid stuff to prompt the user.  Kill it.
+       sed -i '/stty -icanon min 0 time 50; read waste/d' config || die
+       ./config --test-sanity || die "I AM NOT SANE"
+
+       multilib_copy_sources
+}
+
+multilib_src_configure() {
+       unset APPS #197996
+       unset SCRIPTS #312551
+       unset CROSS_COMPILE #311473
+
+       tc-export CC AR RANLIB RC
+
+       # Clean out patent-or-otherwise-encumbered code
+       # Camellia: Royalty Free            
http://en.wikipedia.org/wiki/Camellia_(cipher)
+       # IDEA:     Expired                 
http://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
+       # EC:       ????????? ??/??/2015    
http://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography
+       # MDC2:     Expired                 http://en.wikipedia.org/wiki/MDC-2
+       # RC5:      Expired                 http://en.wikipedia.org/wiki/RC5
+
+       use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; }
+       echoit() { echo "$@" ; "$@" ; }
+
+       local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo 
"Heimdal")
+
+       # See if our toolchain supports __uint128_t.  If so, it's 64bit
+       # friendly and can use the nicely optimized code paths. #460790
+       local ec_nistp_64_gcc_128
+       # Disable it for now though #469976
+       #if ! use bindist ; then
+       #       echo "__uint128_t i;" > "${T}"/128.c
+       #       if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; 
then
+       #               ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128"
+       #       fi
+       #fi
+
+       local sslout=$(./gentoo.config)
+       einfo "Use configuration ${sslout:-(openssl knows best)}"
+       local config="Configure"
+       [[ -z ${sslout} ]] && config="config"
+
+       echoit \
+       ./${config} \
+               ${sslout} \
+               --api=1.1.0 \
+               $(use cpu_flags_x86_sse2 || echo "no-sse2") \
+               enable-camellia \
+               disable-deprecated \
+               $(use_ssl !bindist ec) \
+               ${ec_nistp_64_gcc_128} \
+               enable-idea \
+               enable-mdc2 \
+               enable-rc5 \
+               $(use_ssl asm) \
+               $(use_ssl rfc3779) \
+               $(use_ssl sctp) \
+               $(use_ssl tls-heartbeat heartbeats) \
+               $(use_ssl zlib) \
+               --prefix="${EPREFIX}"/usr \
+               --openssldir="${EPREFIX}"${SSL_CNF_DIR} \
+               --libdir=$(get_libdir) \
+               shared threads \
+               || die
+
+       # Clean out hardcoded flags that openssl uses
+       # Fix quoting for sed
+       local DEFAULT_CFLAGS=$(grep ^CFLAGS= Makefile | LC_ALL=C sed \
+               -e 's:^CFLAGS=::' \
+               -e 's:-fomit-frame-pointer ::g' \
+               -e 's:-O[0-9] ::g' \
+               -e 's:-march=[-a-z0-9]* ::g' \
+               -e 's:-mcpu=[-a-z0-9]* ::g' \
+               -e 's:-m[a-z0-9]* ::g' \
+               -e 's:\\:\\\\:g' \
+       )
+       sed -i \
+               -e "/^CFLAGS=/s|=.*|=${DEFAULT_CFLAGS} ${CFLAGS}|" \
+               -e "/^LDFLAGS=/s|=[[:space:]]*$|=${LDFLAGS}|" \
+               Makefile || die
+}
+
+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
+}
+
+multilib_src_test() {
+       emake -j1 test
+}
+
+multilib_src_install() {
+       emake DESTDIR="${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/${PN}-c-indent.el
+       dohtml -r doc/*
+
+       # 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
+       keepdir ${SSL_CNF_DIR}/certs
+
+       # 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 $?
+}

Reply via email to