diff options
Diffstat (limited to 'math/scilab/Makefile')
-rw-r--r-- | math/scilab/Makefile | 282 |
1 files changed, 89 insertions, 193 deletions
diff --git a/math/scilab/Makefile b/math/scilab/Makefile index 617e0279b1e5..cbd47538c7df 100644 --- a/math/scilab/Makefile +++ b/math/scilab/Makefile @@ -2,48 +2,107 @@ # $FreeBSD$ PORTNAME= scilab -PORTVERSION= 5.3.3 -PORTREVISION= 11 +PORTVERSION= 5.5.0 CATEGORIES= math cad parallel java -MASTER_SITES= http://www.scilab.org/download/${PORTVERSION}/:scilab \ - http://www.predatorlabs.net/dl/:jgraphx \ - http://www.bayofrum.net/dist/jgraphx/:jgraphx \ - SF/saxon/saxon6/${SAXON_VERSION}:saxon -DISTFILES= ${DISTNAME}-src.tar.gz:scilab -EXTRACT_ONLY= ${DISTNAME}-src.tar.gz +MASTER_SITES= http://www.scilab.org/download/${PORTVERSION}/ +DISTFILES= ${DISTNAME}-src${EXTRACT_SUFX} MAINTAINER= makc@FreeBSD.org COMMENT= Scientific software package for numerical computations -EXTRACT_DEPENDS+= ${UNZIP_CMD}:${PORTSDIR}/archivers/unzip # A partial dependencies list can be found at: # http://wiki.scilab.org/Dependencies_of_Scilab_5.X LIB_DEPENDS= libxml2.so:${PORTSDIR}/textproc/libxml2 \ - libpcre.so:${PORTSDIR}/devel/pcre - -USES= fortran gettext gmake pkgconfig + libpcre.so:${PORTSDIR}/devel/pcre \ + libcurl.so:${PORTSDIR}/ftp/curl \ + libhdf5.so:${PORTSDIR}/science/hdf5 \ + libarpack.so:${PORTSDIR}/math/arpack \ + libfftw3.so:${PORTSDIR}/math/fftw3 \ + libmatio.so:${PORTSDIR}/math/matio \ + libamd.so:${PORTSDIR}/math/suitesparse +RUN_DEPENDS= xdg-open:${PORTSDIR}/devel/xdg-utils + +USES= desktop-file-utils fortran gettext gmake iconv libtool \ + pathfix pkgconfig shared-mime-info GNU_CONFIGURE= yes -USE_LDCONFIG= yes CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib CONFIGURE_ARGS= --with-gfortran \ - --without-hdf5 -CONFIGURE_ENV= ac_cv_search_pthread_join="${PTHREAD_LIBS}" \ - BLAS_LIBS="${BLAS_LIBS}" LAPACK_LIBS="${LAPACK_LIBS}" + --without-emf \ + -disable-static-system-lib +CONFIGURE_ENV= BLAS_LIBS="${BLAS_LIBS}" LAPACK_LIBS="${LAPACK_LIBS}" MAKE_ENV= LANG=en_US.UTF-8 \ LC_ALL=en_US.UTF-8 +INSTALL_TARGET= install-strip -OPTIONS_DEFINE= ATLAS FFTW GUI HELP NLS MATIO OCAML PVM TK UMFPACK DOCS -OPTIONS_DEFAULT= FFTW GUI HELP +OPTIONS_DEFINE= ATLAS GUI OCAML TK +OPTIONS_DEFAULT= GUI OCAML TK +OPTIONS_SUB= yes ATLAS_DESC= Use Atlas instead of Blas -GUI_DESC= Build GUI (requires Java) -HELP_DESC= Help Browser (Java based, requires GUI) -MATIO_DESC= Matlab compatibility -OCAML_DESC= Build OCaml modelica compiler (requires GUI) -PVM_DESC= Parallel Virtual Machine support -UMFPACK_DESC= Build with umfpack +GUI_DESC= Graphical User Interface (Java) +OCAML_DESC= Scicos - dynamical system simulator (requires GUI) + +# Java dependencies: +_GUI_DEPENDS+= ${JAVALIBDIR}/flexdock.jar:${PORTSDIR}/devel/flexdock \ + ${JAVALIBDIR}/jogl2.jar:${PORTSDIR}/graphics/jogamp-jogl \ + foprep:${PORTSDIR}/math/jeuclid \ + ${JAVALIBDIR}/jhall.jar:${PORTSDIR}/java/javahelp \ + ${JAVALIBDIR}/jrosetta-api.jar:${PORTSDIR}/java/jrosetta \ + ${JAVALIBDIR}/commons-logging.jar:${PORTSDIR}/java/jakarta-commons-logging \ + ${JAVALIBDIR}/jgraphx.jar:${PORTSDIR}/java/jgraphx \ + ${JAVALIBDIR}/jlatexmath.jar:${PORTSDIR}/math/jlatexmath \ + ${LOCALBASE}/share/java/ecj-4.5.jar:${PORTSDIR}/lang/gcc-ecj45 +# Documentation, graphic export: +_GUI_DEPENDS+= ${LOCALBASE}/share/java/fop/build/fop.jar:${PORTSDIR}/textproc/fop \ + ${JAVALIBDIR}/jlatexmath-fop.jar:${PORTSDIR}/math/jlatexmath \ + ${LOCALBASE}/share/java/batik/lib/batik-all.jar:${PORTSDIR}/graphics/batik \ + ${JAVALIBDIR}/avalon-framework.jar:${PORTSDIR}/devel/avalon-framework \ + ${JAVALIBDIR}/commons-io.jar:${PORTSDIR}/devel/jakarta-commons-io \ + ${JAVALIBDIR}/xmlgraphics-commons.jar:${PORTSDIR}/graphics/xmlgraphics-commons +# Code quality: +_GUI_DEPENDS+= ${JAVALIBDIR}/commons-beanutils.jar:${PORTSDIR}/java/jakarta-commons-beanutils \ + ${JAVALIBDIR}/antlr.jar:${PORTSDIR}/devel/antlr \ + ${JAVALIBDIR}/junit4.jar:${PORTSDIR}/java/junit \ + ${LOCALBASE}/bin/splint:${PORTSDIR}/devel/splint +# Documentation building: +_GUI_DEPENDS+= ${LOCALBASE}/share/xsl/docbook/javahelp/javahelp.xsl:${PORTSDIR}/textproc/docbook-xsl \ + ${JAVALIBDIR}/saxon9he.jar:${PORTSDIR}/textproc/saxon-he \ + ${JAVALIBDIR}/xml-apis-ext.jar:${PORTSDIR}/textproc/xml-commons \ + xsltproc:${PORTSDIR}/textproc/libxslt +# Other gui deps: +_GUI_DEPENDS+= ${JAVALIBDIR}/looks.jar:${PORTSDIR}/devel/looks \ + ${JAVALIBDIR}/skinlf.jar:${PORTSDIR}/x11-toolkits/skinlf + +# Can't use USE_ANT because it overrides do-build target +GUI_BUILD_DEPENDS= ${_GUI_DEPENDS} \ + ant:${PORTSDIR}/devel/apache-ant +GUI_RUN_DEPENDS= ${_GUI_DEPENDS} + +GUI_ALL_TARGET= all doc +GUI_USE= GL=gl +GUI_EXTRA_PATCHES= ${PATCHDIR}/extra-patch-bin-JAVA_HOME +GUI_CONFIGURE_ON= --with-jdk=${JAVA_HOME} \ + --with-docbook=${LOCALBASE}/share/xsl/docbook \ + --enable-build-help +GUI_CONFIGURE_OFF= --without-gui \ + --without-javasci \ + --without-xcos \ + --disable-build-help +CONFIGURE_ENV_OFF= JAVADOC="${TRUE}" + +OCAML_CONFIGURE_WITH= modelica +OCAML_BUILD_DEPENDS= ocaml:${PORTSDIR}/lang/ocaml +OCAML_RUN_DEPENDS= ocaml:${PORTSDIR}/lang/ocaml + +TK_CONFIGURE_OFF= --without-tk +TK_CONFIGURE_ON= --with-tk-library=${LOCALBASE}/lib \ + --with-tk-include=${TK_INCLUDEDIR} \ + --with-tcl-library=${LOCALBASE}/lib \ + --with-tcl-include=${TCL_INCLUDEDIR} +TK_USES= tk +TK_USE= XORG=x11 .include <bsd.port.options.mk> @@ -54,145 +113,18 @@ LAPACK_LIBS= -lalapack -lcblas .else LIB_DEPENDS+= liblapack.so:${PORTSDIR}/math/lapack \ libblas.so:${PORTSDIR}/math/blas -BLAS_LIBS?= -lblas -LAPACK_LIBS?= -llapack -.endif - -.if ! ${PORT_OPTIONS:MNLS} -CONFIGURE_ARGS+= --disable-build-localization -PLIST_SUB+= NLS="@comment " -.else -CONFIGURE_ARGS+= --enable-build-localization -PLIST_SUB+= NLS="" +BLAS_LIBS= -lblas +LAPACK_LIBS= -llapack .endif -.if ! ${PORT_OPTIONS:MTK} -CONFIGURE_ARGS+= --without-tk -.else -USES+= tk -CONFIGURE_ARGS+= --with-tk-library=${LOCALBASE}/lib \ - --with-tk-include=${TK_INCLUDEDIR} \ - --with-tcl-library=${LOCALBASE}/lib \ - --with-tcl-include=${TCL_INCLUDEDIR} -.endif - -SAXON_VERSION= 6.5.5 -SAXON_DISTFILE= saxon${SAXON_VERSION:S/./-/g}.zip -DISTFILES+= ${SAXON_DISTFILE}:saxon - -.if ! ${PORT_OPTIONS:MGUI} -CONFIGURE_ARGS+= --without-gui \ - --without-javasci \ - --without-xcos \ - --disable-build-help -CONFIGURE_ENV += JAVADOC="${TRUE}" -PLIST_SUB+= WITHOUT_GUI="" -.else -DISTFILES+= ${JGRAPHX_JAR}:jgraphx -JGRAPHX_VERSION= 1.4.1.0 -JGRAPHX_JAR= jgraphx-${JGRAPHX_VERSION:C/\./_/g}.jar - -EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-bin-JAVA_HOME - -GUI_DEPENDS= ${JAVALIBDIR}/flexdock.jar:${PORTSDIR}/devel/flexdock \ - ${JAVALIBDIR}/jogl.jar:${PORTSDIR}/graphics/jogl \ - ${JAVALIBDIR}/commons-logging.jar:${PORTSDIR}/java/jakarta-commons-logging \ - ${JAVALIBDIR}/looks.jar:${PORTSDIR}/devel/looks \ - ${JAVALIBDIR}/skinlf.jar:${PORTSDIR}/x11-toolkits/skinlf \ - ${JAVALIBDIR}/jrosetta-api.jar:${PORTSDIR}/java/jrosetta \ - ${JAVALIBDIR}/jhall.jar:${PORTSDIR}/java/javahelp \ - ${JAVALIBDIR}/jlatexmath.jar:${PORTSDIR}/math/jlatexmath \ - fop:${PORTSDIR}/textproc/fop \ - ${LOCALBASE}/share/java/batik/lib/batik-all.jar:${PORTSDIR}/graphics/batik \ - foprep:${PORTSDIR}/math/jeuclid \ - ${JAVALIBDIR}/commons-io.jar:${PORTSDIR}/devel/jakarta-commons-io \ - ${JAVALIBDIR}/xmlgraphics-commons.jar:${PORTSDIR}/graphics/xmlgraphics-commons \ - ${JAVALIBDIR}/xml-apis-ext.jar:${PORTSDIR}/textproc/xml-commons \ - ${JAVALIBDIR}/avalon-framework.jar:${PORTSDIR}/devel/avalon-framework \ - ${LOCALBASE}/share/xsl/docbook/javahelp/javahelp.xsl:${PORTSDIR}/textproc/docbook-xsl \ - xsltproc:${PORTSDIR}/textproc/libxslt \ - ${JAVALIBDIR}/commons-beanutils.jar:${PORTSDIR}/java/jakarta-commons-beanutils - -# Can't use USE_ANT because it overrides do-build target -BUILD_DEPENDS+= ${GUI_DEPENDS} \ - ant:${PORTSDIR}/devel/apache-ant \ - swig:${PORTSDIR}/devel/swig13 - -RUN_DEPENDS+= ${GUI_DEPENDS} - +.if ${PORT_OPTIONS:MGUI} USE_JAVA= yes -JAVA_VERSION= 1.6+ # bsdjava (ie java/jdk16) doesn't have some "extra" classes that aren't in # the standard java. namespace, but are required by scilab, such as # javax.xml.bind.annotation.XmlSeeAlso JAVA_VENDOR= openjdk JAVA_BUILD= yes JAVA_RUN= yes -USE_XORG= x11 - -CONFIGURE_ARGS+= --with-jdk=${JAVA_HOME} \ - --with-docbook=${LOCALBASE}/share/xsl/docbook \ - --enable-build-help \ - --enable-build-swig -PLIST_SUB+= WITHOUT_GUI="@comment " -.endif - -.if ${PORT_OPTIONS:MHELP} -ALL_TARGET= all doc -.endif - -.if ! ${PORT_OPTIONS:MFFTW} -CONFIGURE_ARGS+= --without-fftw -.else -LIB_DEPENDS+= libfftw3.so:${PORTSDIR}/math/fftw3 -.endif - -.if ! ${PORT_OPTIONS:MPVM} -CONFIGURE_ARGS+= --without-pvm -.else -BUILD_DEPENDS+= pvm:${PORTSDIR}/net/pvm -RUN_DEPENDS+= pvm:${PORTSDIR}/net/pvm - -CONFIGURE_ARGS+= --with-pvm-include=${LOCALBASE}/include \ - --with-pvm-library=${LOCALBASE}/lib - -CONFIGURE_ENV= PVM_ROOT=${LOCALBASE} \ - PVMGETARCH=${LOCALBASE}/lib/pvm/lib/pvmgetarch -.endif - -.if ! ${PORT_OPTIONS:MUMFPACK} -CONFIGURE_ARGS+= --without-umfpack -.else -LIB_DEPENDS+= libamd.so:${PORTSDIR}/math/suitesparse -CONFIGURE_ARGS+= --with-umfpack-include=${LOCALBASE}/include \ - --with-umfpack-library=${LOCALBASE}/lib -.endif - -.if ! ${PORT_OPTIONS:MMATIO} -CONFIGURE_ARGS+= --without-matio -.else -BROKEN= doesn't build with modern matio -LIB_DEPENDS+= libmatio.so:${PORTSDIR}/math/matio -.endif - -.if ! ${PORT_OPTIONS:MOCAML} -CONFIGURE_ARGS+= --without-modelica -PLIST_SUB+= OCAML="@comment " -.else -BUILD_DEPENDS+= ocaml:${PORTSDIR}/lang/ocaml -RUN_DEPENDS+= ocaml:${PORTSDIR}/lang/ocaml -PLIST_SUB+= OCAML="" -.endif - -.if ! ${PORT_OPTIONS:MDOCS} -EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-NOPORTDOCS -.endif - -post-extract: - @${MKDIR} ${WRKSRC}/thirdparty - @${UNZIP_CMD} ${DISTDIR}/${SAXON_DISTFILE} saxon.jar -d ${WRKSRC}/thirdparty -.if ${PORT_OPTIONS:MGUI} - @${CP} ${DISTDIR}/${JGRAPHX_JAR} ${WRKSRC}/thirdparty/jgraphx.jar .endif post-patch: @@ -206,17 +138,13 @@ post-patch: @# Build fixes @${REINPLACE_CMD} -e 's|$$(CFLAGS:-O%=)|-I${LOCALBASE}/include -L${LOCALBASE}/lib|' ${WRKSRC}/modules/elementary_functions/Makefile.in @${REINPLACE_CMD} -e 's|freebsd|__FreeBSD__|g' ${WRKSRC}/modules/sparse/includes/spConfig.h - @${REINPLACE_CMD} -e 's|exp10(|pow(10., |g' ${WRKSRC}/modules/graphics/src/c/Format.c \ - ${WRKSRC}/modules/graphics/src/c/getHandleProperty/set_log_flags_property.c @# malloc.h -> stdlib.h conversions @${GREP} -lr "<malloc.h>" ${WRKSRC} \ | ${XARGS} ${REINPLACE_CMD} -e \ 's/[<"]malloc.h[>"]/<stdlib.h>/' - @# Install fixes - @${REINPLACE_CMD} -e 's|$$(libdir)/pkgconfig|${PREFIX}/libdata/pkgconfig|' ${WRKSRC}/Makefile.in @# Run fixes @${REINPLACE_CMD} -e 's|%%JAVALIBDIR%%|${JAVALIBDIR}|' ${WRKSRC}/etc/librarypath.xml - @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/etc/librarypath.xml + @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/etc/librarypath.xml @${REINPLACE_CMD} -e 's, gfortran, ${FC},' ${WRKSRC}/modules/dynamic_link/src/scripts/configure .if ${PORT_OPTIONS:MGUI} @# Configure fixes @@ -225,13 +153,9 @@ post-patch: @${REINPLACE_CMD} -e 's|$$jardir/batik-all.jar|${LOCALBASE}/share/java/batik/lib/batik-all.jar|g' ${WRKSRC}/configure @${REINPLACE_CMD} -e 's|$$jardir/fop.jar|${LOCALBASE}/share/java/fop/build/fop.jar|' ${WRKSRC}/configure @${REINPLACE_CMD} -e 's|$$jardir/jeuclid-core*.jar|${LOCALBASE}/share/java/jeuclid/repo/jeuclid-core*.jar|' ${WRKSRC}/configure - @${REINPLACE_CMD} -e 's|jrosetta-API.jar|jrosetta-api.jar|' \ - ${WRKSRC}/configure + @${REINPLACE_CMD} -e 's|jrosetta-API.jar|jrosetta-api.jar|' ${WRKSRC}/configure @# Run fixes - @${REINPLACE_CMD} -e 's|%%JAVALIBDIR%%|${JAVALIBDIR}|' ${WRKSRC}/etc/librarypath.xml - @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/etc/librarypath.xml - @${REINPLACE_CMD} -e 's|%%JAVA_HOME%%|${JAVA_HOME}|' ${WRKSRC}/bin/scilab \ - ${WRKSRC}/bin/scilab-adv-cli ${WRKSRC}/bin/scilab-cli + @${REINPLACE_CMD} -e 's|%%JAVA_HOME%%|${JAVA_HOME}|' ${WRKSRC}/bin/scilab @${REINPLACE_CMD} -e 's|/usr/share/scilab|${DATADIR}|' ${WRKSRC}/desktop/scilab.desktop @${REINPLACE_CMD} -e 's|/usr/share/scilab-cli|${DATADIR}|' \ ${WRKSRC}/desktop/scilab-adv-cli.desktop ${WRKSRC}/desktop/scilab-cli.desktop @@ -239,44 +163,16 @@ post-patch: @# Avoids segfault when building help @${REINPLACE_CMD} 's|JIT|NONE|' ${WRKSRC}/etc/jvm_options.xml .endif -.else - @${REINPLACE_CMD} -e '/^check-local:/,/^$$/s/scilab-adv-cli/scilab-cli/g' \ - ${WRKSRC}/Makefile.in .endif pre-install: @${MKDIR} ${STAGEDIR}${DATADIR}/.atoms @${TOUCH} ${STAGEDIR}${DATADIR}/.atoms/.keep_me -.if ${PORT_OPTIONS:MGUI} - @${MKDIR} ${STAGEDIR}${DATADIR}/modules && ${INSTALL_DATA} ${DISTDIR}/${JGRAPHX_JAR} ${STAGEDIR}${DATADIR}/modules/jgraphx.jar - @${REINPLACE_CMD} -e 's|${WRKSRC}/thirdparty/jgraphx.jar|${DATADIR}/modules/jgraphx.jar|g' ${WRKSRC}/etc/classpath.xml -.endif post-install: @# Remove empty dirs in DATADIR/modules - they will be removed by the @# toolbox uninstaller otherwise if 3rd party toolboxes are used @${FIND} ${STAGEDIR}${DATADIR}/modules -type d -empty -delete - @# plist for include/scilab - @${FIND} -s ${STAGEDIR}${PREFIX}/include/scilab -not -type d | ${SORT} | \ - ${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST} - @${FIND} ${STAGEDIR}${PREFIX}/include/scilab -type d | ${SORT} -r | \ - ${SED} -e 's,^${STAGEDIR}${PREFIX}/,@dirrm ,' >> ${TMPPLIST} - @# plist for lib/scilab - @${FIND} -s ${STAGEDIR}${PREFIX}/lib/scilab -not -type d | ${SORT} | \ - ${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST} - @${FIND} ${STAGEDIR}${PREFIX}/lib/scilab -type d | ${SORT} -r | \ - ${SED} -e 's,^${STAGEDIR}${PREFIX}/,@dirrm ,' >> ${TMPPLIST} - @# plist for share/scilab EXCEPT: - @# contrib and .atoms (3rd party toolboxes) - @${FIND} -s ${STAGEDIR}${DATADIR} -not -type d -not -path ${STAGEDIR}${DATADIR}/contrib\* | \ - ${SORT} | ${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST} - @${FIND} ${STAGEDIR}${DATADIR} -type d -not -path ${STAGEDIR}${DATADIR}/contrib\* \ - -not -path ${STAGEDIR}${DATADIR}/.atoms\* -not -path ${STAGEDIR}${DATADIR} | \ - ${SORT} -r | ${SED} -e 's,^${STAGEDIR}${PREFIX}/,@dirrm ,' >> ${TMPPLIST} - @${ECHO_CMD} "@unexec rmdir %D/share/scilab 2>/dev/null || true" >> ${TMPPLIST} -.if ! ${PORT_OPTIONS:MGUI} - @${TOUCH} ${STAGEDIR}${DATADIR}/contrib/xcos_toolbox_skeleton/images/h5/.keep_me -.endif check test regression-test: build @(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${_MAKE_JOBS} \ |