summaryrefslogtreecommitdiff
path: root/security/pgp2
diff options
context:
space:
mode:
authorwiz <wiz>2005-12-01 20:17:48 +0000
committerwiz <wiz>2005-12-01 20:17:48 +0000
commit7ec891aea888bb374324d24414aebca2359530bf (patch)
tree2c3f6e78760e2c7003a34eed2863713a2aa83928 /security/pgp2
parent04b04670ba15e1711f720835ab7eddb879ff9616 (diff)
downloadpkgsrc-7ec891aea888bb374324d24414aebca2359530bf.tar.gz
Convert to options framework.
Diffstat (limited to 'security/pgp2')
-rw-r--r--security/pgp2/Makefile43
-rw-r--r--security/pgp2/options.mk38
2 files changed, 42 insertions, 39 deletions
diff --git a/security/pgp2/Makefile b/security/pgp2/Makefile
index 05e45595a34..ad78e6aabbf 100644
--- a/security/pgp2/Makefile
+++ b/security/pgp2/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.45 2005/10/08 22:42:08 rillig Exp $
+# $NetBSD: Makefile,v 1.46 2005/12/01 20:17:48 wiz Exp $
DISTNAME= pgp263is
CATEGORIES= security
@@ -11,29 +11,13 @@ COMMENT= Public-key encryption and digital signature utility (v2)
WRKSRC= ${WRKDIR}/src
CRYPTO= yes
-USE_RSAREF2= NO
# use of IDEA as crypto function
LICENCE= fee-based-commercial-use
-.include "../../mk/bsd.prefs.mk"
-
-.if defined(USE_RSAREF2) && ${USE_RSAREF2} == YES
-PKGNAME= pgp-2.6.3a
-DEPENDS+= rsaref-2.0p3:../../security/rsaref
-RSAINC= -I${PREFIX}/include
-RSALIBS= ${COMPILER_RPATH_FLAG}${PREFIX}/lib -L${PREFIX}/lib -lrsaref
-RSAOBJS= rsaglue2.o
-CFLAGS= -DUSA
-.else
-PKGNAME= pgp-2.6.3ia
-RSAINC=
-RSALIBS=
-RSAOBJS= rsaglue1.o
-CFLAGS=
-.endif
+.include "options.mk"
-FIX_RPATH+= RSALIBS
+.include "../../mk/bsd.prefs.mk"
PGPLIB= ${PREFIX}/share/pgp
CFLAGS+= -DPGP_SYSTEM_DIR="\"${PGPLIB}/\""
@@ -41,14 +25,6 @@ CFLAGS+= -DPGP_SYSTEM_DIR="\"${PGPLIB}/\""
.if (${MACHINE_ARCH} == "i386")
OBJS_EXT= _80386.o _zmatch.o
ASMFLAG= -DASM
-.elif (${MACHINE_ARCH} == "m68k")
-.ifdef M68060
-OBJS_EXT=
-ASMFLAG= -m68060 -DPORTABLE -DMPORTABLE
-.else
-OBJS_EXT= mc68020.o
-ASMFLAG=
-.endif
.elif (${MACHINE_ARCH} == "sparc") && (${OPSYS} != SunOS)
OBJS_EXT= sparc.o
ASMFLAG=
@@ -63,21 +39,10 @@ ASMFLAG= -DPORTABLE -DMPORTABLE
CFLAGS+= -DHIGHFIRST
.endif
-BUILD_DEFS+= USE_RSAREF2 M68060 ASMFLAG
+BUILD_DEFS+= ASMFLAG
INSTALLATION_DIRS= bin man/man1
-.if !defined(USE_RSAREF2) || ${USE_RSAREF2} != YES && ${USE_RSAREF2} != NO
-pre-fetch:
- @${ECHO} ""
- @${ECHO} "The variable USE_RSAREF2 must be set to either YES or NO"
- @${ECHO} "in order to build this package. USA residents that are"
- @${ECHO} "no licensees of the RSA algorithm MUST set this variable"
- @${ECHO} "to YES. Users outside the USA MUST set this variable to"
- @${ECHO} "NO. Licensees may choose -- NO is faster."
- @${FALSE}
-.endif
-
post-extract:
cd ${WRKDIR} && ${TAR} xf pgp263ii.tar && ${RM} -f pgp263ii.tar
diff --git a/security/pgp2/options.mk b/security/pgp2/options.mk
new file mode 100644
index 00000000000..72c8a3a534c
--- /dev/null
+++ b/security/pgp2/options.mk
@@ -0,0 +1,38 @@
+# $NetBSD: options.mk,v 1.1 2005/12/01 20:17:48 wiz Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.pgp2
+PKG_SUPPORTED_OPTIONS= rsaref
+PKG_SUGGESTED_OPTIONS= rsaref
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${MACHINE_ARCH} == "m68k"
+PKG_SUPPORTED_OPTIONS+= m68060-optimized
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mrsaref)
+PKGNAME= pgp-2.6.3a
+.include "../../security/rsaref/buildlink3.mk"
+RSAINC= -I${BUILDLINK_PREFIX.rsaref}/include
+RSALIBS= ${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.rsaref}/lib -L${BUILDLINK_PREFIX.rsaref}/lib -lrsaref
+RSAOBJS= rsaglue2.o
+CFLAGS+= -DUSA
+.else
+PKGNAME= pgp-2.6.3ia
+RSAINC=
+RSALIBS=
+RSAOBJS= rsaglue1.o
+.endif
+FIX_RPATH+= RSALIBS
+
+.if ${MACHINE_ARCH} == "m68k"
+.if !empty(PKG_OPTIONS:Mm68060-optimized)
+OBJS_EXT=
+ASMFLAG= -m68060 -DPORTABLE -DMPORTABLE
+.else
+OBJS_EXT= mc68020.o
+ASMFLAG=
+.endif
+.endif