From sa264@cam.ac.uk  Sun Oct 26 01:24:32 2003
Return-Path: <sa264@cam.ac.uk>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id D934016A4B3
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 26 Oct 2003 01:24:32 -0700 (PDT)
Received: from gold.csi.cam.ac.uk (gold.csi.cam.ac.uk [131.111.8.12])
	by mx1.FreeBSD.org (Postfix) with ESMTP id A066F43FAF
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 26 Oct 2003 01:24:31 -0700 (PDT)
	(envelope-from sa264@cam.ac.uk)
Received: from m218-3.phy.cam.ac.uk ([131.111.79.217])
	by gold.csi.cam.ac.uk with esmtp (Exim 4.20)
	id 1ADgCM-0006OM-7S; Sun, 26 Oct 2003 08:24:30 +0000
Received: from sa264 by m218-3.phy.cam.ac.uk with local (Exim 4.24; FreeBSD 4.9)
	id 1ADgCM-000Etn-4f; Sun, 26 Oct 2003 08:24:30 +0000
Message-Id: <E1ADgCM-000Etn-4f@m218-3.phy.cam.ac.uk>
Date: Sun, 26 Oct 2003 08:24:30 +0000
From: AMAKAWA Shuhei <sa264@cam.ac.uk>
Sender: AMAKAWA Shuhei <sa264@cam.ac.uk>
Reply-To: AMAKAWA Shuhei <sa264@cam.ac.uk>
To: FreeBSD-gnats-submit@freebsd.org
Cc: sa264@cam.ac.uk
Subject: math/octave: fix linking with LAPACK
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         58555
>Category:       ports
>Synopsis:       math/octave: fix linking with LAPACK
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 26 01:30:20 PDT 2003
>Closed-Date:    Sat Dec 06 18:09:19 PST 2003
>Last-Modified:  Sat Dec 06 18:09:19 PST 2003
>Originator:     AMAKAWA Shuhei
>Release:        FreeBSD 4.9-RC i386
>Organization:
>Environment:
System: FreeBSD m218-3.phy.cam.ac.uk 4.9-RC FreeBSD 4.9-RC #1: Fri Oct 17 00:12:38 BST 2003 sa264@m218-3.phy.cam.ac.uk:/usr/obj/usr/src/sys/KERNCONF i386


	
>Description:

math/octave: 
Fix a typo and link with ATLAS version of LAPACK.
Make mkoctfile accept -pthread.  This is necessary for building
things with ${PTHREAD_LIBS} using mkoctfile.


>How-To-Repeat:
	
>Fix:

Added file:
files/patch-mkoctfile.in

diff -uNr /usr/ports/math/octave/Makefile octave/Makefile
--- /usr/ports/math/octave/Makefile	Sat Aug  2 10:58:38 2003
+++ octave/Makefile	Sat Oct 25 14:15:04 2003
@@ -7,7 +7,7 @@
 
 PORTNAME=	octave
 PORTVERSION=	2.1.50
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	math
 MASTER_SITES=	ftp://ftp.octave.org/pub/octave/bleeding-edge/ \
 		ftp://ftp.eos.hokudai.ac.jp/pub/GNU/misc/octave/bleeding-edge/
@@ -18,8 +18,7 @@
 BUILD_DEPENDS=	gnuplot:${PORTSDIR}/math/gnuplot
 RUN_DEPENDS=	gnuplot:${PORTSDIR}/math/gnuplot
 LIB_DEPENDS=	fftw.2:${PORTSDIR}/math/fftw \
-		f77blas.1:${PORTSDIR}/math/atlas \
-		lapack.3:${PORTSDIR}/math/lapack
+		f77blas.1:${PORTSDIR}/math/atlas
 
 USE_BZIP2=	yes
 
@@ -33,17 +32,18 @@
 OCTAVE_VERSION=	${PORTVERSION}
 PLIST_SUB=	OCTAVE_VERSION=${OCTAVE_VERSION} GNU_HOST=${GNU_HOST}
 
-BLAS_LIBS=	"-L${LOCALBASE}/lib -lf77blas -latlas"
+BLAS_LIBS=	"-L${LOCALBASE}/lib -lf77blas -lcblas -latlas"
 USE_GMAKE=	yes
 GNU_CONFIGURE=	yes
 USE_REINPLACE=	yes
 
 CONFIGURE_ARGS=	--host=${GNU_HOST} \
-		--with-fftw --with-blas=${BLAS_LIBS} --with-lpack \
+		--with-fftw --with-blas=${BLAS_LIBS} --with-lapack=-lalapack \
 		--enable-shared
 CONFIGURE_ENV=	CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
 		LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib" \
-		CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include"
+		CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
+		FFLAGS="${FFLAGS}"
 
 .if ${OSVERSION} < 400004
 CONFIGURE_ARGS+=	--with-f2c
diff -uNr /usr/ports/math/octave/files/patch-mkoctfile.in octave/files/patch-mkoctfile.in
--- /usr/ports/math/octave/files/patch-mkoctfile.in	Thu Jan  1 01:00:00 1970
+++ octave/files/patch-mkoctfile.in	Wed Oct 22 10:04:38 2003
@@ -0,0 +1,11 @@
+--- mkoctfile.in.orig	Thu Jan  2 22:55:47 2003
++++ mkoctfile.in	Wed Oct 22 10:04:01 2003
+@@ -182,7 +182,7 @@
+     -D*)
+       defs="$defs $1"
+     ;;
+-    -[lL]*)
++    -[lL]* | -pthread)
+       ldflags="$ldflags $1"
+     ;;
+     -M | --depend)
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Sat Dec 6 18:09:09 PST 2003 
State-Changed-Why:  
Committed, thanks! 

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