summaryrefslogtreecommitdiff
path: root/security/gnupg/Makefile
blob: b9999e6de8048499e3fd789e788f16ba5dd49897 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
# $NetBSD: Makefile,v 1.21 2001/02/15 12:04:37 wiz Exp $
# FreeBSD Id: Makefile,v 1.20 1997/08/27 13:06:01 ache Exp
#

DISTNAME=	gnupg-1.0.4
PKGNAME=	${DISTNAME}nb3
CATEGORIES=	security
MASTER_SITES=	ftp://ftp.gnupg.org/pub/gcrypt/gnupg/
# don't remove this -- we may add idea.c to it below
DISTFILES=	${DISTNAME}${EXTRACT_SUFX}

PATCHFILES=	gnupg-1.0.4.security-patch1.diff
PATCH_SITES=	ftp://ftp.gnupg.org/pub/gcrypt/gnupg/
PATCH_DIST_STRIP=	-p1

MAINTAINER=	wiz@netbsd.org
HOMEPAGE=	http://www.gnupg.org/

BUILD_DEPENDS+=	msgfmt:../../devel/gettext

CRYPTO=		yes
GNU_CONFIGURE=	yes
USE_GMAKE=	yes
USE_LIBINTL=	yes

EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}

.include "../../mk/bsd.prefs.mk"

BUILD_DEFS+=	USE_IDEA

.if defined(USE_IDEA) && ${USE_IDEA} == YES
# use of IDEA as crypto function
LICENCE=        fee-based-commercial-use
MASTER_SITES+=	ftp://ftp.gnupg.org/pub/gcrypt/contrib/
DISTFILES+=	idea.c
EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
PLIST_SUBST+=	IDEA=""

post-extract:
		${CP} ${_DISTDIR}/idea.c ${WRKSRC}

post-build:
		cd ${WRKSRC} && 				\
		${CC} -shared -Wl,-Bshareable -fPIC -o idea idea.c

post-install:
		${INSTALL_PROGRAM} ${WRKSRC}/idea ${PREFIX}/lib/gnupg
.else
PLIST_SUBST+=	IDEA="@comment "
.endif

.if ${OPSYS} == "SunOS"
DEPENDS+=	zlib-1.1.3:../../devel/zlib
LDFLAGS+=	-L${LOCALBASE}/lib
.endif

.include "../../mk/bsd.pkg.mk"