From 1757d15549a81cf104ba6f4b5c1bbabd09edf9f0 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 10 Jun 2015 03:18:42 +0100 Subject: force enable python in our calamares build --- app-admin/calamares/calamares-999.ebuild | 7 +++- .../calamares-find-gentoo-python3-boost-libs.patch | 44 ++++++++++++++++++++++ .../cmake-find-gentoo-python3-boost-libs.patch | 44 ---------------------- 3 files changed, 49 insertions(+), 46 deletions(-) create mode 100644 app-admin/calamares/files/calamares-find-gentoo-python3-boost-libs.patch delete mode 100644 app-admin/calamares/files/cmake-find-gentoo-python3-boost-libs.patch (limited to 'app-admin') diff --git a/app-admin/calamares/calamares-999.ebuild b/app-admin/calamares/calamares-999.ebuild index 1160599d..1da39160 100644 --- a/app-admin/calamares/calamares-999.ebuild +++ b/app-admin/calamares/calamares-999.ebuild @@ -74,8 +74,11 @@ RDEPEND=">=dev-qt/designer-5.4.0:5 virtual/udev[systemd]" src_prepare() { - # cmake cannot find python3 boost libs on gentoo, but with a little help it will (fixes landed upstream, disable this for now) - # epatch "${FILESDIR}/cmake-find-gentoo-python3-boost-libs.patch" + # by default, python support is optional and calamares builds fine if is not found + # on gentoo finding python && boost libs is sometimes problematic, and we really really + # want python support in our package + # this patch helps calamares to find python && boost libs and force-enables python + epatch "${FILESDIR}/${PN}-find-gentoo-python3-boost-libs.patch" # If qtchooser is installed, it may break the build, because moc,rcc and uic binaries for wrong qt version may be used. # Setting QT_SELECT environment variable will enforce correct binaries (fix taken from vlc ebuild) diff --git a/app-admin/calamares/files/calamares-find-gentoo-python3-boost-libs.patch b/app-admin/calamares/files/calamares-find-gentoo-python3-boost-libs.patch new file mode 100644 index 00000000..1756b02f --- /dev/null +++ b/app-admin/calamares/files/calamares-find-gentoo-python3-boost-libs.patch @@ -0,0 +1,44 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 774d301..afd4f80 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -33,34 +33,13 @@ find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED Core Gui Widgets LinguistTools S + find_package( YamlCpp 0.5.1 REQUIRED ) + find_package( PolkitQt5-1 REQUIRED ) + +-option( WITH_PYTHON "Enable Python modules support." ON ) +- +-macro_optional_find_package( PythonLibs 3.3 ) +-macro_log_feature( +- PYTHONLIBS_FOUND +- "Python" +- "C interface libraries for the Python 3 interpreter." +- "http://python.org" +- FALSE "3.3" +- "Python 3 is used for some Calamares job modules." +-) ++find_package( PythonLibs 3.3 REQUIRED ) ++include_directories( ${PYTHON_INCLUDE_DIRS} ) + +-if ( PYTHONLIBS_FOUND ) +- include( BoostPython3 ) +- find_boost_python3( 1.54.0 ${PYTHONLIBS_VERSION_STRING} CALAMARES_BOOST_PYTHON3_FOUND ) +- macro_log_feature( +- CALAMARES_BOOST_PYTHON3_FOUND +- "Boost.Python" +- "A C++ library which enables seamless interoperability between C++ and Python 3." +- "http://www.boost.org" +- FALSE "1.54.0" +- "Boost.Python is used for interfacing with Calamares job modules written in Python 3." +- ) +-endif() ++find_package( Boost COMPONENTS python REQUIRED ) ++include_directories( ${Boost_INCLUDE_DIR}) + +-if ( PYTHONLIBS_NOTFOUND OR NOT CALAMARES_BOOST_PYTHON3_FOUND ) +- set( WITH_PYTHON OFF ) +-endif() ++option( WITH_PYTHON "Enable Python modules support." ON ) + + ### + ### Calamares application info diff --git a/app-admin/calamares/files/cmake-find-gentoo-python3-boost-libs.patch b/app-admin/calamares/files/cmake-find-gentoo-python3-boost-libs.patch deleted file mode 100644 index 1756b02f..00000000 --- a/app-admin/calamares/files/cmake-find-gentoo-python3-boost-libs.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 774d301..afd4f80 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -33,34 +33,13 @@ find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED Core Gui Widgets LinguistTools S - find_package( YamlCpp 0.5.1 REQUIRED ) - find_package( PolkitQt5-1 REQUIRED ) - --option( WITH_PYTHON "Enable Python modules support." ON ) -- --macro_optional_find_package( PythonLibs 3.3 ) --macro_log_feature( -- PYTHONLIBS_FOUND -- "Python" -- "C interface libraries for the Python 3 interpreter." -- "http://python.org" -- FALSE "3.3" -- "Python 3 is used for some Calamares job modules." --) -+find_package( PythonLibs 3.3 REQUIRED ) -+include_directories( ${PYTHON_INCLUDE_DIRS} ) - --if ( PYTHONLIBS_FOUND ) -- include( BoostPython3 ) -- find_boost_python3( 1.54.0 ${PYTHONLIBS_VERSION_STRING} CALAMARES_BOOST_PYTHON3_FOUND ) -- macro_log_feature( -- CALAMARES_BOOST_PYTHON3_FOUND -- "Boost.Python" -- "A C++ library which enables seamless interoperability between C++ and Python 3." -- "http://www.boost.org" -- FALSE "1.54.0" -- "Boost.Python is used for interfacing with Calamares job modules written in Python 3." -- ) --endif() -+find_package( Boost COMPONENTS python REQUIRED ) -+include_directories( ${Boost_INCLUDE_DIR}) - --if ( PYTHONLIBS_NOTFOUND OR NOT CALAMARES_BOOST_PYTHON3_FOUND ) -- set( WITH_PYTHON OFF ) --endif() -+option( WITH_PYTHON "Enable Python modules support." ON ) - - ### - ### Calamares application info -- cgit v1.2.3