Bug 178538 - cad/netgen: chase OpenCascade's upgrade and unbreak.
Summary: cad/netgen: chase OpenCascade's upgrade and unbreak.
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Stephen Montgomery-Smith
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-12 18:40 UTC by Thierry Thomas
Modified: 2013-05-17 04:30 UTC (History)
1 user (show)

See Also:


Attachments
netgen.diff (3.49 KB, patch)
2013-05-12 18:40 UTC, Thierry Thomas
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thierry Thomas freebsd_committer freebsd_triage 2013-05-12 18:32:26 UTC
>Number:         178538
>Category:       ports
>Synopsis:       cad/netgen: chase OpenCascade's upgrade and unbreak.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 12 17:40:01 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Thierry Thomas
>Release:        FreeBSD 9.1-STABLE i386
>Organization:
Kabbale Eros
>Environment:
System: FreeBSD graf.pompo.net 9.1-STABLE FreeBSD 9.1-STABLE #0 r248682: Sun Mar 24 18:59:01 CET 2013 thierry@graf.pompo.net:/usr/obj/usr/src/sys/GRAF130324 i386


	
>Description:
	Attached is a patch to chase OpenCascade's upgrade to 6.6.0.

>How-To-Repeat:
	N/A

>Fix:
	Please apply the following patch.

--- netgen.diff begins here ---
diff -urN cad/netgen.orig/Makefile cad/netgen/Makefile
--- cad/netgen.orig/Makefile	2013-03-01 17:55:49.000000000 +0100
+++ cad/netgen/Makefile	2013-05-12 11:57:07.000000000 +0200
@@ -3,6 +3,7 @@
 
 PORTNAME=	netgen
 PORTVERSION=	5.0.0
+PORTREVISION=	1
 CATEGORIES=	cad
 MASTER_SITES=	SF/netgen-mesher/netgen-mesher/${PORTVERSION:S|.0$||}/
 
@@ -29,14 +30,13 @@
 OPTIONS_DEFINE=		OCC FFMPEG
 OCC_DESC=		Compile with OpenCascade geometry kernel
 FFMPEG_DESC=		video recording with FFmpeg
-OPTIONS_DEFAULT=	# OCC Switch it back on when opencascade is updated.
+OPTIONS_DEFAULT=	OCC
 
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MOCC}
-BROKEN=		The opencascade port needs to be updated before OCC will work
 LIB_DEPENDS+=	TKernel.0:${PORTSDIR}/cad/opencascade
-CXXFLAGS+=	-DOCCGEOMETRY -DOCC63 -DHAVE_WOK_CONFIG_H -DHAVE_CONFIG_H -D${ARCH} -I${LOCALBASE}/OpenCAS/ros/inc
+CXXFLAGS+=	-DOCCGEOMETRY -DHAVE_CONFIG_H -D${ARCH} -I${LOCALBASE}/include/OpenCASCADE
 CONFIGURE_ARGS+=	--enable-occ
 .endif
 
