php.extensions.couchbase: 2.6.2 -> 3.1.2
This commit is contained in:
parent
5e1ad948cf
commit
565885bb4b
|
@ -1,7 +1,7 @@
|
||||||
{ lib, buildPecl, fetchFromGitHub, writeText, libcouchbase, zlib, php }:
|
{ lib, buildPecl, fetchFromGitHub, writeText, libcouchbase, zlib, php, substituteAll }:
|
||||||
let
|
let
|
||||||
pname = "couchbase";
|
pname = "couchbase";
|
||||||
version = "2.6.2";
|
version = "3.1.2";
|
||||||
in
|
in
|
||||||
buildPecl {
|
buildPecl {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
|
@ -10,38 +10,19 @@ buildPecl {
|
||||||
owner = "couchbase";
|
owner = "couchbase";
|
||||||
repo = "php-couchbase";
|
repo = "php-couchbase";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0ymrymnz91qg9b2ns044qg46wc65dffhxx402wpx1b5cj2vr4ma3";
|
sha256 = "0zm2jm5lzjjqlhkiivm4v5gr4286pwqaf5nar1ga816hhwnyhj42";
|
||||||
};
|
};
|
||||||
|
|
||||||
configureFlags = [ "--with-couchbase" ];
|
configureFlags = [ "--with-couchbase" ];
|
||||||
|
|
||||||
buildInputs = [ libcouchbase zlib ];
|
buildInputs = [ libcouchbase zlib ];
|
||||||
internalDeps = lib.optionals (lib.versionOlder php.version "8.0") [ php.extensions.json ];
|
internalDeps = lib.optionals (lib.versionOlder php.version "8.0") [ php.extensions.json ];
|
||||||
peclDeps = [ php.extensions.igbinary ];
|
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
(writeText "php-couchbase.patch" ''
|
(substituteAll {
|
||||||
--- a/config.m4
|
src = ./libcouchbase.patch;
|
||||||
+++ b/config.m4
|
inherit libcouchbase;
|
||||||
@@ -9,7 +9,7 @@ if test "$PHP_COUCHBASE" != "no"; then
|
})
|
||||||
LIBCOUCHBASE_DIR=$PHP_COUCHBASE
|
|
||||||
else
|
|
||||||
AC_MSG_CHECKING(for libcouchbase in default path)
|
|
||||||
- for i in /usr/local /usr; do
|
|
||||||
+ for i in ${libcouchbase}; do
|
|
||||||
if test -r $i/include/libcouchbase/couchbase.h; then
|
|
||||||
LIBCOUCHBASE_DIR=$i
|
|
||||||
AC_MSG_RESULT(found in $i)
|
|
||||||
@@ -154,6 +154,8 @@ COUCHBASE_FILES=" \
|
|
||||||
igbinary_inc_path="$phpincludedir"
|
|
||||||
elif test -f "$phpincludedir/ext/igbinary/igbinary.h"; then
|
|
||||||
igbinary_inc_path="$phpincludedir"
|
|
||||||
+ elif test -f "${php.extensions.igbinary.dev}/include/ext/igbinary/igbinary.h"; then
|
|
||||||
+ igbinary_inc_path="${php.extensions.igbinary.dev}/include"
|
|
||||||
fi
|
|
||||||
if test "$igbinary_inc_path" = ""; then
|
|
||||||
AC_MSG_WARN([Cannot find igbinary.h])
|
|
||||||
'')
|
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
@ -49,6 +30,5 @@ buildPecl {
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
homepage = "https://docs.couchbase.com/php-sdk/current/project-docs/sdk-release-notes.html";
|
homepage = "https://docs.couchbase.com/php-sdk/current/project-docs/sdk-release-notes.html";
|
||||||
maintainers = teams.php.members;
|
maintainers = teams.php.members;
|
||||||
broken = versionAtLeast php.version "8.0";
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
11
pkgs/development/php-packages/couchbase/libcouchbase.patch
Normal file
11
pkgs/development/php-packages/couchbase/libcouchbase.patch
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- a/config.m4
|
||||||
|
+++ b/config.m4
|
||||||
|
@@ -28,7 +28,7 @@ if test "$PHP_COUCHBASE" != "no"; then
|
||||||
|
|
||||||
|
dnl fallback on standard directory
|
||||||
|
else
|
||||||
|
- for i in /usr/local /usr; do
|
||||||
|
+ for i in @libcouchbase@; do
|
||||||
|
if test -r $i/include/libcouchbase/couchbase.h; then
|
||||||
|
LIBCOUCHBASE_DIR=$i
|
||||||
|
AC_MSG_RESULT(found in $i)
|
Loading…
Reference in a new issue