summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2017-03-04 20:44:06 -0500
committerBrian Evans <grknight@gentoo.org>2017-03-04 20:44:06 -0500
commit10363c109a4155fb7702eaa88819f00586b243aa (patch)
treeba6dc7deb21dc291d24716091d40047fd15248b1 /dev-php/pecl-oauth
parentmedia-libs/mesa: Drop old versions 11.0.6, 11.0.9, 17.0.0. (diff)
downloadgentoo-10363c109a4155fb7702eaa88819f00586b243aa.tar.gz
gentoo-10363c109a4155fb7702eaa88819f00586b243aa.tar.bz2
gentoo-10363c109a4155fb7702eaa88819f00586b243aa.zip
dev-php/pecl-oauth: Revbump to fix dependencies and add php7-1
Package-Manager: Portage-2.3.4, Repoman-2.3.2
Diffstat (limited to 'dev-php/pecl-oauth')
-rw-r--r--dev-php/pecl-oauth/files/1.2.3-prce.h-check.patch26
-rw-r--r--dev-php/pecl-oauth/files/1.2.3-withcurl.patch71
-rw-r--r--dev-php/pecl-oauth/files/2.0.2-compare_segfault.patch48
-rw-r--r--dev-php/pecl-oauth/pecl-oauth-1.2.3-r5.ebuild56
-rw-r--r--dev-php/pecl-oauth/pecl-oauth-2.0.2-r1.ebuild54
5 files changed, 255 insertions, 0 deletions
diff --git a/dev-php/pecl-oauth/files/1.2.3-prce.h-check.patch b/dev-php/pecl-oauth/files/1.2.3-prce.h-check.patch
new file mode 100644
index 000000000000..995ef51f28ca
--- /dev/null
+++ b/dev-php/pecl-oauth/files/1.2.3-prce.h-check.patch
@@ -0,0 +1,26 @@
+From f12e2bd72b238da2dbf3bd0f882d977073cca282 Mon Sep 17 00:00:00 2001
+From: John Jawed <jawed@php.net>
+Date: Thu, 24 Jul 2014 15:19:18 +0000
+Subject: [PATCH] Bug #67658 (configure does not detect missing pcre.h)
+
+git-svn-id: https://svn.php.net/repository/pecl/oauth/trunk@334377 c90b9560-bf6c-de11-be94-00142212c4b1
+---
+ config.m4 | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/config.m4 b/config.m4
+index 48e2608..53a5ea8 100644
+--- a/config.m4
++++ b/config.m4
+@@ -14,6 +14,8 @@ if test "$PHP_OAUTH" != "no"; then
+ PHP_NEW_EXTENSION(oauth, oauth.c provider.c, $ext_shared)
+ CFLAGS="$CFLAGS -Wall -g"
+
++ AC_CHECK_HEADERS(pcre.h)
++
+ AS_IF([test "x$with_curl" != "xno"],
+ [
+ AC_MSG_CHECKING(for cURL in default path)
+--
+2.1.4
+
diff --git a/dev-php/pecl-oauth/files/1.2.3-withcurl.patch b/dev-php/pecl-oauth/files/1.2.3-withcurl.patch
new file mode 100644
index 000000000000..5069ae92b146
--- /dev/null
+++ b/dev-php/pecl-oauth/files/1.2.3-withcurl.patch
@@ -0,0 +1,71 @@
+From 1b68ce035883f1ae186d82682fbbc5ea7d1834b3 Mon Sep 17 00:00:00 2001
+From: John Jawed <jawed@php.net>
+Date: Fri, 18 Jan 2013 20:28:05 +0000
+Subject: [PATCH] Bug 64025 (patch via mattsch at gmail dot com)
+
+git-svn-id: https://svn.php.net/repository/pecl/oauth/trunk@329234 c90b9560-bf6c-de11-be94-00142212c4b1
+---
+ config.m4 | 40 ++++++++++++++++++++++++++--------------
+ 1 file changed, 26 insertions(+), 14 deletions(-)
+
+diff --git a/config.m4 b/config.m4
+index 832c577..48e2608 100644
+--- a/config.m4
++++ b/config.m4
+@@ -5,27 +5,39 @@ dnl
+ PHP_ARG_ENABLE(oauth, for oauth support,
+ [ --enable-oauth Include oauth support])
+
++AC_ARG_WITH([curl],
++ AS_HELP_STRING([--without-curl], [Ignore presence of cURL and disable it]))
++
+ if test "$PHP_OAUTH" != "no"; then
+ PHP_SUBST(OAUTH_SHARED_LIBADD)
+
+ PHP_NEW_EXTENSION(oauth, oauth.c provider.c, $ext_shared)
+ CFLAGS="$CFLAGS -Wall -g"
+
+- AC_MSG_CHECKING(for cURL in default path)
+- for i in /usr/local /usr; do
+- if test -r $i/include/curl/easy.h; then
+- CURL_DIR=$i
+- AC_MSG_RESULT(found in $i)
+- break
+- fi
+- done
++ AS_IF([test "x$with_curl" != "xno"],
++ [
++ AC_MSG_CHECKING(for cURL in default path)
++ have_curl=no
++ for i in /usr/local /usr; do
++ if test -r $i/include/curl/easy.h; then
++ have_curl=yes
++ CURL_DIR=$i
++ AC_MSG_RESULT(found in $i)
++ break
++ fi
++ done
++ ],
++ [have_curl=no])
+
+- if test -z "$CURL_DIR"; then
+- AC_MSG_RESULT(cURL not found, cURL support disabled)
+- else
+- PHP_ADD_LIBRARY(curl,,OAUTH_SHARED_LIBADD)
+- AC_DEFINE(OAUTH_USE_CURL, 1, [Whether cURL is present and should be used])
+- fi
++ AS_IF([test "x$have_curl" = "xyes"],
++ [
++ PHP_ADD_LIBRARY(curl,,OAUTH_SHARED_LIBADD)
++ AC_DEFINE(OAUTH_USE_CURL, 1, [Whether cURL is present and should be used])
++ ],
++ [AS_IF([test "x$with_curl" = "xyes"],
++ [AC_MSG_ERROR([cURL requested but not found])
++ ])
++ ])
+
+ PHP_ADD_EXTENSION_DEP(oauth, hash)
+ fi
+--
+2.1.4
+
diff --git a/dev-php/pecl-oauth/files/2.0.2-compare_segfault.patch b/dev-php/pecl-oauth/files/2.0.2-compare_segfault.patch
new file mode 100644
index 000000000000..f0b8d7ae216f
--- /dev/null
+++ b/dev-php/pecl-oauth/files/2.0.2-compare_segfault.patch
@@ -0,0 +1,48 @@
+From f1a5b6dea1982dab03c810edd321ca57907d41fe Mon Sep 17 00:00:00 2001
+From: Adam Saponara <as@php.net>
+Date: Fri, 24 Feb 2017 17:20:51 -0500
+Subject: [PATCH] Fix bug #74163: Segfault in oauth_compare_value
+
+Credit to @russpos for finding this bug
+---
+ oauth.c | 4 ++--
+ tests/oauth_sbs.phpt | 4 ++++
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/oauth.c b/oauth.c
+index 62522bd..198e2cb 100644
+--- a/oauth.c
++++ b/oauth.c
+@@ -374,8 +374,8 @@ static int oauth_strcmp(zval *first, zval *second)
+ static int oauth_compare_value(const void *a, const void *b)
+ {
+ Bucket *f, *s;
+- f = *(Bucket **)a;
+- s = *(Bucket **)b;
++ f = (Bucket *)a;
++ s = (Bucket *)b;
+
+ return oauth_strcmp(&f->val, &s->val);
+ }
+diff --git a/tests/oauth_sbs.phpt b/tests/oauth_sbs.phpt
+index a49d2b4..4e9269e 100644
+--- a/tests/oauth_sbs.phpt
++++ b/tests/oauth_sbs.phpt
+@@ -21,6 +21,8 @@ echo "-- putting oauth_signature inside by mistake --\n";
+ echo oauth_get_sbs('GET', 'http://127.0.0.1:12342/',array('oauth_signature'=>'hello world')),"\n";
+ echo "-- merging url query and extra params --\n";
+ echo oauth_get_sbs('GET', 'http://127.0.0.1:12342/script?arg1=1',array('arg2' => '2')),"\n";
++echo "-- with array value --\n";
++echo oauth_get_sbs('GET', 'http://127.0.0.1:12342/script',array('arg2' => [1, 2, 3])),"\n";
+
+ ?>
+ --EXPECTF--
+@@ -44,3 +46,5 @@ GET&http%3A%2F%2F127.0.0.1%3A12342%2F&test%3D
+ GET&http%3A%2F%2F127.0.0.1%3A12342%2F&
+ -- merging url query and extra params --
+ GET&http%3A%2F%2F127.0.0.1%3A12342%2Fscript&arg1%3D1%26arg2%3D2
++-- with array value --
++GET&http%3A%2F%2F127.0.0.1%3A12342%2Fscript&arg2%3D1%26arg2%3D2%26arg2%3D3
+--
+2.1.4
+
diff --git a/dev-php/pecl-oauth/pecl-oauth-1.2.3-r5.ebuild b/dev-php/pecl-oauth/pecl-oauth-1.2.3-r5.ebuild
new file mode 100644
index 000000000000..460f2c39256c
--- /dev/null
+++ b/dev-php/pecl-oauth/pecl-oauth-1.2.3-r5.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+PHP_EXT_NAME="oauth"
+PHP_EXT_INI="yes"
+PHP_EXT_ZENDEXT="no"
+
+USE_PHP="php5-6 php7-0 php7-1"
+
+inherit php-ext-pecl-r3
+
+# Really only build for 5.6
+USE_PHP="php5-6"
+
+KEYWORDS="~amd64 ~x86"
+
+DESCRIPTION="OAuth is an authorization protocol built on top of HTTP"
+LICENSE="BSD"
+SLOT="0"
+IUSE="+curl examples"
+
+DEPEND="php_targets_php5-6? ( dev-lang/php:5.6[hash]
+ dev-libs/libpcre:3= curl? ( net-misc/curl:0= ) )
+"
+RDEPEND="${DEPEND} php_targets_php7-0? ( ${CATEGORY}/${PN}:7[php_targets_php7-0(-)?] )
+ php_targets_php7-1? ( ${CATEGORY}/${PN}:7[php_targets_php7-1(-)?] )"
+
+src_prepare() {
+ if use php_targets_php5-6 ; then
+ local PATCHES=(
+ "${FILESDIR}/${PV}-withcurl.patch"
+ "${FILESDIR}/${PV}-prce.h-check.patch"
+ )
+ php-ext-source-r3_src_prepare
+ else
+ eapply_user
+ fi
+}
+
+src_configure() {
+ if use php_targets_php5-6 ; then
+ local PHP_EXT_ECONF_ARGS=(
+ --enable-oauth
+ $(use_with curl)
+ )
+
+ php-ext-source-r3_src_configure
+ fi
+}
+
+src_install() {
+ if use php_targets_php5-6 ; then
+ php-ext-pecl-r3_src_install
+ fi
+}
diff --git a/dev-php/pecl-oauth/pecl-oauth-2.0.2-r1.ebuild b/dev-php/pecl-oauth/pecl-oauth-2.0.2-r1.ebuild
new file mode 100644
index 000000000000..988ba351a82a
--- /dev/null
+++ b/dev-php/pecl-oauth/pecl-oauth-2.0.2-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+PHP_EXT_NAME="oauth"
+PHP_EXT_INI="yes"
+PHP_EXT_ZENDEXT="no"
+
+USE_PHP="php5-6 php7-0 php7-1"
+
+inherit php-ext-pecl-r3
+
+# Really only build for 7.0
+USE_PHP="php7-0 php7-1"
+
+KEYWORDS="~amd64 ~x86"
+
+DESCRIPTION="OAuth is an authorization protocol built on top of HTTP"
+LICENSE="BSD"
+SLOT="7"
+IUSE="+curl examples"
+
+DEPEND="php_targets_php7-0? ( dev-lang/php:7.0[hash]
+ dev-libs/libpcre:3= curl? ( net-misc/curl:0= ) )
+ php_targets_php7-1? ( dev-lang/php:7.1[hash]
+ dev-libs/libpcre:3= curl? ( net-misc/curl:0= ) )
+"
+RDEPEND="${DEPEND} php_targets_php5-6? ( ${CATEGORY}/${PN}:0[php_targets_php5-6(-)?] )"
+
+src_prepare() {
+ if use php_targets_php7-0 || use php_targets_php7-1 ; then
+ local PATCHES=( "${FILESDIR}/${PV}-compare_segfault.patch" )
+ php-ext-source-r3_src_prepare
+ else
+ eapply_user
+ fi
+}
+
+src_configure() {
+ if use php_targets_php7-0 || use php_targets_php7-1 ; then
+ local PHP_EXT_ECONF_ARGS=(
+ --enable-oauth
+ $(use_with curl)
+ )
+
+ php-ext-source-r3_src_configure
+ fi
+}
+
+src_install() {
+ if use php_targets_php7-0 || use php_targets_php7-1 ; then
+ php-ext-pecl-r3_src_install
+ fi
+}