From tijl@coosemans.org  Sat Dec 21 14:27:47 2013
Return-Path: <tijl@coosemans.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 33B3CC54
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 21 Dec 2013 14:27:47 +0000 (UTC)
Received: from mailrelay002.isp.belgacom.be (mailrelay002.isp.belgacom.be [195.238.6.175])
	by mx1.freebsd.org (Postfix) with ESMTP id C2CAC18B2
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 21 Dec 2013 14:27:46 +0000 (UTC)
Received: from 66.130-241-81.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([81.241.130.66])
  by relay.skynet.be with ESMTP; 21 Dec 2013 15:27:37 +0100
Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1])
	by kalimero.tijl.coosemans.org (8.14.7/8.14.7) with ESMTP id rBLERbaX018182
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO)
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 21 Dec 2013 15:27:38 +0100 (CET)
	(envelope-from tijl@kalimero.tijl.coosemans.org)
Received: (from tijl@localhost)
	by kalimero.tijl.coosemans.org (8.14.7/8.14.7/Submit) id rBLERbkQ018181;
	Sat, 21 Dec 2013 15:27:37 +0100 (CET)
	(envelope-from tijl)
Message-Id: <201312211427.rBLERbkQ018181@kalimero.tijl.coosemans.org>
Date: Sat, 21 Dec 2013 15:27:37 +0100 (CET)
From: Tijl Coosemans <tijl@FreeBSD.org>
Reply-To: Tijl Coosemans <tijl@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] math/superlu_mt: USES=fortran + misc changes
X-Send-Pr-Version: 3.114
X-GNATS-Notify:

>Number:         185069
>Category:       ports
>Synopsis:       [patch] math/superlu_mt: USES=fortran + misc changes
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bf
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 21 14:30:00 UTC 2013
>Closed-Date:    Sun Feb 16 18:27:24 CET 2014
>Last-Modified:  Sun Feb 16 18:27:24 CET 2014
>Originator:     Tijl Coosemans
>Release:        FreeBSD 11.0-CURRENT i386
>Organization:
>Environment:
>Description:
- Convert USE_FORTRAN and USE_GMAKE to USES=fortran gmake.
- Let the port respect CPPFLAGS and LDFLAGS.
  USES=fortran only sets the Fortran compiler so the base system
  compiler is still used for C/C++.  This means ports need to respect
  LDFLAGS to be able to find the gfortran runtime libraries.
>How-To-Repeat:
>Fix:

--- superlu_mt.patch begins here ---
Index: math/superlu_mt/Makefile
===================================================================
--- math/superlu_mt/Makefile	(revision 337128)
+++ math/superlu_mt/Makefile	(working copy)
@@ -17,8 +17,7 @@ EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
 MAINTAINER=	bf@FreeBSD.org
 COMMENT=	Routines for performing multithreaded sparse factorization
 
-USE_FORTRAN=	yes
-USE_GMAKE=	yes
+USES=		fortran gmake
 
 NO_STAGE=	yes
 .include <bsd.port.pre.mk>
@@ -71,8 +70,10 @@ post-patch:
 	${CP} -r ${WRKSRC} ${WRKSRC_SHARED}
 	@${REINPLACE_CMD} -e 's+%%BLAS%%+-L${LOCALBASE}/lib ${BLAS}+ ; \
 			s+%%CC%%+${CC}+; s+%%FC%%+${FC}+; \
+			s+%%CPPFLAGS%%+${CPPFLAGS}+; \
 			s+%%CFLAGS%%+${CFLAGS}+; \
 			s+%%FFLAGS%%+${FFLAGS}+; \
+			s+%%LDFLAGS%%+${LDFLAGS}+; \
 			s+%%FPIC%%++; \
 	  s+%%PTHREAD_CFLAGS%%+${PTHREAD_CFLAGS}+ ; \
 	  s+%%PTHREAD_LIBS%%+${PTHREAD_LIBS}+ ' \
@@ -80,8 +81,10 @@ post-patch:
 
 	@${REINPLACE_CMD} -e 's+%%BLAS%%+-L${LOCALBASE}/lib ${BLAS}+ ; \
 			s+%%CC%%+${CC}+; s+%%FC%%+${FC}+; \
+			s+%%CPPFLAGS%%+${CPPFLAGS}+; \
 			s+%%CFLAGS%%+${CFLAGS} ${FPIC}+; \
 			s+%%FFLAGS%%+${FFLAGS} ${FPIC}+; \
+			s+%%LDFLAGS%%+${LDFLAGS}+; \
 			s+%%FPIC%%+${FPIC}+; \
 	  s+%%PTHREAD_CFLAGS%%+${PTHREAD_CFLAGS}+ ; \
 	  s+%%PTHREAD_LIBS%%+${PTHREAD_LIBS}+ ' \

Property changes on: math/superlu_mt/Makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: math/superlu_mt/files/patch-make.inc
===================================================================
--- math/superlu_mt/files/patch-make.inc	(revision 337128)
+++ math/superlu_mt/files/patch-make.inc	(working copy)
@@ -41,11 +41,11 @@
 -LOADER       = xlc_r
 -LOADOPTS     = -bmaxdata:0x80000000
 +CC           = %%CC%%
-+CFLAGS       = $(PREDEFS) %%CFLAGS%% %%PTHREAD_CFLAGS%%
-+FORTRAN	     = %%FC%%
++CFLAGS       = $(PREDEFS) %%CPPFLAGS%% %%CFLAGS%% %%PTHREAD_CFLAGS%%
++FORTRAN      = %%FC%%
 +FFLAGS       = %%FFLAGS%%
-+LOADER       = %%FC%%
-+LOADOPTS     = -O
++LOADER       = %%CC%%
++LOADOPTS     = %%LDFLAGS%%
 +NOOPTS       = %%FPIC%%
  #
  #  C preprocessor defs for compilation for the Fortran interface

Property changes on: math/superlu_mt/files/patch-make.inc
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
--- superlu_mt.patch ends here ---

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->bf 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat Dec 21 14:30:08 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=185069 
State-Changed-From-To: open->closed 
State-Changed-By: tijl 
State-Changed-When: Sun Feb 16 18:26:56 CET 2014 
State-Changed-Why:  
Committed as part of r344614. 

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