mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-19 19:59:43 +00:00
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
This commit is contained in:
parent
f4b52dc69f
commit
28c3c20886
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=188139
@ -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
|
||||
|
83
science/gnudatalanguage/files/patch-src__datatypes.cpp
Normal file
83
science/gnudatalanguage/files/patch-src__datatypes.cpp
Normal file
@ -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
|
15
science/gnudatalanguage/files/patch-src__specializations.hpp
Normal file
15
science/gnudatalanguage/files/patch-src__specializations.hpp
Normal file
@ -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;
|
Loading…
Reference in New Issue
Block a user