pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/security/pgp2 Convert to options framework.
details: https://anonhg.NetBSD.org/pkgsrc/rev/14d8ffdb0393
branches: trunk
changeset: 503918:14d8ffdb0393
user: wiz <wiz%pkgsrc.org@localhost>
date: Thu Dec 01 20:17:48 2005 +0000
description:
Convert to options framework.
diffstat:
security/pgp2/Makefile | 43 ++++---------------------------------------
security/pgp2/options.mk | 38 ++++++++++++++++++++++++++++++++++++++
2 files changed, 42 insertions(+), 39 deletions(-)
diffs (121 lines):
diff -r 54f2f1c85584 -r 14d8ffdb0393 security/pgp2/Makefile
--- a/security/pgp2/Makefile Thu Dec 01 20:16:59 2005 +0000
+++ b/security/pgp2/Makefile Thu Dec 01 20:17:48 2005 +0000
@@ -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 @@
WRKSRC= ${WRKDIR}/src
CRYPTO= yes
-USE_RSAREF2= NO
# use of IDEA as crypto function
LICENCE= fee-based-commercial-use
-.include "../../mk/bsd.prefs.mk"
+.include "options.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
-
-FIX_RPATH+= RSALIBS
+.include "../../mk/bsd.prefs.mk"
PGPLIB= ${PREFIX}/share/pgp
CFLAGS+= -DPGP_SYSTEM_DIR="\"${PGPLIB}/\""
@@ -41,14 +25,6 @@
.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 @@
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 -r 54f2f1c85584 -r 14d8ffdb0393 security/pgp2/options.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/security/pgp2/options.mk Thu Dec 01 20:17:48 2005 +0000
@@ -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
Home |
Main Index |
Thread Index |
Old Index