diff -urN cad/netgen.orig/files/patch-libsrc_occ_Partition_Inter3d.cxx cad/netgen/files/patch-libsrc_occ_Partition_Inter3d.cxx
--- cad/netgen.orig/files/patch-libsrc_occ_Partition_Inter3d.cxx	1970-01-01 01:00:00.000000000 +0100
+++ cad/netgen/files/patch-libsrc_occ_Partition_Inter3d.cxx	2013-05-12 11:32:23.000000000 +0200
@@ -0,0 +1,13 @@
+--- libsrc/occ/Partition_Inter3d.cxx.orig	2012-11-09 16:15:02.000000000 +0100
++++ libsrc/occ/Partition_Inter3d.cxx	2013-05-12 11:31:45.000000000 +0200
+@@ -243,8 +243,8 @@
+       Standard_Integer i, nbExt = anExtPS.NbExt();
+       Extrema_POnSurf aPOnSurf;
+       for (i = 1; i <= nbExt; ++i )
+-	if (anExtPS.Value( i ) <= TolE)               // V6.3
+-	  // if (anExtPS.SquareDistance( i ) <= TolE)   // V6.5
++	// if (anExtPS.Value( i ) <= TolE)               // V6.3
++	  if (anExtPS.SquareDistance( i ) <= TolE)   // V6.5
+ 	  {
+           aPOnSurf = anExtPS.Point( i );
+           break;
diff -urN cad/netgen.orig/files/patch-libsrc_occ_Partition_Loop2d.cxx cad/netgen/files/patch-libsrc_occ_Partition_Loop2d.cxx
--- cad/netgen.orig/files/patch-libsrc_occ_Partition_Loop2d.cxx	1970-01-01 01:00:00.000000000 +0100
+++ cad/netgen/files/patch-libsrc_occ_Partition_Loop2d.cxx	2013-05-12 11:41:36.000000000 +0200
@@ -0,0 +1,13 @@
+--- libsrc/occ/Partition_Loop2d.cxx.orig	2012-11-09 16:15:02.000000000 +0100
++++ libsrc/occ/Partition_Loop2d.cxx	2013-05-12 11:41:09.000000000 +0200
+@@ -52,6 +52,10 @@
+ #include <gp_Pnt.hxx>
+ #include <gp_Pnt2d.hxx>
+ 
++#ifndef PI
++#define PI        3.14159265358979323846
++#endif
++
+ //=======================================================================
+ //function : Partition_Loop2d
+ //purpose  :
diff -urN cad/netgen.orig/files/patch-libsrc_occ_Partition_Spliter.cxx cad/netgen/files/patch-libsrc_occ_Partition_Spliter.cxx
--- cad/netgen.orig/files/patch-libsrc_occ_Partition_Spliter.cxx	1970-01-01 01:00:00.000000000 +0100
+++ cad/netgen/files/patch-libsrc_occ_Partition_Spliter.cxx	2013-05-12 11:36:04.000000000 +0200
@@ -0,0 +1,13 @@
+--- libsrc/occ/Partition_Spliter.cxx.orig	2012-11-09 16:15:02.000000000 +0100
++++ libsrc/occ/Partition_Spliter.cxx	2013-05-12 11:35:38.000000000 +0200
+@@ -1169,8 +1169,8 @@
+           for (; j<=nbj && ok; ++j) {
+             if (Extrema.IsMin(j)) {
+ 	      hasMin = Standard_True;
+-	      ok = Extrema.Value(j) <= tol;  // V6.3
+-	      // ok = Extrema.SquareDistance(j) <= tol;  // V6.5
++	      // ok = Extrema.Value(j) <= tol;  // V6.3
++	      ok = Extrema.SquareDistance(j) <= tol;  // V6.5
+ 	    }
+           }
+         }
--- netgen.diff ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
freebsd-ports-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "freebsd-ports-bugs-unsubscribe@freebsd.org"
Comment 1 Thierry Thomas freebsd_committer freebsd_triage 2013-05-12 18:40:01 UTC
	Attached is a patch to chase OpenCascade's upgrade to 6.6.0.

Fix: Please apply the following patch.
How-To-Repeat: 	N/A
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2013-05-12 18:40:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->stephen

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 3 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2013-05-12 20:22:05 UTC
State Changed
From-To: open->feedback

I have some questions for the submitter.
Comment 4 Stephen Montgomery-Smith 2013-05-12 20:23:43 UTC
I am trying to apply the patch.  But I am failing to build the
opencascade port.  I get the following error.  My guess is we are using
different versions of FreeBSD, and hence difference compilers.

uname -a
FreeBSD wilberforce 8.4-PRERELEASE FreeBSD 8.4-PRERELEASE #0: Tue Apr  2
16:51:28 CDT 2013     stephen@wilberforce:/usr/obj/usr/src/sys/GENERIC 
amd64


