2013-01-26 17:34:39 +01:00
|
|
|
# Created by: Dirk Froemberg <dirk@FreeBSD.org>
|
1999-08-31 03:53:22 +02:00
|
|
|
# $FreeBSD$
|
1996-03-03 22:32:35 +01:00
|
|
|
|
2000-04-09 20:34:06 +02:00
|
|
|
PORTNAME= openssl
|
2017-05-25 20:53:09 +02:00
|
|
|
PORTVERSION= 1.0.2l
|
2016-08-27 13:00:44 +02:00
|
|
|
PORTEPOCH= 1
|
1999-11-07 23:19:49 +01:00
|
|
|
CATEGORIES= security devel
|
2015-05-14 12:15:04 +02:00
|
|
|
MASTER_SITES= http://www.openssl.org/source/ \
|
|
|
|
ftp://ftp.cert.dfn.de/pub/tools/net/openssl/source/
|
2017-05-25 20:53:09 +02:00
|
|
|
DIST_SUBDIR= ${DISTNAME:C/[a-z]$//}
|
2011-11-22 07:50:03 +01:00
|
|
|
|
2016-09-24 22:23:53 +02:00
|
|
|
MAINTAINER= brnrd@FreeBSD.org
|
2003-02-20 19:26:42 +01:00
|
|
|
COMMENT= SSL and crypto library
|
1999-03-06 12:36:23 +01:00
|
|
|
|
2016-04-04 21:09:39 +02:00
|
|
|
LICENSE= OpenSSL
|
|
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE
|
2002-09-14 15:32:06 +02:00
|
|
|
|
2016-09-24 15:15:47 +02:00
|
|
|
CONFLICTS_INSTALL= libressl-[0-9]* \
|
|
|
|
libressl-devel-[0-9]* \
|
|
|
|
openssl-devel-[0-9]*
|
2016-04-04 21:09:39 +02:00
|
|
|
|
2016-10-02 13:51:00 +02:00
|
|
|
OPTIONS_DEFINE= DOCS MAN3 PADLOCK RFC3779 SHARED THREADS ZLIB
|
2017-02-08 21:16:31 +01:00
|
|
|
OPTIONS_DEFAULT= ASM MD2 MAN3 SCTP SHARED SSE2 SSL2 SSL3 THREADS
|
2016-09-12 20:10:41 +02:00
|
|
|
OPTIONS_DEFINE_amd64= EC
|
|
|
|
OPTIONS_DEFAULT_amd64= EC
|
2013-01-29 19:46:39 +01:00
|
|
|
TARGET_ARCH?= ${MACHINE_ARCH}
|
|
|
|
.if ${TARGET_ARCH} == "mips64el"
|
|
|
|
OPTIONS_DEFINE_mips= EC
|
|
|
|
OPTIONS_DEFAULT_mips= EC
|
|
|
|
.endif
|
2016-10-02 13:51:00 +02:00
|
|
|
OPTIONS_GROUP= CIPHERS HASHES OPTIMIZE PROTOCOLS
|
2017-06-25 02:29:09 +02:00
|
|
|
OPTIONS_GROUP_CIPHERS= EXPCIPHERS RC5
|
2016-10-02 13:51:00 +02:00
|
|
|
OPTIONS_GROUP_HASHES= MD2
|
|
|
|
OPTIONS_GROUP_OPTIMIZE= ASM SSE2
|
|
|
|
OPTIONS_GROUP_PROTOCOLS= SCTP SSL2 SSL3
|
|
|
|
.if ${TARGET_ARCH} == "i386"
|
|
|
|
OPTIONS_GROUP_OPTIMIZE+= I386
|
|
|
|
.endif
|
2014-02-14 15:33:59 +01:00
|
|
|
OPTIONS_SUB= yes
|
2016-10-02 13:51:00 +02:00
|
|
|
ASM_DESC= Optimized Assembler code
|
|
|
|
CIPHERS_DESC= Cipher Suite support
|
|
|
|
EC_DESC= Optimize NIST elliptic curves
|
|
|
|
EXPCIPHERS_DESC= Include experimental ciphers
|
|
|
|
HASHES_DESC= Hash Function Support
|
|
|
|
I386_DESC= Optimize for i386 (instead of i486+)
|
|
|
|
MAN3_DESC= Install API manpages (section 3)
|
|
|
|
MD2_DESC= MD2 hash (obsolete)
|
|
|
|
OPTIMIZE_DESC= Optimizations
|
|
|
|
PADLOCK_DESC= VIA Padlock support
|
|
|
|
PROTOCOLS_DESC= Protocol Support
|
|
|
|
RC5_DESC= RC5 cipher (patented)
|
|
|
|
RFC3779_DESC= RFC3779 support (BGP)
|
|
|
|
SCTP_DESC= SCTP protocol support
|
|
|
|
SHARED_DESC= Build shared libs
|
|
|
|
SSE2_DESC= Runtime SSE2 detection
|
|
|
|
SSL2_DESC= SSLv2 protocol support
|
|
|
|
SSL3_DESC= SSLv3 protocol support
|
|
|
|
ZLIB_DESC= zlib compression support
|
2009-05-20 21:22:47 +02:00
|
|
|
|
2016-08-28 18:19:16 +02:00
|
|
|
USES= cpe perl5
|
2013-09-16 18:45:35 +02:00
|
|
|
USE_PERL5= build
|
|
|
|
MAKE_ARGS+= WHOLE_ARCHIVE_FLAG=--whole-archive
|
2014-03-28 19:23:44 +01:00
|
|
|
MAKE_ENV+= LIBRPATH="${PREFIX}/lib" GREP_OPTIONS=
|
2013-09-16 18:45:35 +02:00
|
|
|
SUB_FILES= pkg-message
|
2001-05-23 04:47:02 +02:00
|
|
|
|
2016-10-04 20:35:00 +02:00
|
|
|
MAKE_JOBS_UNSAFE= yes
|
|
|
|
|
2016-10-02 13:51:00 +02:00
|
|
|
ASM_CONFIGURE_OFF= no-asm
|
|
|
|
EC_CONFIGURE_ON= enable-ec_nistp_64_gcc_128
|
|
|
|
EC_CONFIGURE_OFF= no-ec_nistp_64_gcc_128
|
|
|
|
I386_CONFIGURE_ON= 386
|
|
|
|
MD2_CONFIGURE_ON= enable-md2
|
|
|
|
MD2_CONFIGURE_OFF= no-md2
|
2017-05-25 20:53:09 +02:00
|
|
|
PADLOCK_CFLAGS= -Wno-unused-function
|
|
|
|
PADLOCK_CONFIGURE_OFF= no-padlock
|
2016-10-02 13:51:00 +02:00
|
|
|
PADLOCK_PATCH_SITES= http://git.alpinelinux.org/cgit/aports/plain/main/openssl/:padlock
|
|
|
|
PADLOCK_PATCHFILES= 1001-crypto-hmac-support-EVP_MD_CTX_FLAG_ONESHOT-and-set-.patch:padlock \
|
|
|
|
1002-backport-changes-from-upstream-padlock-module.patch:padlock \
|
|
|
|
1003-engines-e_padlock-implement-sha1-sha224-sha256-accel.patch:padlock \
|
|
|
|
1004-crypto-engine-autoload-padlock-dynamic-engine.patch:padlock
|
|
|
|
PADLOCK_VARS= PATCH_DIST_STRIP=-p1
|
|
|
|
RC5_CONFIGURE_ON= enable-rc5
|
|
|
|
RC5_CONFIGURE_OFF= no-rc5
|
|
|
|
RFC3779_CONFIGURE_ON= enable-rfc3779
|
|
|
|
RFC3779_CONFIGURE_OFF= no-rfc3779
|
|
|
|
SCTP_CONFIGURE_ON= sctp
|
|
|
|
SCTP_CONFIGURE_OFF= no-sctp
|
|
|
|
SHARED_CONFIGURE_ON= shared
|
|
|
|
SHARED_MAKE_ENV= SHLIBVER=${OPENSSL_SHLIBVER}
|
|
|
|
SHARED_PLIST_SUB= SHLIBVER=${OPENSSL_SHLIBVER}
|
2016-10-06 21:38:48 +02:00
|
|
|
SHARED_USE= ldconfig=yes
|
2016-10-02 13:51:00 +02:00
|
|
|
SSE2_CONFIGURE_OFF= no-sse2
|
|
|
|
SSL2_CONFIGURE_ON= enable-ssl2
|
|
|
|
SSL2_CONFIGURE_OFF= no-ssl2
|
|
|
|
SSL3_CONFIGURE_ON= enable-ssl3
|
|
|
|
SSL3_CONFIGURE_OFF= no-ssl3 no-ssl3-method
|
2017-05-25 20:53:09 +02:00
|
|
|
SSL3_EXTRA_PATCHES_OFF= ${PATCHDIR}/extra-patch-test_testssl
|
2016-10-02 13:51:00 +02:00
|
|
|
THREADS_CONFIGURE_ON= threads
|
|
|
|
THREADS_CONFIGURE_OFF= no-threads
|
|
|
|
ZLIB_CONFIGURE_ON= zlib zlib-dynamic
|
|
|
|
ZLIB_CONFIGURE_OFF= no-zlib no-zlib-dynamic
|
|
|
|
|
2017-05-25 20:53:09 +02:00
|
|
|
CFLAGS+= -Werror -Qunused-arguments
|
|
|
|
|
2003-02-19 22:12:51 +01:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2014-03-02 14:13:27 +01:00
|
|
|
.if ${PREFIX} == /usr
|
2015-11-21 19:36:50 +01:00
|
|
|
IGNORE= the OpenSSL port can not be installed over the base version
|
2014-03-02 14:13:27 +01:00
|
|
|
.endif
|
|
|
|
|
2014-07-03 18:49:37 +02:00
|
|
|
OPENSSLDIR?= ${PREFIX}/openssl
|
|
|
|
PLIST_SUB+= OPENSSLDIR=${OPENSSLDIR:S=^${PREFIX}/==}
|
|
|
|
|
2016-08-28 18:19:16 +02:00
|
|
|
.include "version.mk"
|
2016-08-27 13:00:44 +02:00
|
|
|
|
2016-09-24 08:43:04 +02:00
|
|
|
.if ${PORT_OPTIONS:MASM}
|
|
|
|
BROKEN_sparc64= option ASM generates illegal instructions
|
2016-08-27 13:00:44 +02:00
|
|
|
.endif
|
|
|
|
|
2016-10-02 13:51:00 +02:00
|
|
|
CONFIGURE_ARGS+= no-gmp
|
2002-05-13 20:54:03 +02:00
|
|
|
|
2010-04-06 19:30:33 +02:00
|
|
|
post-patch:
|
2016-08-27 13:00:44 +02:00
|
|
|
${REINPLACE_CMD} -e 's|m4 -B 8192|m4|g' \
|
|
|
|
${WRKSRC}/crypto/des/Makefile
|
|
|
|
${REINPLACE_CMD} -e 's|SHLIB_VERSION_NUMBER "1.0.0"|SHLIB_VERSION_NUMBER "${OPENSSL_SHLIBVER}"|' \
|
|
|
|
${WRKSRC}/crypto/opensslv.h
|
|
|
|
${REINPLACE_CMD} -e 's|ERR_R_MALLOC_ERROR|ERR_R_MALLOC_FAILURE|' \
|
|
|
|
${WRKSRC}/crypto/bio/bss_dgram.c
|
|
|
|
.if ${PORT_OPTIONS:MEXPCIPHERS}
|
|
|
|
${REINPLACE_CMD} -e 's|TLS1_ALLOW_EXPERIMENTAL_CIPHERSUITES 0|TLS1_ALLOW_EXPERIMENTAL_CIPHERSUITES 1|' \
|
|
|
|
${WRKSRC}/ssl/tls1.h
|
|
|
|
.endif
|
2016-08-27 11:59:48 +02:00
|
|
|
|
2016-10-02 13:51:00 +02:00
|
|
|
post-patch-MAN3-off:
|
|
|
|
${GREP} -L openssl_manual_section ${WRKSRC}/doc/crypto/*.pod | ${XARGS} ${RM}
|
2016-10-21 14:51:40 +02:00
|
|
|
${RM} -r ${WRKSRC}/doc/ssl/*.pod
|
2016-10-02 13:51:00 +02:00
|
|
|
${REINPLACE_CMD} -e 's|pod doc/ssl/\*\.pod|pod|' ${WRKSRC}/Makefile.org
|
|
|
|
|
2016-08-27 13:00:44 +02:00
|
|
|
do-configure:
|
|
|
|
${REINPLACE_CMD} -e "s|options 386|options|" \
|
|
|
|
${WRKSRC}/config
|
|
|
|
cd ${WRKSRC} \
|
|
|
|
&& ${SETENV} CC="${CC}" FREEBSDCC="${CC}" CFLAGS="${CFLAGS}" PERL="${PERL}" \
|
|
|
|
./config --prefix=${PREFIX} --openssldir=${OPENSSLDIR} \
|
|
|
|
--install_prefix=${STAGEDIR} \
|
2016-10-02 13:51:00 +02:00
|
|
|
-L${PREFIX}/lib ${CONFIGURE_ARGS}
|
2016-08-28 18:19:16 +02:00
|
|
|
|
|
|
|
post-configure:
|
2016-08-27 11:59:48 +02:00
|
|
|
${REINPLACE_CMD} \
|
2016-08-27 13:00:44 +02:00
|
|
|
-e 's|^MANDIR=.*$$|MANDIR=$$(PREFIX)/man|' \
|
|
|
|
-e 's|$$(LIBDIR)/pkgconfig|libdata/pkgconfig|g' \
|
|
|
|
-e 's|LIBVERSION=[^ ]* |LIBVERSION=${OPENSSL_SHLIBVER} |' \
|
2005-09-19 23:04:35 +02:00
|
|
|
${WRKSRC}/Makefile
|
1999-03-26 09:42:49 +01:00
|
|
|
|
2016-08-28 18:19:16 +02:00
|
|
|
post-install-SHARED-on:
|
2016-08-27 13:00:44 +02:00
|
|
|
.for i in libcrypto libssl
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/$i.so.${OPENSSL_SHLIBVER} ${STAGEDIR}${PREFIX}/lib
|
2017-05-25 20:53:09 +02:00
|
|
|
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/$i.so.${OPENSSL_SHLIBVER}
|
2016-08-27 13:00:44 +02:00
|
|
|
${LN} -sf $i.so.${OPENSSL_SHLIBVER} ${STAGEDIR}${PREFIX}/lib/$i.so
|
|
|
|
.endfor
|
2017-05-25 20:53:09 +02:00
|
|
|
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/openssl
|
|
|
|
.for i in 4758cca aep atalla capi chil cswift gmp gost nuron padlock sureware ubsec
|
|
|
|
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/engines/lib${i}.so
|
|
|
|
.endfor
|
2016-08-28 18:19:16 +02:00
|
|
|
|
2016-08-27 13:00:44 +02:00
|
|
|
post-install-DOCS-on:
|
|
|
|
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/openssl.txt ${STAGEDIR}${DOCSDIR}/
|
|
|
|
|
2010-01-23 19:00:29 +01:00
|
|
|
test: build
|
2003-01-02 05:17:19 +01:00
|
|
|
cd ${WRKSRC} && ${MAKE} test
|
|
|
|
|
2006-06-24 10:27:11 +02:00
|
|
|
regression-test: test
|
|
|
|
|
2000-01-28 23:05:15 +01:00
|
|
|
.include <bsd.port.post.mk>
|