[packages/freecad] - more work
arekm
arekm at pld-linux.org
Thu Jun 11 23:33:03 CEST 2015
commit c177ecb1e46e006e588ab939f6b88efe89003d31
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Jun 11 23:32:55 2015 +0200
- more work
freecad-0.14-DraftSnap.patch | 2 -
freecad-0.14-Version_h.patch | 13 ++++
freecad-0.14-smesh.patch | 162 -------------------------------------------
freecad-0.15-zipios.patch | 17 +++++
freecad.spec | 58 +++++++---------
5 files changed, 54 insertions(+), 198 deletions(-)
---
diff --git a/freecad.spec b/freecad.spec
index 7230840..f7288ec 100644
--- a/freecad.spec
+++ b/freecad.spec
@@ -1,9 +1,9 @@
#
# Conditional build:
%bcond_with occ # Compile using OpenCASCADE instead of OCE
-%bcond_with bundled_zipios # use bundled version of zipios++
-%bcond_with bundled_pycxx # use bundled version of pycxx
-%bcond_with bundled_smesh # use bundled version of Salome's Mesh
+%bcond_without system_zipios # use system version of zipios++
+%bcond_without system_pycxx # use system version of pycxx
+%bcond_without system_smesh # use system version of Salome's Mesh
# This revision is 0.15 final.
%define rev 4671
@@ -19,11 +19,10 @@ Source101: %{name}.desktop
Source102: %{name}.1
Source103: %{name}.appdata.xml
Source104: %{name}.sharedmimeinfo
-Patch0: %{name}-3rdParty.patch
-Patch1: %{name}-0.14-Xlib_h.patch
-Patch2: %{name}-0.14-smesh.patch
-Patch3: %{name}-0.14-DraftSnap.patch
-#Patch4: %{name}-0.14-disable_auto_dxf_dl.patch
+Patch0: freecad-3rdParty.patch
+Patch1: freecad-0.14-Xlib_h.patch
+Patch2: freecad-0.15-zipios.patch
+Patch3: freecad-0.14-Version_h.patch
URL: http://freecadweb.org/
# Utilities
BuildRequires: cmake
@@ -56,19 +55,17 @@ BuildRequires: netgen-mesher-devel
#BuildRequires: opencv-devel
BuildRequires: python-devel
BuildRequires: python-matplotlib
-%{!?with_bundled_pycxx:BuildRequires: python-pycxx-devel}
-BuildRequires: python-pyside-devel
+%{?with_system_pycxx:BuildRequires: python-pycxx-devel}
+BuildRequires: python-PySide-devel
+BuildRequires: pyside-tools
BuildRequires: qt-devel
-BuildRequires: qt-webkit-devel
+BuildRequires: QtWebKit-devel
BuildRequires: shiboken
-%{!?with_bundled_smesh:BuildRequires: smesh-devel}
BuildRequires: xerces-c
BuildRequires: xerces-c-devel
-%{!?with_bundled_zipios:BuildRequires: zipios++-devel}
+%{?with_system_zipios:BuildRequires: zipios++-devel}
Requires: %{name}-data = %{version}-%{release}
Requires: glib2 >= 1:2.26.0
-# Obsolete old doc package since it's required for functionality.
-Obsoletes: freecad-doc < 0.13-5
# Needed for plugin support and is not a soname dependency.
Requires: hicolor-icon-theme
Requires: python-collada
@@ -108,9 +105,7 @@ system.
%package data
Summary: Data files for FreeCAD
Requires: %{name} = %{version}-%{release}
-%if "%{_rpmversion}" >= "5"
BuildArch: noarch
-%endif
%description data
Data files for FreeCAD.
@@ -118,16 +113,15 @@ Data files for FreeCAD.
%prep
%setup -q -n %{name}-%{version}.%{rev}
%patch0 -p1
-%if %{without bundled_pycxx}
-rm -r src/CXX
-%endif
%patch1 -p1
%patch2 -p1
%patch3 -p1
-# Patch comes from upstream/master, doesn't apply cleanly to 0.14.
-#patch4 -p1
-%if %{without bundled_zipios}
+%if %{with system_pycxx}
+rm -r src/CXX
+%endif
+
+%if %{with system_zipios}
rm -r src/zipios++
%endif
@@ -137,16 +131,12 @@ dos2unix -k src/Mod/Test/unittestgui.py \
copying.lib \
data/License.txt
-# Removed bundled libraries
+# Removed system libraries
rm -r src/3rdParty
%build
install -d build
cd build
-
-# Deal with cmake projects that tend to link excessively.
-export LDFLAGS="%{rpmcflags} -Wl,--as-needed -Wl,--no-undefined"
-
%cmake \
-DCMAKE_INSTALL_PREFIX=%{_libdir}/%{name} \
-DCMAKE_INSTALL_DATADIR=%{_datadir}/%{name} \
@@ -159,14 +149,14 @@ export LDFLAGS="%{rpmcflags} -Wl,--as-needed -Wl,--no-undefined"
%if %{with occ}
-DUSE_OCC=TRUE \
%endif
-%if %{without bundled_smesh}
+%if %{with system_smesh}
-DFREECAD_USE_EXTERNAL_SMESH=TRUE \
-DSMESH_INCLUDE_DIR=%{_includedir}/smesh \
%endif
-%if %{without bundled_zipios}
+%if %{with system_zipios}
-DFREECAD_USE_EXTERNAL_ZIPIOS=TRUE \
%endif
-%if %{without bundled_pycxx}
+%if %{with system_pycxx}
-DPYCXX_INCLUDE_DIR=$(pkg-config --variable=includedir PyCXX) \
-DPYCXX_SOURCE_DIR=$(pkg-config --variable=srcdir PyCXX) \
%endif
@@ -198,9 +188,9 @@ install -pD src/Gui/Icons/%{name}.svg $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/s
# Install man page
install -pD %{SOURCE102} $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1
-# Symlink manpage to other binary names
-ln -s %{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1/FreeCAD.1
-ln -s %{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1/FreeCADCmd.1
+# groff link manpage to other binary names
+echo %{name}.1 > $RPM_BUILD_ROOT%{_mandir}/man1/FreeCAD.1
+echo %{name}.1 > $RPM_BUILD_ROOT%{_mandir}/man1/FreeCADCmd.1
# Remove obsolete Start_Page.html
rm $RPM_BUILD_ROOT%{_docdir}/%{name}/Start_Page.html
diff --git a/freecad-0.14-DraftSnap.patch b/freecad-0.14-DraftSnap.patch
index b2e8715..e2d881d 100644
--- a/freecad-0.14-DraftSnap.patch
+++ b/freecad-0.14-DraftSnap.patch
@@ -1,5 +1,3 @@
-# http://www.freecadweb.org/tracker/view.php?id=1757
-
From 328bdcf6363f1107447858c2dd939ecae1005f47 Mon Sep 17 00:00:00 2001
From: Yorik van Havre <yorik at uncreated.net>
Date: Thu, 18 Sep 2014 19:39:37 -0300
diff --git a/freecad-0.14-Version_h.patch b/freecad-0.14-Version_h.patch
new file mode 100644
index 0000000..6309690
--- /dev/null
+++ b/freecad-0.14-Version_h.patch
@@ -0,0 +1,13 @@
+diff -Naur freecad-0.14.3702.orig/src/CMakeLists.txt freecad-0.14.3702/src/CMakeLists.txt
+--- freecad-0.14.3702.orig/src/CMakeLists.txt 2015-05-28 11:24:13.393935311 -0500
++++ freecad-0.14.3702/src/CMakeLists.txt 2015-05-28 11:24:03.937354886 -0500
+@@ -1,5 +1,7 @@
+-
+-add_subdirectory(Build)
++# Do not generate a new Version.h if the source is a release tarball.
++if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Build/Version.h)
++ add_subdirectory(Build)
++endif()
+ add_subdirectory(Base)
+ add_subdirectory(App)
+ add_subdirectory(Main)
diff --git a/freecad-0.14-smesh.patch b/freecad-0.14-smesh.patch
deleted file mode 100644
index 1608005..0000000
--- a/freecad-0.14-smesh.patch
+++ /dev/null
@@ -1,162 +0,0 @@
-diff -Naur freecad-0.14.3702.orig/CMakeLists.txt freecad-0.14.3702/CMakeLists.txt
---- freecad-0.14.3702.orig/CMakeLists.txt 2014-07-13 10:33:02.000000000 -0500
-+++ freecad-0.14.3702/CMakeLists.txt 2014-11-30 16:28:11.540834321 -0600
-@@ -117,6 +117,7 @@
- OPTION(FREECAD_MAINTAINERS_BUILD "Build FreeCAD for Maintainers, with Docu and 3rd party libs. On Windows the Installer is build." OFF)
- OPTION(FREECAD_USE_EXTERNAL_ZIPIOS "Use system installed zipios++ instead of the bundled." OFF)
- OPTION(FREECAD_USE_EXTERNAL_PIVY "Use system installed python-pivy instead of the bundled." OFF)
-+OPTION(FREECAD_USE_EXTERNAL_SMESH "Use system installed smesh instead of the bundled." OFF)
- OPTION(FREECAD_BUILD_DEBIAN "Prepare for a build of a Debian package" OFF)
-
- OPTION(FREECAD_BUILD_CAM "Build the FreeCAD CAM module and the needed libs, be aware, unfinished code!" OFF)
-@@ -165,6 +166,7 @@
- if (FREECAD_BUILD_DEBIAN)
- set(FREECAD_USE_EXTERNAL_ZIPIOS ON)
- set(FREECAD_USE_EXTERNAL_PIVY ON)
-+ set(FREECAD_USE_EXTERNAL_SMESH ON)
- endif (FREECAD_BUILD_DEBIAN)
-
- # ==============================================================================
-@@ -348,10 +350,6 @@
- message(SEND_ERROR "Could not find libpack in specified location:" ${FREECAD_LIBPACK_DIR})
- ENDIF(FREECAD_LIBPACK_CHECKFILE6X)
-
--# -------------------------------- PyCXX --------------------------------
--
-- find_package(PyCXX REQUIRED)
--
- # -------------------------------- Swig ----------------------------------
-
- find_package(SWIG)
-@@ -473,24 +471,29 @@
-
- # Salome SMESH sources are under src/3rdParty now
- IF(OCC_FOUND)
-- set(SMESH_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/3rdParty/salomesmesh/inc)
-- set(SMESH_LIBRARIES
-- StdMeshers
-- #MEFISTO2
-- SMESH
-- DriverUNV
-- SMESHDS
-- DriverSTL
-- DriverDAT
-- Driver
-- SMDS
-- )
-- set(SMESH_FOUND TRUE)
-- ENDIF(OCC_FOUND)
-- #find_package(SMESH)
-- #IF(NOT SMESH_FOUND)
-- # MESSAGE("Salome SMESH was not found!")
-- #ENDIF(NOT SMESH_FOUND)
-+ if(NOT FREECAD_USE_EXTERNAL_SMESH)
-+ set(SMESH_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/3rdParty/salomesmesh/inc)
-+ else()
-+ include_directories(${SMESH_INCLUDE_DIR})
-+ set(SMESH_LIBRARIES "")
-+ foreach(SMESH_LIB
-+ StdMeshers
-+ #MEFISTO2
-+ SMESH
-+ DriverUNV
-+ SMESHDS
-+ DriverSTL
-+ DriverDAT
-+ Driver
-+ SMDS
-+ )
-+ find_library(SMESH_${SMESH_LIB} ${SMESH_LIB} REQUIRED)
-+ list(APPEND SMESH_LIBRARIES ${SMESH_${SMESH_LIB}})
-+ endforeach()
-+ message(STATUS "Found SMESH library: ${SMESH_LIBRARIES}")
-+ endif()
-+ set(SMESH_FOUND TRUE)
-+ ENDIF(OCC_FOUND)
-
- # -------------------------------- Netgen --------------------------------
-
-diff -Naur freecad-0.14.3702.orig/src/3rdParty/CMakeLists.txt freecad-0.14.3702/src/3rdParty/CMakeLists.txt
---- freecad-0.14.3702.orig/src/3rdParty/CMakeLists.txt 2014-07-13 10:33:02.000000000 -0500
-+++ freecad-0.14.3702/src/3rdParty/CMakeLists.txt 2014-07-26 21:31:55.617168862 -0500
-@@ -34,8 +34,8 @@
- endif (FREECAD_LIBPACK_CHECKFILE6X)
- endif(FREECAD_BUILD_GUI AND NOT FREECAD_USE_EXTERNAL_PIVY)
-
--# Build SalomeMesh for all Platforms since heavily patched
--if (FREECAD_BUILD_SMESH)
-+if(NOT FREECAD_USE_EXTERNAL_SMESH)
-+ # Build SalomeMesh for all Platforms since heavily patched
- add_subdirectory(salomesmesh)
--endif(FREECAD_BUILD_SMESH)
-+endif(NOT FREECAD_USE_EXTERNAL_SMESH)
-
-diff -Naur freecad-0.14.3702.orig/src/Mod/Fem/App/CMakeLists.txt freecad-0.14.3702/src/Mod/Fem/App/CMakeLists.txt
---- freecad-0.14.3702.orig/src/Mod/Fem/App/CMakeLists.txt 2014-07-13 10:33:02.000000000 -0500
-+++ freecad-0.14.3702/src/Mod/Fem/App/CMakeLists.txt 2014-12-15 14:23:39.548135756 -0600
-@@ -21,7 +21,7 @@
- ${PYTHON_INCLUDE_PATH}
- ${ZLIB_INCLUDE_DIR}
- ${XERCESC_INCLUDE_DIR}
-- ${CMAKE_SOURCE_DIR}/src/3rdParty/salomesmesh/inc
-+ ${SMESH_INCLUDE_DIR}
- )
-
- link_directories(${OCC_LIBRARY_DIR})
-@@ -34,6 +34,8 @@
- StdMeshers
- NETGENPlugin
- SMESH
-+ SMDS
-+ SMESHDS
- )
- else(FREECAD_BUILD_FEM_NETGEN)
- set(Fem_LIBS
-@@ -41,6 +43,8 @@
- FreeCADApp
- StdMeshers
- SMESH
-+ SMDS
-+ SMESHDS
- )
- endif(FREECAD_BUILD_FEM_NETGEN)
-
-diff -Naur freecad-0.14.3702.orig/src/Mod/Fem/Gui/CMakeLists.txt freecad-0.14.3702/src/Mod/Fem/Gui/CMakeLists.txt
---- freecad-0.14.3702.orig/src/Mod/Fem/Gui/CMakeLists.txt 2014-07-13 10:33:02.000000000 -0500
-+++ freecad-0.14.3702/src/Mod/Fem/Gui/CMakeLists.txt 2014-12-15 11:16:24.706617437 -0600
-@@ -20,7 +20,7 @@
- ${SOQT_INCLUDE_DIR}
- ${PYTHON_INCLUDE_PATH}
- ${XERCESC_INCLUDE_DIR}
-- ${CMAKE_SOURCE_DIR}/src/3rdParty/salomesmesh/inc
-+ ${SMESH_INCLUDE_DIR}
- )
-
- link_directories(${OCC_LIBRARY_DIR})
-diff -Naur freecad-0.14.3702.orig/src/Mod/MeshPart/App/CMakeLists.txt freecad-0.14.3702/src/Mod/MeshPart/App/CMakeLists.txt
---- freecad-0.14.3702.orig/src/Mod/MeshPart/App/CMakeLists.txt 2014-07-13 10:33:02.000000000 -0500
-+++ freecad-0.14.3702/src/Mod/MeshPart/App/CMakeLists.txt 2014-12-15 12:55:44.292060698 -0600
-@@ -14,7 +14,6 @@
-
- include_directories(
- ${CMAKE_SOURCE_DIR}/src
-- ${CMAKE_SOURCE_DIR}/src/3rdParty/salomesmesh/inc
- ${Boost_INCLUDE_DIRS}
- ${OCC_INCLUDE_DIR}
- ${ZLIB_INCLUDE_DIR}
-@@ -34,6 +33,7 @@
- StdMeshers
- NETGENPlugin
- SMESH
-+ SMDS
- )
- else(FREECAD_BUILD_FEM_NETGEN)
- set(MeshPart_LIBS
-@@ -41,6 +41,7 @@
- Mesh
- StdMeshers
- SMESH
-+ SMDS
- )
- endif(FREECAD_BUILD_FEM_NETGEN)
-
diff --git a/freecad-0.15-zipios.patch b/freecad-0.15-zipios.patch
new file mode 100644
index 0000000..1cd9b0f
--- /dev/null
+++ b/freecad-0.15-zipios.patch
@@ -0,0 +1,17 @@
+diff -Naur freecad-0.15.4671.orig/src/Base/CMakeLists.txt freecad-0.15.4671/src/Base/CMakeLists.txt
+--- freecad-0.15.4671.orig/src/Base/CMakeLists.txt 2015-04-05 12:25:02.000000000 -0500
++++ freecad-0.15.4671/src/Base/CMakeLists.txt 2015-04-11 07:19:09.729155453 -0500
+@@ -301,9 +301,11 @@
+ # Use external zipios++ if specified.
+ if(FREECAD_USE_EXTERNAL_ZIPIOS)
+ find_library(ZIPIOS_LIBRARY zipios)
+- find_path(ZIPIOS_INCLUDES zipios++/zipios-config.h)
++ find_path(ZIPIOS_INCLUDES NAMES
++ zipios++/zipios-config.h
++ zipios++/zipios-config.hpp)
+ if(ZIPIOS_LIBRARY)
+- message(STATUS "Found zipios++: ${ZIPIOS}")
++ message(STATUS "Found zipios++: ${ZIPIOS_LIBRARY}")
+ endif()
+ if(ZIPIOS_INCLUDES)
+ message(STATUS "Found zipios++ headers.")
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/freecad.git/commitdiff/c177ecb1e46e006e588ab939f6b88efe89003d31
More information about the pld-cvs-commit
mailing list