aboutsummaryrefslogtreecommitdiff
path: root/security/john
diff options
context:
space:
mode:
authorVasil Dimov <vd@FreeBSD.org>2006-05-09 06:18:39 +0000
committerVasil Dimov <vd@FreeBSD.org>2006-05-09 06:18:39 +0000
commit39df57402b6ff571a68b08e06b99c36a43bd1e7f (patch)
tree4ec6ef1290e87e79fbd1b3c654ceec576e2ccf6f /security/john
parent9cd5e2a10fcfb529b3544bcfaefeb246f9b32fb9 (diff)
downloadports-39df57402b6ff571a68b08e06b99c36a43bd1e7f.tar.gz
ports-39df57402b6ff571a68b08e06b99c36a43bd1e7f.zip
Notes
Diffstat (limited to 'security/john')
-rw-r--r--security/john/Makefile25
-rw-r--r--security/john/files/patch-Makefile27
-rw-r--r--security/john/files/patch-params.h45
3 files changed, 26 insertions, 71 deletions
diff --git a/security/john/Makefile b/security/john/Makefile
index dafd824c3b13..35b2368bf89c 100644
--- a/security/john/Makefile
+++ b/security/john/Makefile
@@ -7,6 +7,7 @@
PORTNAME= john
PORTVERSION= 1.7.0.2
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= http://www.openwall.com/john/f/ \
ftp://ftp.ru.openwall.com/pub/projects/john/${PORTVERSION}/
@@ -24,24 +25,32 @@ USE_BZIP2= yes
.include <bsd.port.pre.mk>
OSNAME= ${OPSYS:L}
+CFLAGS+= -DJOHN_SYSTEMWIDE=1 \
+ -DJOHN_SYSTEMWIDE_HOME=\\"${DATADIR}\\" \
+ -DCFG_FULL_NAME=\\"${PREFIX}/etc/${PORTNAME}.conf\\"
ALL_TARGET= generic
.if ${ARCH} == "i386"
-. if ${MACHINE_CPU:Mmmx}
-ALL_TARGET= ${OSNAME}-x86-mmx
-. else
+. if defined(WITHOUT_MMX)
ALL_TARGET= ${OSNAME}-x86-any
+. else
+ALL_TARGET= ${OSNAME}-x86-mmx
. endif
.elif ${ARCH} == "alpha"
ALL_TARGET= ${OSNAME}-alpha
.endif
+pre-everything::
+.if !defined(WITHOUT_MMX) && ${ARCH} == "i386"
+ @${ECHO_MSG}
+ @${ECHO_MSG} "You can disable MMX optimizations by defining WITHOUT_MMX"
+ @${ECHO_MSG}
+.endif
+
post-patch:
- ${REINPLACE_CMD} -e 's|$$JOHN|${DATADIR}|g' \
- ${WRKDIR}/${DISTNAME}/run/john.conf
- ${REINPLACE_CMD} -e \
- 's|%%PREFIX%%|${PREFIX}|g; s|%%DATADIR%%|${DATADIR}|g'\
- ${WRKSRC}/params.h
+ ${REINPLACE_CMD} -e 's|= gcc|= ${CC}|g' \
+ -e 's|CFLAGS =.*|CFLAGS = -c ${CFLAGS}|g' \
+ ${WRKSRC}/Makefile
pre-build:
@${ECHO} "Building for ${ALL_TARGET}"
diff --git a/security/john/files/patch-Makefile b/security/john/files/patch-Makefile
deleted file mode 100644
index 804c0d651486..000000000000
--- a/security/john/files/patch-Makefile
+++ /dev/null
@@ -1,27 +0,0 @@
---- Makefile.orig Mon Dec 12 19:53:36 2005
-+++ Makefile Sat Dec 31 01:30:01 2005
-@@ -3,10 +3,10 @@
- # Copyright (c) 1996-2005 by Solar Designer
- #
-
--CPP = gcc
--CC = gcc
--AS = gcc
--LD = gcc
-+CC ?= gcc
-+CPP = $(CC)
-+AS = $(CC)
-+LD = $(CC)
- CP = cp
- LN = ln -sf
- RM = rm -f
-@@ -15,7 +15,8 @@
- PERL = perl
- NULL = /dev/null
- CPPFLAGS = -E
--CFLAGS = -c -Wall -O2 -fomit-frame-pointer
-+CFLAGS ?= -O2
-+CFLAGS += -c -Wall -fomit-frame-pointer
- ASFLAGS = -c
- LDFLAGS = -s
- OPT_NORMAL = -funroll-loops
diff --git a/security/john/files/patch-params.h b/security/john/files/patch-params.h
index 97d6c5597b15..03c4150ecfdb 100644
--- a/security/john/files/patch-params.h
+++ b/security/john/files/patch-params.h
@@ -1,41 +1,14 @@
---- params.h.orig Sun Mar 19 20:34:15 2006
-+++ params.h Wed May 3 14:45:51 2006
-@@ -49,15 +49,15 @@
- * notes above.
- */
- #ifndef JOHN_SYSTEMWIDE
--#define JOHN_SYSTEMWIDE 0
-+#define JOHN_SYSTEMWIDE 1
- #endif
-
- #if JOHN_SYSTEMWIDE
- #ifndef JOHN_SYSTEMWIDE_EXEC /* please refer to the notes above */
--#define JOHN_SYSTEMWIDE_EXEC "/usr/libexec/john"
-+#define JOHN_SYSTEMWIDE_EXEC "%%PREFIX%%/bin/john"
- #endif
- #ifndef JOHN_SYSTEMWIDE_HOME
--#define JOHN_SYSTEMWIDE_HOME "/usr/share/john"
-+#define JOHN_SYSTEMWIDE_HOME "%%DATADIR%%"
- #endif
- #define JOHN_PRIVATE_HOME "~/.john"
- #endif
-@@ -101,8 +101,8 @@
+--- params.h.orig Mon May 8 15:14:13 2006
++++ params.h Mon May 8 15:16:41 2006
+@@ -101,7 +101,11 @@
/*
* File names.
*/
--#define CFG_FULL_NAME "$JOHN/john.conf"
--#define CFG_ALT_NAME "$JOHN/john.ini"
-+#define CFG_FULL_NAME "%%PREFIX%%/etc/john.conf"
-+#define CFG_ALT_NAME "%%PREFIX%%/etc/john.ini"
++#if JOHN_SYSTEMWIDE
++#ifndef CFG_FULL_NAME
+ #define CFG_FULL_NAME "$JOHN/john.conf"
++#endif
++#endif
+ #define CFG_ALT_NAME "$JOHN/john.ini"
#if JOHN_SYSTEMWIDE
#define CFG_PRIVATE_FULL_NAME JOHN_PRIVATE_HOME "/john.conf"
- #define CFG_PRIVATE_ALT_NAME JOHN_PRIVATE_HOME "/john.ini"
-@@ -116,7 +116,7 @@
- #endif
- #define LOG_SUFFIX ".log"
- #define RECOVERY_SUFFIX ".rec"
--#define WORDLIST_NAME "$JOHN/password.lst"
-+#define WORDLIST_NAME "%%DATADIR%%/password.lst"
-
- /*
- * Configuration file section names.