summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2012-06-15 21:07:56 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2012-06-15 21:07:56 +0000
commit85529db3d5c41f7593eabe067fc83eb6bf0bb6b5 (patch)
treebc5955c4655a87c8cd5b23ae597f921f2f8a0eff
parent- Update to 0.06 (diff)
- use OPTIONS_DEFINE
- add VIA padlock support PR: 164795 Submitted by: Stefan Krüger
-rw-r--r--security/openssl/Makefile69
-rw-r--r--security/openssl/distinfo8
2 files changed, 50 insertions, 27 deletions
diff --git a/security/openssl/Makefile b/security/openssl/Makefile
index 2dc5cad00a86..d1c2fb0bc878 100644
--- a/security/openssl/Makefile
+++ b/security/openssl/Makefile
@@ -25,14 +25,20 @@ BUILD_DEPENDS= makedepend:${PORTSDIR}/devel/makedepend
.error You have `USE_OPENSSL' variable defined either in environment or in make(1) arguments. Please undefine and try again.
.endif
-OPTIONS= I386 "Use optimized assembler for 80386" off \
- SSE2 "Use runtime SSE2 detection" on \
- ASM "Build with optimized Assembler" on \
- ZLIB "Build with zlib compression" on \
- SCTP "include SCTP support" on \
- MD2 "Build with MD2 hash (obsolete)" on \
- RC5 "Build with RC5 chipher (patented)" off \
- RFC3779 "Build with RFC3779 support" off
+OPTIONS_DEFINE= SHARED THREADS I386 SSE2 ASM PADLOCK ZLIB SCTP MD2 RC5 RFC3779 GMP
+OPTIONS_DEFAULT=SHARED THREADS SSE2 ASM ZLIB SCTP MD2
+NO_OPTIONS_SORT=yes
+I386_DESC?= Use optimized assembler for x86
+SSE2_DESC?= Enable runtime SSE2 detection
+ASM_DESC?= Enable optimized Assembler code
+PADLOCK_DESC?= Enable VIA Padlock support
+SHARED_DESC?= Enable build of shared libs
+ZLIB_DESC?= Enable zlib compression support
+SCTP_DESC?= Enable SCTP protocol support
+MD2_DESC?= Enable MD2 hash (obsolete)
+RC5_DESC?= Enable C5 chipher (patented)
+RFC3779_DESC?= Enable RFC3779 support
+GMP_DESC?= Enable gmp support (LGPLv3)
MAKE_JOBS_UNSAFE= yes
NOPRECIOUSMAKEVARS= Too many _MLINKS for fetch
@@ -1043,46 +1049,46 @@ OPENSSL_SHLIBVER_BASE= ${OPENSSL_BASE_SONAME:E}
OPENSSL_BASE_SOPATH= ${OPENSSL_BASE_SONAME:H}
OPENSSL_SHLIBVER?= 8
-.if defined(WITH_I386)
+.if ${PORT_OPTIONS:MI386}
.if ${ARCH} == "i386"
EXTRACONFIGURE+= 386
.endif
.endif
-.if defined(WITHOUT_SSE2)
+.if empty(PORT_OPTIONS:MSSE2)
# disable runtime SSE2 detection
EXTRACONFIGURE+= no-sse2
.endif
-.if !defined(WITHOUT_ASM)
-EXTRACONFIGURE+= enable-asm
-.else
+.if ${PORT_OPTIONS:MASM}
EXTRACONFIGURE+= no-asm
+.else
+EXTRACONFIGURE+= enable-asm
.endif
-.if defined(NOSHARED)
-PLIST_SUB+= SHARED="@comment "
-.else
+.if ${PORT_OPTIONS:MSHARED}
PLIST_SUB+= SHARED=""
EXTRACONFIGURE+= shared
MAKE_ENV+= SHLIBVER=${OPENSSL_SHLIBVER}
PLIST_SUB+= SHLIBVER=${OPENSSL_SHLIBVER}
USE_LDCONFIG= yes
+.else
+PLIST_SUB+= SHARED="@comment "
.endif
-.if !defined(WITHOUT_ZLIB)
-EXTRACONFIGURE+= zlib zlib-dynamic
-.else
+.if ${PORT_OPTIONS:MZLIB}
EXTRACONFIGURE+= no-zlib no-zlib-dynamic
+.else
+EXTRACONFIGURE+= zlib zlib-dynamic
.endif
-.if !defined(WITHOUT_SCTP)
+.if ${PORT_OPTIONS:MSCTP}
EXTRACONFIGURE+= sctp
.else
EXTRACONFIGURE+= no-sctp
.endif
-.if defined(WITH_MD2)
+.if ${PORT_OPTIONS:MMD2}
EXTRACONFIGURE+= enable-md2
PLIST_SUB+= WITH_MD2=""
.else
@@ -1090,7 +1096,7 @@ EXTRACONFIGURE+= no-md2
PLIST_SUB+= WITH_MD2="@comment "
.endif
-.if defined(WITH_RC5)
+.if ${PORT_OPTIONS:MRC5}
EXTRACONFIGURE+= enable-rc5
PLIST_SUB+= WITH_RC5=""
.else
@@ -1098,14 +1104,23 @@ EXTRACONFIGURE+= no-rc5
PLIST_SUB+= WITH_RC5="@comment "
.endif
-.if defined(WITH_GMP)
+.if ${PORT_OPTIONS:MPADLOCK}
+PATCH_DIST_STRIP= -p1
+PATCH_SITES+= http://git.alpinelinux.org/cgit/aports/plain/main/openssl/:padlock
+PATCHFILES+= 0001-crypto-hmac-support-EVP_MD_CTX_FLAG_ONESHOT-and-set-.patch:padlock \
+0003-engines-e_padlock-backport-cvs-head-changes.patch:padlock \
+0004-engines-e_padlock-implement-sha1-sha224-sha256-accel.patch:padlock \
+0005-crypto-engine-autoload-padlock-dynamic-engine.patch:padlock
+.endif
+
+.if ${PORT_OPTIONS:MGMP}
EXTRACONFIGURE+= enable-gmp
IGNORE= GMP is LGPLv3 an can not be linked.
.else
EXTRACONFIGURE+= no-gmp
.endif
-.if defined(WITH_RFC3779)
+.if ${PORT_OPTIONS:MRFC3779}
EXTRACONFIGURE+= enable-rfc3779
.else
EXTRACONFIGURE+= no-rfc3779
@@ -1131,15 +1146,15 @@ post-patch:
do-configure:
@${REINPLACE_CMD} -e "s|options 386|options|" \
${WRKSRC}/config
-.if defined(WITH_OPENSSL_THREADS)
+.if ${PORT_OPTIONS:MTHREADS}
cd ${WRKSRC} \
&& ${SETENV} CC="${CC}" FREEBSDCC="${CC}" CFLAGS="${CFLAGS}" PERL="${PERL}" \
- PTHREAD_CFLAGS=${PTHREAD_CFLAGS} PTHREAD_LIBS=${PTHREAD_LIBS} \
./config --prefix=${PREFIX} --openssldir=${OPENSSLDIR} \
-L${PREFIX}/lib ${EXTRACONFIGURE}
.else
cd ${WRKSRC} \
&& ${SETENV} CC="${CC}" FREEBSDCC="${CC}" CFLAGS="${CFLAGS}" PERL="${PERL}" \
+ PTHREAD_CFLAGS=${PTHREAD_CFLAGS} PTHREAD_LIBS=${PTHREAD_LIBS} \
./config --prefix=${PREFIX} --openssldir=${OPENSSLDIR} \
-L${PREFIX}/lib ${EXTRACONFIGURE}
.endif
@@ -1150,7 +1165,7 @@ do-configure:
${WRKSRC}/Makefile
post-install:
-.if !defined(NOSHARED)
+.if ${PORT_OPTIONS:MSHARED}
.for i in libcrypto libssl
@${INSTALL_DATA} ${WRKSRC}/$i.so.${OPENSSL_SHLIBVER} ${PREFIX}/lib
@${LN} -sf $i.so.${OPENSSL_SHLIBVER} ${PREFIX}/lib/$i.so
diff --git a/security/openssl/distinfo b/security/openssl/distinfo
index 06af6c0a86a9..53e5da00d22c 100644
--- a/security/openssl/distinfo
+++ b/security/openssl/distinfo
@@ -1,2 +1,10 @@
SHA256 (openssl-1.0.1c/openssl-1.0.1c.tar.gz) = 2a9eb3cd4e8b114eb9179c0d3884d61658e7d8e8bf4984798a5f5bd48e325ebe
SIZE (openssl-1.0.1c/openssl-1.0.1c.tar.gz) = 4457113
+SHA256 (openssl-1.0.1c/0001-crypto-hmac-support-EVP_MD_CTX_FLAG_ONESHOT-and-set-.patch) = 7f40edec04115e97ae2c64e77d3324f6083963200add148f9a4dec090c60550b
+SIZE (openssl-1.0.1c/0001-crypto-hmac-support-EVP_MD_CTX_FLAG_ONESHOT-and-set-.patch) = 3089
+SHA256 (openssl-1.0.1c/0003-engines-e_padlock-backport-cvs-head-changes.patch) = cc5e464d7bf8e181bb454de65772366ed90ee91716ecbadaaf2dfda2e080fdc2
+SIZE (openssl-1.0.1c/0003-engines-e_padlock-backport-cvs-head-changes.patch) = 5897
+SHA256 (openssl-1.0.1c/0004-engines-e_padlock-implement-sha1-sha224-sha256-accel.patch) = bff8308f6652c8ddade1dd3261e5519fa3aa1660bea3474fc9996a53382a26b5
+SIZE (openssl-1.0.1c/0004-engines-e_padlock-implement-sha1-sha224-sha256-accel.patch) = 20552
+SHA256 (openssl-1.0.1c/0005-crypto-engine-autoload-padlock-dynamic-engine.patch) = f2d6bffae2fe5fcf76c7b9f6299893846a7730cadf70ab91bc94ee0578d0ba8d
+SIZE (openssl-1.0.1c/0005-crypto-engine-autoload-padlock-dynamic-engine.patch) = 794