diff --git a/srcpkgs/freecad/patches/020-boost-1.68.patch b/srcpkgs/freecad/patches/020-boost-1.68.patch new file mode 100644 index 00000000000..4b871e7e65f --- /dev/null +++ b/srcpkgs/freecad/patches/020-boost-1.68.patch @@ -0,0 +1,39 @@ +From 3c9e6b038ed544e446c61695dab62f83e781a28a Mon Sep 17 00:00:00 2001 +From: wmayer +Date: Sat, 21 Apr 2018 11:12:45 +0200 +Subject: [PATCH] fix requesting boost python component for version >= 1.67.0 + +--- + src/Mod/Path/libarea/CMakeLists.txt | 18 ++++++++++++------ + 1 file changed, 12 insertions(+), 6 deletions(-) + +diff --git src/Mod/Path/libarea/CMakeLists.txt src/Mod/Path/libarea/CMakeLists.txt +index ef95c29d37d..dd03a39a797 100644 +--- src/Mod/Path/libarea/CMakeLists.txt ++++ src/Mod/Path/libarea/CMakeLists.txt +@@ -16,13 +16,19 @@ OPTION(USE_BOOST_PYTHON "use BOOST_PYTHON, otherwise use PYBIND11" ON) + + if(USE_BOOST_PYTHON) + if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER) +- if(NOT PYTHON_VERSION_MAJOR LESS 3) +- find_package( Boost COMPONENTS python3) +- if (NOT Boost_PYTHON3_FOUND) +- find_package( Boost COMPONENTS python REQUIRED) +- endif() ++ # for boost >= 1.67 we must add the Python version suffix to ++ # the component name ++ if (Boost_VERSION VERSION_GREATER 106699) ++ find_package(Boost COMPONENTS python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR} REQUIRED) # find BOOST and boost-python + else() +- find_package( Boost COMPONENTS python REQUIRED) # find BOOST and boost-python ++ if(NOT PYTHON_VERSION_MAJOR LESS 3) ++ find_package( Boost COMPONENTS python3) ++ if (NOT Boost_PYTHON3_FOUND) ++ find_package( Boost COMPONENTS python REQUIRED) ++ endif() ++ else() ++ find_package( Boost COMPONENTS python REQUIRED) # find BOOST and boost-python ++ endif() + endif() + + if(Boost_FOUND) diff --git a/srcpkgs/freecad/patches/021-boost-1.68.patch b/srcpkgs/freecad/patches/021-boost-1.68.patch new file mode 100644 index 00000000000..4a2f31031f8 --- /dev/null +++ b/srcpkgs/freecad/patches/021-boost-1.68.patch @@ -0,0 +1,36 @@ +From 869b5c8918674d6069652b2b688e4faf59c87ffe Mon Sep 17 00:00:00 2001 +From: Jan Beich +Date: Tue, 17 Apr 2018 06:46:22 +0000 +Subject: [PATCH] Explicitly link against -lpthread on Unix + +/usr/bin/ld.lld: error: undefined symbol: pthread_condattr_init +>>> referenced by src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp +>>> src/3rdParty/salomesmesh/CMakeFiles/SMESH.dir/src/SMESH/SMESH_Mesh.cpp.o:(boost::condition_variable::condition_variable()) + +/usr/bin/ld.lld: error: undefined symbol: pthread_condattr_setclock +>>> referenced by src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp +>>> src/3rdParty/salomesmesh/CMakeFiles/SMESH.dir/src/SMESH/SMESH_Mesh.cpp.o:(boost::condition_variable::condition_variable()) + +/usr/bin/ld.lld: error: undefined symbol: pthread_condattr_destroy +>>> referenced by src/3rdParty/salomesmesh/src/SMESH/SMESH_Mesh.cpp +>>> src/3rdParty/salomesmesh/CMakeFiles/SMESH.dir/src/SMESH/SMESH_Mesh.cpp.o:(boost::condition_variable::condition_variable()) +--- + CMakeLists.txt | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git CMakeLists.txt CMakeLists.txt +index cc06f908642..7230ae70de8 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -596,6 +596,11 @@ endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + find_package(Boost ${BOOST_MIN_VERSION} + COMPONENTS filesystem program_options regex signals system thread REQUIRED) + ++ if(UNIX AND NOT APPLE) ++ # Boost.Thread 1.67+ headers reference pthread_condattr_* ++ list(APPEND Boost_LIBRARIES pthread) ++ endif() ++ + IF(NOT Boost_FOUND) + MESSAGE(FATAL_ERROR "========================================\n" + "boost not found, install the components:\n" diff --git a/srcpkgs/freecad/patches/030-gcc8.patch b/srcpkgs/freecad/patches/030-gcc8.patch new file mode 100644 index 00000000000..e9ffb14c7b5 --- /dev/null +++ b/srcpkgs/freecad/patches/030-gcc8.patch @@ -0,0 +1,29 @@ +From 45945836131998ef267c632ef9c0c04b63321f31 Mon Sep 17 00:00:00 2001 +From: Gabriel Souza Franco +Date: Wed, 9 May 2018 01:22:59 +0200 +Subject: [PATCH] Fix compilation with GCC 8 + +--- + src/3rdParty/salomesmesh/inc/SMESH_Algo.hxx | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git src/3rdParty/salomesmesh/inc/SMESH_Algo.hxx src/3rdParty/salomesmesh/inc/SMESH_Algo.hxx +index a362ed290bc..7e23608f52d 100644 +--- src/3rdParty/salomesmesh/inc/SMESH_Algo.hxx ++++ src/3rdParty/salomesmesh/inc/SMESH_Algo.hxx +@@ -30,6 +30,7 @@ + + #include "SMESH_SMESH.hxx" + ++#include "SMDS_MeshNode.hxx" + #include "SMDSAbs_ElementType.hxx" + #include "SMESH_Comment.hxx" + #include "SMESH_ComputeError.hxx" +@@ -45,7 +46,6 @@ + #include + #include + +-class SMDS_MeshNode; + class SMESHDS_Mesh; + class SMESHDS_SubMesh; + class SMESH_Gen; diff --git a/srcpkgs/freecad/template b/srcpkgs/freecad/template index dd4c63093dc..72e5e3d723f 100644 --- a/srcpkgs/freecad/template +++ b/srcpkgs/freecad/template @@ -5,7 +5,7 @@ # - python3: freecad code not yet ready for it, probably at 0.18 pkgname=freecad version=0.17 -revision=4 +revision=5 wrksrc="FreeCAD-${version}" build_style=cmake