diff options
author | Thierry Thomas <thierry@FreeBSD.org> | 2005-10-31 18:48:23 +0000 |
---|---|---|
committer | Thierry Thomas <thierry@FreeBSD.org> | 2005-10-31 18:48:23 +0000 |
commit | af1b41b6b80f567a41963605a96135dfb80a5d01 (patch) | |
tree | d1a3c3d53c4b818b46831142255187237bfe0064 /science | |
parent | Use more appropriate and better readable URL for WWW: line. (diff) |
GDL - GNU Data Language - is a free IDL (Interactive Data Language)
compatible incremental compiler (i.e. runs IDL programs).
IDL is a registered trademark of Research Systems Inc.
(see: <http://www.rsinc.com/>)
Remark: slave port for Python module intentionnally not yet committed.
WWW: http://gnudatalanguage.sourceforge.net/
Notes
Notes:
svn path=/head/; revision=146853
Diffstat (limited to 'science')
-rw-r--r-- | science/Makefile | 1 | ||||
-rw-r--r-- | science/gnudatalanguage/Makefile | 135 | ||||
-rw-r--r-- | science/gnudatalanguage/distinfo | 2 | ||||
-rw-r--r-- | science/gnudatalanguage/files/patch-configure | 38 | ||||
-rw-r--r-- | science/gnudatalanguage/files/patch-src__basic_fun.cpp | 20 | ||||
-rw-r--r-- | science/gnudatalanguage/files/patch-src__basic_fun_cl.cpp | 62 | ||||
-rw-r--r-- | science/gnudatalanguage/files/patch-src__dinterpreter.hpp | 18 | ||||
-rw-r--r-- | science/gnudatalanguage/files/patch-src__file.cpp | 11 | ||||
-rw-r--r-- | science/gnudatalanguage/files/patch-src__math_fun_jmg.hpp | 19 | ||||
-rw-r--r-- | science/gnudatalanguage/files/patch-src__pythongdl.cpp | 11 | ||||
-rw-r--r-- | science/gnudatalanguage/pkg-descr | 7 | ||||
-rw-r--r-- | science/gnudatalanguage/pkg-plist | 45 |
12 files changed, 369 insertions, 0 deletions
diff --git a/science/Makefile b/science/Makefile index 4a834ab9fe47..a411075c9bf4 100644 --- a/science/Makefile +++ b/science/Makefile @@ -26,6 +26,7 @@ SUBDIR += getdp SUBDIR += ghemical SUBDIR += glens + SUBDIR += gnudatalanguage SUBDIR += gramps SUBDIR += gromacs SUBDIR += gsystem diff --git a/science/gnudatalanguage/Makefile b/science/gnudatalanguage/Makefile new file mode 100644 index 000000000000..ef638835b95f --- /dev/null +++ b/science/gnudatalanguage/Makefile @@ -0,0 +1,135 @@ +# New ports collection makefile for: gnudatalanguage +# Date created: Sat 22 oct 2005 +# Whom: thierry@pompo.net +# +# $FreeBSD$ +# + +PORTNAME= gnudatalanguage +PORTVERSION= 0.8.11 +CATEGORIES= science lang +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= ${PORTNAME} +.if defined(BUILD_PYTHON_MODULE) +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +.endif +DISTNAME= gdl-${PORTVERSION} + +MAINTAINER= thierry@FreeBSD.org +COMMENT?= GDL, a free IDL compatible incremental compiler + +#--------------------------------------------------------------------------- +# You may define these options: +# +# - WITHOUT_IMAGEMAGICK: remove ImageMagick support +# - WITHOUT_HDF5: remove HDF5 support +# - WITHOUT_NETCDF: remove netCDF support +# - WITHOUT_HDF: remove HDF 4 suppport (conflict with netCDF) +# - WITHOUT_PYTHON: don't build the interface to python +# - WITH_FFTW3: faster fft routine than GSL +# +#--------------------------------------------------------------------------- + +LIB_DEPENDS+= plplotd.10:${PORTSDIR}/math/plplot \ + gsl.7:${PORTSDIR}/math/gsl \ + readline.5:${PORTSDIR}/devel/readline + +USE_XLIB= yes +USE_AUTOTOOLS= libtool:15 +CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} +CONFIGURE_ENV= CPPFLAGS="${CFLAGS} ${PTHREAD_CFLAGS} -I${LOCALBASE}/include -I${X11BASE}/include" \ + LDFLAGS="${LDFLAGS} ${PTHREAD_LIBS} -L${LOCALBASE}/lib -L${X11BASE}/lib" + +SLAVEDIRS= science/py-gnudatalanguage + +CONFLICTS= antlr-2.* + +.if defined(BUILD_PYTHON_MODULE) +CATEGORIES+= python +CONFIGURE_ARGS+=--enable-python_module +PLIST_FILES= %%PYTHON_SITELIBDIR%%/GDL.so +PLIST_SUB+= MASTER="@comment " +.else +PLIST_SUB+= MASTER="" +.endif + +.if !defined(WITHOUT_IMAGEMAGICK) +LIB_DEPENDS+= Magick.8:${PORTSDIR}/graphics/ImageMagick +CONFIGURE_ARGS+=--with-Magick=${LOCALBASE} +.else +CONFIGURE_ARGS+=--with-Magick=no +.endif + +.if !defined(WITHOUT_HDF5) +LIB_DEPENDS+= hdf5.0:${PORTSDIR}/science/hdf5 +CONFIGURE_ARGS+=--with-hdf5=${LOCALBASE} +.else +CONFIGURE_ARGS+=--with-hdf5=no +.endif + +.if !defined(WITHOUT_NETCDF) +LIB_DEPENDS+= netcdf.1:${PORTSDIR}/math/netcdf +CONFIGURE_ARGS+=--with-netcdf=${LOCALBASE} --with-hdf=no +.else +CONFIGURE_ARGS+=--with-netcdf=no +. if !defined(WITHOUT_HDF) +LIB_DEPENDS+= df.1:${PORTSDIR}/science/hdf +CONFIGURE_ARGS+=--with-hdf=${LOCALBASE} +. else +CONFIGURE_ARGS+=--with-hdf=no +. endif +.endif + +.if !defined(WITHOUT_PYTHON) || defined(BUILD_PYTHON_MODULE) +USE_PYTHON= 2.3+ +RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/numarray:${PORTSDIR}/math/py-numarray \ + ${PYTHON_SITELIBDIR}/matplotlib:${PORTSDIR}/math/py-matplotlib +CONFIGURE_ENV+= PYTHON_VERSION=${_PYTHON_VERSION} +CONFIGURE_ARGS+=--with-python=${PYTHONBASE} +.else +CONFIGURE_ARGS+=--with-python=no +.endif + +.include <bsd.port.pre.mk> + +.if exists(${LOCALBASE}/lib/libfftw3.so) +WITH_FFTW3= yes +.endif +.if defined(WITH_FFTW3) +LIB_DEPENDS+= fftw3.3:${PORTSDIR}/math/fftw3 \ + fftw3f.3:${PORTSDIR}/math/fftw3-float +CONFIGURE_ARGS+=--with-fftw=${LOCALBASE} +.endif + +.if ${OSVERSION} < 500000 +BROKEN= "Does not compile with gcc-2.95" +.endif + +.if defined(BUILD_PYTHON_MODULE) +do-install: + ${INSTALL_DATA} ${WRKSRC}/src/.libs/libgdl.so.0 ${PYTHON_SITELIBDIR}/GDL.so +.endif + +.if !defined(BUILD_PYTHON_MODULE) +post-install: +. if !defined(NOPORTDOCS) + ${MKDIR} ${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/src/pro/* ${EXAMPLESDIR} + @${ECHO_MSG} "===> Examples installed in ${EXAMPLESDIR}." +. endif +.endif + +.if defined(MAINTAINER_MODE) +test: install +. if defined(BUILD_PYTHON_MODULE) + @${ECHO_CMD} 'import GDL' > ${WRKDIR}/testgdl.py + @${ECHO_CMD} 'print GDL.function("sin",(1,))' >> ${WRKDIR}/testgdl.py + ${PYTHON_CMD} ${WRKDIR}/testgdl.py +. else + @${ECHO_CMD} ".RUN ${EXAMPLESDIR}/test_suite.pro" > ${WRKDIR}/testgdl + @${ECHO_CMD} "exit" >> ${WRKDIR}/testgdl + ${PREFIX}/bin/gdl < ${WRKDIR}/testgdl +. endif +.endif + +.include <bsd.port.post.mk> diff --git a/science/gnudatalanguage/distinfo b/science/gnudatalanguage/distinfo new file mode 100644 index 000000000000..c9874707f8fa --- /dev/null +++ b/science/gnudatalanguage/distinfo @@ -0,0 +1,2 @@ +MD5 (gdl-0.8.11.tar.gz) = 837365b860889de03483cf84ae15b9b3 +SIZE (gdl-0.8.11.tar.gz) = 827194 diff --git a/science/gnudatalanguage/files/patch-configure b/science/gnudatalanguage/files/patch-configure new file mode 100644 index 000000000000..fb977bd65d98 --- /dev/null +++ b/science/gnudatalanguage/files/patch-configure @@ -0,0 +1,38 @@ +--- configure.orig Mon Oct 17 10:22:00 2005 ++++ configure Sun Oct 23 11:40:43 2005 +@@ -19158,7 +19158,7 @@ + + fi; + +-if test "x$PYTHON_MODULE" == "xyes"; then ++if test "x$PYTHON_MODULE" = "xyes"; then + + cat >>confdefs.h <<\_ACEOF + #define PYTHON_MODULE 1 +@@ -19386,7 +19386,7 @@ + with_gsl=yes + fi + +-if test "x$with_gsl" == "xno"; then ++if test "x$with_gsl" = "xno"; then + echo "" + echo "Error! GSL library is obligatory." + exit -1 +@@ -19573,7 +19573,7 @@ + with_plplot=yes + fi + +-if test "x$with_plplot" == "xno"; then ++if test "x$with_plplot" = "xno"; then + echo "" + echo "Error! PLPLOT library is obligatory." + exit -1 +@@ -20297,7 +20297,7 @@ + + fi; + +-if test "x$PYTHON_VERSION" == "x"; then ++if test "x$PYTHON_VERSION" = "x"; then + + echo -n "Automatic determination of python version." + diff --git a/science/gnudatalanguage/files/patch-src__basic_fun.cpp b/science/gnudatalanguage/files/patch-src__basic_fun.cpp new file mode 100644 index 000000000000..24d2811b189f --- /dev/null +++ b/science/gnudatalanguage/files/patch-src__basic_fun.cpp @@ -0,0 +1,20 @@ +--- src/basic_fun.cpp.orig Mon Oct 17 10:22:04 2005 ++++ src/basic_fun.cpp Mon Oct 24 21:08:57 2005 +@@ -32,6 +32,9 @@ + #else + #include <unistd.h> + #endif ++#if defined(__FreeBSD__) ++ extern "C" char **environ; ++#endif + + #include "datatypes.hpp" + #include "envt.hpp" +@@ -2903,6 +2906,7 @@ + + BaseGDL* getenv_fun( EnvT* e) + { ++ + SizeT nParam=e->NParam(); + + static int environmentIx = e->KeywordIx( "ENVIRONMENT" ); diff --git a/science/gnudatalanguage/files/patch-src__basic_fun_cl.cpp b/science/gnudatalanguage/files/patch-src__basic_fun_cl.cpp new file mode 100644 index 000000000000..1d9b0a41ef2a --- /dev/null +++ b/science/gnudatalanguage/files/patch-src__basic_fun_cl.cpp @@ -0,0 +1,62 @@ +--- src/basic_fun_cl.cpp.orig Mon Oct 17 10:22:04 2005 ++++ src/basic_fun_cl.cpp Sun Oct 23 15:32:34 2005 +@@ -131,7 +131,7 @@ + } + } + +- //return the variable in seconds, either JULIAN, JULIAN+UTC, ++ //return the variable in seconds, either JULIAN, JULIAN+UTC, + //or no other keywords + struct tm *tstruct; + if( ret_seconds || e->KeywordSet("SECONDS") ) +@@ -139,38 +139,38 @@ + if( e->KeywordSet("JULIAN") ) + { + if( e->KeywordSet("UTC") ) +- tstruct=gmtime(&tval.tv_sec); ++ tstruct=gmtime((time_t *)(&tval.tv_sec)); + else +- tstruct=localtime(&tval.tv_sec); +- ++ tstruct=localtime((time_t *)(&tval.tv_sec)); ++ + return new DDoubleGDL(Gregorian2Julian(tstruct)); + } +- else ++ else + { + // does not (necessaryly) work: time might count backwards + //double tickTime = static_cast<double>(t) + tt - floor( tt); + return new DDoubleGDL(static_cast<double>(tt)); + } + } +- ++ + //return a string of the time, either UTC or local (default) + if(e->KeywordSet("UTC")) +- tstruct= gmtime(&tval.tv_sec); ++ tstruct= gmtime((time_t *)(&tval.tv_sec)); + else +- tstruct= localtime(&tval.tv_sec); +- ++ tstruct= localtime((time_t *)(&tval.tv_sec)); ++ + //Convert the time to JULIAN or NOT + if(e->KeywordSet("JULIAN")) +- return new DDoubleGDL(Gregorian2Julian(tstruct)); +- else ++ return new DDoubleGDL(Gregorian2Julian(tstruct)); ++ else + { + char *st=new char[MAX_DATE_STRING_LENGTH]; + const char *format="%a %h %d %T %Y";//my IDL date format. + DStringGDL *S; +- ++ + SizeT res=strftime(st,MAX_DATE_STRING_LENGTH,format,tstruct); + +- if(res != 0) ++ if(res != 0) + S=new DStringGDL(st); + else + S=new DStringGDL(""); diff --git a/science/gnudatalanguage/files/patch-src__dinterpreter.hpp b/science/gnudatalanguage/files/patch-src__dinterpreter.hpp new file mode 100644 index 000000000000..69b5c29a5ec9 --- /dev/null +++ b/science/gnudatalanguage/files/patch-src__dinterpreter.hpp @@ -0,0 +1,18 @@ +--- src/dinterpreter.hpp.orig Mon Oct 17 10:22:04 2005 ++++ src/dinterpreter.hpp Sat Oct 29 21:46:46 2005 +@@ -25,7 +25,14 @@ + #include <fstream> + #include <csignal> + +-#include <fenv.h> ++#ifdef __cplusplus ++ extern "C" { ++# include <fenv.h> ++# if defined(__FreeBSD__) ++# pragma STDC FENV_ACCESS ON ++# endif ++} ++#endif + + #include "initsysvar.hpp" + #include "objects.hpp" diff --git a/science/gnudatalanguage/files/patch-src__file.cpp b/science/gnudatalanguage/files/patch-src__file.cpp new file mode 100644 index 000000000000..1663f9dbe5a8 --- /dev/null +++ b/science/gnudatalanguage/files/patch-src__file.cpp @@ -0,0 +1,11 @@ +--- src/file.cpp.orig Mon Oct 17 10:22:04 2005 ++++ src/file.cpp Sun Oct 23 21:21:21 2005 +@@ -514,7 +514,7 @@ + if( noSort) + flags |= GLOB_NOSORT; + +-#ifndef __APPLE__ ++#if !defined(__APPLE__) && !defined(__FreeBSD__) + if( !quote) // n/a on OS X + flags |= GLOB_NOESCAPE; + diff --git a/science/gnudatalanguage/files/patch-src__math_fun_jmg.hpp b/science/gnudatalanguage/files/patch-src__math_fun_jmg.hpp new file mode 100644 index 000000000000..0b476e720ecb --- /dev/null +++ b/science/gnudatalanguage/files/patch-src__math_fun_jmg.hpp @@ -0,0 +1,19 @@ +--- src/math_fun_jmg.hpp.orig Mon Oct 17 10:22:04 2005 ++++ src/math_fun_jmg.hpp Sat Oct 29 21:48:25 2005 +@@ -18,7 +18,15 @@ + #ifndef MATH_FUN_HPP_ + #define MATH_FUN_HPP_ + +-#include <fenv.h> ++#ifdef __cplusplus ++ extern "C" { ++# include <fenv.h> ++# if defined(__FreeBSD__) ++# pragma STDC FENV_ACCESS ON ++# endif ++} ++#endif ++ + #include "datatypes.hpp" + #include "envt.hpp" + #include "math_utl.hpp" diff --git a/science/gnudatalanguage/files/patch-src__pythongdl.cpp b/science/gnudatalanguage/files/patch-src__pythongdl.cpp new file mode 100644 index 000000000000..f323172ed04f --- /dev/null +++ b/science/gnudatalanguage/files/patch-src__pythongdl.cpp @@ -0,0 +1,11 @@ +--- src/pythongdl.cpp.orig Mon Oct 17 10:22:04 2005 ++++ src/pythongdl.cpp Mon Oct 31 10:59:22 2005 +@@ -362,7 +362,7 @@ + if( !success) goto ret; + + // build the environment +- EnvT e( interpreter, NULL, sub); ++ EnvT e( (EnvT*)interpreter, (DSub*)NULL, (BaseGDL**)sub); + + // copy arguments + success = CopyArgFromPython( parRef, kwRef, e, argTuple, kwDict); diff --git a/science/gnudatalanguage/pkg-descr b/science/gnudatalanguage/pkg-descr new file mode 100644 index 000000000000..c83dca03df29 --- /dev/null +++ b/science/gnudatalanguage/pkg-descr @@ -0,0 +1,7 @@ +GDL - GNU Data Language - is a free IDL (Interactive Data Language) compatible +incremental compiler (i.e. runs IDL programs). + +IDL is a registered trademark of Research Systems Inc. +(see: <http://www.rsinc.com/>) + +WWW: http://gnudatalanguage.sourceforge.net/ diff --git a/science/gnudatalanguage/pkg-plist b/science/gnudatalanguage/pkg-plist new file mode 100644 index 000000000000..873a3c056d09 --- /dev/null +++ b/science/gnudatalanguage/pkg-plist @@ -0,0 +1,45 @@ +%%MASTER%%bin/gdl +%%MASTER%%lib/libantlr.a +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/appleman.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/array_indices.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/dist.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/example_journal.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/factorial.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/identity.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/image_test.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/kurtosis.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/lmgr.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/loadct.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/mean.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/meanabsdev.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/moment.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/nc_test.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/poly.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/py_plot.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/py_print.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/read_bmp.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/read_dicom.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/read_jpeg.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/read_pict.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/read_png.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/read_tiff.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/read_xwd.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/regression-total.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/skewness.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/stddev.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/strsplit.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/swap_endian.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/template.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/template_blank.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/test_brain.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/test_jd_op_tut.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/test_suite.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/trace.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/tvscl.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/uniq.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/variance.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/write_bmp.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/write_jpeg.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/write_pict.pro +%%MASTER%%%%PORTDOCS%%%%EXAMPLESDIR%%/write_png.pro +%%MASTER%%%%PORTDOCS%%@dirrm %%EXAMPLESDIR%% |