From nobody@FreeBSD.org  Fri Jan  3 04:11:03 2014
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 486D0742
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  3 Jan 2014 04:11:03 +0000 (UTC)
Received: from oldred.freebsd.org (oldred.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 2936C1370
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  3 Jan 2014 04:11:03 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id s034B3x2056373
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 3 Jan 2014 04:11:03 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id s034B33c056372;
	Fri, 3 Jan 2014 04:11:03 GMT
	(envelope-from nobody)
Message-Id: <201401030411.s034B33c056372@oldred.freebsd.org>
Date: Fri, 3 Jan 2014 04:11:03 GMT
From: Mark Felder <feld@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] security/john: OPENMP option doesn't choose correct compiler
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         185433
>Category:       ports
>Synopsis:       [PATCH] security/john: OPENMP option doesn't choose correct compiler
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    danfe
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 03 04:20:00 UTC 2014
>Closed-Date:    Thu Mar 06 13:08:58 UTC 2014
>Last-Modified:  Thu Mar 06 13:08:58 UTC 2014
>Originator:     Mark Felder
>Release:        CURRENT
>Organization:
>Environment:
FreeBSD mwi1.coffeenet.org 11.0-CURRENT FreeBSD 11.0-CURRENT #4 r260171: Wed Jan  1 20:12:38 CST 2014     root@mwi1.coffeenet.org:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Noticed when I tried building john with OPENMP that it wasn't choosing the right compiler; it was still using clang and ignoring the -fopenmp CFLAG

This patch should give john stage support and fix the OPENMP option

I tried running john through portlint to look for any other obvious issues but portlint does not like this port; I think it's because of some of the syntax used in the MASTER_SITES
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: Makefile
===================================================================
--- Makefile	(revision 338178)
+++ Makefile	(working copy)
@@ -3,6 +3,7 @@
 
 PORTNAME=	john
 DISTVERSION=	1.7.9-jumbo-5
+PORTREVISION=	1
 CATEGORIES=	security
 MASTER_SITES=	http://www.openwall.com/john/g/ \
 		http://mirrors.kernel.org/openwall/projects/john/${DISTVERSION:C/-.*//}/ \
@@ -15,7 +16,7 @@
 LICENSE=	GPLv2
 
 USE_BZIP2=	yes
-USE_GMAKE=	yes
+USES=	gmake
 BUILD_WRKSRC=	${WRKDIR}/${DISTNAME}/src
 
 # We prefer -jumbo (community-enhanced) versions instead of vanilla releases
@@ -37,7 +38,12 @@
 OPTIONS_DEFINE=	OPENMP DOCS
 OPENMP_DESC=	Compile with OpenMP support
 
-NO_STAGE=	yes
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MOPENMP}
+USES+=	compiler:openmp
+.endif
+
 .include <bsd.port.pre.mk>
 
 .if ${ARCH} == "i386"
@@ -80,20 +86,17 @@
 	@${ECHO_CMD}
 
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/run/john ${PREFIX}/bin
-	${LN} -sf john ${PREFIX}/bin/xtract
-	${LN} -sf john ${PREFIX}/bin/unshadow
-	@${MKDIR} ${DATADIR}
-	cd ${WRKSRC}/run && ${INSTALL_DATA} *.??? [^j]*.conf ${DATADIR}
-	cd ${WRKSRC}/run && ${INSTALL_SCRIPT} *.?? mailer ${DATADIR}
+	${INSTALL_PROGRAM} ${WRKSRC}/run/john ${STAGEDIR}${PREFIX}/bin
+	${LN} -sf john ${STAGEDIR}${PREFIX}/bin/xtract
+	${LN} -sf john ${STAGEDIR}${PREFIX}/bin/unshadow
+	${MKDIR} ${STAGEDIR}${DATADIR}
+	cd ${WRKSRC}/run && ${INSTALL_DATA} *.??? [^j]*.conf ${STAGEDIR}${DATADIR}
+	cd ${WRKSRC}/run && ${INSTALL_SCRIPT} *.?? mailer ${STAGEDIR}${DATADIR}
 	${INSTALL_DATA} ${WRKSRC}/run/john.conf \
-		${PREFIX}/etc/john.conf.default
-.if !exists(${PREFIX}/etc/john.conf)
-	${INSTALL_DATA} ${WRKSRC}/run/john.conf ${PREFIX}/etc
-.endif
+		${STAGEDIR}${PREFIX}/etc/john.conf.default
 .if ${PORT_OPTIONS:MDOCS}
-	@${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/doc/|} ${DOCSDIR}
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/doc/|} ${STAGEDIR}${DOCSDIR}
 .endif
 
 .include <bsd.port.post.mk>
Index: pkg-plist
===================================================================
--- pkg-plist	(revision 338178)
+++ pkg-plist	(working copy)
@@ -25,4 +25,4 @@
 %%DATADIR%%/sap_prepare.pl
 %%DATADIR%%/sha-dump.pl
 %%DATADIR%%/sha-test.pl
-@dirrm %%DATADIR%%
+@dirrmtry %%DATADIR%%


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->danfe 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Fri Jan 3 04:20:08 UTC 2014 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=185433 
State-Changed-From-To: open->closed 
State-Changed-By: feld 
State-Changed-When: Thu Mar 6 13:08:58 UTC 2014 
State-Changed-Why:  
Superceded by another commit. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=185433 
>Unformatted:
