commit:     d26fbf8a09acf421b800eac6e9aa25f73b12a6a8
Author:     Andreas Sturmlechner <andreas.sturmlechner <AT> gmail <DOT> com>
AuthorDate: Sun Jan 24 12:37:52 2016 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Tue Jan 26 18:18:38 2016 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=d26fbf8a

app-text/kbibtex: Force handbook optional, use system-qoauth

Package-Manager: portage-2.2.26

 .../kbibtex-part-revert-reenable-qtoauth.patch     |  43 ++++++++
 .../files/kbibtex-revert-removing-qtoauth.patch    | 114 +++++++++++++++++++++
 app-text/kbibtex/kbibtex-9999.ebuild               |  14 ++-
 3 files changed, 170 insertions(+), 1 deletion(-)

diff --git a/app-text/kbibtex/files/kbibtex-part-revert-reenable-qtoauth.patch 
b/app-text/kbibtex/files/kbibtex-part-revert-reenable-qtoauth.patch
new file mode 100644
index 0000000..31402dc
--- /dev/null
+++ b/app-text/kbibtex/files/kbibtex-part-revert-reenable-qtoauth.patch
@@ -0,0 +1,43 @@
+commit 345ef2b7f11da68d9a2fbd92ace3fada85f70140
+Author: Andreas Sturmlechner <[email protected]>
+Date:   Sun Jan 24 13:16:54 2016 +0100
+
+    Partially revert "Re-enabling code for QtOAuth"
+    
+    This partially reverts commit 7b6937326ba2a4e4072692add38a4abd28bd0cd4
+    so that kbibtex is using system-qoauth instead of bundled one.
+
+diff --git a/src/networking/CMakeLists.txt b/src/networking/CMakeLists.txt
+index 4408821..bd80b26 100644
+--- a/src/networking/CMakeLists.txt
++++ b/src/networking/CMakeLists.txt
+@@ -35,8 +35,6 @@ set(
+     internalnetworkaccessmanager.cpp
+     ${CMAKE_SOURCE_DIR}/src/global/kbibtex.cpp
+     logging_networking.cpp
+-    # QOAuth for Qt5 from Git
+-    ../3rdparty/qoauth/src/interface.cpp
+ )
+ 
+ set(
+@@ -79,7 +77,6 @@ if(UNITY_BUILD)
+ endif(UNITY_BUILD)
+ 
+ include_directories(
+-    ${CMAKE_SOURCE_DIR}/src/3rdparty/qoauth/include
+     ${CMAKE_BINARY_DIR}/src/config
+     ${CMAKE_SOURCE_DIR}/src/config
+     ${CMAKE_BINARY_DIR}/src/data
+diff --git a/src/networking/zotero/oauthwizard.cpp 
b/src/networking/zotero/oauthwizard.cpp
+index 61cf8b7..691fb40 100644
+--- a/src/networking/zotero/oauthwizard.cpp
++++ b/src/networking/zotero/oauthwizard.cpp
+@@ -34,7 +34,7 @@
+ #include "internalnetworkaccessmanager.h"
+ #include "logging_networking.h"
+ 
+-#include <QtOAuth>
++#include <QtOAuth/QtOAuth>
+ 
+ using namespace Zotero;
+ 

diff --git a/app-text/kbibtex/files/kbibtex-revert-removing-qtoauth.patch 
b/app-text/kbibtex/files/kbibtex-revert-removing-qtoauth.patch
new file mode 100644
index 0000000..6956d3c
--- /dev/null
+++ b/app-text/kbibtex/files/kbibtex-revert-removing-qtoauth.patch
@@ -0,0 +1,114 @@
+commit 77047809b742c3b53ad0f31feddd4029525038e7
+Author: Andreas Sturmlechner <[email protected]>
+Date:   Sun Jan 24 13:04:26 2016 +0100
+
+    Revert "Removing references to QtOAuth and Qca-Qt5"
+    
+    This reverts commit ff4b966f13b1b8da8471f92f44751b58012a53e8.
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index eb33c9e..082b1bd 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -160,6 +160,26 @@ endif(
+ )
+ 
+ find_package(
++    QtOAuth
++)
++if(
++    QTOAUTH_FOUND
++)
++    add_definitions(
++        -DHAVE_QTOAUTH
++    )
++else(
++    QTOAUTH_FOUND
++)
++    message(
++        STATUS
++        "No QtOAuth installed, disabling Zotero OAuth wizard"
++    )
++endif(
++    QTOAUTH_FOUND
++)
++
++find_package(
+     Qca-qt5 "2.1.0"
+     REQUIRED
+ )
+@@ -168,7 +188,7 @@ find_package(
+ # TODO isn't there an "official" way to determine this directory?
+ find_path(
+     QTCRYPTO_INCLUDE_DIR qca.h
+-    HINTS ENV ${Qt5Core_INCLUDE_DIRS} ENV ${QT_INCLUDES}
++    HINTS ${QTOAUTH_INCLUDE_DIR} ENV ${Qt5Core_INCLUDE_DIRS} ENV 
${QT_INCLUDES}
+     PATH_SUFFIXES QtCrypto
+ )
+ 
+diff --git a/src/networking/CMakeLists.txt b/src/networking/CMakeLists.txt
+index f2f725b..4408821 100644
+--- a/src/networking/CMakeLists.txt
++++ b/src/networking/CMakeLists.txt
+@@ -30,7 +30,6 @@ set(
+     zotero/tags.cpp
+     zotero/tagmodel.cpp
+     zotero/items.cpp
+-    zotero/oauthwizard.cpp
+     associatedfiles.cpp
+     findpdf.cpp
+     internalnetworkaccessmanager.cpp
+@@ -70,7 +69,6 @@ set(
+     zotero/tagmodel.h
+     zotero/items.h
+     zotero/api.h
+-    zotero/oauthwizard.h
+     associatedfiles.h
+     findpdf.h
+     internalnetworkaccessmanager.h
+@@ -94,6 +92,26 @@ include_directories(
+     ${LIBXML2_INCLUDE_DIR}
+ )
+ 
++if(
++    QTOAUTH_FOUND
++)
++    include_directories(
++        ${QTOAUTH_INCLUDE_DIR}
++    )
++    set(
++        kbibtexnetworking_HDRS
++        ${kbibtexnetworking_HDRS}
++        zotero/oauthwizard.h
++    )
++    set(
++        kbibtexnetworking_LIB_SRCS
++        ${kbibtexnetworking_LIB_SRCS}
++        zotero/oauthwizard.cpp
++    )
++endif(
++    QTOAUTH_FOUND
++)
++
+ add_library(
+     kbibtexnetworking
+     SHARED
+@@ -119,6 +137,18 @@ target_link_libraries(
+     qca-qt5
+ )
+ 
++if(
++    QTOAUTH_FOUND
++)
++    target_link_libraries(
++      kbibtexnetworking
++      ${cmake_2_8_12_PRIVATE}
++      ${QTOAUTH_LIBRARY}
++    )
++endif(
++    QTOAUTH_FOUND
++)
++
+ set_target_properties(
+     kbibtexnetworking
+     PROPERTIES

diff --git a/app-text/kbibtex/kbibtex-9999.ebuild 
b/app-text/kbibtex/kbibtex-9999.ebuild
index 7db8cb1..2c30229 100644
--- a/app-text/kbibtex/kbibtex-9999.ebuild
+++ b/app-text/kbibtex/kbibtex-9999.ebuild
@@ -6,7 +6,7 @@ EAPI=5
 
 KDE_DOXYGEN="true"
 KDE_GCC_MINIMAL="4.9"
-KDE_HANDBOOK="true"
+KDE_HANDBOOK="forceoptional"
 inherit kde5
 
 DESCRIPTION="BibTeX editor to edit bibliographies used with LaTeX"
@@ -39,6 +39,7 @@ DEPEND="
        dev-libs/icu:=
        dev-libs/libxml2
        dev-libs/libxslt
+       dev-libs/qoauth:5
        dev-qt/qtdbus:5
        dev-qt/qtgui:5
        dev-qt/qtnetwork:5
@@ -53,3 +54,14 @@ RDEPEND="${DEPEND}
 "
 
 S=${WORKDIR}/${P/_/-}
+
+PATCHES=(
+       "${FILESDIR}/${PN}-revert-removing-qtoauth.patch"
+       "${FILESDIR}/${PN}-part-revert-reenable-qtoauth.patch"
+)
+
+src_prepare() {
+       kde5_src_prepare
+
+       rm -r src/3rdparty/qoauth || die "Failed to remove bundled qoauth"
+}

Reply via email to