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