File OCE.spec of Package OCE
#
# spec file for package OCE
#
# Copyright (c) 2012 Arun Persaud <arun@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define version_ 0.17
Name: OCE
Version: 0.17.2
Release: 1
Summary: Opencascade Community Edition
Group: Productivity/Other
License: GPL-2.0+
URL: https://github.com/tpaviot/oce
Source: oce_0.17.2.orig.tar.gz
Patch0: dlr-feature-coons_c2.patch
Patch1: fix-tiglviewer-selection.patch
Patch2: fix-geomapi_extremacurvecurve.patch
Patch3: fix_private_linking.patch
Patch4: fix-fonts.patch
Patch5: xlocale.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: cmake
BuildRequires: gcc-c++
%if 0%{?suse_version}
BuildRequires: xorg-x11-devel Mesa-devel freetype2-devel freeglut-devel
%endif
%if 0%{?fedora}
BuildRequires: libX11-devel mesa-libGL-devel mesa-libGLU-devel libXmu-devel freetype-devel
%endif
%if 0%{?rhel_version} || 0%{?centos_version}
BuildRequires: libX11-devel Mesa-devel mesa-libGLU-devel libXmu-devel freetype-devel
%endif
%description
This project aims at gathering patches/changes/improvements from
the OCC community over the latest release (currently OCCT 6.7.0).
This package supplies the version of OCE that is needed to build pythonocc.
%package devel
Summary: OCE development files
Group: Development/Libraries/C and C++
Requires: OCE = %{version}
%description devel
This package contains necessary header files for OCE development.
%prep
%setup -q -n oce-OCE-%{version}
%patch0 -p0
%patch1 -p0
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%build
%cmake -DOCE_INSTALL_PREFIX:PATH=%{_prefix} -DOCE_INSTALL_LIB_DIR=%{_libdir} -DOCE_INSTALL_CMAKE_DATA_DIR=%{_libdir}/oce-%{version_} \
-DOCE_MULTITHREAD_LIBRARY:STRING=OPENMP -DOCE_ENABLE_DEB_FLAG=OFF -DCMAKE_SKIP_RPATH:BOOL=ON
make %{?_smp_mflags}
%install
%cmake_install
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_libdir}/libTK*so.*
%{_libdir}/libFWOSP*so.*
%{_libdir}/libPTKernel*so.*
%files devel
%defattr(-,root,root)
%{_includedir}/oce
%{_libdir}/oce-%{version_}
%{_datadir}/oce-%{version_}
%{_libdir}/libTK*so
%{_libdir}/libFWOSP*so
%{_libdir}/libPTKernel*so
%changelog