Fixup fromcvs/togit conversion
[pkgsrcv2.git] / security / libgcrypt / options.mk
1 # $NetBSD: options.mk,v 1.4 2009/01/31 08:53:14 adam Exp $
2
3 PKG_OPTIONS_VAR=        PKG_OPTIONS.libgcrypt
4 PKG_SUPPORTED_OPTIONS=  idea
5
6 .include "../../mk/bsd.prefs.mk"
7
8 .if ${MACHINE_ARCH} == "i386" && ${OPSYS} != "Darwin"
9 .  include "../../mk/compiler.mk"
10 # GCC 3.x (at least 3.3.3 on NetBSD) fails to compile asm() call in
11 # cipher/rijndael.c:do_padlock()
12 .  if empty(CC_VERSION:Mgcc-3.*)
13 PKG_SUPPORTED_OPTIONS+= via-padlock
14 PKG_SUGGESTED_OPTIONS+= via-padlock
15 .  endif
16 .endif
17
18 .include "../../mk/bsd.options.mk"
19
20 .if empty(PKG_OPTIONS:Mvia-padlock)
21 # Disable VIA Padlock support.
22 CONFIGURE_ARGS+=        --disable-padlock-support
23 .endif
24
25 .if !empty(PKG_OPTIONS:Midea)
26 # use of IDEA as crypto function
27 LICENSE=        idea-license
28 RESTRICTED=     Commercial distribution is claimed to require a license.
29 NO_SRC_ON_CDROM=        ${RESTRICTED}
30 NO_BIN_ON_CDROM=        ${RESTRICTED}
31
32 DISTFILES+=     gcrypt.tar.bz2
33 SITES.gcrypt.tar.bz2=   http://www.kfwebs.com/
34 CFLAGS+=        -DUSE_IDEA
35 MAKE_ENV+=      IDEAOBJECT=idea.lo
36 USE_TOOLS+=     patch
37 post-patch:     ideapatch
38 ideapatch:
39         cd ${WRKDIR} && ${PATCH} <${FILESDIR}/idea-patch && \
40         ${CP} idea.c ${WRKSRC}/cipher
41 .endif