]>
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 | ||
0da61c06 TP |
11 | # TODO: separate libs-x (80% of libraries) |
12 | ||
211fd830 | 13 | Summary: OpenCASCADE CAE platform |
9d815b70 | 14 | Name: OpenCASCADE |
211fd830 TP |
15 | # The 6.3.1 is a maintenance release, only available for OCC customers |
16 | Version: 6.3.0 | |
ab499437 | 17 | Release: 40.3 |
211fd830 | 18 | License: LGPL-like, see http://www.opencascade.org/occ/license/ |
b22968e0 | 19 | Group: Applications/Engineering |
211fd830 TP |
20 | Source0: http://files.opencascade.com/OCC_6.3_release/%{name}_src.tgz |
21 | # Source0-md5: 52778127974cb3141c2827f9d40d1f11 | |
9d815b70 TP |
22 | Patch0: %{name}6.3.0-obs-check.patch |
23 | Patch1: %{name}6.3.0-strcmp.patch | |
ab499437 | 24 | Patch2: OpenCASCADE6.3.0-occ6.3.0.patch |
49bdbc8a | 25 | Patch3: %{name}6.3.0-casroot.patch |
ab499437 TP |
26 | Patch5: OpenCASCADE6.3.0-tkernel-ld.patch |
27 | Patch6: OpenCASCADE6.3.0-mft-disable-mmap.patch | |
28 | Patch7: OpenCASCADE6.3.0-no-bitmaps-icon.patch | |
61b2b43f | 29 | Patch8: %{name}6.3.0-DESTDIR.patch |
ab499437 TP |
30 | Patch9: OpenCASCADE6.3.0-maint-mode.patch |
31 | Patch10: OpenCASCADE6.3.0-dep-libs.patch | |
32 | Patch11: OpenCASCADE6.3.0-move-vrml-vis.patch | |
0da61c06 TP |
33 | Patch12: %{name}6.3.0-make-wok-libs-private.patch |
34 | Patch13: %{name}6.3.0-make-draw-libs-private.patch | |
ab499437 TP |
35 | Patch14: OpenCASCADE6.3.0-wok-install.patch |
36 | Patch15: OpenCASCADE6.3.0-udlist.patch | |
37 | Patch16: OpenCASCADE6.3.0-WOKUnix_FDescr.patch | |
211fd830 | 38 | URL: http://www.opencascade.org/ |
61b2b43f TP |
39 | BuildRequires: autoconf |
40 | BuildRequires: automake | |
b22968e0 TP |
41 | BuildRequires: bison |
42 | BuildRequires: flex | |
869e1a31 | 43 | BuildRequires: java-sun-jdk-base |
61b2b43f TP |
44 | BuildRequires: libstdc++-devel |
45 | BuildRequires: libtool | |
46 | BuildRequires: Mesa-libGLU-devel | |
869e1a31 | 47 | BuildRequires: tk-devel |
61b2b43f TP |
48 | BuildRequires: xorg-lib-libX11-devel |
49 | BuildRequires: xorg-lib-libXmu-devel | |
50 | BuildRequires: xorg-proto-xproto-devel | |
9d815b70 | 51 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
ab499437 TP |
52 | |
53 | %description | |
54 | OpenCASCADE is a suite for 3D surface and solid modeling, visualization, data | |
55 | exchange and rapid application development. It is an excellent platform for | |
56 | development of numerical simulation software including CAD/CAM/CAE, AEC and | |
57 | GIS, as well as PDM applications. | |
58 | ||
b22968e0 TP |
59 | %package libs |
60 | Summary: OpenCASCADE shared libraries | |
61 | Group: Libraries | |
62 | ||
63 | %description libs | |
64 | OpenCASCADE shared libraries. | |
65 | ||
ab499437 | 66 | %package devel |
b22968e0 TP |
67 | Summary: OpenCASCADE development files |
68 | Group: Development/Libraries | |
69 | Requires: %{name}-libs = %{version}-%{release} | |
ab499437 TP |
70 | |
71 | %description devel | |
b22968e0 TP |
72 | OpenCASCADE development files. |
73 | ||
74 | %package doc | |
75 | Summary: OpenCASCADE documentation | |
76 | Group: Documentation | |
77 | ||
78 | %description doc | |
79 | OpenCASCADE help and html documentation. | |
80 | ||
fce55032 TP |
81 | %package samples |
82 | Summary: OpenCASCADE samples | |
83 | Group: Documentation | |
84 | ||
85 | %description samples | |
86 | OpenCASCADE samples. | |
87 | ||
ab499437 TP |
88 | %prep |
89 | %setup -q -n %{name}%{version} | |
ab499437 TP |
90 | %patch0 -p1 |
91 | %patch1 -p1 | |
92 | %patch2 -p1 | |
93 | %patch3 -p1 | |
ab499437 TP |
94 | %patch5 -p1 |
95 | %patch6 -p1 | |
96 | %patch7 -p1 | |
97 | %patch8 -p1 | |
98 | %patch9 -p1 | |
99 | %patch10 -p1 | |
100 | %patch11 -p1 | |
0da61c06 TP |
101 | %patch12 -p1 |
102 | %patch13 -p1 | |
ab499437 TP |
103 | %patch14 -p1 |
104 | %patch15 -p1 | |
105 | %patch16 -p1 | |
b22968e0 TP |
106 | cd ros/src/ExprIntrp |
107 | bison -d -p ExprIntrp -o ExprIntrp.tab.c ExprIntrp.yacc | |
108 | flex -L -8 -Cf -Cr -P ExprIntrp -o lex.ExprIntrp.c ExprIntrp.lex | |
109 | mv ExprIntrp.tab.h ../../inc/ | |
110 | cp ExprIntrp.tab.c lex.ExprIntrp.c ../../drv/ExprIntrp/ | |
ab499437 TP |
111 | |
112 | %build | |
9d815b70 TP |
113 | cd ros |
114 | %{__libtoolize} | |
5e4cb3c9 | 115 | %{__aclocal} |
9d815b70 TP |
116 | %{__autoconf} |
117 | %{__autoheader} | |
118 | %{__automake} | |
119 | ||
ab499437 | 120 | %ifarch x86_64 ppc64 |
b22968e0 TP |
121 | export CFLAGS="%{rpmcflags} -D_OCC64 -fno-strict-aliasing" |
122 | export CXXFLAGS="%{rpmcflags} -D_OCC64 -fno-strict-aliasing" | |
ab499437 | 123 | %else |
b22968e0 TP |
124 | export CFLAGS="%{rpmcflags} -fno-strict-aliasing" |
125 | export CXXFLAGS="%{rpmcflags} -fno-strict-aliasing" | |
ab499437 | 126 | %endif |
ab499437 | 127 | LDFLAGS=-lpthread %configure \ |
0ad19400 TP |
128 | %{?debug:--disable-production --enable-debug} \ |
129 | %{!?debug:--enable-production --disable-debug} \ | |
b22968e0 | 130 | --with-java-include="%{java_home}"/include |
ab499437 | 131 | |
cdf0b2d4 | 132 | %{__make} |
ab499437 TP |
133 | |
134 | %install | |
cdf0b2d4 | 135 | rm -rf $RPM_BUILD_ROOT |
b63031f9 | 136 | install -d $RPM_BUILD_ROOT{%{_datadir}/%{name},%{_includedir}} |
61b2b43f | 137 | |
ab499437 | 138 | cd ros |
61b2b43f TP |
139 | %{__make} install \ |
140 | DESTDIR=$RPM_BUILD_ROOT | |
ab499437 | 141 | cd .. |
b22968e0 TP |
142 | |
143 | cp -a data $RPM_BUILD_ROOT%{_datadir}/%{name} | |
24cda61d | 144 | mv $RPM_BUILD_ROOT{%{_prefix}/{src,wok,config.h,env_DRAW.sh},%{_datadir}/%{name}} |
3c55ead9 TP |
145 | mv $RPM_BUILD_ROOT{%{_prefix}/inc,%{_includedir}/%{name}} |
146 | rm -r $RPM_BUILD_ROOT%{_prefix}/{Linux,lin} | |
147 | ||
b63031f9 | 148 | mkdir -p $RPM_BUILD_ROOT/usr/src |
fce55032 TP |
149 | for i in doc samples; do |
150 | mkdir -p $i-i | |
151 | [ -d $i ] && mv $i $i-i/%{name}-%{version} || : | |
152 | done | |
153 | ln -s %{_builddir}/%{name}%{version}/doc-i $RPM_BUILD_ROOT%{_defaultdocdir} | |
154 | ln -s %{_builddir}/%{name}%{version}/samples-i $RPM_BUILD_ROOT%{_examplesdir} | |
155 | ||
0da61c06 TP |
156 | %post libs -p /sbin/ldconfig |
157 | %postun libs -p /sbin/ldconfig | |
ab499437 TP |
158 | |
159 | %clean | |
cdf0b2d4 | 160 | rm -rf $RPM_BUILD_ROOT |
ab499437 TP |
161 | |
162 | %files | |
cdf0b2d4 | 163 | %defattr(644,root,root,755) |
3c55ead9 TP |
164 | %attr(755,root,root) %{_bindir}/DRAWEXE |
165 | %attr(755,root,root) %{_bindir}/wok* | |
b63031f9 | 166 | %dir %{_datadir}/%{name} |
24cda61d | 167 | %{_datadir}/%{name}/config.h |
b63031f9 | 168 | %{_datadir}/%{name}/data |
24cda61d | 169 | %attr(755,root,root) %{_datadir}/%{name}/env_DRAW.sh |
b63031f9 TP |
170 | %dir %{_datadir}/%{name}/src |
171 | %dir %{_datadir}/%{name}/src/UnitsAPI | |
172 | %{_datadir}/%{name}/src/UnitsAPI/*.dat | |
24cda61d | 173 | %{_datadir}/%{name}/wok |
0da61c06 TP |
174 | %dir %{_libdir}/opencas |
175 | %attr(755,root,root) %{_libdir}/opencas/*.so.*.*.* | |
176 | %attr(755,root,root) %ghost %{_libdir}/opencas/*.so.0 | |
3c55ead9 TP |
177 | |
178 | %files libs | |
179 | %defattr(644,root,root,755) | |
0da61c06 | 180 | %doc LICENSE ros/README.txt |
3c55ead9 TP |
181 | %attr(755,root,root) %{_libdir}/*.so.*.*.* |
182 | %attr(755,root,root) %ghost %{_libdir}/*.so.0 | |
183 | ||
ab499437 | 184 | %files devel |
cdf0b2d4 | 185 | %defattr(644,root,root,755) |
3c55ead9 | 186 | %{_includedir}/%{name} |
0da61c06 | 187 | %{_libdir}/opencas/*.la |
ab499437 | 188 | %{_libdir}/*.la |
0da61c06 | 189 | %attr(755,root,root) %{_libdir}/opencas/*.so |
3c55ead9 | 190 | %attr(755,root,root) %{_libdir}/*.so |
b63031f9 TP |
191 | %{_datadir}/%{name}/src/* |
192 | %exclude %{_datadir}/%{name}/src/UnitsAPI/*.dat | |
fce55032 TP |
193 | |
194 | %files doc | |
b63031f9 | 195 | %defattr(644,root,root,755) |
fce55032 TP |
196 | %{_docdir}/%{name}-%{version} |
197 | ||
198 | %files samples | |
b63031f9 | 199 | %defattr(644,root,root,755) |
fce55032 | 200 | %{_examplesdir}/%{name}-%{version} |