Mon Feb 16 00:25:45 2015 UTC ()
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.


(rodent)
diff -r1.20 -r1.21 pkgsrc/security/apg/Makefile
diff -r0 -r1.1 pkgsrc/security/apg/options.mk

cvs diff -r1.20 -r1.21 pkgsrc/security/apg/Makefile (expand / switch to unified diff)

--- pkgsrc/security/apg/Makefile 2014/08/10 09:06:48 1.20
+++ pkgsrc/security/apg/Makefile 2015/02/16 00:25:45 1.21
@@ -1,39 +1,39 @@ @@ -1,39 +1,39 @@
1# $NetBSD: Makefile,v 1.20 2014/08/10 09:06:48 tron Exp $ 1# $NetBSD: Makefile,v 1.21 2015/02/16 00:25:45 rodent Exp $
2# 2#
3 3
4DISTNAME= apg-2.3.0b 4DISTNAME= apg-2.3.0b
5PKGREVISION= 1 5PKGREVISION= 2
6CATEGORIES= security 6CATEGORIES= security
7MASTER_SITES= http://www.adel.nursat.kz/apg/download/ 7MASTER_SITES= http://www.adel.nursat.kz/apg/download/
8 8
9MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
10HOMEPAGE= http://www.adel.nursat.kz/apg/ 10HOMEPAGE= http://www.adel.nursat.kz/apg/
11COMMENT= Tool set for random password generation 11COMMENT= Tool set for random password generation
12LICENSE= modified-bsd 12LICENSE= modified-bsd
13 13
14MAKE_ENV+= FLAGS=${CFLAGS:M*:Q} INSTALL_PREFIX=${DESTDIR:Q}${PREFIX:Q} 14MAKE_ENV+= FLAGS=${CFLAGS:M*:Q} INSTALL_PREFIX=${DESTDIR:Q}${PREFIX:Q}
15 15
16USE_TOOLS+= perl:run 16USE_TOOLS+= perl:run
17REPLACE_PERL= perl/apgcli.pl 17REPLACE_PERL= perl/apgcli.pl
18 18
19OPSYSVARS+= APG_CS_CLIBS 19OPSYSVARS+= APG_CS_CLIBS
20APG_CS_CLIBS.Linux+= -lnsl 20APG_CS_CLIBS.Linux+= -lnsl
21APG_CS_CLIBS.SunOS+= -lnsl -lsocket 21APG_CS_CLIBS.SunOS+= -lnsl -lsocket
22MAKE_ENV+= APG_CS_CLIBS=${APG_CS_CLIBS:Q} 22MAKE_ENV+= APG_CS_CLIBS=${APG_CS_CLIBS:Q}
23 23
24INSTALLATION_DIRS+= bin sbin ${PKGMANDIR}/man1 ${PKGMANDIR}/man8 24INSTALLATION_DIRS+= bin sbin ${PKGMANDIR}/man1 ${PKGMANDIR}/man8
25 25
26.include "../../mk/bsd.prefs.mk" 26.include "options.mk"
27 27
28.if ${OPSYS} == "Darwin" 28.if ${OPSYS} == "Darwin" || ${OPSYS} == "OpenBSD"
29BUILDLINK_TRANSFORM+= rm:-lcrypt 29BUILDLINK_TRANSFORM+= l:crypt:crypto
30.endif 30.endif
31 31
32post-extract: 32post-extract:
33 ${CHMOD} -R u+w ${WRKSRC} 33 ${CHMOD} -R u+w ${WRKSRC}
34 ${RM} -f ${WRKSRC}/INSTALL 34 ${RM} -f ${WRKSRC}/INSTALL
35 35
36post-install: 36post-install:
37 ${INSTALL_SCRIPT} ${WRKSRC}/perl/apgcli.pl ${DESTDIR}${PREFIX}/bin/apgcli 37 ${INSTALL_SCRIPT} ${WRKSRC}/perl/apgcli.pl ${DESTDIR}${PREFIX}/bin/apgcli
38 38
39.include "../../mk/bsd.pkg.mk" 39.include "../../mk/bsd.pkg.mk"

File Added: pkgsrc/security/apg/options.mk
# $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