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.
11 # NOTE: there are some not PLD-relevant patches available:
12 # - kFreeBSD/Hurd: http://git.debian.org/?p=debian-science/packages/opencascade.git;a=blob;f=debian/patches/fix-osd_path.patch
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
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
18 # - consider arch-independent includes: http://git.debian.org/?p=debian-science/packages/opencascade.git;a=blob;f=debian/patches/OCC64.patch
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
25 Summary: OpenCASCADE CAE platform
27 # The 6.3.1 is a maintenance release, only available for OCC customers
30 License: LGPL-like, see http://www.opencascade.org/occ/license/
31 Group: Applications/Engineering
32 Source0: http://files.opencascade.com/OCC_6.3_release/%{name}_src.tgz
33 # Source0-md5: 52778127974cb3141c2827f9d40d1f11
34 Patch0: %{name}6.3.0-obs-check.patch
35 Patch1: %{name}6.3.0-strcmp.patch
36 Patch2: %{name}6.3.0-occ6.3.0.patch
37 Patch3: %{name}6.3.0-casroot.patch
38 Patch4: wokstep_extract.patch
39 Patch5: %{name}6.3.0-tkernel-ld.patch
40 Patch6: %{name}6.3.0-mft-disable-mmap.patch
41 Patch7: %{name}6.3.0-no-bitmaps-icon.patch
42 Patch8: %{name}6.3.0-DESTDIR.patch
43 Patch9: %{name}6.3.0-maint-mode.patch
44 Patch10: %{name}6.3.0-dep-libs.patch
45 Patch11: %{name}6.3.0-move-vrml-vis.patch
46 Patch12: %{name}6.3.0-make-wok-libs-private.patch
47 Patch13: %{name}6.3.0-make-draw-libs-private.patch
48 Patch14: %{name}6.3.0-wok-install.patch
49 Patch15: %{name}6.3.0-udlist.patch
50 Patch16: %{name}6.3.0-WOKUnix_FDescr.patch
51 Patch17: fix-tklcaf.patch
52 Patch18: %{name}-build.patch
53 URL: http://www.opencascade.org/
54 BuildRequires: autoconf
55 BuildRequires: automake
61 BuildRequires: libstdc++-devel
62 BuildRequires: libtool
63 BuildRequires: Mesa-libGLU-devel
64 BuildRequires: tk-devel
65 BuildRequires: xorg-lib-libX11-devel
66 BuildRequires: xorg-lib-libXmu-devel
67 BuildRequires: xorg-proto-xproto-devel
68 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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.
77 Summary: OpenCASCADE shared libraries
81 OpenCASCADE shared libraries.
84 Summary: OpenCASCADE development files
85 Group: Development/Libraries
86 Requires: %{name}-libs = %{version}-%{release}
89 OpenCASCADE development files.
92 Summary: OpenCASCADE documentation
94 %if "%{_rpmversion}" >= "5"
99 OpenCASCADE help and html documentation.
102 Summary: OpenCASCADE samples
104 %if "%{_rpmversion}" >= "5"
112 %setup -q -n %{name}%{version}
133 bison -d -p ExprIntrp -o ExprIntrp.tab.c ExprIntrp.yacc
134 flex -L -8 -Cf -Cr -P ExprIntrp -o lex.ExprIntrp.c ExprIntrp.lex
135 mv ExprIntrp.tab.h ../../inc/
136 cp ExprIntrp.tab.c lex.ExprIntrp.c ../../drv/ExprIntrp/
147 export CFLAGS="%{rpmcflags} -D_OCC64 -fno-strict-aliasing -DUSE_INTERP_RESULT"
148 export CXXFLAGS="%{rpmcflags} -D_OCC64 -fno-strict-aliasing -DUSE_INTERP_RESULT"
150 export CFLAGS="%{rpmcflags} -fno-strict-aliasing -DUSE_INTERP_RESULT"
151 export CXXFLAGS="%{rpmcflags} -fno-strict-aliasing -DUSE_INTERP_RESULT"
153 LDFLAGS=-lpthread %configure \
154 %{?debug:--disable-production --enable-debug} \
155 %{!?debug:--enable-production --disable-debug} \
156 --with-java-include="%{java_home}"/include
161 rm -rf $RPM_BUILD_ROOT
162 install -d $RPM_BUILD_ROOT{%{_datadir}/%{name},%{_includedir}}
166 DESTDIR=$RPM_BUILD_ROOT
169 cp -a data $RPM_BUILD_ROOT%{_datadir}/%{name}
170 mv $RPM_BUILD_ROOT{%{_prefix}/{src,wok,config.h,env_DRAW.sh},%{_datadir}/%{name}}
171 mv $RPM_BUILD_ROOT{%{_prefix}/inc,%{_includedir}/%{name}}
172 rm -r $RPM_BUILD_ROOT%{_prefix}/{Linux,lin}
174 mkdir -p $RPM_BUILD_ROOT/usr/src
175 for i in doc samples; do
177 [ -d $i ] && mv $i $i-i/%{name}-%{version} || :
179 ln -s %{_builddir}/%{name}%{version}/doc-i $RPM_BUILD_ROOT%{_defaultdocdir}
180 ln -s %{_builddir}/%{name}%{version}/samples-i $RPM_BUILD_ROOT%{_examplesdir}
182 %{__rm} $RPM_BUILD_ROOT%{_libdir}{/opencas,}/*.la
184 %post libs -p /sbin/ldconfig
185 %postun libs -p /sbin/ldconfig
188 rm -rf $RPM_BUILD_ROOT
191 %defattr(644,root,root,755)
192 %attr(755,root,root) %{_bindir}/DRAWEXE
193 %attr(755,root,root) %{_bindir}/wok*
194 %dir %{_datadir}/%{name}
195 %{_datadir}/%{name}/config.h
196 %{_datadir}/%{name}/data
197 %attr(755,root,root) %{_datadir}/%{name}/env_DRAW.sh
198 %dir %{_datadir}/%{name}/src
199 %dir %{_datadir}/%{name}/src/UnitsAPI
200 %{_datadir}/%{name}/src/UnitsAPI/*.dat
201 %{_datadir}/%{name}/wok
202 %attr(755,root,root) %{_libdir}/opencas/*.so.*.*.*
203 %attr(755,root,root) %ghost %{_libdir}/opencas/*.so.0
206 %defattr(644,root,root,755)
207 %doc LICENSE ros/README.txt
208 %attr(755,root,root) %{_libdir}/*.so.*.*.*
209 %attr(755,root,root) %ghost %{_libdir}/*.so.0
210 %dir %{_libdir}/opencas
213 %defattr(644,root,root,755)
214 %{_includedir}/%{name}
215 %attr(755,root,root) %{_libdir}/opencas/*.so
216 %attr(755,root,root) %{_libdir}/*.so
217 %{_datadir}/%{name}/src/*
218 %exclude %{_datadir}/%{name}/src/UnitsAPI/*.dat
221 %defattr(644,root,root,755)
222 %{_docdir}/%{name}-%{version}
225 %defattr(644,root,root,755)
226 %{_examplesdir}/%{name}-%{version}