diff --git a/databases/pg_citus/Makefile b/databases/pg_citus/Makefile index e178094273e7..b45d5a4d83fd 100644 --- a/databases/pg_citus/Makefile +++ b/databases/pg_citus/Makefile @@ -1,34 +1,35 @@ PORTNAME= citus PORTVERSION= 11.2.0 +PORTREVISION= 1 DISTVERSIONPREFIX= v CATEGORIES= databases PKGNAMEPREFIX= pg_ MAINTAINER= matthew@FreeBSD.org COMMENT= Horizontally scale Postgresql using sharding and replication WWW= https://www.citusdata.com/ LICENSE= AGPLv3 USES= compiler:c11 gmake pgsql:12+ autoreconf readline ssl \ gettext-runtime LIB_DEPENDS= liblz4.so:archivers/liblz4 \ libzstd.so:archivers/zstd WANT_PGSQL= lib server GNU_CONFIGURE= yes OPTIONS_DEFINE= ANONSTATS ANONSTATS_DESC= Enable anonymous statistics collection ANONSTATS_CONFIGURE_WITH= libcurl ANONSTATS_LIB_DEPENDS= libcurl.so:ftp/curl USE_GITHUB= yes GH_ACCOUNT= citusdata INSTALL_TARGET= install-strip MAKE_ARGS= INSTALL="${INSTALL} -c" .include diff --git a/databases/pg_citus/files/patch-src_backend_distributed_commands_multi__copy.c b/databases/pg_citus/files/patch-src_backend_distributed_commands_multi__copy.c index 790a9981cf97..01041d008b54 100644 --- a/databases/pg_citus/files/patch-src_backend_distributed_commands_multi__copy.c +++ b/databases/pg_citus/files/patch-src_backend_distributed_commands_multi__copy.c @@ -1,10 +1,10 @@ ---- src/backend/distributed/commands/multi_copy.c.orig 2021-03-09 08:26:53 UTC +--- src/backend/distributed/commands/multi_copy.c.orig 2023-02-03 08:13:35 UTC +++ src/backend/distributed/commands/multi_copy.c -@@ -53,6 +53,7 @@ +@@ -50,6 +50,7 @@ #include /* for htons */ #include /* for htons */ +#include #include #include "distributed/pg_version_constants.h" diff --git a/databases/pg_citus/files/patch-src_include_pg__version__compat.h b/databases/pg_citus/files/patch-src_include_pg__version__compat.h new file mode 100644 index 000000000000..a421c728c951 --- /dev/null +++ b/databases/pg_citus/files/patch-src_include_pg__version__compat.h @@ -0,0 +1,28 @@ +--- src/include/pg_version_compat.h.orig 2023-02-15 11:30:17 UTC ++++ src/include/pg_version_compat.h +@@ -54,7 +54,14 @@ pg_strtoint64(char *s) + return result; + } + +- ++/* ++ * RelationGetSmgr got backported in 13.10 and 14.7 so redefining it for any ++ * version higher causes compilation errors due to redefining of the function. ++ * We want to use it in all versions. So we backport it ourselves in earlier ++ * versions, and rely on the Postgres provided version in the later versions. ++ */ ++#if PG_VERSION_NUM >= PG_VERSION_13 && PG_VERSION_NUM < 130010 \ ++ || PG_VERSION_NUM >= PG_VERSION_14 && PG_VERSION_NUM < 140007 + static inline SMgrRelation + RelationGetSmgr(Relation rel) + { +@@ -64,6 +71,9 @@ RelationGetSmgr(Relation rel) + } + return rel->rd_smgr; + } ++ ++ ++#endif + + + #define CREATE_SEQUENCE_COMMAND \