aboutsummaryrefslogtreecommitdiff
path: root/security/john/Makefile
diff options
context:
space:
mode:
authorMarcus Alves Grando <mnag@FreeBSD.org>2006-05-13 04:28:02 +0000
committerMarcus Alves Grando <mnag@FreeBSD.org>2006-05-13 04:28:02 +0000
commita85e6c4414deff6cfa08a492c0123b8bb3c35d25 (patch)
treedfb1f585d8a1c98c6646957842877cd916c3a84b /security/john/Makefile
parent1adfa4acd39352741858107e33ea2725c44dd513 (diff)
Notes
Diffstat (limited to 'security/john/Makefile')
-rw-r--r--security/john/Makefile46
1 files changed, 29 insertions, 17 deletions
diff --git a/security/john/Makefile b/security/john/Makefile
index 35b2368bf89c..24f0d2e05e15 100644
--- a/security/john/Makefile
+++ b/security/john/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= john
-PORTVERSION= 1.7.0.2
-PORTREVISION= 1
+PORTVERSION= 1.7.1
CATEGORIES= security
MASTER_SITES= http://www.openwall.com/john/f/ \
ftp://ftp.ru.openwall.com/pub/projects/john/${PORTVERSION}/
@@ -22,33 +21,46 @@ PORTDOCS= CHANGES CONFIG EXAMPLES EXTERNAL FAQ MODES OPTIONS README \
WRKSRC= ${WRKDIR}/${DISTNAME}/src
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
+# workaround for OSVERSION/ARCH detection before bsd.port.pre.mk
+# (required for OPTIONS usage)
+ARCH!= /usr/bin/uname -p
+OSVERSION!= /sbin/sysctl -n kern.osreldate
+
+.if ${ARCH} == "i386" || ${ARCH} == "amd64"
+. if ${OSVERSION} > 500000
+# dumps core with sse2 + gcc 2.95
+OPTIONS= SSE2 "Enable SSE2 optimizations" off
+. endif
+.endif
.if ${ARCH} == "i386"
-. if defined(WITHOUT_MMX)
-ALL_TARGET= ${OSNAME}-x86-any
+OPTIONS+= MMX "Enable MMX optimizations" off
+.endif
+
+.include <bsd.port.pre.mk>
+
+ALL_TARGET= generic
+
+.if defined(WITH_MMX)
+. if defined(WITH_SSE2)
+ALL_TARGET= ${OSNAME}-x86-sse2
. else
ALL_TARGET= ${OSNAME}-x86-mmx
. endif
+.elif defined(WITH_SSE2)
+ALL_TARGET= ${OSNAME}-x86-sse2
.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}
+.else
+ALL_TARGET= ${OSNAME}-x86-any
.endif
post-patch:
- ${REINPLACE_CMD} -e 's|= gcc|= ${CC}|g' \
+ @${REINPLACE_CMD} -e 's|= gcc|= ${CC}|g' \
-e 's|CFLAGS =.*|CFLAGS = -c ${CFLAGS}|g' \
${WRKSRC}/Makefile
@@ -60,7 +72,7 @@ do-install:
.for l in xtract unshadow
${LN} -sf ${PREFIX}/bin/john ${PREFIX}/bin/${l}
.endfor
- ${MKDIR} ${DATADIR}
+ @${MKDIR} ${DATADIR}
.for f in ${DATAFILES}
${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/run/${f} ${DATADIR}
.endfor
@@ -72,7 +84,7 @@ do-install:
.endif
.if !defined(NOPORTDOCS)
- ${MKDIR} ${DOCSDIR}
+ @${MKDIR} ${DOCSDIR}
.for f in ${PORTDOCS}
${INSTALL_DATA} ${WRKDIR}/${DISTNAME}/doc/${f} ${DOCSDIR}
.endfor