- Fix build with gcc 4.2

- Pass maintainership to submitter

PR:		120626
Submitted by:	Pietro Cerutti <gahr@gahr.ch>
This commit is contained in:
Martin Wilke 2008-02-15 17:39:03 +00:00
parent 7ade77179e
commit c4adc8534a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=207258
18 changed files with 373 additions and 8 deletions

View file

@ -12,7 +12,7 @@ CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= libnurbs
MAINTAINER= ports@FreeBSD.org
MAINTAINER= gahr@gahr.ch
COMMENT= A C++ library for representing curves or surfaces
USE_AUTOTOOLS= libtool:15
@ -22,10 +22,4 @@ USE_LDCONFIG= yes
MAN1= nurbs++-config.1
.include <bsd.port.pre.mk>
.if ${OSVERSION} >= 700042
BROKEN= Broken with gcc 4.2
.endif
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View file

@ -0,0 +1,29 @@
--- image/color.cpp.orig 2008-02-13 22:28:08.000000000 +0100
+++ image/color.cpp 2008-02-13 22:28:56.000000000 +0100
@@ -50,7 +50,7 @@
Color blackColor(0,0,0) ;
*/
- double
+ template<> double
Matrix<Color>::norm(void) {
#ifdef USE_EXCEPTION
throw MatrixErr();
@@ -63,7 +63,7 @@
}
#ifndef USING_VCC
- int Matrix<Color>::read(char* filename,int r, int c) {
+ template<> int Matrix<Color>::read(char* filename,int r, int c) {
ifstream fin(filename) ;
if(!fin) {
resize(1,1) ;
@@ -89,7 +89,7 @@
}
#endif
- int Vector<Color>::minIndex() const {
+ template<> int Vector<Color>::minIndex() const {
#ifdef USE_EXCEPTION
throw MatrixErr() ;
#else

View file

@ -0,0 +1,11 @@
--- matrix/barray2d_uchar.cpp.orig 2008-02-13 22:18:33.000000000 +0100
+++ matrix/barray2d_uchar.cpp 2008-02-13 22:18:50.000000000 +0100
@@ -27,7 +27,7 @@
namespace PLib {
-ostream&
+template<> ostream&
Basic2DArray<unsigned char>::print(ostream& os) const
{
int i, j;

View file

@ -0,0 +1,11 @@
--- matrix/barray_complex.cpp.orig 2008-02-13 22:26:03.000000000 +0100
+++ matrix/barray_complex.cpp 2008-02-13 22:26:20.000000000 +0100
@@ -27,7 +27,7 @@
namespace PLib {
-ostream&
+template<> ostream&
BasicArray<Complex>::print(ostream& os) const{
const int iend = size();

View file

@ -0,0 +1,38 @@
--- matrix/matrix_char.cpp.orig 2008-02-13 22:21:07.000000000 +0100
+++ matrix/matrix_char.cpp 2008-02-13 22:21:42.000000000 +0100
@@ -27,7 +27,7 @@
namespace PLib {
- Matrix<char>&
+ template<> Matrix<char>&
Matrix<char>::operator*=(double a)
{
char *p1 ;
@@ -40,7 +40,7 @@
return *this ;
}
- Matrix<char>&
+ template<> Matrix<char>&
Matrix<char>::operator+=(double a)
{
char *p1 ;
@@ -51,7 +51,7 @@
return *this ;
}
- Matrix<char>&
+ template<> Matrix<char>&
Matrix<char>::operator-=(double a)
{
char *p1 ;
@@ -62,7 +62,7 @@
return *this ;
}
- Matrix<char>&
+ template<> Matrix<char>&
Matrix<char>::operator/=(double a)
{
char *p1 ;

View file

@ -0,0 +1,11 @@
--- matrix/matrix_complex.cpp.orig 2008-02-13 22:27:09.000000000 +0100
+++ matrix/matrix_complex.cpp 2008-02-13 22:27:30.000000000 +0100
@@ -27,7 +27,7 @@
namespace PLib {
- double Matrix<Complex>::norm(void){
+ template<> double Matrix<Complex>::norm(void){
int i,j ;
double sumR, sumI, maxsum;
int init=0 ;

View file

@ -0,0 +1,11 @@
--- matrix/matrix_double.cpp.orig 2008-02-13 22:16:31.000000000 +0100
+++ matrix/matrix_double.cpp 2008-02-13 22:16:45.000000000 +0100
@@ -27,7 +27,7 @@
namespace PLib {
- void Matrix<double>::qSort(){
+ template<> void Matrix<double>::qSort(){
qsort((char*)m,rows()*cols(),sizeof(double),compareDouble) ;
}

View file

@ -0,0 +1,11 @@
--- matrix/matrix_float.cpp.orig 2008-02-13 22:14:25.000000000 +0100
+++ matrix/matrix_float.cpp 2008-02-13 22:14:45.000000000 +0100
@@ -27,7 +27,7 @@
namespace PLib {
- void Matrix<float>::qSort(){
+ template<> void Matrix<float>::qSort(){
qsort((char*)m,rows()*cols(),sizeof(float),compareFloat) ;
}

View file

@ -0,0 +1,38 @@
--- matrix/matrix_hpoint.cpp.orig 2008-02-13 22:23:41.000000000 +0100
+++ matrix/matrix_hpoint.cpp 2008-02-13 22:24:43.000000000 +0100
@@ -27,7 +27,7 @@
namespace PLib {
- double
+ template<> double
Matrix<HPoint3Df>::norm(void) {
int i,j ;
double sumX, sumY, sumZ, sumW, maxsum;
@@ -58,7 +58,7 @@
}
- double
+ template<> double
Matrix<HPoint3Dd>::norm(void) {
int i,j ;
double sumX, sumY, sumZ, sumW, maxsum;
@@ -89,7 +89,7 @@
}
- double
+ template<> double
Matrix<HPoint2Df>::norm(void) {
int i,j ;
double sumX, sumY, sumZ, sumW, maxsum;
@@ -119,7 +119,7 @@
return sqrt(maxsum);
}
- double
+ template<> double
Matrix<HPoint2Dd>::norm(void) {
int i,j ;
double sumX, sumY, sumZ, sumW, maxsum;

View file

@ -0,0 +1,43 @@
--- matrix/matrix_int.cpp.orig 2008-02-13 22:11:44.000000000 +0100
+++ matrix/matrix_int.cpp 2008-02-13 22:12:25.000000000 +0100
@@ -29,11 +29,11 @@
namespace PLib {
- void Matrix<int>::qSort(){
+ template<> void Matrix<int>::qSort(){
qsort((char*)m,rows()*cols(),sizeof(int),compareInt) ;
}
- Matrix<int>&
+ template<> Matrix<int>&
Matrix<int>::operator*=(double a)
{
int *p1 ;
@@ -46,7 +46,7 @@
return *this ;
}
- Matrix<int>&
+ template<> Matrix<int>&
Matrix<int>::operator+=(double a)
{
int *p1 ;
@@ -57,7 +57,7 @@
return *this ;
}
- Matrix<int>&
+ template<> Matrix<int>&
Matrix<int>::operator-=(double a)
{
int *p1 ;
@@ -68,7 +68,7 @@
return *this ;
}
- Matrix<int>&
+ template<> Matrix<int>&
Matrix<int>::operator/=(double a)
{
int *p1 ;

View file

@ -0,0 +1,38 @@
--- matrix/matrix_point.cpp.orig 2008-02-13 22:22:23.000000000 +0100
+++ matrix/matrix_point.cpp 2008-02-13 22:23:16.000000000 +0100
@@ -27,7 +27,7 @@
namespace PLib {
- double
+ template<> double
Matrix<Point3Df>::norm(void) {
int i,j ;
double sumX, sumY, sumZ, maxsum;
@@ -55,7 +55,7 @@
return sqrt(maxsum);
}
- double
+ template<> double
Matrix<Point3Dd>::norm(void) {
int i,j ;
double sumX, sumY, sumZ, maxsum;
@@ -83,7 +83,7 @@
return sqrt(maxsum);
}
- double
+ template<> double
Matrix<Point2Df>::norm(void) {
int i,j ;
double sumX, sumY, sumZ, maxsum;
@@ -111,7 +111,7 @@
return sqrt(maxsum);
}
- double
+ template<> double
Matrix<Point2Dd>::norm(void) {
int i,j ;
double sumX, sumY, sumZ, maxsum;

View file

@ -0,0 +1,38 @@
--- matrix/matrix_uchar.cpp.orig 2008-02-13 22:39:32.000000000 +0100
+++ matrix/matrix_uchar.cpp 2008-02-13 22:40:11.000000000 +0100
@@ -27,7 +27,7 @@
namespace PLib {
- Matrix<unsigned char>&
+ template<> Matrix<unsigned char>&
Matrix<unsigned char>::operator*=(double a)
{
unsigned char *p1 ;
@@ -40,7 +40,7 @@
return *this ;
}
- Matrix<unsigned char>&
+ template<> Matrix<unsigned char>&
Matrix<unsigned char>::operator+=(double a)
{
unsigned char *p1 ;
@@ -52,7 +52,7 @@
}
- Matrix<unsigned char>&
+ template<> Matrix<unsigned char>&
Matrix<unsigned char>::operator-=(double a)
{
unsigned char *p1 ;
@@ -64,7 +64,7 @@
}
- Matrix<unsigned char>&
+ template<> Matrix<unsigned char>&
Matrix<unsigned char>::operator/=(double a)
{
unsigned char *p1 ;

View file

@ -0,0 +1,11 @@
--- matrix/vector_double.cpp.orig 2008-02-13 22:17:22.000000000 +0100
+++ matrix/vector_double.cpp 2008-02-13 22:17:40.000000000 +0100
@@ -27,7 +27,7 @@
namespace PLib {
- void Vector<double>::qSortStd(){
+ template<> void Vector<double>::qSortStd(){
qsort((char*)memory(),n(),sizeof(float),compareDouble) ;
}

View file

@ -0,0 +1,11 @@
--- matrix/vector_float.cpp.orig 2008-02-13 22:15:33.000000000 +0100
+++ matrix/vector_float.cpp 2008-02-13 22:15:51.000000000 +0100
@@ -27,7 +27,7 @@
namespace PLib {
- void Vector<float>::qSortStd(){
+ template<> void Vector<float>::qSortStd(){
qsort((char*)memory(),n(),sizeof(float),compareFloat) ;
}

View file

@ -0,0 +1,11 @@
--- matrix/vector_int.cpp.orig 2008-02-13 22:13:23.000000000 +0100
+++ matrix/vector_int.cpp 2008-02-13 22:13:39.000000000 +0100
@@ -27,7 +27,7 @@
namespace PLib {
- void Vector<int>::qSortStd(){
+ template<> void Vector<int>::qSortStd(){
qsort((char*)memory(),n(),sizeof(int),compareInt) ;
}

View file

@ -0,0 +1,11 @@
--- nurbs/d_nurbs.cpp.orig 2008-02-13 22:33:03.000000000 +0100
+++ nurbs/d_nurbs.cpp 2008-02-13 22:33:32.000000000 +0100
@@ -10,7 +10,7 @@
return firstDn(u) ;
}
-void NurbsCurve<double,2>::makeCircle(const Point_nD<double,2>& O, double r, double as, double ae){
+template<> void NurbsCurve<double,2>::makeCircle(const Point_nD<double,2>& O, double r, double as, double ae){
makeCircle(O,Point_nD<double,2>(1,0),Point_nD<double,2>(0,1),r,as,ae) ;
}

View file

@ -0,0 +1,24 @@
--- nurbs/d_surface.cpp.orig 2008-02-13 22:34:54.000000000 +0100
+++ nurbs/d_surface.cpp 2008-02-13 22:35:05.000000000 +0100
@@ -19,21 +19,4 @@
cerr << "NOT DEFINED FOR 2D SURFACES.\n" ;
return 0;
}
-
-#ifdef NO_IMPLICIT_TEMPLATES
-
- template class InterPoint<double,2> ;
- template class InterPoint<double,3> ;
-
- template class BasicList<InterPoint<double,2> > ;
- template class BasicList<InterPoint<double,3> > ;
-
- template class ParaSurface<double,2> ;
- template class ParaSurface<double,3> ;
-
- template void intersectSurfaces(const ParaSurface<double,2>&, const ParaSurface<double,2>&, BasicList<InterPoint<double,2> >&, int, double, double, double, double) ;
- template void intersectSurfaces(const ParaSurface<double,3>&, const ParaSurface<double,3>&, BasicList<InterPoint<double,3> >&, int, double, double, double, double) ;
-
-#endif
-
}

View file

@ -0,0 +1,24 @@
--- nurbs/f_surface.cpp.orig 2008-02-13 22:31:09.000000000 +0100
+++ nurbs/f_surface.cpp 2008-02-13 22:31:32.000000000 +0100
@@ -20,21 +20,4 @@
return 0;
}
-#ifdef NO_IMPLICIT_TEMPLATES
-
- template class InterPoint<float,2> ;
- template class InterPoint<float,3> ;
-
- template class BasicList<InterPoint<float,2> > ;
- template class BasicList<InterPoint<float,3> > ;
-
- template class ParaSurface<float,2> ;
- template class ParaSurface<float,3> ;
-
- template void intersectSurfaces(const ParaSurface<float,2>&, const ParaSurface<float,2>&, BasicList<InterPoint<float,2> >&, int, float, float, float, float) ;
-
- template void intersectSurfaces(const ParaSurface<float,3>&, const ParaSurface<float,3>&, BasicList<InterPoint<float,3> >&, int, float, float, float, float) ;
-
-#endif
-
}