ports/120626: [patch] graphics/nurbs++ unbreak fix build w/ GCC 4.2 + adopt maintainship
Pietro Cerutti
gahr at gahr.ch
Wed Feb 13 22:00:04 UTC 2008
>Number: 120626
>Category: ports
>Synopsis: [patch] graphics/nurbs++ unbreak fix build w/ GCC 4.2 + adopt maintainship
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Feb 13 22:00:03 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Pietro Cerutti
>Release: FreeBSD 8.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD 8.0-CURRENT #4: Wed Feb 13 18:13:34 CET 2008
root at gahrtop.localhost:/usr/obj/usr/src/sys/MSI1034
>Description:
The following patch fixes a few issues preventing nurbs++ 3.0.11 to build with the latest GCC 4.2 compiler.
>How-To-Repeat:
>Fix:
--- _nurbs++.diff begins here ---
--- Makefile.orig 2008-02-13 20:57:38.000000000 +0100
+++ Makefile 2008-02-13 22:06:24.000000000 +0100
@@ -12,7 +12,7 @@
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= libnurbs
-MAINTAINER= ports at FreeBSD.org
+MAINTAINER= gahr at gahr.ch
COMMENT= A C++ library for representing curves or surfaces
USE_AUTOTOOLS= libtool:15
@@ -22,10 +22,4 @@
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>
--- /dev/null 2008-02-13 22:12:21.000000000 +0100
+++ files/patch-matrix_matrix_int.cpp 2008-02-13 22:12:45.000000000 +0100
@@ -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 ;
--- /dev/null 2008-02-13 22:13:37.000000000 +0100
+++ files/patch-matrix_vector_int.cpp 2008-02-13 22:13:57.000000000 +0100
@@ -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) ;
+ }
+
--- /dev/null 2008-02-13 22:14:37.000000000 +0100
+++ files/patch-matrix_matrix_float.cpp 2008-02-13 22:15:03.000000000 +0100
@@ -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) ;
+ }
+
--- /dev/null 2008-02-13 22:15:48.000000000 +0100
+++ files/patch-matrix_vector_float.cpp 2008-02-13 22:16:05.000000000 +0100
@@ -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) ;
+ }
+
--- /dev/null 2008-02-13 22:16:42.000000000 +0100
+++ files/patch-matrix_matrix_double.cpp 2008-02-13 22:16:56.000000000 +0100
@@ -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) ;
+ }
+
--- /dev/null 2008-02-13 22:17:35.000000000 +0100
+++ files/patch-matrix_vector_double.cpp 2008-02-13 22:17:52.000000000 +0100
@@ -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) ;
+ }
+
--- /dev/null 2008-02-13 22:18:46.000000000 +0100
+++ files/patch-matrix_barray2d_uchar.cpp 2008-02-13 22:19:06.000000000 +0100
@@ -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;
--- /dev/null 2008-02-13 22:22:00.000000000 +0100
+++ files/patch-matrix_matrix_char.cpp 2008-02-13 22:21:59.000000000 +0100
@@ -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 ;
--- /dev/null 2008-02-13 22:24:41.000000000 +0100
+++ files/patch-matrix_matrix_point.cpp 2008-02-13 22:23:34.000000000 +0100
@@ -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;
--- /dev/null 2008-02-13 22:24:41.000000000 +0100
+++ files/patch-matrix_matrix_hpoint.cpp 2008-02-13 22:25:04.000000000 +0100
@@ -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;
--- /dev/null 2008-02-13 22:26:17.000000000 +0100
+++ files/patch-matrix_barray_complex.cpp 2008-02-13 22:26:41.000000000 +0100
@@ -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();
+
--- /dev/null 2008-02-13 22:27:38.000000000 +0100
+++ files/patch-matrix_matrix_complex.cpp 2008-02-13 22:27:45.000000000 +0100
@@ -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 ;
--- /dev/null 2008-02-13 22:29:45.000000000 +0100
+++ files/patch-image_color.cpp 2008-02-13 22:29:14.000000000 +0100
@@ -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
--- /dev/null 2008-02-13 22:30:12.000000000 +0100
+++ files/patch-nurbs_f_surface.cpp 2008-02-13 22:31:52.000000000 +0100
@@ -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
+-
+ }
--- /dev/null 2008-02-13 22:34:12.000000000 +0100
+++ files/patch-nurbs_d_nurbs.cpp 2008-02-13 22:33:53.000000000 +0100
@@ -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) ;
+ }
+
--- /dev/null 2008-02-13 22:34:39.000000000 +0100
+++ files/patch-nurbs_d_surface.cpp 2008-02-13 22:35:23.000000000 +0100
@@ -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
+-
+ }
--- /dev/null 2008-02-13 22:40:44.000000000 +0100
+++ files/patch-matrix_matrix_uchar.cpp 2008-02-13 22:40:26.000000000 +0100
@@ -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 ;
--- _nurbs++.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list