summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2018-09-16 23:47:41 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2018-09-17 00:29:12 +0200
commitc7befb2acb16f58e52e9914826ef4a6c7ca35cad (patch)
treec3266bc398bebd863ab950d8b0cdba191887dfcf /dev-cpp
parentgames-fps/eduke32: drop old version (diff)
downloadgentoo-c7befb2acb16f58e52e9914826ef4a6c7ca35cad.tar.gz
gentoo-c7befb2acb16f58e52e9914826ef4a6c7ca35cad.tar.bz2
gentoo-c7befb2acb16f58e52e9914826ef4a6c7ca35cad.zip
dev-cpp/libcmis: Add new 0.5.2_pre20180118 snapshot
Package-Manager: Portage-2.3.49, Repoman-2.3.10
Diffstat (limited to 'dev-cpp')
-rw-r--r--dev-cpp/libcmis/Manifest1
-rw-r--r--dev-cpp/libcmis/files/libcmis-0.5.2-boost-1.68.patch25
-rw-r--r--dev-cpp/libcmis/files/libcmis-0.5.2-oauth2-encode.patch69
-rw-r--r--dev-cpp/libcmis/libcmis-0.5.2_pre20180118.ebuild84
-rw-r--r--dev-cpp/libcmis/libcmis-9999.ebuild22
5 files changed, 188 insertions, 13 deletions
diff --git a/dev-cpp/libcmis/Manifest b/dev-cpp/libcmis/Manifest
index b7fef5d145e..2e15c177422 100644
--- a/dev-cpp/libcmis/Manifest
+++ b/dev-cpp/libcmis/Manifest
@@ -1 +1,2 @@
DIST libcmis-0.5.2_pre20160820.tar.gz 285100 BLAKE2B 980200d1a56240d8d069aba2ad349ec02e90d345bad4956f6cbbea3606f9f90951523804293b349ad0419dd2db6db294a45a97872469105c1ba392c888fab332 SHA512 4b6d0fc4d80444fea2c5eb16621b92a10b41c58128cc8a355caca50f12648ed5113bd977cc5dbe8971e3dbc11f9d7ae8d45c9d2aa19f37c83659141af135bd1a
+DIST libcmis-0.5.2_pre20180118.tar.gz 291080 BLAKE2B 1cb5664dcb0bef7f5a04c422b21ac54a9b70d38dec74d688327732630e4a134a88c7262d763a39d1730eda1cd45f5d3c3d47a56099959d01bf5e23972181a793 SHA512 630cf7e5c31266e2b55ca093aa942fc373eb24bbb5b9aedd687f67f1b3c6b627a3bdb58878859449bcb340626f3e1bdafa2b9cbb5e61e8e4336c45b804fca7a9
diff --git a/dev-cpp/libcmis/files/libcmis-0.5.2-boost-1.68.patch b/dev-cpp/libcmis/files/libcmis-0.5.2-boost-1.68.patch
new file mode 100644
index 00000000000..767464242f7
--- /dev/null
+++ b/dev-cpp/libcmis/files/libcmis-0.5.2-boost-1.68.patch
@@ -0,0 +1,25 @@
+From 3ef3569c4ae1c5319aff0664d52cbd8a8d42c909 Mon Sep 17 00:00:00 2001
+From: rezso <rezso@rezso.net>
+Date: Tue, 4 Sep 2018 01:18:10 +0200
+Subject: tdf#119344 fix libcmis build with boost 1.68
+
+Change-Id: I80d6ea8ecd001dc02b941c1eb8974c9244316045
+Reviewed-on: https://gerrit.libreoffice.org/59958
+Tested-by: Jenkins
+Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
+
+--- a/src/libcmis/xml-utils.cxx
++++ b/src/libcmis/xml-utils.cxx
+@@ -31,7 +31,12 @@
+ #include <sstream>
+ #include <stdlib.h>
+
++#include <boost/version.hpp>
++#if (BOOST_VERSION >= 106800)
++#include <boost/uuid/detail/sha1.hpp>
++#else
+ #include <boost/uuid/sha1.hpp>
++#endif
+ #include <curl/curl.h>
+
+ #include "xml-utils.hxx"
diff --git a/dev-cpp/libcmis/files/libcmis-0.5.2-oauth2-encode.patch b/dev-cpp/libcmis/files/libcmis-0.5.2-oauth2-encode.patch
new file mode 100644
index 00000000000..c6a99074c50
--- /dev/null
+++ b/dev-cpp/libcmis/files/libcmis-0.5.2-oauth2-encode.patch
@@ -0,0 +1,69 @@
+From 33f7485dedea90e0f80c6348fa8ac5f27c5052e0 Mon Sep 17 00:00:00 2001
+From: Stephan Bergmann <sbergman@redhat.com>
+Date: Tue, 4 Sep 2018 16:45:00 +0200
+Subject: Properly encode OAuth2 credentials
+
+Change-Id: Ic3edeae035262309e91fb01e3aca5c2f905bc3e5
+Reviewed-on: https://gerrit.libreoffice.org/59986
+Tested-by: Jenkins
+Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
+
+--- a/src/libcmis/oauth2-providers.cxx
++++ b/src/libcmis/oauth2-providers.cxx
+@@ -26,6 +26,8 @@
+ * instead of those above.
+ */
+
++#include <cassert>
++
+ #include <libxml/HTMLparser.h>
+ #include <libxml/xmlreader.h>
+
+@@ -45,6 +47,29 @@
+ #define HTML_PARSE_RECOVER 0
+ #endif
+
++namespace {
++
++// See <https://url.spec.whatwg.org/#concept-urlencoded-byte-serializer>:
++void addXWwwFormUrlencoded(std::string * buffer, std::string const & data) {
++ assert(buffer);
++ for (string::const_iterator i = data.begin(); i != data.end(); ++i) {
++ unsigned char c = static_cast<unsigned char>(*i);
++ if (c == ' ' || c == '*' || c == '-' || c == '.' || (c >= '0' && c <= '9')
++ || (c >= 'A' && c <= 'Z') || c == '_' || (c >= 'a' && c <= 'z'))
++ {
++ *buffer += static_cast<char>(c);
++ } else {
++ static const char hex[16] = {
++ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
++ *buffer += '%';
++ *buffer += hex[c >> 4];
++ *buffer += hex[c & 0xF];
++ }
++ }
++}
++
++}
++
+ string OAuth2Providers::OAuth2Gdrive( HttpSession* session, const string& authUrl,
+ const string& username, const string& password )
+ {
+@@ -97,7 +120,7 @@
+ return string( );
+
+ loginEmailPost += "Email=";
+- loginEmailPost += string( username );
++ addXWwwFormUrlencoded(&loginEmailPost, username);
+
+ istringstream loginEmailIs( loginEmailPost );
+ string loginEmailRes;
+@@ -119,7 +142,7 @@
+ return string( );
+
+ loginPasswdPost += "Passwd=";
+- loginPasswdPost += string( password );
++ addXWwwFormUrlencoded(&loginPasswdPost, password);
+
+ istringstream loginPasswdIs( loginPasswdPost );
+ string loginPasswdRes;
diff --git a/dev-cpp/libcmis/libcmis-0.5.2_pre20180118.ebuild b/dev-cpp/libcmis/libcmis-0.5.2_pre20180118.ebuild
new file mode 100644
index 00000000000..9c4546b7f5f
--- /dev/null
+++ b/dev-cpp/libcmis/libcmis-0.5.2_pre20180118.ebuild
@@ -0,0 +1,84 @@
+# 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"
+ inherit git-r3
+elif [[ ${PV} = *_pre* ]]; then
+ COMMIT=738528d790b2b1d52d9b72d673842969a852815d
+ SRC_URI="https://github.com/tdf/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+else
+ SRC_URI="https://github.com/tdf/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+fi
+inherit alternatives autotools flag-o-matic
+
+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"
+
+RDEPEND="
+ dev-libs/boost:=
+ dev-libs/libxml2
+ net-misc/curl
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ man? (
+ app-text/docbook2X
+ dev-libs/libxslt
+ )
+ test? (
+ dev-util/cppcheck
+ dev-util/cppunit
+ )
+"
+
+RESTRICT="test"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.5.2-boost-1.68.patch"
+ "${FILESDIR}/${PN}-0.5.2-oauth2-encode.patch"
+)
+
+[[ ${PV} = *_pre* ]] && S="${WORKDIR}/${PN}-${COMMIT}"
+
+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
index 78e5b1990a3..922b7a7756a 100644
--- a/dev-cpp/libcmis/libcmis-9999.ebuild
+++ b/dev-cpp/libcmis/libcmis-9999.ebuild
@@ -5,17 +5,14 @@ EAPI=6
if [[ ${PV} = 9999 ]]; then
EGIT_REPO_URI="https://github.com/tdf/libcmis.git"
- SCM_ECLASS="git-r3"
+ inherit 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
+ COMMIT=738528d790b2b1d52d9b72d673842969a852815d
+ SRC_URI="https://github.com/tdf/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
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
+inherit alternatives autotools flag-o-matic
DESCRIPTION="C++ client library for the CMIS interface"
HOMEPAGE="https://github.com/tdf/libcmis"
@@ -25,16 +22,16 @@ 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"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
IUSE="man static-libs test"
-COMMON_DEPEND="
+RDEPEND="
dev-libs/boost:=
dev-libs/libxml2
net-misc/curl
"
-DEPEND="${COMMON_DEPEND}
+DEPEND="${RDEPEND}
virtual/pkgconfig
man? (
app-text/docbook2X
@@ -45,12 +42,11 @@ DEPEND="${COMMON_DEPEND}
dev-util/cppunit
)
"
-RDEPEND="${COMMON_DEPEND}
- !<dev-cpp/libcmis-0.5.0
-"
RESTRICT="test"
+[[ ${PV} = *_pre* ]] && S="${WORKDIR}/${PN}-${COMMIT}"
+
src_prepare() {
default
[[ ${PV} = *_pre* || ${PV} = 9999 ]] && eautoreconf