commit:     f2a7db7f8159036f2733e844c7469f00bf095daf
Author:     Andreas Sturmlechner <andreas.sturmlechner <AT> gmail <DOT> com>
AuthorDate: Sat Aug 13 22:29:06 2016 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Sat Aug 20 18:28:26 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2a7db7f

net-im/choqok: Add WEBKIT_REQUIRED, revbump with major fix

- Bump EAPI 6
- Patch to make KDEWEBKIT optional
- src_prepare -> src_configure so USE works
- Patch to fix USE=-telepathy

Package-Manager: portage-2.2.28

 .../{choqok-1.5.ebuild => choqok-1.5-r1.ebuild}    | 27 ++++---
 net-im/choqok/choqok-1.5.ebuild                    |  3 +-
 .../files/choqok-1.5-kdewebkit-optional.patch      | 30 +++++++
 .../files/choqok-1.5-telepathy-optional.patch      | 93 ++++++++++++++++++++++
 4 files changed, 139 insertions(+), 14 deletions(-)

diff --git a/net-im/choqok/choqok-1.5.ebuild 
b/net-im/choqok/choqok-1.5-r1.ebuild
similarity index 66%
copy from net-im/choqok/choqok-1.5.ebuild
copy to net-im/choqok/choqok-1.5-r1.ebuild
index 873b6ec..9eb4416 100644
--- a/net-im/choqok/choqok-1.5.ebuild
+++ b/net-im/choqok/choqok-1.5-r1.ebuild
@@ -2,24 +2,20 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI=5
+EAPI=6
 
 KDE_LINGUAS="bg bs ca ca@valencia cs da de el en_GB eo es et fa fi fr ga gl
 hr hu is it ja km lt mr ms nb nds nl pa pl pt pt_BR ro ru sk sl sq sv tr ug
 uk zh_CN zh_TW"
 KDE_HANDBOOK="optional"
+WEBKIT_REQUIRED="optional"
 inherit kde4-base
 
-DESCRIPTION="Free/Open Source micro-blogging client for KDE"
+DESCRIPTION="Free/Open Source micro-blogging client by KDE"
 HOMEPAGE="http://choqok.gnufolks.org/";
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
 
-if [[ ${PV} != *9999* ]]; then
-       SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
-       KEYWORDS="amd64 x86"
-else
-       KEYWORDS=""
-fi
-
+KEYWORDS="~amd64 ~x86"
 LICENSE="GPL-2+"
 SLOT="4"
 IUSE="ayatana debug telepathy"
@@ -38,11 +34,16 @@ DEPEND="${RDEPEND}
 
 DOCS=( AUTHORS README TODO changelog )
 
