diff --git a/CMakeModules/download_boost.cmake b/CMakeModules/download_boost.cmake index 29e775e3d2..7fe4f0d243 100644 --- a/CMakeModules/download_boost.cmake +++ b/CMakeModules/download_boost.cmake @@ -121,8 +121,12 @@ ExternalProject_Add( boost URL_MD5 ${BOOST_MD5} # The patch command executes with the working directory set to - PATCH_COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_minkowski.patch" + # Revert the branch to pristine before applying patch sets as bzr patch + # fails when applying a patch to the branch twice and doesn't have a switch + # to ignore previously applied patches + PATCH_COMMAND bzr revert # PATCH_COMMAND continuation (any *_COMMAND here can be continued with COMMAND): + COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_minkowski.patch" COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost_cstdint.patch" # [Mis-]use this step to erase all the boost headers and libraries before diff --git a/CMakeModules/download_openssl.cmake b/CMakeModules/download_openssl.cmake index 8f6d534529..b810cfb63e 100644 --- a/CMakeModules/download_openssl.cmake +++ b/CMakeModules/download_openssl.cmake @@ -58,7 +58,13 @@ ExternalProject_Add( # PATCH_COMMAND patch -p0 < ${PROJECT_SOURCE_DIR}/patches/openssl-1.0.1e.patch # This one requires the bzr commit below, since bzr patch only knows a working tree. - PATCH_COMMAND bzr patch -p0 ${PROJECT_SOURCE_DIR}/patches/openssl-1.0.1e.patch + + # Revert the branch to pristine before applying patch sets as bzr patch + # fails when applying a patch to the branch twice and doesn't have a switch + # to ignore previously applied patches + PATCH_COMMAND bzr revert + # PATCH_COMMAND continuation (any *_COMMAND here can be continued with COMMAND): + COMMAND bzr patch -p0 ${PROJECT_SOURCE_DIR}/patches/openssl-1.0.1e.patch CONFIGURE_COMMAND ${CMAKE_COMMAND}