1995-05-02 09:18:21 +02:00
|
|
|
# New ports collection makefile for: octave
|
1998-09-08 16:32:42 +02:00
|
|
|
# Date created: 8 September 1998
|
1997-01-20 23:13:57 +01:00
|
|
|
# Whom: chuckr@freebsd.org
|
1995-05-02 09:18:21 +02:00
|
|
|
#
|
1999-08-25 09:23:21 +02:00
|
|
|
# $FreeBSD$
|
1995-05-02 09:18:21 +02:00
|
|
|
#
|
|
|
|
|
2000-04-14 09:20:58 +02:00
|
|
|
PORTNAME= octave
|
2011-07-05 08:13:03 +02:00
|
|
|
PORTVERSION= 3.4.2
|
2011-07-15 09:00:46 +02:00
|
|
|
PORTREVISION= 2
|
1997-10-16 01:20:44 +02:00
|
|
|
CATEGORIES= math
|
2011-05-10 10:28:34 +02:00
|
|
|
MASTER_SITES= ftp://ftp.gnu.org/gnu/octave/ \
|
2007-12-25 04:37:51 +01:00
|
|
|
ftp://ftp.u-aizu.ac.jp/pub/SciEng/numanal/Octave/bleeding-edge/
|
1995-05-02 09:18:21 +02:00
|
|
|
|
2007-12-25 04:37:51 +01:00
|
|
|
MAINTAINER= maho@FreeBSD.org
|
2003-03-07 07:14:21 +01:00
|
|
|
COMMENT= High-level interactive language for numerical computations
|
1995-05-02 09:18:21 +02:00
|
|
|
|
2007-12-25 04:37:51 +01:00
|
|
|
BUILD_DEPENDS+= gnuplot:${PORTSDIR}/math/gnuplot \
|
|
|
|
${LOCALBASE}/bin/gperf:${PORTSDIR}/devel/gperf \
|
|
|
|
gsed:${PORTSDIR}/textproc/gsed \
|
2011-05-10 10:28:34 +02:00
|
|
|
dvips:${PORTSDIR}/print/dvipsk-tetex \
|
2011-07-11 16:31:40 +02:00
|
|
|
${LOCALBASE}/bin/makeinfo:${PORTSDIR}/print/texinfo
|
2008-01-04 05:05:39 +01:00
|
|
|
RUN_DEPENDS= gnuplot:${PORTSDIR}/math/gnuplot \
|
2011-05-10 10:28:34 +02:00
|
|
|
gsed:${PORTSDIR}/textproc/gsed \
|
2011-07-11 16:31:40 +02:00
|
|
|
${LOCALBASE}/bin/makeinfo:${PORTSDIR}/print/texinfo
|
2011-06-23 09:28:50 +02:00
|
|
|
LIB_DEPENDS= GraphicsMagick.1:${PORTSDIR}/graphics/GraphicsMagick \
|
2009-08-03 13:20:23 +02:00
|
|
|
arpack:${PORTSDIR}/math/arpack \
|
2011-06-23 09:28:50 +02:00
|
|
|
curl:${PORTSDIR}/ftp/curl \
|
2009-08-03 13:20:23 +02:00
|
|
|
fftw3:${PORTSDIR}/math/fftw3 \
|
2011-06-23 09:28:50 +02:00
|
|
|
fftw3f:${PORTSDIR}/math/fftw3-float \
|
2010-03-23 22:14:39 +01:00
|
|
|
fltk.1:${PORTSDIR}/x11-toolkits/fltk \
|
2011-06-23 09:28:50 +02:00
|
|
|
ftgl:${PORTSDIR}/graphics/ftgl \
|
|
|
|
hdf5:${PORTSDIR}/science/hdf5-18 \
|
|
|
|
pcre.0:${PORTSDIR}/devel/pcre \
|
|
|
|
qhull:${PORTSDIR}/math/qhull \
|
|
|
|
qrupdate:${PORTSDIR}/math/qrupdate \
|
|
|
|
umfpack.1:${PORTSDIR}/math/suitesparse \
|
|
|
|
glpk.30:${PORTSDIR}/math/glpk
|
2007-12-25 04:37:51 +01:00
|
|
|
|
2003-06-09 19:36:16 +02:00
|
|
|
USE_BZIP2= yes
|
2004-12-03 08:07:41 +01:00
|
|
|
USE_PERL5_BUILD=yes
|
2005-05-26 19:32:40 +02:00
|
|
|
USE_GMAKE= yes
|
|
|
|
GNU_CONFIGURE= yes
|
2011-05-10 10:28:34 +02:00
|
|
|
#USE_AUTOTOOLS= autoconf
|
1995-05-02 09:18:21 +02:00
|
|
|
|
2011-05-10 10:28:34 +02:00
|
|
|
INFO= octave liboctave OctaveFAQ
|
|
|
|
MAN1= octave.1 mkoctfile.1 octave-config.1
|
2004-12-11 22:50:01 +01:00
|
|
|
|
2007-12-25 04:37:51 +01:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2008-03-08 10:29:12 +01:00
|
|
|
USE_BLAS?= reference
|
|
|
|
|
2010-02-16 07:54:31 +01:00
|
|
|
.if exists(${LOCALBASE}/lib/libgoto2.so)
|
2008-03-08 10:29:12 +01:00
|
|
|
USE_BLAS= gotoblas
|
|
|
|
.elif exists(${LOCALBASE}/lib/libatlas_r.so)
|
|
|
|
USE_BLAS= atlas
|
2007-12-25 04:37:51 +01:00
|
|
|
.endif
|
2008-03-08 10:29:12 +01:00
|
|
|
|
|
|
|
. if ${USE_BLAS} == reference
|
2007-12-25 04:37:51 +01:00
|
|
|
LIB_DEPENDS+= blas.2:${PORTSDIR}/math/blas
|
|
|
|
LIB_DEPENDS+= lapack.4:${PORTSDIR}/math/lapack
|
|
|
|
BLAS= -lblas
|
|
|
|
LAPACK= -llapack
|
2008-03-08 10:29:12 +01:00
|
|
|
.elif ${USE_BLAS} == gotoblas
|
2010-02-16 07:54:31 +01:00
|
|
|
LIB_DEPENDS+= goto2:${PORTSDIR}/math/gotoblas
|
|
|
|
BLAS= -lgoto2p
|
|
|
|
LAPACK= -lgoto2p
|
2008-03-08 10:29:12 +01:00
|
|
|
.elif ${USE_BLAS} == atlas
|
|
|
|
LIB_DEPENDS+= atlas:${PORTSDIR}/math/atlas
|
|
|
|
BLAS= -lptf77blas -lptcblas -latlas_r
|
|
|
|
LAPACK= -lalapack_r
|
2007-12-25 04:37:51 +01:00
|
|
|
.endif
|
1999-05-13 01:27:28 +02:00
|
|
|
|
2007-07-16 02:47:55 +02:00
|
|
|
USE_FORTRAN= yes
|
2004-12-05 03:58:07 +01:00
|
|
|
|
2007-12-25 04:37:51 +01:00
|
|
|
OCTAVE_VERSION= ${PORTVERSION}
|
|
|
|
GNU_HOST= ${ARCH}-portbld-freebsd${OSREL}
|
|
|
|
PLIST_SUB= OCTAVE_VERSION=${OCTAVE_VERSION} GNU_HOST=${GNU_HOST}
|
2009-08-06 11:21:25 +02:00
|
|
|
INCLUDES= -I${LOCALBASE}/include
|
2011-09-24 00:26:39 +02:00
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib ${PTHREAD_LIBS}
|
2009-04-12 02:19:20 +02:00
|
|
|
CFLAGS+= ${INCLUDES}
|
|
|
|
CXXFLAGS+= ${INCLUDES}
|
|
|
|
CPPFLAGS+= ${INCLUDES}
|
2007-12-25 04:37:51 +01:00
|
|
|
CONFIGURE_ENV+= GPERF="${LOCALBASE}/bin/gperf" \
|
|
|
|
CC="${CC}" \
|
2008-01-07 02:31:53 +01:00
|
|
|
CXX="${CXX}" \
|
2011-05-10 10:28:34 +02:00
|
|
|
MAKEINFO=${PREFIX}/bin/makeinfo
|
2011-09-24 00:26:39 +02:00
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib ${PTHREAD_LIBS}
|
2005-05-26 19:32:40 +02:00
|
|
|
CONFIGURE_ARGS= --host=${GNU_HOST} \
|
2007-12-25 04:37:51 +01:00
|
|
|
--with-blas="-L${LOCALBASE}/lib ${BLAS}" \
|
|
|
|
--with-lapack="${LAPACK}" \
|
2005-05-26 19:32:40 +02:00
|
|
|
--enable-shared
|
|
|
|
|
2009-05-26 04:03:38 +02:00
|
|
|
.if (${OSVERSION} <= 700000)
|
|
|
|
WITH_PTMALLOC=yes
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WITH_PTMALLOC)
|
|
|
|
LIB_DEPENDS+= ptmalloc:${PORTSDIR}/devel/ptmalloc
|
|
|
|
CONFIGURE_ENV+= LIBS="-L${LOCALBASE}/lib -lptmalloc"
|
|
|
|
.endif
|
|
|
|
|
2011-05-10 10:28:34 +02:00
|
|
|
post-patch:
|
|
|
|
${REINPLACE_CMD} 's+"makeinfo"+"${PREFIX}/bin/makeinfo"+' ${WRKSRC}/src/help.cc
|
|
|
|
|
1997-01-20 23:13:57 +01:00
|
|
|
post-install:
|
2008-07-23 08:44:44 +02:00
|
|
|
${MKDIR} ${DESKTOPDIR}
|
2011-05-10 10:28:34 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/icons/octave.desktop \
|
2008-07-23 08:44:44 +02:00
|
|
|
${DESKTOPDIR}/www.octave.org-octave.desktop
|
2005-05-26 19:32:40 +02:00
|
|
|
.if !defined(NOPORTDOCS)
|
2003-06-08 12:09:59 +02:00
|
|
|
@${MKDIR} ${DOCSDIR}
|
2011-05-10 10:28:34 +02:00
|
|
|
.for file in faq/OctaveFAQ.ps liboctave/liboctave.ps \
|
|
|
|
refcard/refcard-a4.ps refcard/refcard-legal.ps \
|
|
|
|
refcard/refcard-letter.ps interpreter/octave.ps
|
2005-05-26 19:32:40 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/${file} ${DOCSDIR}
|
2003-06-08 12:09:59 +02:00
|
|
|
.endfor
|
1997-01-20 23:13:57 +01:00
|
|
|
.endif
|
2011-05-10 10:28:34 +02:00
|
|
|
${RM} -f ${WRKDIR}/PLIST
|
2011-07-21 05:00:29 +02:00
|
|
|
.for d in ${PREFIX}/include/octave-${OCTAVE_VERSION} ${PREFIX}/share/octave/${OCTAVE_VERSION} ${PREFIX}/share/octave/site ${PREFIX}/lib/octave/${OCTAVE_VERSION}
|
2009-04-12 02:19:20 +02:00
|
|
|
@${FIND} -s $d -not -type d | \
|
2011-05-10 10:28:34 +02:00
|
|
|
${SED} -e 's#^${PREFIX}/##' >> ${WRKDIR}/PLIST
|
|
|
|
@${FIND} -s $d -type d -empty | \
|
2011-07-11 16:31:40 +02:00
|
|
|
${SED} -e 's,^${PREFIX}/,@exec ${MKDIR} %D/,' \
|
2011-05-10 10:28:34 +02:00
|
|
|
-e 's,$$, 2>/dev/null || true,' >> ${WRKDIR}/PLIST
|
|
|
|
@${FIND} -s $d -type d -depth | \
|
|
|
|
${SED} -e 's,^${PREFIX}/,@dirrm ,' >> ${WRKDIR}/PLIST
|
2009-04-12 02:19:20 +02:00
|
|
|
.endfor
|
2011-07-21 05:00:29 +02:00
|
|
|
.for d in ${PREFIX}/libexec/octave/${OCTAVE_VERSION} ${PREFIX}/libexec/octave/api-v45+ ${PREFIX}/libexec/octave/site ${PREFIX}/lib/octave/site
|
|
|
|
@${FIND} -s $d -type d -empty | \
|
|
|
|
${SED} -e 's,^${PREFIX}/,@exec ${MKDIR} %D/,' \
|
|
|
|
-e 's,$$, 2>/dev/null || true,' >> ${WRKDIR}/PLIST
|
|
|
|
@${FIND} -s $d -type d -depth | \
|
|
|
|
${SED} -e 's,^${PREFIX}/,@dirrm ,' >> ${WRKDIR}/PLIST
|
|
|
|
.endfor
|
|
|
|
${ECHO_CMD} @dirrm libexec/octave >> ${WRKDIR}/PLIST
|
|
|
|
${ECHO_CMD} @dirrm share/octave >> ${WRKDIR}/PLIST
|
2009-04-12 02:19:20 +02:00
|
|
|
cd ${WRKDIR} ; ${SED} -i -e "/PLIST/ r PLIST" ${TMPPLIST}
|
1997-01-20 23:13:57 +01:00
|
|
|
|
2011-06-23 09:28:50 +02:00
|
|
|
check:
|
|
|
|
(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_ARGS} check)
|
|
|
|
|
1999-05-13 01:27:28 +02:00
|
|
|
.include <bsd.port.post.mk>
|