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