2 # spec file for package OpenCASCADE
4 # All modifications and additions to the file contributed by third parties
5 # remain the property of their copyright owners, unless otherwise agreed
6 # upon. The license for this file, and modifications and additions to the
7 # file, is the same license as for the pristine package itself (unless the
8 # license for the pristine package is not an Open Source License, in which
9 # case the license is the MIT License). An "Open Source License" is a
10 # license that conforms to the Open Source Definition (Version 1.9)
11 # published by the Open Source Initiative.
15 %define _prefix /opt/OpenCASCADE
18 Summary: OpenCASCADE CAE platform
19 Url: http://www.opencascade.org/
20 Group: Productivity/Other
23 License: LGPL-like, see http://www.opencascade.org/occ/license/
24 Packager: Andrea Florio <andrea@opensuse.org>
25 Source0: %{name}%{version}.tar.bz2
27 Source2: OpenCASCADE-rpmlintrc
28 Patch0: OpenCASCADE6.3.0-obs-check.patch
29 Patch1: OpenCASCADE6.3.0-strcmp.patch
30 Patch2: OpenCASCADE6.3.0-occ6.3.0.patch
31 Patch3: OpenCASCADE6.3.0-casroot.patch
32 Patch4: OpenCASCADE6.3.0-lib-release.patch
33 Patch5: OpenCASCADE6.3.0-tkernel-ld.patch
34 Patch6: OpenCASCADE6.3.0-mft-disable-mmap.patch
35 Patch7: OpenCASCADE6.3.0-no-bitmaps-icon.patch
36 Patch8: OpenCASCADE6.3.0-DESTDIR.patch
37 Patch9: OpenCASCADE6.3.0-maint-mode.patch
38 Patch10: OpenCASCADE6.3.0-dep-libs.patch
39 Patch11: OpenCASCADE6.3.0-move-vrml-vis.patch
40 Patch12: OpenCASCADE6.3.0-make-wok-libs-private.patch
41 Patch13: OpenCASCADE6.3.0-make-draw-libs-private.patch
42 Patch14: OpenCASCADE6.3.0-wok-install.patch
43 Patch15: OpenCASCADE6.3.0-udlist.patch
44 Patch16: OpenCASCADE6.3.0-WOKUnix_FDescr.patch
46 BuildRequires: Mesa-devel autoconf automake bison gcc-c++ xorg-x11-devel
47 BuildRequires: flex libtool tcl-devel tk-devel xorg-x11-libXmu-devel fdupes
51 BuildRequires: compat-32bit
53 %if %suse_version >= 1100
54 BuildRequires: java-1_5_0-gcj-compat-devel
56 BuildRequires: java-1_4_2-gcj-compat-devel
59 BuildRoot: %{_tmppath}/%{name}-%{version}-build
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.
69 Group: Development/Libraries/C and C++
70 Summary: Devel package for %{name}
71 Requires: %{name} = %{version}
74 OpenCASCADE is a suite for 3D surface and solid modeling, visualization, data
75 exchange and rapid application development. It is an excellent platform for
76 development of numerical simulation software including CAD/CAM/CAE, AEC and
77 GIS, as well as PDM applications.
80 %setup -q -n %{name}%{version}
81 # all patches must applied in that order or some of them could fail
102 bison -d -p ExprIntrp -o ExprIntrp.tab.c ExprIntrp.yacc
103 flex -L -8 -Cf -Cr -P ExprIntrp -o lex.ExprIntrp.c ExprIntrp.lex
104 mv ExprIntrp.tab.h ../../inc/
105 cp ExprIntrp.tab.c lex.ExprIntrp.c ../../drv/ExprIntrp/
108 export CFLAGS="$RPM_OPT_FLAGS -D_OCC64 -fno-strict-aliasing"
109 export CXXFLAGS="$RPM_OPT_FLAGS -D_OCC64 -fno-strict-aliasing"
111 export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
112 export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
115 LDFLAGS=-lpthread %configure \
116 --with-gl-include=/usr/include \
117 --with-gl-library=/usr/%{_lib} \
118 --with-xmu-include=/usr/include/X11 \
119 --with-xmu-library=/usr/%{_lib} \
120 --with-tcl=/usr/%{_lib} \
121 --with-tk=/usr/%{_lib} \
124 --enable-production \
129 %__make %{?jobs:-j%{jobs}}
135 `for i in $(find %{buildroot}%{_prefix}/inc/ -name '*.h'); do chmod -x $i; done`
136 `for i in $(find %{buildroot}%{_prefix}/inc/ -name '*.hxx'); do chmod -x $i; done`
137 `for i in $(find %{buildroot}%{_prefix}/inc/ -name '*.lxx'); do chmod -x $i; done`
138 `for i in $(find %{buildroot}%{_prefix}/inc/ -name '*.gxx'); do chmod -x $i; done`
140 chmod -x %{buildroot}%{_prefix}/wok/lib/config.h
141 chmod -x %{buildroot}%{_libdir}/*.la
142 chmod -x %{buildroot}%{_libdir}/opencas/*.la
143 chmod -x %{buildroot}%{_prefix}/src/UnitsAPI/UnitsAPI.cxx
144 chmod -x %{buildroot}%{_prefix}/src/DrawResources/Filtre.c
145 chmod -x %{buildroot}%{_prefix}/src/DrawResources/TestDraw.cxx
146 chmod -x %{buildroot}%{_prefix}/src/DrawResources/DIFF.c
149 mv data %{buildroot}%{_prefix}/
150 mv doc %{buildroot}%{_prefix}/
151 mv samples %{buildroot}%{_prefix}/
152 find %{buildroot}%{_prefix}/data -type f -print0 |xargs -0 chmod a-x
153 find %{buildroot}%{_prefix}/doc -type f -print0 |xargs -0 chmod a-x
154 find %{buildroot}%{_prefix}/samples -type f -print0 |xargs -0 chmod a-x
157 %__ln_s %{_libdir} %{buildroot}/%{_prefix}/Linux/lib
158 %__ln_s %{_libdir} %{buildroot}/%{_prefix}/lin/lib
161 # add synlinks for compatibility resons
162 %__mkdir -p %{buildroot}/usr/share/opencascade/
163 %__mkdir -p %{buildroot}/usr/include/
164 %__mkdir -p %{buildroot}/usr/share/doc/packages/
165 %__mkdir -p %{buildroot}/usr/%{_lib}
167 %__ln_s %{_prefix} %{buildroot}/usr/share/opencascade/%{version}
168 %__ln_s %{_prefix}/inc %{buildroot}/usr/include/opencascade
169 %__ln_s %{_prefix}/doc %{buildroot}/usr/share/doc/packages/opencascade
170 `for i in $(ls %{buildroot}/%{_libdir}); do %__ln_s %{_libdir}/$i %{buildroot}/usr/%{_lib}/$i; done`
172 %__mkdir -p %buildroot/etc/ld.so.conf.d/
173 %__cp %SOURCE1 %buildroot/etc/ld.so.conf.d/
175 %fdupes -s %{buildroot}
178 %post -p /sbin/ldconfig
180 %postun -p /sbin/ldconfig
186 %defattr(-,root,root)
190 %dir %{_prefix}/Linux
192 %dir %{_prefix}/wok/lib/
193 %dir %{_prefix}/wok/site/
197 %dir %{_libdir}/opencas/
198 %dir /usr/share/opencascade/
200 %{_bindir}/wokprocess
209 %{_prefix}/wok/site/*
211 %{_prefix}/env_DRAW.sh
213 %{_libdir}/opencas/*.so
215 /usr/share/opencascade/%{version}
216 /usr/share/doc/packages/opencascade
217 %config /etc/ld.so.conf.d/%name.conf
218 %dir %{_prefix}/src/UnitsAPI
220 %{_prefix}/src/UnitsAPI/*.dat
223 %defattr(-,root,root)
224 %dir /usr/include/opencascade/
226 %{_libdir}/opencas/*.la
231 %dir %{_prefix}/samples
233 %exclude %{_prefix}/src/UnitsAPI/*.dat
236 * Fri Dec 4 2009 andrea@opensuse.org
238 * Sat May 2 2009 andrea@opensuse.org
239 - added some symlink to provide compatibility with soma packages
240 * Tue Feb 10 2009 andrea@opensuse.org
241 - moved *.dat to main package, not sources and some packages need them
242 * Wed Oct 29 2008 lars@linux-schulserver.de
243 - ignore post-build-checks until /opt is allowed again
244 * Sat Sep 27 2008 Andrea Florio <andrea@opensuse.org> 6.3.0