diff options
author | thierry <thierry@FreeBSD.org> | 2007-03-24 06:20:25 +0800 |
---|---|---|
committer | thierry <thierry@FreeBSD.org> | 2007-03-24 06:20:25 +0800 |
commit | 71964c60a4fcb673c6fcdb3e4ada08c616845c85 (patch) | |
tree | b07335344048bb0656a0ced11b6e1d63da1df5a2 | |
parent | 96e36eb716677977167ca53d6a9a691557c02df7 (diff) | |
download | freebsd-ports-gnome-71964c60a4fcb673c6fcdb3e4ada08c616845c85.tar.gz freebsd-ports-gnome-71964c60a4fcb673c6fcdb3e4ada08c616845c85.tar.zst freebsd-ports-gnome-71964c60a4fcb673c6fcdb3e4ada08c616845c85.zip |
Fix build with gcc42 (specialization after instantiation).
Since I'm here:
- chase fftw3 update;
- s/test/regression-test/
- remove BROKEN for FreeBSD-4.
Reported by: pointyhat via Kris
Obtained from: GDL CVS
-rw-r--r-- | science/gnudatalanguage/Makefile | 10 | ||||
-rw-r--r-- | science/gnudatalanguage/files/patch-src__datatypes.cpp | 83 | ||||
-rw-r--r-- | science/gnudatalanguage/files/patch-src__specializations.hpp | 15 |
3 files changed, 101 insertions, 7 deletions
diff --git a/science/gnudatalanguage/Makefile b/science/gnudatalanguage/Makefile index 180e9ca7d171..fdd4633a762c 100644 --- a/science/gnudatalanguage/Makefile +++ b/science/gnudatalanguage/Makefile @@ -98,15 +98,11 @@ CONFIGURE_ARGS+=--with-python=no WITH_FFTW3= yes .endif .if defined(WITH_FFTW3) -LIB_DEPENDS+= fftw3.3:${PORTSDIR}/math/fftw3 \ - fftw3f.3:${PORTSDIR}/math/fftw3-float +LIB_DEPENDS+= fftw3.4:${PORTSDIR}/math/fftw3 \ + fftw3f.4:${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 @@ -122,7 +118,7 @@ post-install: .endif .if defined(MAINTAINER_MODE) -test: install +regression-test: install . if defined(BUILD_PYTHON_MODULE) @${ECHO_CMD} 'import GDL' > ${WRKDIR}/testgdl.py @${ECHO_CMD} 'print GDL.function("sin",(1,))' >> ${WRKDIR}/testgdl.py diff --git a/science/gnudatalanguage/files/patch-src__datatypes.cpp b/science/gnudatalanguage/files/patch-src__datatypes.cpp new file mode 100644 index 000000000000..aed6eedfa65b --- /dev/null +++ b/science/gnudatalanguage/files/patch-src__datatypes.cpp @@ -0,0 +1,83 @@ +--- src/datatypes.cpp.orig Mon Oct 17 10:22:04 2005 ++++ src/datatypes.cpp Fri Mar 23 21:43:42 2007 +@@ -52,6 +52,43 @@ + + using namespace std; + ++// these need to be defined early, since some gcc versions were reported to ++// complain about: specialization of ++// 'Data_< <template-parameter-1-1> >::Data_(const dimension&, BaseGDL::InitType) ++// [with Sp = SpDXXX]' after instantiation ++// ++// string, ptr, obj (cannot be INDGEN, ++// need not to be zeroed if all intialized later) ++// struct (as a separate class) as well ++template<> Data_<SpDString>::Data_(const dimension& dim_, ++ BaseGDL::InitType iT): ++ SpDString(dim_), dd(dim.N_Elements()) ++{ ++ dim.Purge(); ++ ++ if( iT == BaseGDL::INDGEN) ++ throw GDLException("DStringGDL(dim,InitType=INDGEN) called."); ++} ++template<> Data_<SpDPtr>::Data_(const dimension& dim_, ++ BaseGDL::InitType iT): ++ SpDPtr(dim_), dd(dim.N_Elements()) ++{ ++ dim.Purge(); ++ ++ if( iT == BaseGDL::INDGEN) ++ throw GDLException("DPtrGDL(dim,InitType=INDGEN) called."); ++} ++template<> Data_<SpDObj>::Data_(const dimension& dim_, ++ BaseGDL::InitType iT): ++ SpDObj(dim_), dd(dim.N_Elements()) ++{ ++ dim.Purge(); ++ ++ if( iT == BaseGDL::INDGEN) ++ throw GDLException("DObjGDL(dim,InitType=INDGEN) called."); ++} ++ ++ + // this (ugly) including of other sourcefiles has to be done, because + // on Mac OS X a template instantiation request (see bottom of file) + // can only be done once +@@ -518,36 +555,6 @@ + // return true; + // } + +-// string, ptr, obj (cannot be INDGEN, +-// need not to be zeroed if all intialized later) +-// struct (as a separate class) as well +-template<> Data_<SpDString>::Data_(const dimension& dim_, +- BaseGDL::InitType iT): +- SpDString(dim_), dd(dim.N_Elements()) +-{ +- dim.Purge(); +- +- if( iT == BaseGDL::INDGEN) +- throw GDLException("DStringGDL(dim,InitType=INDGEN) called."); +-} +-template<> Data_<SpDPtr>::Data_(const dimension& dim_, +- BaseGDL::InitType iT): +- SpDPtr(dim_), dd(dim.N_Elements()) +-{ +- dim.Purge(); +- +- if( iT == BaseGDL::INDGEN) +- throw GDLException("DPtrGDL(dim,InitType=INDGEN) called."); +-} +-template<> Data_<SpDObj>::Data_(const dimension& dim_, +- BaseGDL::InitType iT): +- SpDObj(dim_), dd(dim.N_Elements()) +-{ +- dim.Purge(); +- +- if( iT == BaseGDL::INDGEN) +- throw GDLException("DObjGDL(dim,InitType=INDGEN) called."); +-} + + template<class Sp> + const SizeT Data_<Sp>::NBytes() const diff --git a/science/gnudatalanguage/files/patch-src__specializations.hpp b/science/gnudatalanguage/files/patch-src__specializations.hpp new file mode 100644 index 000000000000..b5b55c0c44a0 --- /dev/null +++ b/science/gnudatalanguage/files/patch-src__specializations.hpp @@ -0,0 +1,15 @@ +--- src/specializations.hpp.orig Mon Oct 17 10:22:04 2005 ++++ src/specializations.hpp Fri Mar 23 22:11:15 2007 +@@ -237,6 +237,12 @@ + Data_<SpDByte>* Data_<SpDComplexDbl>::LogNeg(); + + // datatypes.cpp ++template<> ++Data_<SpDString>::Data_(const dimension& dim_, BaseGDL::InitType iT); ++template<> ++Data_<SpDPtr>::Data_(const dimension& dim_, BaseGDL::InitType iT); ++template<> ++Data_<SpDObj>::Data_(const dimension& dim_, BaseGDL::InitType iT); + template<> const SizeT Data_<SpDString>::NBytes() const; + template<> const SizeT Data_<SpDObj>::NBytes() const; + template<> const SizeT Data_<SpDPtr>::NBytes() const; |