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
|
2016-09-23 14:54:20 +02:00
|
|
|
PORTVERSION= 1.0.2i
|
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/
|
2014-01-07 21:40:22 +01:00
|
|
|
DIST_SUBDIR= ${DISTNAME}
|
2011-11-22 07:50:03 +01:00
|
|
|
|
2016-09-24 08:43:04 +02:00
|
|
|
MAINTAINER= ports@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-04-04 21:09:39 +02:00
|
|
|
MAKE_JOBS_UNSAFE= yes
|
|
|
|
CPE_VERSION= ${PORTVERSION}${DISTVERSIONSUFFIX}
|
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-09-24 08:43:04 +02:00
|
|
|
OPTIONS_DEFINE= SHARED THREADS SSE2 ASM PADLOCK ZLIB SCTP SSL2 SSL3 RFC3779 MD2 RC5 EXPCIPHERS DOCS MAN3
|
2016-08-27 13:00:44 +02:00
|
|
|
OPTIONS_DEFAULT=SHARED THREADS SSE2 SCTP SSL2 SSL3 MD2 MAN3
|
2016-08-14 22:46:55 +02:00
|
|
|
OPTIONS_DEFINE_i386= I386
|
2016-09-12 20:10:41 +02:00
|
|
|
OPTIONS_DEFINE_amd64= EC
|
|
|
|
OPTIONS_DEFAULT_amd64= EC
|
|
|
|
OPTIONS_DEFINE_ia64= EC
|
|
|
|
OPTIONS_DEFAULT_ia64= 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
|
2012-06-15 23:07:56 +02:00
|
|
|
NO_OPTIONS_SORT=yes
|
2014-02-14 15:33:59 +01:00
|
|
|
OPTIONS_SUB= yes
|
2012-06-30 13:33:28 +02:00
|
|
|
I386_DESC?= Optimize for i386 (instead of i486+)
|
2016-09-24 08:43:04 +02:00
|
|
|
ASM_DESC?= optimized Assembler code
|
2012-06-30 13:33:28 +02:00
|
|
|
SSE2_DESC?= runtime SSE2 detection
|
2016-08-27 13:00:44 +02:00
|
|
|
PADLOCK_DESC?= VIA Padlock support
|
2012-06-30 13:33:28 +02:00
|
|
|
SHARED_DESC?= build of shared libs
|
|
|
|
ZLIB_DESC?= zlib compression support
|
|
|
|
SCTP_DESC?= SCTP protocol support
|
2016-08-27 13:00:44 +02:00
|
|
|
SSL2_DESC?= SSLv2 protocol support
|
2014-08-11 06:27:53 +02:00
|
|
|
SSL3_DESC?= SSLv3 protocol support
|
2014-11-23 11:34:38 +01:00
|
|
|
RFC3779_DESC?= RFC3779 support (BGP)
|
2016-08-27 13:00:44 +02:00
|
|
|
MD2_DESC?= MD2 hash (obsolete)
|
2013-03-18 07:20:21 +01:00
|
|
|
RC5_DESC?= RC5 cipher (patented)
|
2016-08-27 13:00:44 +02:00
|
|
|
EXPCIPHERS_DESC?= Include experimental ciphers
|
2013-01-29 19:46:39 +01:00
|
|
|
EC_DESC?= Optimize NIST elliptic curves
|
2015-09-05 15:17:47 +02:00
|
|
|
MAN3_DESC?= Install API manpages (section 3)
|
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
|
|
|
|
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}/==}
|
|
|
|
|
2007-08-06 12:39:24 +02:00
|
|
|
OPENSSL_BASE_SONAME!= readlink ${DESTDIR}/usr/lib/libcrypto.so || true
|
2006-08-02 07:52:28 +02:00
|
|
|
OPENSSL_SHLIBVER_BASE= ${OPENSSL_BASE_SONAME:E}
|
|
|
|
OPENSSL_BASE_SOPATH= ${OPENSSL_BASE_SONAME:H}
|
2016-08-28 18:19:16 +02:00
|
|
|
|
|
|
|
.include "version.mk"
|
2016-08-27 13:00:44 +02:00
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MI386}
|
|
|
|
.if ${ARCH} == "i386"
|
|
|
|
EXTRACONFIGURE+= 386
|
|
|
|
.endif
|
|
|
|
.endif
|
2010-01-23 19:00:29 +01:00
|
|
|
|
2016-08-27 13:00:44 +02:00
|
|
|
.if empty(PORT_OPTIONS:MSSE2)
|
|
|
|
# disable runtime SSE2 detection
|
|
|
|
EXTRACONFIGURE+= no-sse2
|
|
|
|
.endif
|
2010-01-23 19:00:29 +01:00
|
|
|
|
2016-09-24 08:43:04 +02:00
|
|
|
.if ${PORT_OPTIONS:MASM}
|
|
|
|
BROKEN_sparc64= option ASM generates illegal instructions
|
|
|
|
.else
|
2016-08-27 13:00:44 +02:00
|
|
|
EXTRACONFIGURE+= no-asm
|
2016-09-24 08:43:04 +02:00
|
|
|
.endif
|
2016-08-27 13:00:44 +02:00
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MTHREADS}
|
|
|
|
EXTRACONFIGURE+= threads
|
|
|
|
.else
|
|
|
|
EXTRACONFIGURE+= no-threads
|
2012-07-29 10:36:47 +02:00
|
|
|
.endif
|
|
|
|
|
2012-06-15 23:07:56 +02:00
|
|
|
.if ${PORT_OPTIONS:MSHARED}
|
2016-08-27 13:00:44 +02:00
|
|
|
EXTRACONFIGURE+= shared
|
|
|
|
MAKE_ENV+= SHLIBVER=${OPENSSL_SHLIBVER}
|
|
|
|
PLIST_SUB+= SHLIBVER=${OPENSSL_SHLIBVER}
|
2007-02-12 04:39:09 +01:00
|
|
|
USE_LDCONFIG= yes
|
2003-02-19 22:12:51 +01:00
|
|
|
.endif
|
|
|
|
|
2016-08-27 13:00:44 +02:00
|
|
|
.if ${PORT_OPTIONS:MZLIB}
|
|
|
|
EXTRACONFIGURE+= zlib zlib-dynamic
|
|
|
|
.else
|
|
|
|
EXTRACONFIGURE+= no-zlib no-zlib-dynamic
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MSCTP}
|
|
|
|
EXTRACONFIGURE+= sctp
|
|
|
|
.else
|
|
|
|
EXTRACONFIGURE+= no-sctp
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MSSL2}
|
|
|
|
EXTRACONFIGURE+= enable-ssl2
|
|
|
|
.else
|
|
|
|
EXTRACONFIGURE+= no-ssl2
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MSSL3}
|
|
|
|
EXTRACONFIGURE+= enable-ssl3
|
|
|
|
.else
|
|
|
|
EXTRACONFIGURE+= no-ssl3 no-ssl3-method
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MMD2}
|
|
|
|
EXTRACONFIGURE+= enable-md2
|
|
|
|
.else
|
|
|
|
EXTRACONFIGURE+= no-md2
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MRC5}
|
|
|
|
EXTRACONFIGURE+= enable-rc5
|
|
|
|
.else
|
|
|
|
EXTRACONFIGURE+= no-rc5
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MPADLOCK}
|
|
|
|
PATCH_DIST_STRIP= -p1
|
|
|
|
PATCH_SITES+= http://git.alpinelinux.org/cgit/aports/plain/main/openssl/: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
|
|
|
|
.endif
|
|
|
|
|
|
|
|
EXTRACONFIGURE+= no-gmp
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MRFC3779}
|
|
|
|
EXTRACONFIGURE+= enable-rfc3779
|
|
|
|
.else
|
|
|
|
EXTRACONFIGURE+= no-rfc3779
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MEC}
|
|
|
|
EXTRACONFIGURE+= enable-ec_nistp_64_gcc_128
|
|
|
|
.else
|
|
|
|
EXTRACONFIGURE+= no-ec_nistp_64_gcc_128
|
|
|
|
.endif
|
|
|
|
|
2006-08-02 07:52:28 +02:00
|
|
|
.if ${OPENSSL_SHLIBVER_BASE} > ${OPENSSL_SHLIBVER}
|
|
|
|
pre-everything::
|
|
|
|
@${ECHO_CMD} "#"
|
|
|
|
@${ECHO_CMD} "# this ports conflicts with your base system"
|
2016-06-16 20:15:08 +02:00
|
|
|
@${ECHO_CMD} "# you have to uninstall your ssl port"
|
|
|
|
@${ECHO_CMD} "# please use DEFAULT_VERSIONS+= ssl=base instead."
|
2006-08-02 07:52:28 +02:00
|
|
|
@${ECHO_CMD} "#"
|
|
|
|
@${FALSE}
|
|
|
|
.endif
|
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-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} \
|
|
|
|
-L${PREFIX}/lib ${EXTRACONFIGURE}
|
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
|
|
|
|
${LN} -sf $i.so.${OPENSSL_SHLIBVER} ${STAGEDIR}${PREFIX}/lib/$i.so
|
|
|
|
.endfor
|
2016-08-28 18:19:16 +02:00
|
|
|
|
|
|
|
post-install-MAN3-off:
|
2015-09-05 15:17:47 +02:00
|
|
|
${RM} -rf ${STAGEDIR}/${PREFIX}/man/man3
|
|
|
|
${REINPLACE_CMD} -e 's|^man/man3/.*||' ${TMPPLIST}
|
2015-11-21 19:36:50 +01: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>
|