summaryrefslogtreecommitdiff
path: root/dev-cpp/libcmis
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-cpp/libcmis
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-cpp/libcmis')
-rw-r--r--dev-cpp/libcmis/Manifest5
-rw-r--r--dev-cpp/libcmis/files/libcmis-0.5.2-fix-gdrive-2fa.patch70
-rw-r--r--dev-cpp/libcmis/libcmis-0.5.2_pre20160820-r1.ebuild85
-rw-r--r--dev-cpp/libcmis/libcmis-9999.ebuild83
-rw-r--r--dev-cpp/libcmis/metadata.xml14
5 files changed, 257 insertions, 0 deletions
diff --git a/dev-cpp/libcmis/Manifest b/dev-cpp/libcmis/Manifest
new file mode 100644
index 000000000000..b7d529db4aae
--- /dev/null
+++ b/dev-cpp/libcmis/Manifest
@@ -0,0 +1,5 @@
+AUX libcmis-0.5.2-fix-gdrive-2fa.patch 3268 BLAKE2B be4d740655ae76c3cecde5d8ce643506c0a77f1b1cbd3320be9c9f3daa975e7579b28cb5f6ef11848bba875b6b9664fe07f81c3359be16f07b3ca305c7644279 SHA512 fbdae22b30da00b559111ce0b56aac8da90305ef0c1c4b9b55b5554a6747cf7690dd67c34bfdcb0c4597a8160a15fe9e611a01432523d31e6ea729e914a5fe6b
+DIST libcmis-0.5.2_pre20160820.tar.gz 285100 BLAKE2B 980200d1a56240d8d069aba2ad349ec02e90d345bad4956f6cbbea3606f9f90951523804293b349ad0419dd2db6db294a45a97872469105c1ba392c888fab332 SHA512 4b6d0fc4d80444fea2c5eb16621b92a10b41c58128cc8a355caca50f12648ed5113bd977cc5dbe8971e3dbc11f9d7ae8d45c9d2aa19f37c83659141af135bd1a
+EBUILD libcmis-0.5.2_pre20160820-r1.ebuild 1851 BLAKE2B 9f1d434f8ac067cd81dd7f6d7fb63db241ac63924e56b1da5ff069f7cd739127e5ec21504e357fde7ecc6bfb88c2b186df9ff151f186bb8cf2286035f77c724e SHA512 ec65003739c84b64293c88c98eb9b5ae931cf5644256607a35718665b87577d9413c133be140b13a9ed664efd1b5572f549adf04116801555dc75c08ef64db41
+EBUILD libcmis-9999.ebuild 1786 BLAKE2B f6d20063e3cb48588f5251fa22c7ece2109773809afb9ad562755595a2aeafa0de85b57250bc562ce1f3a9bd801433aafd6bf3db11d7a3c0af1f2dd4856d693c SHA512 fdb149a255dc1dbf8b41d61dfdc4bde12e4e0b8548c02c87d7146a1a346617aac886be0a9a33e5066f7c5f75abe8f8ebc29bc12c3d0cfb1dcd7bac9840310530
+MISC metadata.xml 401 BLAKE2B 51ccbd2b64899189a740c498dee304fa62676b4673b22f5215e5e587925d74a3582f9a4206e47da42524f527cb1d36545d45c64c9a38b9783c65d2e923aba0b0 SHA512 b01b808fa630d2d02ef61b4f8e1d286c51108eb3e9120b687b8e2bdf012b05d70a32de1264c0699f9778d0cb9574b88ddd4df1cc428992c90780b4934973841b
diff --git a/dev-cpp/libcmis/files/libcmis-0.5.2-fix-gdrive-2fa.patch b/dev-cpp/libcmis/files/libcmis-0.5.2-fix-gdrive-2fa.patch
new file mode 100644
index 000000000000..3c19e99a5ba9
--- /dev/null
+++ b/dev-cpp/libcmis/files/libcmis-0.5.2-fix-gdrive-2fa.patch
@@ -0,0 +1,70 @@
+From 1effce6d286ba3a9f467e15074b532d2ba4b7c98 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Szymon=20K=C5=82os?= <eszkadev@gmail.com>
+Date: Wed, 29 Mar 2017 17:45:10 +0200
+Subject: [PATCH] Fix 2FA for Google Drive
+
+---
+ src/libcmis/oauth2-providers.cxx | 15 +++++++++++++--
+ 1 file changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/src/libcmis/oauth2-providers.cxx b/src/libcmis/oauth2-providers.cxx
+index 74c0fec..dd872dd 100644
+--- a/src/libcmis/oauth2-providers.cxx
++++ b/src/libcmis/oauth2-providers.cxx
+@@ -37,6 +37,7 @@
+ #define CHALLENGE_PAGE_ACTION_LEN sizeof( CHALLENGE_PAGE_ACTION ) - 1
+ #define PIN_FORM_ACTION "/signin/challenge/ipp"
+ #define PIN_FORM_ACTION_LEN sizeof( PIN_FORM_ACTION ) - 1
++#define PIN_INPUT_NAME "Pin"
+
+ using namespace std;
+
+@@ -152,7 +153,7 @@ string OAuth2Providers::OAuth2Gdrive( HttpSession* session, const string& authUr
+ }
+
+ loginChallengeLink = "https://accounts.google.com" + loginChallengeLink;
+- loginChallengePost += "Pin=";
++ loginChallengePost += string( PIN_INPUT_NAME ) + "=";
+ loginChallengePost += string( pin );
+
+ istringstream loginChallengeIs( loginChallengePost );
+@@ -291,6 +292,8 @@ int OAuth2Providers::parseResponse ( const char* response, string& post, string&
+ if ( reader == NULL ) return 0;
+
+ bool readInputField = false;
++ bool bIsRightForm = false;
++ bool bHasPinField = false;
+
+ while ( true )
+ {
+@@ -301,6 +304,12 @@ int OAuth2Providers::parseResponse ( const char* response, string& post, string&
+ // Find the redirect link
+ if ( xmlStrEqual( nodeName, BAD_CAST( "form" ) ) )
+ {
++ // 2FA: Don't add fields form other forms not having pin field
++ if ( bIsRightForm && !bHasPinField )
++ post = string( "" );
++ if ( bIsRightForm && bHasPinField )
++ break;
++
+ xmlChar* action = xmlTextReaderGetAttribute( reader,
+ BAD_CAST( "action" ));
+
+@@ -311,7 +320,7 @@ int OAuth2Providers::parseResponse ( const char* response, string& post, string&
+ bool bChallengePage = ( strncmp( (char*)action,
+ CHALLENGE_PAGE_ACTION,
+ CHALLENGE_PAGE_ACTION_LEN ) == 0 );
+- bool bIsRightForm = ( strncmp( (char*)action,
++ bIsRightForm = ( strncmp( (char*)action,
+ PIN_FORM_ACTION,
+ PIN_FORM_ACTION_LEN ) == 0 );
+ if ( ( xmlStrlen( action ) > 0 )
+@@ -332,6 +341,8 @@ int OAuth2Providers::parseResponse ( const char* response, string& post, string&
+ BAD_CAST( "name" ));
+ xmlChar* value = xmlTextReaderGetAttribute( reader,
+ BAD_CAST( "value" ));
++ if ( name != NULL && strcmp( (char*)name, PIN_INPUT_NAME ) == 0 )
++ bHasPinField = true;
+ if ( ( name != NULL ) && ( value!= NULL ) )
+ {
+ if ( ( xmlStrlen( name ) > 0) && ( xmlStrlen( value ) > 0) )
diff --git a/dev-cpp/libcmis/libcmis-0.5.2_pre20160820-r1.ebuild b/dev-cpp/libcmis/libcmis-0.5.2_pre20160820-r1.ebuild
new file mode 100644
index 000000000000..8377602271d8
--- /dev/null
+++ b/dev-cpp/libcmis/libcmis-0.5.2_pre20160820-r1.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="https://github.com/tdf/libcmis.git"
+ SCM_ECLASS="git-r3"
+elif [[ ${PV} = *_pre* ]]; then
+ SCM_ECLASS="vcs-snapshot"
+ snapshot=d2054a12e3f52fff8e96341e8c48f0dcd75e2e2a
+ SRC_URI="https://github.com/tdf/${PN}/archive/${snapshot}.tar.gz -> ${P}.tar.gz"
+ unset snapshot
+else
+ SRC_URI="https://github.com/tdf/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+fi
+inherit alternatives autotools flag-o-matic ${SCM_ECLASS}
+unset SCM_ECLASS
+
+DESCRIPTION="C++ client library for the CMIS interface"
+HOMEPAGE="https://github.com/tdf/libcmis"
+
+LICENSE="|| ( GPL-2 LGPL-2 MPL-1.1 )"
+SLOT="0.5"
+
+# Don't move KEYWORDS on the previous line or ekeyword won't work # 399061
+[[ ${PV} == 9999 ]] || \
+KEYWORDS="amd64 ~arm ~arm64 x86 ~amd64-linux ~x86-linux"
+
+IUSE="man static-libs test"
+
+COMMON_DEPEND="
+ dev-libs/boost:=
+ dev-libs/libxml2
+ net-misc/curl
+"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+ man? (
+ app-text/docbook2X
+ dev-libs/libxslt
+ )
+ test? (
+ dev-util/cppcheck
+ dev-util/cppunit
+ )
+"
+RDEPEND="${COMMON_DEPEND}
+ !<dev-cpp/libcmis-0.5.0
+"
+
+RESTRICT="test"
+
+PATCHES=( "${FILESDIR}/${PN}-0.5.2-fix-gdrive-2fa.patch" )
+
+src_prepare() {
+ default
+ [[ ${PV} = *_pre* || ${PV} = 9999 ]] && eautoreconf
+}
+
+src_configure() {
+ # bug 618778
+ append-cxxflags -std=c++14
+
+ econf \
+ --program-suffix=-${SLOT} \
+ --disable-werror \
+ $(use_with man) \
+ $(use_enable static-libs static) \
+ $(use_enable test tests) \
+ --enable-client
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -delete || die
+}
+
+pkg_postinst() {
+ alternatives_auto_makesym /usr/bin/cmis-client "/usr/bin/cmis-client-[0-9].[0-9]"
+}
+
+pkg_postrm() {
+ alternatives_auto_makesym /usr/bin/cmis-client "/usr/bin/cmis-client-[0-9].[0-9]"
+}
diff --git a/dev-cpp/libcmis/libcmis-9999.ebuild b/dev-cpp/libcmis/libcmis-9999.ebuild
new file mode 100644
index 000000000000..78e5b1990a3a
--- /dev/null
+++ b/dev-cpp/libcmis/libcmis-9999.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+if [[ ${PV} = 9999 ]]; then
+ EGIT_REPO_URI="https://github.com/tdf/libcmis.git"
+ SCM_ECLASS="git-r3"
+elif [[ ${PV} = *_pre* ]]; then
+ SCM_ECLASS="vcs-snapshot"
+ snapshot=d2054a12e3f52fff8e96341e8c48f0dcd75e2e2a
+ SRC_URI="https://github.com/tdf/${PN}/archive/${snapshot}.tar.gz -> ${P}.tar.gz"
+ unset snapshot
+else
+ SRC_URI="https://github.com/tdf/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+fi
+inherit alternatives autotools flag-o-matic ${SCM_ECLASS}
+unset SCM_ECLASS
+
+DESCRIPTION="C++ client library for the CMIS interface"
+HOMEPAGE="https://github.com/tdf/libcmis"
+
+LICENSE="|| ( GPL-2 LGPL-2 MPL-1.1 )"
+SLOT="0.5"
+
+# Don't move KEYWORDS on the previous line or ekeyword won't work # 399061
+[[ ${PV} == 9999 ]] || \
+KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
+
+IUSE="man static-libs test"
+
+COMMON_DEPEND="
+ dev-libs/boost:=
+ dev-libs/libxml2
+ net-misc/curl
+"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+ man? (
+ app-text/docbook2X
+ dev-libs/libxslt
+ )
+ test? (
+ dev-util/cppcheck
+ dev-util/cppunit
+ )
+"
+RDEPEND="${COMMON_DEPEND}
+ !<dev-cpp/libcmis-0.5.0
+"
+
+RESTRICT="test"
+
+src_prepare() {
+ default
+ [[ ${PV} = *_pre* || ${PV} = 9999 ]] && eautoreconf
+}
+
+src_configure() {
+ # bug 618778
+ append-cxxflags -std=c++14
+
+ econf \
+ --program-suffix=-${SLOT} \
+ --disable-werror \
+ $(use_with man) \
+ $(use_enable static-libs static) \
+ $(use_enable test tests) \
+ --enable-client
+}
+
+src_install() {
+ default
+ find "${D}" -name '*.la' -delete || die
+}
+
+pkg_postinst() {
+ alternatives_auto_makesym /usr/bin/cmis-client "/usr/bin/cmis-client-[0-9].[0-9]"
+}
+
+pkg_postrm() {
+ alternatives_auto_makesym /usr/bin/cmis-client "/usr/bin/cmis-client-[0-9].[0-9]"
+}
diff --git a/dev-cpp/libcmis/metadata.xml b/dev-cpp/libcmis/metadata.xml
new file mode 100644
index 000000000000..afb9c075be7a
--- /dev/null
+++ b/dev-cpp/libcmis/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>office@gentoo.org</email>
+ <name>Gentoo Office project</name>
+ </maintainer>
+ <use>
+ <flag name="man">Build and install man pages.</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">tdf/libcmis</remote-id>
+ </upstream>
+</pkgmetadata>