summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--databases/postgresql80/Makefile.common20
1 files changed, 19 insertions, 1 deletions
diff --git a/databases/postgresql80/Makefile.common b/databases/postgresql80/Makefile.common
index 33b16a29acc..90c60be4838 100644
--- a/databases/postgresql80/Makefile.common
+++ b/databases/postgresql80/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.7 2005/08/08 22:20:34 jlam Exp $
+# $NetBSD: Makefile.common,v 1.8 2005/08/08 23:19:26 jlam Exp $
#
# This Makefile fragment is included by all PostgreSQL packages built from
# the main sources of the PostgreSQL distribution except jdbc-postgresql.
@@ -135,3 +135,21 @@ post-extract:
>${WRKSRC}/src/backend/port/dynloader/$$template.c
fi
.endif
+
+# PGSQL_BLCKSZ is the size in bytes of a PostgreSQL disk page or block.
+# This also limits the size of a tuple. The valid values are powers
+# of 2 up to 32768, and the default size is 8196 (hardcoded in the
+# PostgreSQL sources). Please don't change this value unless you know
+# what you are doing.
+#
+BUILD_DEFS+= PGSQL_BLCKSZ
+
+.if defined(PGSQL_BLCKSZ)
+.PHONY: pgsql-blcksz
+pre-configure: pgsql-blcksz
+pgsql-blcksz:
+ for file in ${WRKSRC}/src/include/pg_config_manual.h; do \
+ ${SED} -e "/^#define[ ]*BLCKSZ[ ]*/s/^\(#define[ ]*BLCKSZ\).*/\1 ${PGSQL_BLCKSZ}/" $$file > $$file.new; \
+ ${MV} -f $$file.new $$file; \
+ done
+.endif