diff options
Diffstat (limited to 'dev-cpp/libcmis')
-rw-r--r-- | dev-cpp/libcmis/Manifest | 7 | ||||
-rw-r--r-- | dev-cpp/libcmis/files/libcmis-0.5.2-fix-gdrive-2fa.patch | 70 | ||||
-rw-r--r-- | dev-cpp/libcmis/libcmis-0.5.2_pre20160820-r1.ebuild | 82 | ||||
-rw-r--r-- | dev-cpp/libcmis/libcmis-9999.ebuild | 80 | ||||
-rw-r--r-- | dev-cpp/libcmis/metadata.xml | 14 |
5 files changed, 253 insertions, 0 deletions
diff --git a/dev-cpp/libcmis/Manifest b/dev-cpp/libcmis/Manifest new file mode 100644 index 000000000000..fe2e90035557 --- /dev/null +++ b/dev-cpp/libcmis/Manifest @@ -0,0 +1,7 @@ +AUX libcmis-0.5.2-fix-gdrive-2fa.patch 3268 SHA256 bf47231cd42caf93433f4d11728f02032a3da7e135d459ec2c5c816bfb91ac4d SHA512 fbdae22b30da00b559111ce0b56aac8da90305ef0c1c4b9b55b5554a6747cf7690dd67c34bfdcb0c4597a8160a15fe9e611a01432523d31e6ea729e914a5fe6b WHIRLPOOL 8137e6f5064e08f9bd4b4a5babc95a8eb81b5122d552d17eba6f7e1926357b6afc58681e706893e0313c7607a637aac10455a07f307f9f9d747c8e62d65d89ca +DIST libcmis-0.5.2_pre20160820.tar.gz 285100 SHA256 49c0d46be0019703b8dbbc0a37fcdd97ed2f5a9576315df2a516b997b07e5b03 SHA512 4b6d0fc4d80444fea2c5eb16621b92a10b41c58128cc8a355caca50f12648ed5113bd977cc5dbe8971e3dbc11f9d7ae8d45c9d2aa19f37c83659141af135bd1a WHIRLPOOL 524391339976b32a698faa75e4597732d487fcee77c5cdf2acb0380dd81686bc357a5ad5df02693f4d0b7a66890c02701dfa04286270c17ab28a86b01d7dfe55 +EBUILD libcmis-0.5.2_pre20160820-r1.ebuild 1795 SHA256 fc46aaca78b23df42c2c59b0352eba798876acccf89a7a95ceaf1ae33427a2cc SHA512 21de6a53e9319905f9165f9e3a0f8c2e0cc5464fd24f719c1653fe161a5ecce75f3afc0df400f96955babb9a63def551687129960850db3abed2758b212b69d0 WHIRLPOOL ed1326fb34384c856070c945da2ae58104f2a1d8a6612c89d0aa1205a26e2929be8d30afdce92d7ff9af841b91b0bc9263dcddc092899f80c9262904dccab86d +EBUILD libcmis-9999.ebuild 1730 SHA256 1c0024e9101f277766753fbdf28ece07a0be514158236eafcc96706a9688453b SHA512 463fe71aefe1fa753d2af7c08d406dc1bf07dc4d290bdc27a65ccf6a56bdab73af70935dcbb0ac2c23e32d1e2e894f76c4cc4d9464c1b84905a7c403b01b02ba WHIRLPOOL a76736df0b9ce7ea3c5906cfb947301a0e3bbb0f856038cb4639b80a28d6a120713dd5b28ca2a7f03d5ff3b1a73e4272e5949662d4e4c9f5eb93099d26e81323 +MISC ChangeLog 4773 SHA256 0e569957d90fe73e5a008019a70909f006c0086e139d565597a311df9d96faef SHA512 8517d32deda0e33fbbd1179aead5c7a32a9280444ddccb061712c41d6508a31364fc76ca4ccd9d7143c55833ce405028c94a9f12698c36ab7e7c9c3b7bf5caf0 WHIRLPOOL ab73284a303d3aa5195a630bc807321bc2edb12ef1682a70f1003f4f1d5494ef74a90ece1c1f61717ff11bcba1579c517b1a110d58dbb50df30c13b4206e2b44 +MISC ChangeLog-2015 6049 SHA256 664421e2a789b077e4c8da2ee6fa9f0ed383edb9e54a6ab3ce40d8c1e38d5201 SHA512 e3692eed19cc7a1f536508669627c4cd0bdec0fd062f6dceb35b1a51fd968c72fa84e784c0444ff4ad08ecf2fbd7655ca8f6dea132f3c6b9cfd5bed45427b092 WHIRLPOOL 398c2083a9a33ff63c490fa1ecc03a722e0118dac7d736650fa0d6c471990395f339bb2b48e296f2309b48660f55d1b96092507cc1c18f34fa975c29784df104 +MISC metadata.xml 401 SHA256 2d1c4d94939ff381d9a8ec19f8de10adf1bcdcd6579624c3632f72488b05c763 SHA512 b01b808fa630d2d02ef61b4f8e1d286c51108eb3e9120b687b8e2bdf012b05d70a32de1264c0699f9778d0cb9574b88ddd4df1cc428992c90780b4934973841b WHIRLPOOL 745a92bee14f592529d825d4dc10a430df3a8cd6c5a0c41ee1073ebbcef38fc0148c23668a0fad943575dcba055684787a96f3331935cf2169f5e26d9fbaece0 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..ef3f07753294 --- /dev/null +++ b/dev-cpp/libcmis/libcmis-0.5.2_pre20160820-r1.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2017 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 ${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() { + 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..603a0334c7de --- /dev/null +++ b/dev-cpp/libcmis/libcmis-9999.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2017 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 ${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() { + 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> |