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