]>
Commit | Line | Data |
---|---|---|
ab499437 | 1 | # |
ab499437 TP |
2 | # All modifications and additions to the file contributed by third parties |
3 | # remain the property of their copyright owners, unless otherwise agreed | |
4 | # upon. The license for this file, and modifications and additions to the | |
5 | # file, is the same license as for the pristine package itself (unless the | |
6 | # license for the pristine package is not an Open Source License, in which | |
7 | # case the license is the MIT License). An "Open Source License" is a | |
8 | # license that conforms to the Open Source Definition (Version 1.9) | |
9 | # published by the Open Source Initiative. | |
10 | ||
ab499437 TP |
11 | %define _prefix /opt/OpenCASCADE |
12 | ||
211fd830 TP |
13 | Name: OpenCASCADE |
14 | Summary: OpenCASCADE CAE platform | |
ab499437 | 15 | Group: Productivity/Other |
211fd830 TP |
16 | # The 6.3.1 is a maintenance release, only available for OCC customers |
17 | Version: 6.3.0 | |
ab499437 | 18 | Release: 40.3 |
211fd830 | 19 | License: LGPL-like, see http://www.opencascade.org/occ/license/ |
ab499437 | 20 | Packager: Andrea Florio <andrea@opensuse.org> |
211fd830 TP |
21 | Source0: http://files.opencascade.com/OCC_6.3_release/%{name}_src.tgz |
22 | # Source0-md5: 52778127974cb3141c2827f9d40d1f11 | |
ab499437 TP |
23 | Source1: %name.conf |
24 | Source2: OpenCASCADE-rpmlintrc | |
25 | Patch0: OpenCASCADE6.3.0-obs-check.patch | |
26 | Patch1: OpenCASCADE6.3.0-strcmp.patch | |
27 | Patch2: OpenCASCADE6.3.0-occ6.3.0.patch | |
28 | Patch3: OpenCASCADE6.3.0-casroot.patch | |
29 | Patch4: OpenCASCADE6.3.0-lib-release.patch | |
30 | Patch5: OpenCASCADE6.3.0-tkernel-ld.patch | |
31 | Patch6: OpenCASCADE6.3.0-mft-disable-mmap.patch | |
32 | Patch7: OpenCASCADE6.3.0-no-bitmaps-icon.patch | |
33 | Patch8: OpenCASCADE6.3.0-DESTDIR.patch | |
34 | Patch9: OpenCASCADE6.3.0-maint-mode.patch | |
35 | Patch10: OpenCASCADE6.3.0-dep-libs.patch | |
36 | Patch11: OpenCASCADE6.3.0-move-vrml-vis.patch | |
37 | Patch12: OpenCASCADE6.3.0-make-wok-libs-private.patch | |
38 | Patch13: OpenCASCADE6.3.0-make-draw-libs-private.patch | |
39 | Patch14: OpenCASCADE6.3.0-wok-install.patch | |
40 | Patch15: OpenCASCADE6.3.0-udlist.patch | |
41 | Patch16: OpenCASCADE6.3.0-WOKUnix_FDescr.patch | |
211fd830 | 42 | URL: http://www.opencascade.org/ |
ab499437 TP |
43 | |
44 | BuildRequires: Mesa-devel autoconf automake bison gcc-c++ xorg-x11-devel | |
45 | BuildRequires: flex libtool tcl-devel tk-devel xorg-x11-libXmu-devel fdupes | |
46 | %ifarch i586 | |
47 | BuildRequires: compat | |
48 | %else | |
49 | BuildRequires: compat-32bit | |
50 | %endif | |
51 | %if %suse_version >= 1100 | |
52 | BuildRequires: java-1_5_0-gcj-compat-devel | |
53 | %else | |
54 | BuildRequires: java-1_4_2-gcj-compat-devel | |
55 | %endif | |
56 | Requires: tcsh | |
57 | BuildRoot: %{_tmppath}/%{name}-%{version}-build | |
58 | ||
59 | %description | |
60 | OpenCASCADE is a suite for 3D surface and solid modeling, visualization, data | |
61 | exchange and rapid application development. It is an excellent platform for | |
62 | development of numerical simulation software including CAD/CAM/CAE, AEC and | |
63 | GIS, as well as PDM applications. | |
64 | ||
65 | %package devel | |
66 | ||
67 | Group: Development/Libraries/C and C++ | |
68 | Summary: Devel package for %{name} | |
69 | Requires: %{name} = %{version} | |
70 | ||
71 | %description devel | |
72 | OpenCASCADE is a suite for 3D surface and solid modeling, visualization, data | |
73 | exchange and rapid application development. It is an excellent platform for | |
74 | development of numerical simulation software including CAD/CAM/CAE, AEC and | |
75 | GIS, as well as PDM applications. | |
76 | ||
77 | %prep | |
78 | %setup -q -n %{name}%{version} | |
79 | # all patches must applied in that order or some of them could fail | |
80 | %patch0 -p1 | |
81 | %patch1 -p1 | |
82 | %patch2 -p1 | |
83 | %patch3 -p1 | |
84 | %patch4 -p1 | |
85 | %patch5 -p1 | |
86 | %patch6 -p1 | |
87 | %patch7 -p1 | |
88 | %patch8 -p1 | |
89 | %patch9 -p1 | |
90 | %patch10 -p1 | |
91 | %patch11 -p1 | |
92 | %patch12 -p1 | |
93 | %patch13 -p1 | |
94 | %patch14 -p1 | |
95 | %patch15 -p1 | |
96 | %patch16 -p1 | |
97 | ||
98 | %build | |
99 | cd ros/src/ExprIntrp | |
100 | bison -d -p ExprIntrp -o ExprIntrp.tab.c ExprIntrp.yacc | |
101 | flex -L -8 -Cf -Cr -P ExprIntrp -o lex.ExprIntrp.c ExprIntrp.lex | |
102 | mv ExprIntrp.tab.h ../../inc/ | |
103 | cp ExprIntrp.tab.c lex.ExprIntrp.c ../../drv/ExprIntrp/ | |
104 | cd ../.. | |
105 | %ifarch x86_64 ppc64 | |
106 | export CFLAGS="$RPM_OPT_FLAGS -D_OCC64 -fno-strict-aliasing" | |
107 | export CXXFLAGS="$RPM_OPT_FLAGS -D_OCC64 -fno-strict-aliasing" | |
108 | %else | |
109 | export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" | |
110 | export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" | |
111 | %endif | |
112 | autoreconf -f -i | |
113 | LDFLAGS=-lpthread %configure \ | |
114 | --with-gl-include=/usr/include \ | |
115 | --with-gl-library=/usr/%{_lib} \ | |
116 | --with-xmu-include=/usr/include/X11 \ | |
117 | --with-xmu-library=/usr/%{_lib} \ | |
118 | --with-tcl=/usr/%{_lib} \ | |
119 | --with-tk=/usr/%{_lib} \ | |
120 | --disable-static \ | |
121 | --disable-debug \ | |
122 | --enable-production \ | |
123 | --enable-wok \ | |
124 | --enable-wrappers \ | |
125 | --enable-draw | |
126 | ||
127 | %__make %{?jobs:-j%{jobs}} | |
128 | ||
129 | %install | |
130 | cd ros | |
131 | %makeinstall | |
132 | ||
133 | `for i in $(find %{buildroot}%{_prefix}/inc/ -name '*.h'); do chmod -x $i; done` | |
134 | `for i in $(find %{buildroot}%{_prefix}/inc/ -name '*.hxx'); do chmod -x $i; done` | |
135 | `for i in $(find %{buildroot}%{_prefix}/inc/ -name '*.lxx'); do chmod -x $i; done` | |
136 | `for i in $(find %{buildroot}%{_prefix}/inc/ -name '*.gxx'); do chmod -x $i; done` | |
137 | ||
138 | chmod -x %{buildroot}%{_prefix}/wok/lib/config.h | |
139 | chmod -x %{buildroot}%{_libdir}/*.la | |
140 | chmod -x %{buildroot}%{_libdir}/opencas/*.la | |
141 | chmod -x %{buildroot}%{_prefix}/src/UnitsAPI/UnitsAPI.cxx | |
142 | chmod -x %{buildroot}%{_prefix}/src/DrawResources/Filtre.c | |
143 | chmod -x %{buildroot}%{_prefix}/src/DrawResources/TestDraw.cxx | |
144 | chmod -x %{buildroot}%{_prefix}/src/DrawResources/DIFF.c | |
145 | ||
146 | cd .. | |
147 | mv data %{buildroot}%{_prefix}/ | |
148 | mv doc %{buildroot}%{_prefix}/ | |
149 | mv samples %{buildroot}%{_prefix}/ | |
150 | find %{buildroot}%{_prefix}/data -type f -print0 |xargs -0 chmod a-x | |
151 | find %{buildroot}%{_prefix}/doc -type f -print0 |xargs -0 chmod a-x | |
152 | find %{buildroot}%{_prefix}/samples -type f -print0 |xargs -0 chmod a-x | |
153 | ||
154 | %ifarch x86_64 | |
155 | %__ln_s %{_libdir} %{buildroot}/%{_prefix}/Linux/lib | |
156 | %__ln_s %{_libdir} %{buildroot}/%{_prefix}/lin/lib | |
157 | %endif | |
158 | ||
159 | # add synlinks for compatibility resons | |
160 | %__mkdir -p %{buildroot}/usr/share/opencascade/ | |
161 | %__mkdir -p %{buildroot}/usr/include/ | |
162 | %__mkdir -p %{buildroot}/usr/share/doc/packages/ | |
163 | %__mkdir -p %{buildroot}/usr/%{_lib} | |
164 | ||
165 | %__ln_s %{_prefix} %{buildroot}/usr/share/opencascade/%{version} | |
166 | %__ln_s %{_prefix}/inc %{buildroot}/usr/include/opencascade | |
167 | %__ln_s %{_prefix}/doc %{buildroot}/usr/share/doc/packages/opencascade | |
168 | `for i in $(ls %{buildroot}/%{_libdir}); do %__ln_s %{_libdir}/$i %{buildroot}/usr/%{_lib}/$i; done` | |
169 | ||
170 | %__mkdir -p %buildroot/etc/ld.so.conf.d/ | |
171 | %__cp %SOURCE1 %buildroot/etc/ld.so.conf.d/ | |
172 | ||
173 | %fdupes -s %{buildroot} | |
174 | ||
175 | ||
176 | %post -p /sbin/ldconfig | |
177 | ||
178 | %postun -p /sbin/ldconfig | |
179 | ||
180 | %clean | |
181 | rm -rf %buildroot | |
182 | ||
183 | %files | |
184 | %defattr(-,root,root) | |
185 | %dir %{_prefix} | |
186 | %dir %{_bindir} | |
187 | %dir %{_prefix}/lin | |
188 | %dir %{_prefix}/Linux | |
189 | %dir %{_prefix}/wok | |
190 | %dir %{_prefix}/wok/lib/ | |
191 | %dir %{_prefix}/wok/site/ | |
192 | %dir %{_prefix}/data | |
193 | %dir %{_prefix}/doc | |
194 | %dir %{_libdir}/ | |
195 | %dir %{_libdir}/opencas/ | |
196 | %dir /usr/share/opencascade/ | |
197 | %{_bindir}/DRAWEXE | |
198 | %{_bindir}/wokprocess | |
199 | %{_bindir}/woksh | |
200 | %{_prefix}/lin/bin | |
201 | %{_prefix}/lin/lib | |
202 | %{_prefix}/Linux/bin | |
203 | %{_prefix}/Linux/lib | |
204 | %{_prefix}/data/* | |
205 | %{_prefix}/doc/* | |
206 | %{_prefix}/wok/lib/* | |
207 | %{_prefix}/wok/site/* | |
208 | %{_prefix}/config.h | |
209 | %{_prefix}/env_DRAW.sh | |
210 | %{_libdir}/*.so | |
211 | %{_libdir}/opencas/*.so | |
212 | /usr/%_lib/* | |
213 | /usr/share/opencascade/%{version} | |
214 | /usr/share/doc/packages/opencascade | |
215 | %config /etc/ld.so.conf.d/%name.conf | |
216 | %dir %{_prefix}/src/UnitsAPI | |
217 | %dir %{_prefix}/src | |
218 | %{_prefix}/src/UnitsAPI/*.dat | |
219 | ||
220 | %files devel | |
221 | %defattr(-,root,root) | |
222 | %dir /usr/include/opencascade/ | |
223 | %{_libdir}/*.la | |
224 | %{_libdir}/opencas/*.la | |
225 | %dir %{_prefix}/src/ | |
226 | %{_prefix}/src/* | |
227 | %dir %{_prefix}/inc/ | |
228 | %{_prefix}/inc/* | |
229 | %dir %{_prefix}/samples | |
230 | %{_prefix}/samples/* | |
231 | %exclude %{_prefix}/src/UnitsAPI/*.dat |