1 |
commit: 3addb11abe96717bdd72e01ee5dff2a47aa3f9e7 |
2 |
Author: Grégory Salvan <apieum <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Feb 13 11:40:48 2016 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 22 08:36:31 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=3addb11a |
7 |
|
8 |
patch netgen for occ to integrate version 5.3.1 see #436 |
9 |
|
10 |
.../files/netgen-5.x-occ-stl-api-change.patch | 94 ++++++++++++++++++++++ |
11 |
sci-mathematics/netgen/netgen-5.3.1.ebuild | 16 +++- |
12 |
2 files changed, 109 insertions(+), 1 deletion(-) |
13 |
|
14 |
diff --git a/sci-mathematics/netgen/files/netgen-5.x-occ-stl-api-change.patch b/sci-mathematics/netgen/files/netgen-5.x-occ-stl-api-change.patch |
15 |
new file mode 100644 |
16 |
index 0000000..05f3a54 |
17 |
--- /dev/null |
18 |
+++ b/sci-mathematics/netgen/files/netgen-5.x-occ-stl-api-change.patch |
19 |
@@ -0,0 +1,94 @@ |
20 |
+--- libsrc/occ/occgeom.cpp 2014-08-29 11:54:03.000000000 +0200 |
21 |
++++ libsrc/occ/occgeom.cpp 2016-02-12 21:14:49.258982206 +0100 |
22 |
+@@ -149,7 +149,7 @@ |
23 |
+ |
24 |
+ for (exp0.Init (shape, TopAbs_FACE); exp0.More(); exp0.Next()) |
25 |
+ { |
26 |
+- // Variable to hold the colour (if there exists one) of |
27 |
++ // Variable to hold the colour (if there exists one) of |
28 |
+ // the current face being processed |
29 |
+ Quantity_Color face_colour; |
30 |
+ |
31 |
+@@ -190,7 +190,7 @@ |
32 |
+ rebuild->Replace(face, newface, Standard_False); |
33 |
+ } |
34 |
+ |
35 |
+- // Set the original colour of the face to the newly created |
36 |
++ // Set the original colour of the face to the newly created |
37 |
+ // face (after the healing process) |
38 |
+ face = TopoDS::Face (exp0.Current()); |
39 |
+ face_colours->SetColor(face,face_colour,XCAFDoc_ColorSurf); |
40 |
+@@ -815,11 +815,11 @@ |
41 |
+ face_maxh.SetSize (fmap.Extent()); |
42 |
+ face_maxh = mparam.maxh; |
43 |
+ |
44 |
+- // Philippose - 15/01/2010 |
45 |
+- face_maxh_modified.DeleteAll(); |
46 |
+- face_maxh_modified.SetSize(fmap.Extent()); |
47 |
++ // Philippose - 15/01/2010 |
48 |
++ face_maxh_modified.DeleteAll(); |
49 |
++ face_maxh_modified.SetSize(fmap.Extent()); |
50 |
+ face_maxh_modified = 0; |
51 |
+- |
52 |
++ |
53 |
+ |
54 |
+ // Philippose - 17/01/2009 |
55 |
+ face_sel_status.DeleteAll(); |
56 |
+@@ -845,7 +845,7 @@ |
57 |
+ cout << "Trying to sew faces ..." << flush; |
58 |
+ |
59 |
+ BRepOffsetAPI_Sewing sewedObj(1); |
60 |
+- |
61 |
++ |
62 |
+ for (int i = 1; i <= fmap.Extent(); i++) |
63 |
+ { |
64 |
+ TopoDS_Face face = TopoDS::Face (fmap(i)); |
65 |
+@@ -1038,9 +1038,6 @@ |
66 |
+ { |
67 |
+ cout << "writing stl..."; cout.flush(); |
68 |
+ StlAPI_Writer writer; |
69 |
+- writer.RelativeMode() = Standard_False; |
70 |
+- |
71 |
+- writer.SetDeflection(0.02); |
72 |
+ writer.Write(shape,filename); |
73 |
+ |
74 |
+ cout << "done" << endl; |
75 |
+@@ -1109,7 +1106,7 @@ |
76 |
+ } |
77 |
+ |
78 |
+ |
79 |
+- // For the IGES Reader, all the shapes can be exported as one compund shape |
80 |
++ // For the IGES Reader, all the shapes can be exported as one compund shape |
81 |
+ // using the "OneShape" member |
82 |
+ occgeo->shape = reader.OneShape(); |
83 |
+ occgeo->face_colours = iges_colour_contents; |
84 |
+@@ -1187,7 +1184,7 @@ |
85 |
+ } |
86 |
+ |
87 |
+ |
88 |
+- // For the STEP File Reader in OCC, the 1st Shape contains the entire |
89 |
++ // For the STEP File Reader in OCC, the 1st Shape contains the entire |
90 |
+ // compound geometry as one shape |
91 |
+ occgeo->shape = step_shape_contents->GetShape(step_shapes.Value(1)); |
92 |
+ occgeo->face_colours = step_colour_contents; |
93 |
+@@ -1218,7 +1215,7 @@ |
94 |
+ } |
95 |
+ |
96 |
+ // Philippose - 23/02/2009 |
97 |
+- // Fixed a bug in the OpenCascade XDE Colour handling when |
98 |
++ // Fixed a bug in the OpenCascade XDE Colour handling when |
99 |
+ // opening BREP Files, since BREP Files have no colour data. |
100 |
+ // Hence, the face_colours Handle needs to be created as a NULL handle. |
101 |
+ occgeo->face_colours = Handle_XCAFDoc_ColorTool(); |
102 |
+@@ -1236,9 +1233,9 @@ |
103 |
+ void OCCGeometry :: Save (string sfilename) const |
104 |
+ { |
105 |
+ const char * filename = sfilename.c_str(); |
106 |
+- if (strlen(filename) < 4) |
107 |
++ if (strlen(filename) < 4) |
108 |
+ throw NgException ("illegal filename"); |
109 |
+- |
110 |
++ |
111 |
+ if (strcmp (&filename[strlen(filename)-3], "igs") == 0) |
112 |
+ { |
113 |
+ IGESControl_Writer writer("millimeters", 1); |
114 |
|
115 |
diff --git a/sci-mathematics/netgen/netgen-5.3.1.ebuild b/sci-mathematics/netgen/netgen-5.3.1.ebuild |
116 |
index 8a2f60b..16441ff 100644 |
117 |
--- a/sci-mathematics/netgen/netgen-5.3.1.ebuild |
118 |
+++ b/sci-mathematics/netgen/netgen-5.3.1.ebuild |
119 |
@@ -25,7 +25,7 @@ DEPEND=" |
120 |
opencascade? ( sci-libs/opencascade:* ) |
121 |
ffmpeg? ( media-video/ffmpeg ) |
122 |
jpeg? ( virtual/jpeg:0= ) |
123 |
- mpi? ( virtual/mpi ( || ( sci-libs/parmetis sci-libs/metis ) ) ) " |
124 |
+ mpi? ( virtual/mpi ( || ( sci-libs/parmetis <sci-libs/metis-5.0 ) ) sci-libs/hdf5[mpi] ) " |
125 |
RDEPEND="${DEPEND}" |
126 |
# Note, MPI has not be tested. |
127 |
|
128 |
@@ -33,6 +33,14 @@ src_prepare() { |
129 |
# Adapted from http://sourceforge.net/projects/netgen-mesher/forums/forum/905307/topic/5422824 |
130 |
epatch "${FILESDIR}/${PN}-5.x-missing-define.patch" |
131 |
epatch "${FILESDIR}/${PN}-5.x-metis-numflag.patch" |
132 |
+ epatch "${FILESDIR}/${PN}-5.x-occ-stl-api-change.patch" |
133 |
+ if use mpi; then |
134 |
+ export CC=mpicc |
135 |
+ export CXX=mpic++ |
136 |
+ export FC=mpif90 |
137 |
+ export F90=mpif90 |
138 |
+ export F77=mpif77 |
139 |
+ fi |
140 |
eautoreconf |
141 |
} |
142 |
|
143 |
@@ -47,8 +55,14 @@ src_configure() { |
144 |
append-ldflags -L$CASROOT/lin/$(get_libdir) |
145 |
fi |
146 |
if use mpi; then |
147 |
+ ewarn "*************************************************************************" |
148 |
+ ewarn "" |
149 |
+ ewarn "MPI has not been tested, you should probably deactivate the mpi use flag" |
150 |
+ ewarn "" |
151 |
+ ewarn "*************************************************************************" |
152 |
myconf="${myconf} --enable-parallel" |
153 |
append-cppflags -I/usr/include/metis |
154 |
+ append-ldflags -L/usr/$(get_libdir)/openmpi/ |
155 |
fi |
156 |
use ffmpeg && myconf="${myconf} --enable-ffmpeg" |
157 |
use jpeg && myconf="${myconf} --enable-jpeglib" |