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 %define _prefix /opt/OpenCASCADE
14 Summary: OpenCASCADE CAE platform
15 Group: Productivity/Other
16 # The 6.3.1 is a maintenance release, only available for OCC customers
19 License: LGPL-like, see http://www.opencascade.org/occ/license/
20 Packager: Andrea Florio <andrea@opensuse.org>
21 Source0: http://files.opencascade.com/OCC_6.3_release/%{name}_src.tgz
22 # Source0-md5: 52778127974cb3141c2827f9d40d1f11
24 Source2: OpenCASCADE-rpmlintrc
25 Patch0: OpenCASCADE6.3.0-obs-check.patch
26 Patch1: OpenCASCADE6.3.0-strcmp.patch
27 Patch2: OpenCASCADE6.3.0-occ6.3.0.patch
28 Patch3: OpenCASCADE6.3.0-casroot.patch
29 Patch4: OpenCASCADE6.3.0-lib-release.patch
30 Patch5: OpenCASCADE6.3.0-tkernel-ld.patch
31 Patch6: OpenCASCADE6.3.0-mft-disable-mmap.patch
32 Patch7: OpenCASCADE6.3.0-no-bitmaps-icon.patch
33 Patch8: OpenCASCADE6.3.0-DESTDIR.patch
34 Patch9: OpenCASCADE6.3.0-maint-mode.patch
35 Patch10: OpenCASCADE6.3.0-dep-libs.patch
36 Patch11: OpenCASCADE6.3.0-move-vrml-vis.patch
37 Patch12: OpenCASCADE6.3.0-make-wok-libs-private.patch
38 Patch13: OpenCASCADE6.3.0-make-draw-libs-private.patch
39 Patch14: OpenCASCADE6.3.0-wok-install.patch
40 Patch15: OpenCASCADE6.3.0-udlist.patch
41 Patch16: OpenCASCADE6.3.0-WOKUnix_FDescr.patch
42 URL: http://www.opencascade.org/
44 BuildRequires: Mesa-devel autoconf automake bison gcc-c++ xorg-x11-devel
45 BuildRequires: flex libtool tcl-devel tk-devel xorg-x11-libXmu-devel fdupes
49 BuildRequires: compat-32bit
51 %if %suse_version >= 1100
52 BuildRequires: java-1_5_0-gcj-compat-devel
54 BuildRequires: java-1_4_2-gcj-compat-devel
57 BuildRoot: %{_tmppath}/%{name}-%{version}-build
60 OpenCASCADE is a suite for 3D surface and solid modeling, visualization, data
61 exchange and rapid application development. It is an excellent platform for
62 development of numerical simulation software including CAD/CAM/CAE, AEC and
63 GIS, as well as PDM applications.
67 Group: Development/Libraries/C and C++
68 Summary: Devel package for %{name}
69 Requires: %{name} = %{version}
72 OpenCASCADE is a suite for 3D surface and solid modeling, visualization, data
73 exchange and rapid application development. It is an excellent platform for
74 development of numerical simulation software including CAD/CAM/CAE, AEC and
75 GIS, as well as PDM applications.
78 %setup -q -n %{name}%{version}
79 # all patches must applied in that order or some of them could fail
100 bison -d -p ExprIntrp -o ExprIntrp.tab.c ExprIntrp.yacc
101 flex -L -8 -Cf -Cr -P ExprIntrp -o lex.ExprIntrp.c ExprIntrp.lex
102 mv ExprIntrp.tab.h ../../inc/
103 cp ExprIntrp.tab.c lex.ExprIntrp.c ../../drv/ExprIntrp/
106 export CFLAGS="$RPM_OPT_FLAGS -D_OCC64 -fno-strict-aliasing"
107 export CXXFLAGS="$RPM_OPT_FLAGS -D_OCC64 -fno-strict-aliasing"
109 export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
110 export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
113 LDFLAGS=-lpthread %configure \
114 --with-gl-include=/usr/include \
115 --with-gl-library=/usr/%{_lib} \
116 --with-xmu-include=/usr/include/X11 \
117 --with-xmu-library=/usr/%{_lib} \
118 --with-tcl=/usr/%{_lib} \
119 --with-tk=/usr/%{_lib} \
122 --enable-production \
127 %__make %{?jobs:-j%{jobs}}
133 `for i in $(find %{buildroot}%{_prefix}/inc/ -name '*.h'); do chmod -x $i; done`
134 `for i in $(find %{buildroot}%{_prefix}/inc/ -name '*.hxx'); do chmod -x $i; done`
135 `for i in $(find %{buildroot}%{_prefix}/inc/ -name '*.lxx'); do chmod -x $i; done`
136 `for i in $(find %{buildroot}%{_prefix}/inc/ -name '*.gxx'); do chmod -x $i; done`
138 chmod -x %{buildroot}%{_prefix}/wok/lib/config.h
139 chmod -x %{buildroot}%{_libdir}/*.la
140 chmod -x %{buildroot}%{_libdir}/opencas/*.la
141 chmod -x %{buildroot}%{_prefix}/src/UnitsAPI/UnitsAPI.cxx
142 chmod -x %{buildroot}%{_prefix}/src/DrawResources/Filtre.c
143 chmod -x %{buildroot}%{_prefix}/src/DrawResources/TestDraw.cxx
144 chmod -x %{buildroot}%{_prefix}/src/DrawResources/DIFF.c
147 mv data %{buildroot}%{_prefix}/
148 mv doc %{buildroot}%{_prefix}/
149 mv samples %{buildroot}%{_prefix}/
150 find %{buildroot}%{_prefix}/data -type f -print0 |xargs -0 chmod a-x
151 find %{buildroot}%{_prefix}/doc -type f -print0 |xargs -0 chmod a-x
152 find %{buildroot}%{_prefix}/samples -type f -print0 |xargs -0 chmod a-x
155 %__ln_s %{_libdir} %{buildroot}/%{_prefix}/Linux/lib
156 %__ln_s %{_libdir} %{buildroot}/%{_prefix}/lin/lib
159 # add synlinks for compatibility resons
160 %__mkdir -p %{buildroot}/usr/share/opencascade/
161 %__mkdir -p %{buildroot}/usr/include/
162 %__mkdir -p %{buildroot}/usr/share/doc/packages/
163 %__mkdir -p %{buildroot}/usr/%{_lib}
165 %__ln_s %{_prefix} %{buildroot}/usr/share/opencascade/%{version}
166 %__ln_s %{_prefix}/inc %{buildroot}/usr/include/opencascade
167 %__ln_s %{_prefix}/doc %{buildroot}/usr/share/doc/packages/opencascade
168 `for i in $(ls %{buildroot}/%{_libdir}); do %__ln_s %{_libdir}/$i %{buildroot}/usr/%{_lib}/$i; done`
170 %__mkdir -p %buildroot/etc/ld.so.conf.d/
171 %__cp %SOURCE1 %buildroot/etc/ld.so.conf.d/
173 %fdupes -s %{buildroot}
176 %post -p /sbin/ldconfig
178 %postun -p /sbin/ldconfig
184 %defattr(-,root,root)
188 %dir %{_prefix}/Linux
190 %dir %{_prefix}/wok/lib/
191 %dir %{_prefix}/wok/site/
195 %dir %{_libdir}/opencas/
196 %dir /usr/share/opencascade/
198 %{_bindir}/wokprocess
207 %{_prefix}/wok/site/*
209 %{_prefix}/env_DRAW.sh
211 %{_libdir}/opencas/*.so
213 /usr/share/opencascade/%{version}
214 /usr/share/doc/packages/opencascade
215 %config /etc/ld.so.conf.d/%name.conf
216 %dir %{_prefix}/src/UnitsAPI
218 %{_prefix}/src/UnitsAPI/*.dat
221 %defattr(-,root,root)
222 %dir /usr/include/opencascade/
224 %{_libdir}/opencas/*.la
229 %dir %{_prefix}/samples
231 %exclude %{_prefix}/src/UnitsAPI/*.dat