pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/libgcrypt Add a new option "via-padlock" whic...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f973fc5b05f3
branches:  trunk
changeset: 540097:f973fc5b05f3
user:      tron <tron%pkgsrc.org@localhost>
date:      Wed Mar 26 20:09:43 2008 +0000

description:
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:

 security/libgcrypt/hacks.mk   |   9 +--------
 security/libgcrypt/options.mk |  23 ++++++++++++++++++++---
 2 files changed, 21 insertions(+), 11 deletions(-)

diffs (65 lines):

diff -r ae401ed61942 -r f973fc5b05f3 security/libgcrypt/hacks.mk
--- a/security/libgcrypt/hacks.mk       Wed Mar 26 19:06:49 2008 +0000
+++ b/security/libgcrypt/hacks.mk       Wed Mar 26 20:09:43 2008 +0000
@@ -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 @@
                ${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 -r ae401ed61942 -r f973fc5b05f3 security/libgcrypt/options.mk
--- a/security/libgcrypt/options.mk     Wed Mar 26 19:06:49 2008 +0000
+++ b/security/libgcrypt/options.mk     Wed Mar 26 20:09:43 2008 +0000
@@ -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_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



Home | Main Index | Thread Index | Old Index