libtool: compile:  c++ -DHAVE_CONFIG_H -I. -I../../../..
-I/usr/local/include -DHAVE_TBB -I../../../../inc -I../../../../drv/FSD
-I../../../../src/FSD -I../../../../drv/MMgt -I../../../../src/MMgt
-I../../../../drv/OSD -I../../../../src/OSD -I../../../../drv/Plugin
-I../../../../src/Plugin -I../../../../drv/Quantity
-I../../../../src/Quantity -I../../../../drv/Resource
-I../../../../src/Resource -I../../../../drv/SortTools
-I../../../../src/SortTools -I../../../../drv/Standard
-I../../../../src/Standard -I../../../../drv/StdFail
-I../../../../src/StdFail -I../../../../drv/Storage
-I../../../../src/Storage -I../../../../drv/TColStd
-I../../../../src/TColStd -I../../../../drv/TCollection
-I../../../../src/TCollection -I../../../../drv/TShort
-I../../../../src/TShort -I../../../../drv/Units -I../../../../src/Units
-I../../../../drv/UnitsAPI -I../../../../src/UnitsAPI
-I../../../../drv/IncludeLibrary -I../../../../src/IncludeLibrary
-I../../../../drv/Dico -I../../../../src/Dico
-I../../../../drv/NCollection -I../../../../src/NCollection
-I../../../../drv/Message -I../../../../src/Message -I/usr/local/include
-D_OCC64 -DNDEBUG -DNo_Exception -O2 -pipe -fno-strict-aliasing -DCSFDB
-DOCC_CONVERT_SIGNALS -O2 -MT Standard_CLocaleSentry.lo -MD -MP -MF
.deps/Standard_CLocaleSentry.Tpo -c
../../../../src/Standard/Standard_CLocaleSentry.cxx  -fPIC -DPIC -o
.libs/Standard_CLocaleSentry.o
In file included from
../../../../src/Standard/Standard_CLocaleSentry.cxx:24:
../../../../inc/Standard_CLocaleSentry.hxx:33:23: error: xlocale.h: No
such file or directory
In file included from
../../../../src/Standard/Standard_CLocaleSentry.cxx:24:
../../../../inc/Standard_CLocaleSentry.hxx:62: error: 'locale_t' does
not name a type
../../../../inc/Standard_CLocaleSentry.hxx:71: error: 'clocale_t' does
not name a type
../../../../src/Standard/Standard_CLocaleSentry.cxx:59: error:
'clocale_t' in class 'Standard_CLocaleSentry' does not name a type
../../../../src/Standard/Standard_CLocaleSentry.cxx: In constructor
'<unnamed>::CLocalePtr::CLocalePtr()':
../../../../src/Standard/Standard_CLocaleSentry.cxx:40: error: class
'<unnamed>::CLocalePtr' does not have any field named 'myLocale'
../../../../src/Standard/Standard_CLocaleSentry.cxx:40: error:
'LC_ALL_MASK' was not declared in this scope
../../../../src/Standard/Standard_CLocaleSentry.cxx:40: error:
'newlocale' was not declared in this scope
../../../../src/Standard/Standard_CLocaleSentry.cxx: In destructor
'<unnamed>::CLocalePtr::~CLocalePtr()':
../../../../src/Standard/Standard_CLocaleSentry.cxx:51: error:
'myLocale' was not declared in this scope
../../../../src/Standard/Standard_CLocaleSentry.cxx:51: error:
'freelocale' was not declared in this scope
../../../../src/Standard/Standard_CLocaleSentry.cxx: At global scope:
../../../../src/Standard/Standard_CLocaleSentry.cxx:71: error:
'clocale_t' in class 'Standard_CLocaleSentry' does not name a type
../../../../src/Standard/Standard_CLocaleSentry.cxx: In constructor
'Standard_CLocaleSentry::Standard_CLocaleSentry()':
../../../../src/Standard/Standard_CLocaleSentry.cxx:82: error:
'class<unnamed>::CLocalePtr' has no member named 'myLocale'
../../../../src/Standard/Standard_CLocaleSentry.cxx:82: error:
'uselocale' was not declared in this scope
../../../../src/Standard/Standard_CLocaleSentry.cxx: In destructor
'virtual Standard_CLocaleSentry::~Standard_CLocaleSentry()':
../../../../src/Standard/Standard_CLocaleSentry.cxx:113: error:
'locale_t' was not declared in this scope
../../../../src/Standard/Standard_CLocaleSentry.cxx:113: error:
'uselocale' was not declared in this scope
*** Error code 1

