Fix user creation (and probably other db-related issues) by removing

quotes around LANGUAGE 'plpgsql' declarations, needed since pgsql > 9.3.
Remove the patch that was fixing a single occurence, and apply some perl
-pi -e magic during post-patch instead.
Taken from https://gitlab.com/davical-project/davical/issues/26, tested
by viq.
This commit is contained in:
landry 2014-09-27 07:48:07 +00:00
parent 4838e46405
commit 30333c65d1
2 changed files with 6 additions and 25 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.10 2014/05/30 13:20:13 sthen Exp $
# $OpenBSD: Makefile,v 1.11 2014/09/27 07:48:07 landry Exp $
COMMENT = CalDAV/CardDav calendar/contacts server
DISTNAME = davical-1.1.1
REVISION = 4
REVISION = 5
CATEGORIES = productivity net
HOMEPAGE = http://www.davical.org/
@ -32,6 +32,10 @@ NO_BUILD = Yes
NO_TEST = Yes
PKG_ARCH = *
post-patch:
# fix sql files to remove quotes from LANGUAGE statements, breaks with pgsql 9.3.
cd ${WRKSRC} && grep -rl LANGUAGE dba | xargs perl -pi -e "s/LANGUAGE '(\w+)'/LANGUAGE \1/"
do-install:
${INSTALL_DATA_DIR} ${INSTDIR}
cp -Rp ${WRKSRC}/{README,INSTALL,dba,inc,config,htdocs,po,scripts} ${INSTDIR}

View File

@ -1,23 +0,0 @@
$OpenBSD: patch-dba_davical_sql,v 1.1 2012/11/11 20:50:18 landry Exp $
http://postgresql.1045698.n5.nabble.com/Buildfarm-now-building-but-with-test-failures-td5119291.html#a5120094
Fix with psql > 9.xx ?
--- dba/davical.sql.orig Sun Nov 11 21:36:43 2012
+++ dba/davical.sql Sun Nov 11 21:37:04 2012
@@ -36,7 +36,7 @@ BEGIN
ELSE 0 END)::BIT(24);
END
$$
-LANGUAGE 'PlPgSQL' IMMUTABLE STRICT;
+LANGUAGE PlPgSQL IMMUTABLE STRICT;
-- Given an array of verbose DAV: or CalDAV: privilege names return the bitmask
CREATE or REPLACE FUNCTION privilege_to_bits( TEXT[] ) RETURNS BIT(24) AS $$
@@ -62,7 +62,7 @@ BEGIN
RETURN out_bits;
END
$$
-LANGUAGE 'PlPgSQL' IMMUTABLE STRICT;
+LANGUAGE PlPgSQL IMMUTABLE STRICT;
-- This sequence is used in a number of places so that any DAV resource will have a unique ID