summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Bruhin2016-01-14 16:16:08 +0100
committerFlorian Bruhin2016-01-14 16:16:08 +0100
commitd466e574c75d070bd9e93ce0846cb5c34476fbbd (patch)
tree76a3af29ff59593399d58a23dfcbe0136d7a95e8
parent69edfe42fabaadaf87474ca563d79d2940ac26d6 (diff)
downloadaur-d466e574c75d070bd9e93ce0846cb5c34476fbbd.tar.gz
Add patch for PHP7 compatibility.
See: https://github.com/fruux/sabre-dav/commit/c9f3e7d2be11872eb36873c5410bac476d815871 https://github.com/netgusto/Baikal/issues/420
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD13
-rw-r--r--php7.patch59
3 files changed, 74 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 055c2fb533c3..fc59f562ed5d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,9 @@
+# Generated by mksrcinfo v8
+# Thu Jan 14 15:16:05 UTC 2016
pkgbase = baikal
pkgdesc = Lightweight CalDAV+CardDAV server
pkgver = 0.2.7
- pkgrel = 5
+ pkgrel = 6
url = http://baikal-server.com/
install = baikal.install
arch = any
@@ -13,8 +15,10 @@ pkgbase = baikal
options = !strip
source = http://baikal-server.com/get/baikal-regular-0.2.7.tgz
source = baikal.install
+ source = php7.patch
sha1sums = 01eabcf0229ddffc0542f4e2a349754e778abbea
sha1sums = a1d2f36b6c4a282d23477dccb957c3ad3995f116
+ sha1sums = e1c586c6549f08966c101a5f5125011c5a172f12
pkgname = baikal
diff --git a/PKGBUILD b/PKGBUILD
index 9b5cc7cf8fd6..6c5d05d3162d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=baikal
pkgver=0.2.7
-pkgrel=5
+pkgrel=6
pkgdesc="Lightweight CalDAV+CardDAV server"
url="http://baikal-server.com/"
arch=('any')
@@ -11,12 +11,19 @@ license=('GPL')
depends=('php')
optdepends=('sqlite: Database' 'mariadb: Alternate database' 'php-sqlite: To use the sqlite backend')
source=("http://baikal-server.com/get/baikal-regular-${pkgver}.tgz"
- 'baikal.install')
+ 'baikal.install'
+ 'php7.patch')
sha1sums=('01eabcf0229ddffc0542f4e2a349754e778abbea'
- 'a1d2f36b6c4a282d23477dccb957c3ad3995f116')
+ 'a1d2f36b6c4a282d23477dccb957c3ad3995f116'
+ 'e1c586c6549f08966c101a5f5125011c5a172f12')
options=('!strip')
install=baikal.install
+prepare() {
+ cd "${srcdir}/baikal-regular"
+ patch -p0 -i ../php7.patch
+}
+
package() {
cd "${srcdir}/baikal-regular"
install -dm 755 "$pkgdir"/usr/share/{webapps,doc}"/$pkgname"
diff --git a/php7.patch b/php7.patch
new file mode 100644
index 000000000000..56356515133e
--- /dev/null
+++ b/php7.patch
@@ -0,0 +1,59 @@
+# Based on:
+# https://github.com/fruux/sabre-dav/commit/c9f3e7d2be11872eb36873c5410bac476d815871
+# https://github.com/netgusto/Baikal/issues/420#issuecomment-170257207
+--- vendor/sabre/dav/lib/Sabre/CalDAV/CalendarQueryValidator.php.orig 2014-11-17 11:57:29.000000000 +0100
++++ vendor/sabre/dav/lib/Sabre/CalDAV/CalendarQueryValidator.php 2016-01-14 16:09:17.019090596 +0100
+@@ -59,7 +59,7 @@
+
+ foreach($filters as $filter) {
+
+- $isDefined = isset($parent->$filter['name']);
++ $isDefined = isset($parent->{$filter['name']});
+
+ if ($filter['is-not-defined']) {
+
+@@ -75,7 +75,7 @@
+ }
+
+ if ($filter['time-range']) {
+- foreach($parent->$filter['name'] as $subComponent) {
++ foreach($parent->{$filter['name']} as $subComponent) {
+ if ($this->validateTimeRange($subComponent, $filter['time-range']['start'], $filter['time-range']['end'])) {
+ continue 2;
+ }
+@@ -89,7 +89,7 @@
+
+ // If there are sub-filters, we need to find at least one component
+ // for which the subfilters hold true.
+- foreach($parent->$filter['name'] as $subComponent) {
++ foreach($parent->{$filter['name']} as $subComponent) {
+
+ if (
+ $this->validateCompFilters($subComponent, $filter['comp-filters']) &&
+@@ -128,7 +128,7 @@
+
+ foreach($filters as $filter) {
+
+- $isDefined = isset($parent->$filter['name']);
++ $isDefined = isset($parent->{$filter['name']});
+
+ if ($filter['is-not-defined']) {
+
+@@ -144,7 +144,7 @@
+ }
+
+ if ($filter['time-range']) {
+- foreach($parent->$filter['name'] as $subComponent) {
++ foreach($parent->{$filter['name']} as $subComponent) {
+ if ($this->validateTimeRange($subComponent, $filter['time-range']['start'], $filter['time-range']['end'])) {
+ continue 2;
+ }
+@@ -158,7 +158,7 @@
+
+ // If there are sub-filters, we need to find at least one property
+ // for which the subfilters hold true.
+- foreach($parent->$filter['name'] as $subComponent) {
++ foreach($parent->{$filter['name']} as $subComponent) {
+
+ if(
+ $this->validateParamFilters($subComponent, $filter['param-filters']) &&