2016-06-26 14:31:27 +00:00
|
|
|
#
|
|
|
|
# spec file for package FreeCAD
|
|
|
|
#
|
2018-01-08 07:39:57 +00:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2016-06-26 14:31:27 +00:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
2017-09-10 08:43:40 +00:00
|
|
|
|
2016-06-26 14:31:27 +00:00
|
|
|
%define x_prefix %{_libdir}/%{name}
|
|
|
|
|
|
|
|
Name: FreeCAD
|
2018-04-10 11:51:36 +00:00
|
|
|
Version: 0.17
|
2016-06-26 14:31:27 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: General Purpose 3D CAD Modeler
|
2018-03-05 12:17:57 +00:00
|
|
|
License: LGPL-2.0-or-later AND GPL-2.0-or-later
|
2016-06-26 14:31:27 +00:00
|
|
|
Group: Productivity/Graphics/CAD
|
2017-09-10 08:43:40 +00:00
|
|
|
Url: http://www.freecadweb.org/
|
2018-04-10 11:51:36 +00:00
|
|
|
Source0: %{name}-%version.tar.xz
|
|
|
|
Source1: FreeCAD.sh
|
|
|
|
Source2: FreeCADCmd.sh
|
|
|
|
Source3: FreeCAD_shared_mimeinfo
|
2018-04-27 12:56:06 +00:00
|
|
|
Patch0: branch_update.patch
|
2018-04-11 04:36:31 +00:00
|
|
|
# python3 and generic compile fixes
|
2018-04-10 11:51:36 +00:00
|
|
|
Patch1: fix-build.diff
|
2018-04-11 04:36:31 +00:00
|
|
|
# support for openmpi2 suse package
|
2018-04-10 11:51:36 +00:00
|
|
|
Patch2: 0001-find-openmpi2-include-files.patch
|
2018-04-17 06:46:44 +00:00
|
|
|
# runtime fix, submitted upstream
|
|
|
|
Patch3: fix-draft-module-with-python3.patch
|
2018-05-23 08:29:11 +00:00
|
|
|
# PATCH-FIX-UPSTREAM -- fix-build-with-Qt5_11.diff
|
|
|
|
Patch4: fix-build-with-Qt5_11.diff
|
2016-06-26 14:31:27 +00:00
|
|
|
BuildRequires: Coin-devel
|
2018-04-10 11:51:36 +00:00
|
|
|
#BuildRequires: SoQt-devel
|
2018-05-08 06:37:23 +00:00
|
|
|
#BuildRequires: libmed-devel # needed for FEM module, but requires older hdf5 lib
|
2018-04-10 11:51:36 +00:00
|
|
|
# we use upstream OpenCASCADE instead of oce atm
|
|
|
|
BuildRequires: occt-devel
|
|
|
|
BuildRequires: vtk-devel
|
|
|
|
BuildRequires: vtk-java
|
|
|
|
BuildRequires: vtk-tcl
|
|
|
|
#BuildRequires: smesh-devel
|
|
|
|
|
2017-12-15 07:13:40 +00:00
|
|
|
%if 0%{?suse_version} >= 1330
|
|
|
|
BuildRequires: libboost_filesystem-devel >= 1.55
|
|
|
|
BuildRequires: libboost_graph-devel >= 1.55
|
|
|
|
BuildRequires: libboost_program_options-devel >= 1.55
|
|
|
|
BuildRequires: libboost_python-devel >= 1.55
|
|
|
|
BuildRequires: libboost_regex-devel >= 1.55
|
|
|
|
BuildRequires: libboost_signals-devel >= 1.55
|
|
|
|
BuildRequires: libboost_system-devel >= 1.55
|
|
|
|
BuildRequires: libboost_thread-devel >= 1.55
|
2016-06-26 14:31:27 +00:00
|
|
|
%else
|
|
|
|
BuildRequires: boost-devel >= 1.55
|
|
|
|
%endif
|
2018-04-10 11:51:36 +00:00
|
|
|
|
2016-06-26 14:31:27 +00:00
|
|
|
BuildRequires: cmake
|
2017-11-08 14:25:06 +00:00
|
|
|
BuildRequires: dos2unix
|
2016-06-26 14:31:27 +00:00
|
|
|
BuildRequires: doxygen
|
|
|
|
BuildRequires: f2c
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: freeglut-devel
|
|
|
|
BuildRequires: gcc-fortran
|
2017-11-08 14:25:06 +00:00
|
|
|
BuildRequires: git
|
2017-09-10 08:43:40 +00:00
|
|
|
BuildRequires: libXerces-c-devel
|
2018-04-10 11:51:36 +00:00
|
|
|
BuildRequires: pkg-config
|
|
|
|
|
2018-04-12 06:37:58 +00:00
|
|
|
# reported to break FreeCAD here
|
|
|
|
# https://forum.freecadweb.org/viewtopic.php?t=24610
|
|
|
|
Conflicts: python-pivy
|
|
|
|
|
2018-04-10 11:51:36 +00:00
|
|
|
%if 0%{?suse_version} >= 1330
|
|
|
|
# Qt5 & python3
|
|
|
|
BuildRequires: openmpi2-devel
|
2018-04-16 06:51:39 +00:00
|
|
|
BuildRequires: python3-devel
|
2018-04-10 11:51:36 +00:00
|
|
|
BuildRequires: python3-matplotlib
|
|
|
|
BuildRequires: python3-pyside2-devel
|
|
|
|
BuildRequires: python3-vtk
|
|
|
|
BuildRequires: python3-xml
|
|
|
|
BuildRequires: pkgconfig(Qt5Concurrent)
|
|
|
|
BuildRequires: pkgconfig(Qt5OpenGL)
|
|
|
|
BuildRequires: pkgconfig(Qt5PrintSupport)
|
|
|
|
BuildRequires: pkgconfig(Qt5ScriptTools)
|
|
|
|
BuildRequires: pkgconfig(Qt5Svg)
|
|
|
|
BuildRequires: pkgconfig(Qt5UiTools)
|
|
|
|
BuildRequires: pkgconfig(Qt5WebKit)
|
|
|
|
BuildRequires: pkgconfig(Qt5WebKitWidgets)
|
|
|
|
Requires: python3-pyside2
|
2018-04-12 07:32:58 +00:00
|
|
|
# For Arch & Draft workbench
|
|
|
|
Requires: python3-pivy
|
2018-04-10 11:51:36 +00:00
|
|
|
# core dump if PySide is installed
|
|
|
|
Conflicts: python3-pyside
|
|
|
|
Conflicts: python-pyside
|
|
|
|
%else
|
2017-11-08 14:25:06 +00:00
|
|
|
BuildRequires: libshiboken-devel
|
2016-06-26 14:31:27 +00:00
|
|
|
BuildRequires: python-CXX-devel
|
|
|
|
BuildRequires: python-devel
|
|
|
|
BuildRequires: python-matplotlib
|
2017-09-10 08:43:40 +00:00
|
|
|
BuildRequires: python-pyside-devel
|
|
|
|
BuildRequires: python-pyside-tools
|
2018-04-10 11:51:36 +00:00
|
|
|
BuildRequires: pkgconfig(QtWebKit)
|
|
|
|
%if 0%{?suse_version} > 0
|
|
|
|
# Qt4 & python2
|
|
|
|
BuildRequires: libqt4-devel
|
2017-11-08 14:25:06 +00:00
|
|
|
BuildRequires: python-xml
|
2018-04-10 11:51:36 +00:00
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
%if 0%{?fedora} > 18
|
|
|
|
BuildRequires: eigen3-devel
|
|
|
|
BuildRequires: qt5-qtbase-devel
|
|
|
|
%endif
|
|
|
|
|
|
|
|
BuildRequires: libspnav-devel
|
|
|
|
BuildRequires: opencv-devel
|
2017-11-08 14:25:06 +00:00
|
|
|
BuildRequires: swig
|
2018-04-10 11:51:36 +00:00
|
|
|
%if 0%{?suse_version}
|
|
|
|
BuildRequires: libeigen3-devel
|
|
|
|
BuildRequires: update-desktop-files
|
|
|
|
%endif
|
|
|
|
BuildRequires: dos2unix
|
|
|
|
BuildRequires: make
|
2017-09-10 08:43:40 +00:00
|
|
|
BuildRequires: unzip
|
2017-11-08 14:25:06 +00:00
|
|
|
BuildRequires: update-desktop-files
|
2017-09-10 08:43:40 +00:00
|
|
|
BuildRequires: zlib-devel
|
2016-06-26 14:31:27 +00:00
|
|
|
Requires(post): shared-mime-info
|
|
|
|
Requires(postun): shared-mime-info
|
2018-04-10 11:51:36 +00:00
|
|
|
|
|
|
|
Recommends: ccx
|
2016-06-26 14:31:27 +00:00
|
|
|
|
|
|
|
%description
|
2018-03-05 12:17:57 +00:00
|
|
|
FreeCAD is a parametric 3D modeler made primarily to design real-life objects of any size. Parametric modeling allows you to easily modify your design by going back into your model history and changing its parameters. FreeCAD is open-source and highly customizable, scriptable and extensible.
|
2016-06-26 14:31:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development Files for %{name}
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package contains the files needed for development with FreeCAD.
|
|
|
|
|
|
|
|
%prep
|
2018-05-23 08:29:11 +00:00
|
|
|
%autosetup -p1
|
2018-04-10 11:51:36 +00:00
|
|
|
|
|
|
|
# fix env-script-interpreter
|
|
|
|
sed -i '1c#!%{__python2}' \
|
|
|
|
src/Mod/Test/testmakeWireString.py \
|
|
|
|
src/Mod/Test/unittestgui.py
|
2018-01-05 08:06:52 +00:00
|
|
|
|
2016-06-26 14:31:27 +00:00
|
|
|
# Fix "wrong-file-end-of-line-encoding" rpmlint warning
|
|
|
|
sed -i 's/\r$//' ChangeLog.txt
|
|
|
|
|
|
|
|
# Fix "wrong-script-end-of-line-encoding" rpmlint warning
|
|
|
|
sed -i 's/\r$//' src/Mod/PartDesign/Scripts/Spring.py
|
|
|
|
sed -i 's/\r$//' src/Mod/Robot/MovieTool.py
|
|
|
|
|
|
|
|
# Remove 3rd party libs
|
|
|
|
rm src/3rdparty/Pivy -fr
|
|
|
|
rm src/3rdparty/Pivy-0.5 -fr
|
|
|
|
|
|
|
|
%build
|
|
|
|
mkdir build && cd build
|
|
|
|
# cmake macro would set standard libdir
|
2018-04-10 11:51:36 +00:00
|
|
|
# it needs an older specific zipios version -DFREECAD_USE_EXTERNAL_ZIPIOS=TRUE
|
|
|
|
|
|
|
|
# -fpermissive should become $RPM_OPT_FLAGS , but bugs ...
|
|
|
|
printenv
|
2016-06-26 14:31:27 +00:00
|
|
|
cmake \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=%{_libdir}/%{name} \
|
|
|
|
-DCMAKE_INSTALL_DATADIR=%{_datadir}/%{name} \
|
|
|
|
-DCMAKE_INSTALL_DOCDIR=%{_docdir}/%{name} \
|
|
|
|
-DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}/%{name} \
|
|
|
|
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON \
|
2018-04-10 11:51:36 +00:00
|
|
|
-DOCC_INCLUDE_DIR=%{_includedir}/opencascade \
|
2016-06-26 14:31:27 +00:00
|
|
|
-DRESOURCEDIR=%{_datadir}/%{name} \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
2018-04-10 16:52:38 +00:00
|
|
|
-DCMAKE_CXX_FLAGS="-fpermissive -fno-strict-aliasing" \
|
|
|
|
%if 0%{?suse_version} >= 1330
|
|
|
|
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
|
|
|
|
-DSHIBOKEN_INCLUDE_DIR=/usr/include/shiboken2/ \
|
|
|
|
-DPYSIDE_INCLUDE_DIR=/usr/include/PySide2/ \
|
|
|
|
-DBUILD_QT5=ON \
|
|
|
|
%else
|
|
|
|
-DPYCXX_INCLUDE_DIR:PATH=%{_includedir}/python2.7 \
|
|
|
|
-DPYCXX_SOURCE_DIR:PATH=%{_datadir}/python2.7/CXX \
|
2018-01-05 08:06:52 +00:00
|
|
|
%endif
|
2018-04-10 11:51:36 +00:00
|
|
|
-DFREECAD_USE_EXTERNAL_PIVY:BOOL=TRUE \
|
|
|
|
-DBUILD_MESH_PART:BOOL=ON \
|
|
|
|
-DBUILD_OPENSCAD:BOOL=ON \
|
2018-05-08 06:37:23 +00:00
|
|
|
-DBUILD_FEM:BOOL=OFF \
|
2018-04-10 16:52:38 +00:00
|
|
|
-DBUILD_FEM_NETGEN:BOOL=OFF \
|
2018-04-10 11:51:36 +00:00
|
|
|
-DFREECAD_USE_EXTERNAL_SMESH=OFF \
|
|
|
|
..
|
|
|
|
|
|
|
|
make VERBOSE=1 %{?_smp_mflags} all || make VERBOSE=1 all
|
2016-06-26 14:31:27 +00:00
|
|
|
|
|
|
|
# # Build documentation last, somehow
|
|
|
|
# # this triggers a rebuild
|
|
|
|
# mkdir build_doc
|
|
|
|
# pushd build_doc
|
|
|
|
# cmake \
|
2017-11-08 14:25:06 +00:00
|
|
|
# -DCMAKE_INSTALL_PREFIX=%%{_prefix} \
|
|
|
|
# -DLIB_SUFFIX=%%{_lib} \
|
|
|
|
# -DCMAKE_INSTALL_DATADIR=%%{_datadir}/%%{name} \
|
|
|
|
# -DCMAKE_INSTALL_DOCDIR=%%{_docdir}/%%{name} \
|
|
|
|
# -DCMAKE_INSTALL_INCLUDEDIR=%%{_includedir}/%%{name} \
|
2016-06-26 14:31:27 +00:00
|
|
|
# -DCMAKE_BUILD_TYPE=Release \
|
|
|
|
# -DFREECAD_USE_EXTERNAL_ZIPIOS=TRUE \
|
|
|
|
# -DFREECAD_USE_EXTERNAL_PIVY=TRUE \
|
|
|
|
# ../
|
|
|
|
# # Needs an updated opencascade
|
2017-11-08 14:25:06 +00:00
|
|
|
# #-DOCE_DIR=/opt/OpenCASCADE/%%{_lib}
|
2017-09-10 08:43:40 +00:00
|
|
|
#
|
2016-06-26 14:31:27 +00:00
|
|
|
# nice make VERBOSE=1 DevDoc
|
|
|
|
# popd
|
|
|
|
|
|
|
|
%install
|
|
|
|
pushd build
|
|
|
|
nice make VERBOSE=1 %{?_smp_mflags} install DESTDIR=%{buildroot}
|
|
|
|
popd
|
|
|
|
|
|
|
|
# pushd build_doc
|
2017-11-08 14:25:06 +00:00
|
|
|
# nice make VERBOSE=1 %%{?_smp_mflags} install DESTDIR=%%{buildroot}
|
2016-06-26 14:31:27 +00:00
|
|
|
# popd
|
|
|
|
|
|
|
|
# Fix "non-executable-script" rpmlint warning
|
2017-11-08 14:25:06 +00:00
|
|
|
chmod 755 %{buildroot}%{x_prefix}/Mod/Robot/MovieTool.py \
|
|
|
|
%{buildroot}%{x_prefix}/Mod/Test/testmakeWireString.py \
|
|
|
|
%{buildroot}%{x_prefix}/Mod/Test/unittestgui.py
|
2016-06-26 14:31:27 +00:00
|
|
|
|
|
|
|
# Move desktop icon in the correct location
|
2017-11-08 14:25:06 +00:00
|
|
|
mkdir -p %{buildroot}%{_datadir}/pixmaps
|
|
|
|
mv %{buildroot}%{_datadir}/%{name}/freecad.xpm %{buildroot}%{_datadir}/pixmaps/freecad.xpm
|
2016-06-26 14:31:27 +00:00
|
|
|
|
|
|
|
# Install additional documentation files
|
2018-04-10 11:51:36 +00:00
|
|
|
#install -pm 0644 ChangeLog.txt copying.lib %{buildroot}%{_docdir}/%{name}/
|
2016-06-26 14:31:27 +00:00
|
|
|
|
|
|
|
%suse_update_desktop_file -c %{name} "%{name}" "3D CAD Modeler" %{name} "freecad" Education Engineering
|
|
|
|
|
|
|
|
# Install mime type
|
2018-04-10 11:51:36 +00:00
|
|
|
install -Dpm 0644 %{SOURCE3} %{buildroot}/usr/share/mime/packages/%{name}.xml
|
2016-06-26 14:31:27 +00:00
|
|
|
|
|
|
|
# Remove unneeded files
|
2017-11-08 14:25:06 +00:00
|
|
|
find %{buildroot} -type f -name "*.la" -delete -print
|
2016-06-26 14:31:27 +00:00
|
|
|
|
|
|
|
# Fix rpmlint warning "doc-file-dependency"
|
|
|
|
rm -f html/installdox
|
|
|
|
|
|
|
|
# Install development documentation manually in order to fix rpmlint warning "files-duplicate"
|
|
|
|
mkdir -p %{buildroot}%{_docdir}/%{name}-devel
|
2017-11-08 14:25:06 +00:00
|
|
|
#cp -a html/ %%{buildroot}%%{_docdir}/%%{name}-devel/
|
2016-06-26 14:31:27 +00:00
|
|
|
|
|
|
|
# Correct line endings
|
|
|
|
dos2unix %{buildroot}%{x_prefix}/Mod/PartDesign/Scripts/FilletArc.py
|
|
|
|
dos2unix %{buildroot}%{x_prefix}/Mod/PartDesign/Scripts/Parallelepiped.py
|
|
|
|
dos2unix %{buildroot}%{x_prefix}/Mod/Test/unittestgui.py
|
|
|
|
dos2unix %{buildroot}%{x_prefix}/Mod/Part/MakeBottle.py
|
|
|
|
|
|
|
|
# Link binaries
|
2018-04-10 11:51:36 +00:00
|
|
|
mkdir -p %{buildroot}/usr/bin
|
|
|
|
%if 0%{?suse_version} >= 91330
|
|
|
|
# disabled, hopefully not anymore needed
|
|
|
|
cp %{S:1} %{buildroot}/usr/bin/FreeCAD
|
|
|
|
chmod +x %{buildroot}/usr/bin/FreeCAD
|
|
|
|
cp %{S:2} %{buildroot}/usr/bin/FreeCADCmd
|
|
|
|
chmod +x %{buildroot}/usr/bin/FreeCADCmd
|
|
|
|
%else
|
|
|
|
ln -s -t %{buildroot}/usr/bin %{x_prefix}/bin/FreeCAD
|
|
|
|
ln -s -t %{buildroot}/usr/bin %{x_prefix}/bin/FreeCADCmd
|
|
|
|
%endif
|
2016-06-26 14:31:27 +00:00
|
|
|
|
|
|
|
%fdupes -s %{buildroot}
|
|
|
|
|
|
|
|
%post
|
|
|
|
/sbin/ldconfig
|
2017-11-08 14:25:06 +00:00
|
|
|
%mime_database_post
|
2016-06-26 14:31:27 +00:00
|
|
|
|
|
|
|
%postun
|
|
|
|
/sbin/ldconfig
|
2017-11-08 14:25:06 +00:00
|
|
|
%mime_database_postun
|
2016-06-26 14:31:27 +00:00
|
|
|
|
|
|
|
%files
|
|
|
|
%{_bindir}/FreeCAD*
|
|
|
|
%doc %{_docdir}/%{name}/
|
|
|
|
%{_libdir}/%{name}
|
|
|
|
%{_datadir}/%{name}/
|
|
|
|
%{_datadir}/mime/packages/%{name}.xml
|
|
|
|
%{_datadir}/pixmaps/freecad.xpm
|
|
|
|
%{_datadir}/applications/%{name}.desktop
|
|
|
|
|
|
|
|
%changelog
|