From 3b922b148ba492b5ca563d5bd194c4f0e3351cf5 Mon Sep 17 00:00:00 2001 From: "Andreas K. Hüttel" Date: Sun, 31 Jul 2011 18:24:35 +0000 Subject: Add support for qt-only build, bug 356457 (Portage version: 2.1.10.8/cvs/Linux x86_64) --- kde-base/marble/ChangeLog | 8 ++- kde-base/marble/files/marble-4.7-magic-r1.patch | 50 ++++++++++++++++ kde-base/marble/marble-4.7.0-r1.ebuild | 78 +++++++++++++++++++++++++ 3 files changed, 135 insertions(+), 1 deletion(-) create mode 100644 kde-base/marble/files/marble-4.7-magic-r1.patch create mode 100644 kde-base/marble/marble-4.7.0-r1.ebuild (limited to 'kde-base') diff --git a/kde-base/marble/ChangeLog b/kde-base/marble/ChangeLog index b9a3e7d2840b..67c394c56d49 100644 --- a/kde-base/marble/ChangeLog +++ b/kde-base/marble/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for kde-base/marble # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/kde-base/marble/ChangeLog,v 1.102 2011/07/28 20:02:13 alexxy Exp $ +# $Header: /var/cvsroot/gentoo-x86/kde-base/marble/ChangeLog,v 1.103 2011/07/31 18:24:35 dilfridge Exp $ + +*marble-4.7.0-r1 (31 Jul 2011) + + 31 Jul 2011; Andreas K. Huettel + +files/marble-4.7-magic-r1.patch, +marble-4.7.0-r1.ebuild: + Add support for qt-only build, bug 356457 28 Jul 2011; Alexey Shvetsov +files/marble-4.5.5-gpsd.patch, marble-4.7.0.ebuild: diff --git a/kde-base/marble/files/marble-4.7-magic-r1.patch b/kde-base/marble/files/marble-4.7-magic-r1.patch new file mode 100644 index 000000000000..2249884b5ca7 --- /dev/null +++ b/kde-base/marble/files/marble-4.7-magic-r1.patch @@ -0,0 +1,50 @@ +diff -ruN marble-4.7.0.orig/CMakeLists.txt marble-4.7.0/CMakeLists.txt +--- marble-4.7.0.orig/CMakeLists.txt 2011-06-22 16:53:54.000000000 +0200 ++++ marble-4.7.0/CMakeLists.txt 2011-07-31 20:20:44.000000000 +0200 +@@ -38,7 +38,7 @@ + "Experimental Python binding support for the Marble library. To activate it pass -DEXPERIMENTAL_PYTHON_BINDINGS=TRUE to cmake.") + endif() + +-if(EXPERIMENTAL_PYTHON_BINDINGS) ++if(NOT QTONLY AND EXPERIMENTAL_PYTHON_BINDINGS) + macro_optional_find_package(PythonLibrary) + + macro_optional_find_package(SIP) +diff -ruN marble-4.7.0.orig/src/plugins/positionprovider/CMakeLists.txt marble-4.7.0/src/plugins/positionprovider/CMakeLists.txt +--- marble-4.7.0.orig/src/plugins/positionprovider/CMakeLists.txt 2011-07-07 16:05:38.000000000 +0200 ++++ marble-4.7.0/src/plugins/positionprovider/CMakeLists.txt 2011-07-31 20:16:08.000000000 +0200 +@@ -1,3 +1,7 @@ ++# we cannot use macro_optional_find_package here, because we want to be ++# able to build without kde support ++ ++IF(WITH_libgps) + FIND_PACKAGE(libgps) + IF(LIBGPS_FOUND) + MESSAGE( STATUS "Building with gpsd position provider") +@@ -5,12 +9,19 @@ + ELSE(LIBGPS_FOUND) + MESSAGE( STATUS "Not building with gpsd position provider") + ENDIF(LIBGPS_FOUND) ++ELSE(WITH_libgps) ++ SET(LIBGPS_FOUND 0) ++ENDIF(WITH_libgps) + ++IF(WITH_liblocation) + FIND_PACKAGE(liblocation) + IF(liblocation_FOUND) + MESSAGE( STATUS "Building with Maemo GPS support") + ADD_SUBDIRECTORY( maemo ) + ENDIF(liblocation_FOUND) ++ELSE(WITH_liblocation) ++ SET(liblocation_FOUND 0) ++ENDIF(WITH_liblocation) + + FIND_PACKAGE(QtLocation) + IF(QTLOCATION_FOUND) +@@ -19,4 +30,4 @@ + ENDIF(QTLOCATION_FOUND) + + # experimental implementation +-# ADD_SUBDIRECTORY( geoclue ) +\ Kein Zeilenumbruch am Dateiende. ++# ADD_SUBDIRECTORY( geoclue ) diff --git a/kde-base/marble/marble-4.7.0-r1.ebuild b/kde-base/marble/marble-4.7.0-r1.ebuild new file mode 100644 index 000000000000..10b536284f19 --- /dev/null +++ b/kde-base/marble/marble-4.7.0-r1.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/kde-base/marble/marble-4.7.0-r1.ebuild,v 1.1 2011/07/31 18:24:35 dilfridge Exp $ + +EAPI=3 + +KDE_HANDBOOK="optional" +KDE_REQUIRED="optional" +CPPUNIT_REQUIRED="optional" +PYTHON_DEPEND="python? 2" +KDE_SCM="git" +inherit kde4-base python + +DESCRIPTION="Generic geographical map widget" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="debug designer-plugin gps +kde plasma python" + +# tests fail / segfault. Last checked for 4.2.88 +RESTRICT=test + +DEPEND=" + gps? ( >=sci-geosciences/gpsd-2.95[qt4] ) + python? ( + >=dev-python/PyQt4-4.4.4-r1 + kde? ( $(add_kdebase_dep pykde4) ) + ) +" +RDEPEND="${DEPEND} + !sci-geosciences/marble +" + +PATCHES=( + "${FILESDIR}/${PN}-4.7-magic-r1.patch" + "${FILESDIR}/${PN}-4.5.5-gpsd.patch" +) + +pkg_setup() { + python_set_active_version 2 + kde4-base_pkg_setup +} + +src_prepare() { + kde4-base_src_prepare + python_convert_shebangs -r $(python_get_version) . +} + +src_configure() { + mycmakeargs=( + $(cmake-utils_use_with designer-plugin DESIGNER_PLUGIN) + $(cmake-utils_use python EXPERIMENTAL_PYTHON_BINDINGS) + $(cmake-utils_use_with python PyQt4) + $(cmake-utils_use_with python PythonLibrary) + $(cmake-utils_use_with python SIP) + $(cmake-utils_use_with gps libgps) + -DWITH_liblocation=0 + ) + use kde || mycmakeargs=( + -DQTONLY=ON + ${mycmakeargs[@]} + ) + use kde && mycmakeargs=( + $(cmake-utils_use_with plasma) + $(cmake-utils_use_with python PyKDE4) + ${mycmakeargs[@]} + ) + + find "${S}/marble/src/bindings/python/sip" -name "*.sip" | xargs -- sed -i 's/#include