Stop in /usr/ports/cad/opencascade/work/ros/adm/lin/amk/TKernel.
*** Error code 1

Stop in /usr/ports/cad/opencascade/work/ros/adm/lin/amk.
*** Error code 1

Stop in /usr/ports/cad/opencascade/work/ros.
*** Error code 1

Stop in /usr/ports/cad/opencascade/work/ros.
*** Error code 1

Stop in /usr/ports/cad/opencascade.
*** Error code 1
Comment 5 Thierry Thomas freebsd_committer freebsd_triage 2013-05-12 20:45:56 UTC
On sun 12 may 13 at 21:23:43 +0200, Stephen Montgomery-Smith <stephen@missouri.edu>
 wrote:
> I am trying to apply the patch.  But I am failing to build the
> opencascade port.  I get the following error.  My guess is we are using
> different versions of FreeBSD, and hence difference compilers.
> 
> uname -a
> FreeBSD wilberforce 8.4-PRERELEASE FreeBSD 8.4-PRERELEASE #0: Tue Apr  2
> 16:51:28 CDT 2013     stephen@wilberforce:/usr/obj/usr/src/sys/GENERIC 
> amd64

Indeed: I tried it on i386 and amd64 for FreeBSD-9.1, but not for 8.4.

I'll check it. Thanks for the report.
-- 
Th. Thomas.
Comment 6 Thierry Thomas 2013-05-12 22:10:40 UTC
On sun 12 may 13 at 21:45:56 +0200, Thierry Thomas <thierry@FreeBSD.org>
 wrote:

> > I am trying to apply the patch.  But I am failing to build the
> > opencascade port.  I get the following error.  My guess is we are using
> > different versions of FreeBSD, and hence difference compilers.
> > 
> > uname -a
> > FreeBSD wilberforce 8.4-PRERELEASE FreeBSD 8.4-PRERELEASE #0: Tue Apr  2
> > 16:51:28 CDT 2013     stephen@wilberforce:/usr/obj/usr/src/sys/GENERIC 
> > amd64
> 
> Indeed: I tried it on i386 and amd64 for FreeBSD-9.1, but not for 8.4.
> 
> I'll check it. Thanks for the report.

It uses xlocale.h. I just marked it BROKEN on < 9.0, untill I get some
time to find a fix.
-- 
Th. Thomas.
Comment 7 dfilter service freebsd_committer freebsd_triage 2013-05-17 04:24:43 UTC
Author: stephen
Date: Fri May 17 03:24:24 2013
New Revision: 318352
URL: http://svnweb.freebsd.org/changeset/ports/318352

Log:
  - Change option OCC (build with opencascade libraries) to default to on.
  - Bump portrevision.
  
  PR:		ports/178538
  Submitted by:	thierry@FreeBSD.org

Added:
  head/cad/netgen/files/patch-libsrc_occ_Partition_Inter3d.cxx   (contents, props changed)
  head/cad/netgen/files/patch-libsrc_occ_Partition_Loop2d.cxx   (contents, props changed)
  head/cad/netgen/files/patch-libsrc_occ_Partition_Spliter.cxx   (contents, props changed)
Modified:
  head/cad/netgen/Makefile

Modified: head/cad/netgen/Makefile
==============================================================================
--- head/cad/netgen/Makefile	Fri May 17 02:01:27 2013	(r318351)
+++ head/cad/netgen/Makefile	Fri May 17 03:24:24 2013	(r318352)
@@ -3,6 +3,7 @@
 
 PORTNAME=	netgen
 PORTVERSION=	5.0.0
+PORTREVISION=	1
 CATEGORIES=	cad
 MASTER_SITES=	SF/netgen-mesher/netgen-mesher/${PORTVERSION:S|.0$||}/
 
@@ -29,14 +30,13 @@ FETCH_BEFORE_ARGS+=	-o ${DISTDIR}/${DIST
 OPTIONS_DEFINE=		OCC FFMPEG
 OCC_DESC=		Compile with OpenCascade geometry kernel
 FFMPEG_DESC=		video recording with FFmpeg
-OPTIONS_DEFAULT=	# OCC Switch it back on when opencascade is updated.
+OPTIONS_DEFAULT=	OCC
 
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MOCC}
-BROKEN=		The opencascade port needs to be updated before OCC will work
 LIB_DEPENDS+=	TKernel.0:${PORTSDIR}/cad/opencascade