-src_prepare(){
+PATCHES=(
+       "${FILESDIR}/${P}-kdewebkit-optional.patch"
+       "${FILESDIR}/${P}-telepathy-optional.patch"
+)
+
+src_configure(){
        local mycmakeargs=(
-               $(cmake-utils_use !ayatana QTINDICATE_DISABLE)
+               -DQTINDICATE_DISABLE=$(usex "!ayatana")
                $(cmake-utils_use_find_package telepathy TelepathyQt4)
+               -DWITH_KDEWEBKIT=$(usex webkit)
        )
-
-       kde4-base_src_prepare
+       kde4-base_src_configure
 }

diff --git a/net-im/choqok/choqok-1.5.ebuild b/net-im/choqok/choqok-1.5.ebuild
index 873b6ec..9e24c2e 100644
--- a/net-im/choqok/choqok-1.5.ebuild
+++ b/net-im/choqok/choqok-1.5.ebuild
@@ -8,9 +8,10 @@ KDE_LINGUAS="bg bs ca ca@valencia cs da de el en_GB eo es et 
fa fi fr ga gl
 hr hu is it ja km lt mr ms nb nds nl pa pl pt pt_BR ro ru sk sl sq sv tr ug
 uk zh_CN zh_TW"
 KDE_HANDBOOK="optional"
+WEBKIT_REQUIRED="always"
 inherit kde4-base
 
-DESCRIPTION="Free/Open Source micro-blogging client for KDE"
+DESCRIPTION="Free/Open Source micro-blogging client by KDE"
 HOMEPAGE="http://choqok.gnufolks.org/";
 
 if [[ ${PV} != *9999* ]]; then

diff --git a/net-im/choqok/files/choqok-1.5-kdewebkit-optional.patch 
b/net-im/choqok/files/choqok-1.5-kdewebkit-optional.patch
new file mode 100644
index 0000000..ee16b93
--- /dev/null
+++ b/net-im/choqok/files/choqok-1.5-kdewebkit-optional.patch
@@ -0,0 +1,30 @@
+commit 091d6b1f0e0b473424dab7caea2e6d4964e0be46
+Author: Andreas Sturmlechner <andreas.sturmlech...@gmail.com>
+Date:   Sun Aug 14 23:16:57 2016 +0200
+
+    Expose HAVE_KWEBKITPART to CMake
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a37bb74..20be9fa 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -10,6 +10,8 @@ set(CMAKE_MODULE_PATH ${CHOQOK_SOURCE_DIR}/cmake/modules 
${CMAKE_MODULE_PATH})
+ 
+ option(QTINDICATE_DISABLE "Disable support for notifications via indicator")
+ 
++option(WITH_KDEWEBKIT "Build with kdewebkit support" "ON")
++
+ find_package(QJson REQUIRED)
+ find_package(QCA2 REQUIRED)
+ find_package(QtOAuth REQUIRED)
+@@ -27,6 +29,10 @@ else(QTINDICATE_BUILD)
+     message(STATUS "Optional dependency libindicate-qt not found: Won't 
support notifications via indicator")
+ endif(QTINDICATE_BUILD)
+ 
++if(NOT WITH_KDEWEBKIT)
++    set(HAVE_KWEBKITPART 0)
++endif(NOT WITH_KDEWEBKIT)
++
+ set(CHOQOK_INCLUDES
+ ${KDE4_INCLUDES}
+ ${QT_INCLUDES}

diff --git a/net-im/choqok/files/choqok-1.5-telepathy-optional.patch 
b/net-im/choqok/files/choqok-1.5-telepathy-optional.patch
new file mode 100644
index 0000000..a73a846
--- /dev/null
+++ b/net-im/choqok/files/choqok-1.5-telepathy-optional.patch
@@ -0,0 +1,93 @@
+commit 92433189c29c425a9bfb3eb10a0ffe767f23febd
+Author: Andreas Sturmlechner <andreas.sturmlech...@gmail.com>
+Date:   Sun Aug 14 23:53:08 2016 +0200
+
+    Fix build with disabled TelepathyQt4
+
+diff --git a/plugins/imstatus/CMakeLists.txt b/plugins/imstatus/CMakeLists.txt
+index 19c3ef0..cb45c14 100644
+--- a/plugins/imstatus/CMakeLists.txt
++++ b/plugins/imstatus/CMakeLists.txt
+@@ -1,6 +1,8 @@
+ find_package(TelepathyQt4)
+ 
+-configure_file(config-imstatus.h.cmake 
${CMAKE_CURRENT_BINARY_DIR}/config-imstatus.h )
++if(TelepathyQt4_FOUND)
++    add_definitions( -DTELEPATHY_FOUND )
++endif()
+ 
+ include_directories(
+ ${TELEPATHY_QT4_INCLUDE_DIR}
+diff --git a/plugins/imstatus/imqdbus.cpp b/plugins/imstatus/imqdbus.cpp
+index 7c78b34..a968269 100644
+--- a/plugins/imstatus/imqdbus.cpp
++++ b/plugins/imstatus/imqdbus.cpp
+@@ -30,7 +30,7 @@
+ 
+ #include <kdebug.h>
+ 
+-#if TELEPATHY_FOUND
++#ifdef TELEPATHY_FOUND
+     #include <TelepathyQt/AccountManager>
+     #include <TelepathyQt/AccountSet>
+     #include <TelepathyQt/Account>
+@@ -51,7 +51,7 @@ IMQDBus::IMQDBus (QObject *parent) : QObject(parent)
+     - qutIM (>0.3)
+     - gajim ( doesn't want work :( )
+     */
+-#if TELEPATHY_FOUND
++#ifdef TELEPATHY_FOUND
+     m_accountManager =  
Tp::AccountManager::create(Tp::AccountFactory::create(QDBusConnection::sessionBus(),
 Tp::Account::FeatureCore));
+     connect(m_accountManager->becomeReady(), 
SIGNAL(finished(Tp::PendingOperation*)), 
SLOT(slotFinished(Tp::PendingOperation*)));
+ 
+@@ -65,7 +65,7 @@ void IMQDBus::updateStatusMessage(const QString& im, const 
QString& statusMessag
+     if ( im == IM_PSI ) usePsi(statusMessage);
+     if ( im == IM_SKYPE ) useSkype(statusMessage);
+     if ( im == IM_PIDGIN ) usePidgin(statusMessage);
+-#if TELEPATHY_FOUND
++#ifdef TELEPATHY_FOUND
+     if ( im == IM_TELEPATHY ) useTelepathy(statusMessage);
+ #endif
+ }
+@@ -182,7 +182,7 @@ void IMQDBus::usePidgin(const QString &statusMessage)
+     }
+ }
+ 
+-#if TELEPATHY_FOUND
++#ifdef TELEPATHY_FOUND
+ void IMQDBus::useTelepathy(const QString &statusMessage)
+ {
+     if (m_accountManager->isReady()) {
+@@ -224,7 +224,7 @@ QStringList IMQDBus::scanForIMs()
+         ims << IM_KOPETE;
+     if ( QDBusConnection::sessionBus().interface()->isServiceRegistered ( 
"im.pidgin.purple.PurpleService" ).value() )
+         ims << IM_PIDGIN;
+-#if TELEPATHY_FOUND
++#ifdef TELEPATHY_FOUND
+     if ( QDBusConnection::sessionBus().interface()->isServiceRegistered( 
"org.freedesktop.Telepathy.AccountManager" ).value() )
+         ims << IM_TELEPATHY;
+ #endif
+diff --git a/plugins/imstatus/imqdbus.h b/plugins/imstatus/imqdbus.h
+index 890184a..8b2c245 100644
+--- a/plugins/imstatus/imqdbus.h
++++ b/plugins/imstatus/imqdbus.h
+@@ -28,9 +28,7 @@
+ #include <QString>
+ #include <QObject>
+ 
+-#include "config-imstatus.h"
+-
+-#if TELEPATHY_FOUND
++#ifdef TELEPATHY_FOUND
+ 
+ #include <TelepathyQt/Types>
+ 
+@@ -59,7 +57,7 @@ private:
+     void useSkype(const QString &statusMessage);
+     void usePidgin(const QString &statusMessage);
+ 
+-#if TELEPATHY_FOUND
++#ifdef TELEPATHY_FOUND
+ private slots:
+     void slotFinished(Tp::PendingOperation *po);
+ 

Reply via email to