freebsd-ports/security/apg/files/patch-aa
Peter Pentchev bc5522df11 Fix a segfault when using the -y option. While I'm here:
- remove the MD5 checksum from the distfile
- note upstream's BSD license
- OPTIONSify the support for CrackLib
- add a descriptive patch header to the existing patch-aa
- remove the packetstorm master site, it only seems to carry a much
  older version of apg
- bump PORTREVISION for the segfault fix

PR:		153382 (the segfault fix)
Submitted by:	David Boyd <David.Boyd@insightbb.com>
2010-12-23 10:54:46 +00:00

50 lines
2 KiB
Text

Description: Add CrackLib support and conditionalize the build variables.
Forwarded: no
Author: Peter Pentchev <roam@FreeBSD.org>,
Dominic Marks <dominic_marks@btinternet.com>,
Roman Neuhauser <roman@bellavista.cz>
Last-Update: 2010-12-23
--- Makefile.orig
+++ Makefile
@@ -44,10 +44,12 @@
# If you want to use cracklib for password quality check then you
# must uncomment the folowing 4 lines (you must not do this for WIN32)
#
-#CRACKLIB_DICTPATH = "/usr/local/lib/pw_dict"
-#STANDALONE_OPTIONS += -DAPG_USE_CRACKLIB '-DCRACKLIB_DICTPATH=${CRACKLIB_DICTPATH}' -I/usr/local/include -L/usr/local/lib
-#CLISERV_OPTIONS += -DAPG_USE_CRACKLIB '-DCRACKLIB_DICTPATH=${CRACKLIB_DICTPATH}' -I/usr/local/include -L/usr/local/lib
-#APG_CLIBS += -lcrack
+.if defined(WITH_CRACKLIB)
+CRACKLIB_DICTPATH = "${LOCALBASE}/libdata/cracklib/pw_dict"
+STANDALONE_OPTIONS += -DAPG_USE_CRACKLIB '-DCRACKLIB_DICTPATH=${CRACKLIB_DICTPATH}' -I${LOCALBASE}/include -L${LOCALBASE}/lib
+CLISERV_OPTIONS += -DAPG_USE_CRACKLIB '-DCRACKLIB_DICTPATH=${CRACKLIB_DICTPATH}' -I${LOCALBASE}/include -L${LOCALBASE}/lib
+APG_CLIBS += -lcrack
+.endif
##################################################################
# Support for ANSI X9.17/SHA1 PRNG
@@ -60,12 +62,12 @@
##################################################################
# You can modify CC variable if you have compiler other than GCC
# But the code was designed and tested with GCC
-CC = gcc
+CC ?= gcc
##################################################################
# Compilation flags
# You should comment the line below for AIX+native cc
-CFLAGS = -Wall
+CFLAGS ?= -Wall
####################################################################
# If you plan to install APG daemon you should look at lines below #
@@ -135,7 +137,7 @@
${CC} ${CFLAGS} -DCLISERV ${CLISERV_OPTIONS} -o ${CS_PROGNAME} ${SOURCES} ${APG_CS_CLIBS}
apgbfm:
- ${CC} ${FLAGS} -DAPGBFM -o ${BFM_PROGNAME} ${BFM_SOURCES} ${APGBFM_CLIBS}
+ ${CC} ${CFLAGS} -DAPGBFM -o ${BFM_PROGNAME} ${BFM_SOURCES} ${APGBFM_CLIBS}
strip:
strip ${PROGNAME}