1 # $NetBSD: Makefile,v 1.85 2010/01/17 12:02:26 wiz Exp $
3 DISTNAME= octave-${OCTAVE_VER}
6 MASTER_SITES= ftp://ftp.octave.org/pub/octave/
9 MAINTAINER= adam@NetBSD.org
10 HOMEPAGE= http://www.octave.org/
11 COMMENT= High-level language, intended for numerical computations
13 BUILD_DEPENDS+= bison>=1.875:../../devel/bison
14 BUILD_DEPENDS+= gperf>=2.7:../../devel/gperf
15 DEPENDS+= gnuplot>=3.7:../../graphics/gnuplot
18 CONFLICTS+= octave-2.*
20 .if (${MACHINE_ARCH} == "arm32")
21 BROKEN= Internal compiler error occurs on arm32 (even with gcc-2.95.3)
24 PKG_DESTDIR_SUPPORT= user-destdir
28 USE_TOOLS+= autoconf gsed gmake makeinfo perl pkg-config
32 USE_LANGUAGES= c c++ fortran
34 # needed for loading of shared objects such as those in the
35 # octave-forge package or user written ones compiled with mkoctfile
36 CONFIGURE_ARGS+= --enable-dl
37 # shared libraries are handled automatically in pkgsrc
38 CONFIGURE_ARGS+= --enable-static
39 CONFIGURE_ARGS+= --disable-shared
41 # trick pkgsrc into real gsed, needed for "mkf77def"
42 TOOLS_PLATFORM.gsed= #empty
46 GNU_PLATFORM_DIR!= ${.CURDIR}/../../mk/gnu-config/config.sub ${MACHINE_GNU_PLATFORM}
47 PLIST_SUBST+= GNU_PLATFORM_DIR=${GNU_PLATFORM_DIR}
50 OCTAVE_DOC= faq/Octave-FAQ.ps liboctave/liboctave.ps \
51 refcard/refcard-a4.ps refcard/refcard-legal.ps \
52 refcard/refcard-letter.ps
54 INSTALLATION_DIRS+= share/octave/${OCTAVE_VER}/doc
55 UNWRAP_FILES+= mkoctfile octave-bug src/oct-conf.h
57 # Doesn't work yet, needs to sort out libtool shared libraries handling:
61 cd ${WRKSRC} && autoconf
64 find ${WRKSRC}/doc -type f -name '*.info*' -print | xargs rm -f
65 mkdir ${WRKSRC}/src/pic
67 # substitute in the real path to various bits of the toolchain because
68 # mkoctfile will be used potentially by users and it needs to point at the same
69 # compilers as were used in building octave. We also fix up the path to sed
70 # otherwise we end up with the buildlink directory in mkoctfile
72 mv ${WRKSRC}/mkoctfile ${WRKSRC}/mkoctfile.bak
73 sed -e 's;"${CC}";"${CCPATH}";g' \
74 -e 's;"${CXX}";"${CXXPATH}";g' \
75 -e 's;"${FC}";"${FCPATH}";g' \
76 -e 's@^:[ \t]*\$${SED=.*@: \$$\{SED="${SED}"\}@g' \
77 ${WRKSRC}/mkoctfile.bak > ${WRKSRC}/mkoctfile
78 chmod a+x ${WRKSRC}/mkoctfile
79 (cd ${WRKSRC}/doc/interpreter && gmake octave.ps)
82 cd ${WRKSRC}/doc/liboctave; \
83 for f in liboctave.info liboctave.info-[0-9]*; do \
84 ${TEST} ! -f "$$f" || \
85 ${INSTALL_DATA} "$$f" ${DESTDIR}${PREFIX}/${PKGINFODIR}; \
87 .for f in ${OCTAVE_DOC}
88 ${INSTALL_DATA} ${WRKSRC}/doc/${f} ${DESTDIR}${PREFIX}/share/octave/${OCTAVE_VER}/doc
91 .include "../../audio/libsndfile/buildlink3.mk"
92 .include "../../devel/ncurses/buildlink3.mk"
93 .include "../../devel/readline/buildlink3.mk"
94 .include "../../devel/zlib/buildlink3.mk"
95 .include "../../math/blas/buildlink3.mk"
96 .include "../../math/fftw/buildlink3.mk"
97 .include "../../math/lapack/buildlink3.mk"
98 .include "../../www/curl/buildlink3.mk"
99 .include "../../x11/libX11/buildlink3.mk"
101 .include "../../sysutils/desktop-file-utils/desktopdb.mk"
102 .include "../../mk/bsd.pkg.mk"