diff --git a/Makefile b/Makefile index a55761ce..bc21ff4c 100644 --- a/Makefile +++ b/Makefile @@ -68,6 +68,16 @@ REGRESS := $(filter-out add_table, $(REGRESS)) abs_top_builddir = . NO_TEMP_INSTALL = yes +# Override with_temp_install for extension testing. +# This allows spock tests to run without the pg*-090-init_template_fix.diff +# patch applied to PostgreSQL. Changes from default PGXS with_temp_install: +# 1. Remove INITDB_TEMPLATE - we don't use a temp install template +# 2. Use actual bindir/libdir - we use the installed PostgreSQL, not tmp_install +with_temp_install = \ + PATH="$(bindir):$(CURDIR):$$PATH" \ + $(call add_to_path,$(strip $(ld_library_path_var)),$(libdir)) \ + $(with_temp_install_extra) + # We can't do a normal 'make check' because PGXS doesn't support # creating a temp install. We don't want to use a normal PGXS # 'installcheck' though, because it's a pain to set up a temp install diff --git a/patches/17/pg17-090-init_template_fix.diff b/patches/17/pg17-090-init_template_fix.diff deleted file mode 100644 index ff436756..00000000 --- a/patches/17/pg17-090-init_template_fix.diff +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/src/Makefile.global.in b/src/Makefile.global.in -index a00c909681..c915f0a226 100644 ---- a/src/Makefile.global.in -+++ b/src/Makefile.global.in -@@ -409,10 +409,15 @@ ld_library_path_var = LD_LIBRARY_PATH - # with_temp_install_extra is for individual ports to define if they - # need something more here. If not defined then the expansion does - # nothing. --with_temp_install = \ -+ifdef NO_TEMP_INSTALL -+with_temp_install = -+else -+with_temp_install = INITDB_TEMPLATE='$(abs_top_builddir)'/tmp_install/initdb-template -+endif -+ -+with_temp_install += \ - PATH="$(abs_top_builddir)/tmp_install$(bindir):$(CURDIR):$$PATH" \ - $(call add_to_path,$(strip $(ld_library_path_var)),$(abs_top_builddir)/tmp_install$(libdir)) \ -- INITDB_TEMPLATE='$(abs_top_builddir)'/tmp_install/initdb-template \ - $(with_temp_install_extra) - - temp-install: | submake-generated-headers diff --git a/patches/18/pg18-090-init_template_fix.diff b/patches/18/pg18-090-init_template_fix.diff deleted file mode 100644 index 912a36b2..00000000 --- a/patches/18/pg18-090-init_template_fix.diff +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/src/Makefile.global.in b/src/Makefile.global.in -index 8b1b357beaa..227004fcd36 100644 ---- a/src/Makefile.global.in -+++ b/src/Makefile.global.in -@@ -425,10 +425,15 @@ ld_library_path_var = LD_LIBRARY_PATH - # with_temp_install_extra is for individual ports to define if they - # need something more here. If not defined then the expansion does - # nothing. --with_temp_install = \ -+ifdef NO_TEMP_INSTALL -+with_temp_install = -+else -+with_temp_install = INITDB_TEMPLATE='$(abs_top_builddir)'/tmp_install/initdb-template -+endif -+ -+with_temp_install += \ - PATH="$(abs_top_builddir)/tmp_install$(bindir):$(CURDIR):$$PATH" \ - $(call add_to_path,$(strip $(ld_library_path_var)),$(abs_top_builddir)/tmp_install$(libdir)) \ -- INITDB_TEMPLATE='$(abs_top_builddir)'/tmp_install/initdb-template \ - $(with_temp_install_extra) - - temp-install: | submake-generated-headers