Files
macports-ports/security/apg/files/patch-Makefile.diff
Ryan Schmidt 82a4963ad6 apg: Do not link with libcrypto
Don't modify the Makefile to link with OpenSSL's libcrypto. apg does not
use it.

apg does use libcrypt, but on Darwin the functionality of libcrypt is
in libSystem so no separate -lcrypt flag should be used on Darwin.
2020-05-29 06:12:40 -05:00

49 lines
1.8 KiB
Diff

--- Makefile.orig 2003-08-07 10:40:39.000000000 -0500
+++ Makefile 2020-05-29 05:52:35.000000000 -0500
@@ -1,3 +1,5 @@
+OS := $(shell uname -s)
+
##################################################################
# Directories
# Install dirs
@@ -27,15 +29,10 @@
# NOTE#1: You should comment the line 'APG_CLIBS += -lcrypt' for QNX
# RTP 6.1.0, OpenBSD 2.8 and for WIN32.
#
-# NOTE#2: If ld (linker) could not find `crypt' library try to
-# replace line
-# 'APG_CLIBS += -lcrypt'
-# with line
-# 'APG_CLIBS += -lcrypto'
-# This works on MacOS X
-#
STANDALONE_OPTIONS += -DAPG_USE_CRYPT
+ifneq ($(OS),Darwin)
APG_CLIBS += -lcrypt
+endif
##################################################################
# Support for cracklib
@@ -45,9 +42,9 @@
# 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
+STANDALONE_OPTIONS += -DAPG_USE_CRACKLIB '-DCRACKLIB_DICTPATH=${CRACKLIB_DICTPATH}'
+CLISERV_OPTIONS += -DAPG_USE_CRACKLIB '-DCRACKLIB_DICTPATH=${CRACKLIB_DICTPATH}'
+APG_CLIBS += -lcrack
##################################################################
# Support for ANSI X9.17/SHA1 PRNG
@@ -135,7 +132,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}