-CXXFLAGS+=	-DOCCGEOMETRY -DOCC63 -DHAVE_WOK_CONFIG_H -DHAVE_CONFIG_H -D${ARCH} -I${LOCALBASE}/OpenCAS/ros/inc
+CXXFLAGS+=	-DOCCGEOMETRY -DHAVE_CONFIG_H -D${ARCH} -I${LOCALBASE}/include/OpenCASCADE
 CONFIGURE_ARGS+=	--enable-occ
 .endif
 

Added: head/cad/netgen/files/patch-libsrc_occ_Partition_Inter3d.cxx
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/cad/netgen/files/patch-libsrc_occ_Partition_Inter3d.cxx	Fri May 17 03:24:24 2013	(r318352)
@@ -0,0 +1,13 @@
+--- libsrc/occ/Partition_Inter3d.cxx.orig	2012-11-09 16:15:02.000000000 +0100
++++ libsrc/occ/Partition_Inter3d.cxx	2013-05-12 11:31:45.000000000 +0200
+@@ -243,8 +243,8 @@
+       Standard_Integer i, nbExt = anExtPS.NbExt();
+       Extrema_POnSurf aPOnSurf;
+       for (i = 1; i <= nbExt; ++i )
+-	if (anExtPS.Value( i ) <= TolE)               // V6.3
+-	  // if (anExtPS.SquareDistance( i ) <= TolE)   // V6.5
++	// if (anExtPS.Value( i ) <= TolE)               // V6.3
++	  if (anExtPS.SquareDistance( i ) <= TolE)   // V6.5
+ 	  {
+           aPOnSurf = anExtPS.Point( i );
+           break;

Added: head/cad/netgen/files/patch-libsrc_occ_Partition_Loop2d.cxx
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/cad/netgen/files/patch-libsrc_occ_Partition_Loop2d.cxx	Fri May 17 03:24:24 2013	(r318352)
@@ -0,0 +1,13 @@
+--- libsrc/occ/Partition_Loop2d.cxx.orig	2012-11-09 16:15:02.000000000 +0100
++++ libsrc/occ/Partition_Loop2d.cxx	2013-05-12 11:41:09.000000000 +0200
+@@ -52,6 +52,10 @@
+ #include <gp_Pnt.hxx>
+ #include <gp_Pnt2d.hxx>
+ 
++#ifndef PI
++#define PI        3.14159265358979323846
++#endif
++
+ //=======================================================================
+ //function : Partition_Loop2d
+ //purpose  :

Added: head/cad/netgen/files/patch-libsrc_occ_Partition_Spliter.cxx
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/cad/netgen/files/patch-libsrc_occ_Partition_Spliter.cxx	Fri May 17 03:24:24 2013	(r318352)
@@ -0,0 +1,13 @@
+--- libsrc/occ/Partition_Spliter.cxx.orig	2012-11-09 16:15:02.000000000 +0100
++++ libsrc/occ/Partition_Spliter.cxx	2013-05-12 11:35:38.000000000 +0200
+@@ -1169,8 +1169,8 @@
+           for (; j<=nbj && ok; ++j) {
+             if (Extrema.IsMin(j)) {
+ 	      hasMin = Standard_True;
+-	      ok = Extrema.Value(j) <= tol;  // V6.3
+-	      // ok = Extrema.SquareDistance(j) <= tol;  // V6.5
++	      // ok = Extrema.Value(j) <= tol;  // V6.3
++	      ok = Extrema.SquareDistance(j) <= tol;  // V6.5
+ 	    }
+           }
+         }
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 8 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2013-05-17 04:25:15 UTC
State Changed
From-To: open->closed

Committed.  Thank you very much for submitting this PR.
Comment 9 Thierry Thomas freebsd_committer freebsd_triage 2014-06-01 07:57:10 UTC
State Changed
From-To: feedback->open


Just fixed on 8.x.