summaryrefslogtreecommitdiff
path: root/security/apg
diff options
context:
space:
mode:
authorrodent <rodent@pkgsrc.org>2015-02-16 00:25:45 +0000
committerrodent <rodent@pkgsrc.org>2015-02-16 00:25:45 +0000
commit1fae2f0fab1b9cc27e8002b947826b60d491e982 (patch)
tree60988dc8229f360ab76e152277873707cbc9a003 /security/apg
parentf0522b77398b2580aaf47fa7a97b2b181b04e0fb (diff)
downloadpkgsrc-1fae2f0fab1b9cc27e8002b947826b60d491e982.tar.gz
Source code documentation says that renaming -lcrypt to -lcrypto works on
Darwin. Let's do that instead of removing that library, since it would involve disabling another CFLAG to function properly. Do the same for OpenBSD which fixes the build there too. Add options.mk file to enable the user to choose the libcrack and debug options at build time. Bump PKGREVISION.
Diffstat (limited to 'security/apg')
-rw-r--r--security/apg/Makefile10
-rw-r--r--security/apg/options.mk18
2 files changed, 23 insertions, 5 deletions
diff --git a/security/apg/Makefile b/security/apg/Makefile
index 5192d9ad857..edfc19b9697 100644
--- a/security/apg/Makefile
+++ b/security/apg/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.20 2014/08/10 09:06:48 tron Exp $
+# $NetBSD: Makefile,v 1.21 2015/02/16 00:25:45 rodent Exp $
#
DISTNAME= apg-2.3.0b
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= security
MASTER_SITES= http://www.adel.nursat.kz/apg/download/
@@ -23,10 +23,10 @@ MAKE_ENV+= APG_CS_CLIBS=${APG_CS_CLIBS:Q}
INSTALLATION_DIRS+= bin sbin ${PKGMANDIR}/man1 ${PKGMANDIR}/man8
-.include "../../mk/bsd.prefs.mk"
+.include "options.mk"
-.if ${OPSYS} == "Darwin"
-BUILDLINK_TRANSFORM+= rm:-lcrypt
+.if ${OPSYS} == "Darwin" || ${OPSYS} == "OpenBSD"
+BUILDLINK_TRANSFORM+= l:crypt:crypto
.endif
post-extract:
diff --git a/security/apg/options.mk b/security/apg/options.mk
new file mode 100644
index 00000000000..d7c38189b43
--- /dev/null
+++ b/security/apg/options.mk
@@ -0,0 +1,18 @@
+# $NetBSD: options.mk,v 1.1 2015/02/16 00:25:45 rodent Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.apg
+PKG_SUPPORTED_OPTIONS= debug libcrack
+PKG_SUGGESTED_OPTIONS= # blank
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mdebug)
+CFLAGS+= -DAPG_DEBUG
+.endif
+
+.if !empty(PKG_OPTIONS:Mlibcrack)
+.include "../../security/libcrack/buildlink3.mk"
+CFLAGS+= -I${PREFIX}/include/cracklib -DAPG_USE_CRACKLIB
+CFLAGS+= -DCRACKLIB_DICTPATH=\"${PREFIX}/libdata\"
+BUILDLINK_TRANSFORM+= l:crypt:crypt:crack
+.endif