summaryrefslogtreecommitdiff
path: root/security/libgcrypt/options.mk
blob: e9064c78cac9e67a9536cd64169bcb56c4c784f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# $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.
LICENSE=	idea-license
RESTRICTED=     Commercial distribution is claimed to require a license.
NO_SRC_ON_CDROM=        ${RESTRICTED}
NO_BIN_ON_CDROM=        ${RESTRICTED}

PATCH_SITES=		http://www.kfwebs.com/
PATCHFILES=		libgcrypt-1.2.4-idea.diff.bz2
PATCH_DIST_STRIP=	-p1

SUBST_CLASSES+=		idea
SUBST_STAGE.idea=	post-patch
SUBST_FILES.idea=	cipher/idea.c
SUBST_SED.idea=		-e 's,^.*SIZEOF_UNSIGNED_LONG.*$$,,'

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