summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authortron <tron@pkgsrc.org>2008-03-26 20:09:43 +0000
committertron <tron@pkgsrc.org>2008-03-26 20:09:43 +0000
commit7d93389dbd1298cba7f1035f647a45c0eaf10913 (patch)
treedc9eaf26044b8b359c3cb5846e47c4c880180965 /security
parentaae206df7db4f03c7c82907719546756c47cc72e (diff)
downloadpkgsrc-7d93389dbd1298cba7f1035f647a45c0eaf10913.tar.gz
Add a new option "via-padlock" which enables support for the
VIA PadLock Security Engine: - The new option is turned on by default. - The new option is only available on i386 systems except Mac OS X (which doesn't work on VIA CPU). - The new option isn't available on system which uses GCC 3.x because it causes build failures. This fixes PR pkg/38197. Approved by Dieter Baron.
Diffstat (limited to 'security')
-rw-r--r--security/libgcrypt/hacks.mk9
-rw-r--r--security/libgcrypt/options.mk23
2 files changed, 21 insertions, 11 deletions
diff --git a/security/libgcrypt/hacks.mk b/security/libgcrypt/hacks.mk
index 215c18725a6..4419a7bf184 100644
--- a/security/libgcrypt/hacks.mk
+++ b/security/libgcrypt/hacks.mk
@@ -1,4 +1,4 @@
-# $NetBSD: hacks.mk,v 1.3 2008/03/16 20:14:38 seb Exp $
+# $NetBSD: hacks.mk,v 1.4 2008/03/26 20:09:43 tron Exp $
# config.h #defines socklen_t if it is not defined, but libgcrypt does
# not propogate this to the installed gcrypt.h, so packages using it
@@ -10,10 +10,3 @@ post-configure:
${MV} ${WRKSRC}/src/gcrypt.h ${WRKSRC}/src/gcrypt.h.old; \
${SED} -e "s,^/\* socklen_t \*/,$$socklen," \
${WRKSRC}/src/gcrypt.h.old > ${WRKSRC}/src/gcrypt.h
-
-# GCC 3.x (at least 3.3.3 on NetBSD) fails to compile asm() call in
-# cipher/rijndael.c:do_padlock()
-.include "../../mk/compiler.mk"
-.if !empty(CC_VERSION:Mgcc-3.*)
-CFLAGS+= -fomit-frame-pointer
-.endif
diff --git a/security/libgcrypt/options.mk b/security/libgcrypt/options.mk
index 7273dead55e..e9064c78cac 100644
--- a/security/libgcrypt/options.mk
+++ b/security/libgcrypt/options.mk
@@ -1,12 +1,24 @@
-# $NetBSD: options.mk,v 1.1 2007/08/29 23:11:38 wiz Exp $
+# $NetBSD: options.mk,v 1.2 2008/03/26 20:09:43 tron Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.libgcrypt
PKG_SUPPORTED_OPTIONS= idea
+.include "../../mk/bsd.prefs.mk"
+
+.if ${MACHINE_ARCH} == "i386" && ${OPSYS} != "Darwin"
+. include "../../mk/compiler.mk"
+# GCC 3.x (at least 3.3.3 on NetBSD) fails to compile asm() call in
+# cipher/rijndael.c:do_padlock()
+. if empty(CC_VERSION:Mgcc-3.*)
+PKG_SUPPORTED_OPTIONS+= via-padlock
+PKG_SUGGESTED_OPTIONS+= via-padlock
+. endif
+.endif
+
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Midea)
-# use of IDEA as crypto function
+# Use of IDEA as crypto function.
LICENSE= idea-license
RESTRICTED= Commercial distribution is claimed to require a license.
NO_SRC_ON_CDROM= ${RESTRICTED}
@@ -21,8 +33,13 @@ SUBST_STAGE.idea= post-patch
SUBST_FILES.idea= cipher/idea.c
SUBST_SED.idea= -e 's,^.*SIZEOF_UNSIGNED_LONG.*$$,,'
-USE_TOOLS+= automake
+USE_TOOLS+= autoreconf
pre-configure:
cd ${WRKSRC} && autoreconf -i -v
.endif
+
+.if empty(PKG_OPTIONS:Mvia-padlock)
+# Disable VIA Padlock support.
+CONFIGURE_ARGS+= --disable-padlock-support
+.endif