From 6bcf4fa57b2aa4a94480381cbfcf2359e62ddcf9 Mon Sep 17 00:00:00 2001 From: Marc-Antoine Parent Date: Thu, 11 Jan 2024 22:20:13 -0500 Subject: [PATCH] update with latest brew --- Formula/postgresql_plpy@15.rb | 95 ++++++++++++++++++---------------- Formula/postgresql_plpy@16.rb | 97 ++++++++++++++++++----------------- 2 files changed, 101 insertions(+), 91 deletions(-) diff --git a/Formula/postgresql_plpy@15.rb b/Formula/postgresql_plpy@15.rb index cf58133..91b0d5e 100644 --- a/Formula/postgresql_plpy@15.rb +++ b/Formula/postgresql_plpy@15.rb @@ -1,10 +1,10 @@ class PostgresqlPlpyAT15 < Formula desc "Python3 as procedural language for Postgres" homepage "https://www.postgresql.org/" - url "https://ftp.postgresql.org/pub/source/v15.4/postgresql-15.4.tar.bz2" - sha256 "baec5a4bdc4437336653b6cb5d9ed89be5bd5c0c58b94e0becee0a999e63c8f9" + url "https://ftp.postgresql.org/pub/source/v15.5/postgresql-15.5.tar.bz2" + sha256 "8f53aa95d78eb8e82536ea46b68187793b42bba3b4f65aa342f540b23c9b10a6" license "PostgreSQL" - revision 1 + revision 2 livecheck do url "https://ftp.postgresql.org/pub/source/" @@ -17,26 +17,28 @@ class PostgresqlPlpyAT15 < Formula deprecate! date: "2027-11-11", because: :unsupported depends_on "postgresql@15" - depends_on "python@3.10" + depends_on "python@3.11" def install print "#{buildpath}/stage" ENV.delete "PKG_CONFIG_LIBDIR" ENV.prepend "LDFLAGS", "-L#{Formula["openssl@3"].opt_lib} -L#{Formula["readline"].opt_lib}" ENV.prepend "CPPFLAGS", "-I#{Formula["openssl@3"].opt_include} -I#{Formula["readline"].opt_include}" - ENV.prepend "PYTHON", "#{HOMEBREW_PREFIX}/opt/python@3.10/bin/python3.10" + ENV.prepend "PYTHON", "#{HOMEBREW_PREFIX}/opt/python@3.11/bin/python3.11" - # Fix 'libintl.h' file not found for extensions - ENV.prepend "LDFLAGS", "-L#{Formula["gettext"].opt_lib}" - ENV.prepend "CPPFLAGS", "-I#{Formula["gettext"].opt_include}" + if OS.mac? + # Fix 'libintl.h' file not found for extensions + ENV.prepend "LDFLAGS", "-L#{Formula["gettext"].opt_lib}" + ENV.prepend "CPPFLAGS", "-I#{Formula["gettext"].opt_include}" + end args = std_configure_args + %W[ - --prefix=#{prefix} --datadir=#{HOMEBREW_PREFIX}/share/postgresql@15 - --libdir=#{opt_lib} - --includedir=#{opt_include} + --libdir=#{HOMEBREW_PREFIX}/lib/postgresql@15 + --includedir=#{HOMEBREW_PREFIX}/include/postgresql@15 --sysconfdir=#{etc} --docdir=#{doc} + --mandir=#{libexec}/man --enable-nls --enable-thread-safety --with-gssapi @@ -45,10 +47,12 @@ def install --with-libxml --with-libxslt --with-lz4 + --with-zstd --with-openssl --with-pam --with-python --with-uuid=e2fs + --with-extra-version=\ (#{tap.user}) ] if OS.mac? args += %w[ @@ -59,55 +63,56 @@ def install # PostgreSQL by default uses xcodebuild internally to determine this, # which does not work on CLT-only installs. - args << "PG_SYSROOT=#{MacOS.sdk_path}" if MacOS.sdk_root_needed? + args << "PG_SYSROOT=#{MacOS.sdk_path}" if OS.mac? && MacOS.sdk_root_needed? system "./configure", *args - system "make", "pkglibdir=#{opt_lib}/postgresql", - "pkgincludedir=#{opt_include}/postgresql", - "includedir_server=#{opt_include}/postgresql/server" + system "make", "pkglibdir=#{lib}/postgresql@15", + "pkgincludedir=#{include}/postgresql@15", + "includedir_server=#{include}/postgresql@15/server" mkdir "stage" chdir "src/pl/plpython" do system "make", "install", "DESTDIR=#{buildpath}/stage", - "datadir=#{HOMEBREW_PREFIX}/share/postgresql@15", - "libdir=#{lib}", - "pkglibdir=#{lib}/postgresql", - "includedir=#{include}", - "pkgincludedir=#{include}/postgresql", - "includedir_server=#{include}/postgresql/server", - "includedir_internal=#{include}/postgresql/internal" + "datadir=#{share}/postgresql@15", + "libdir=#{lib}/postgresql@15", + "pkglibdir=#{lib}/postgresql@15", + "includedir=#{include}/postgresql@15", + "pkgincludedir=#{include}/postgresql@15", + "includedir_server=#{include}/postgresql@15/server", + "includedir_internal=#{include}/postgresql@15/internal" end chdir "contrib/hstore_plpython" do system "make", "install", "DESTDIR=#{buildpath}/stage", - "datadir=#{HOMEBREW_PREFIX}/share/postgresql@15", - "libdir=#{lib}", - "pkglibdir=#{lib}/postgresql", - "includedir=#{include}", - "pkgincludedir=#{include}/postgresql", - "includedir_server=#{include}/postgresql/server", - "includedir_internal=#{include}/postgresql/internal" + "datadir=#{share}/postgresql@15", + "libdir=#{lib}/postgresql@15", + "pkglibdir=#{lib}/postgresql@15", + "includedir=#{include}/postgresql@15", + "pkgincludedir=#{include}/postgresql@15", + "includedir_server=#{include}/postgresql@15/server", + "includedir_internal=#{include}/postgresql@15/internal" end chdir "contrib/ltree_plpython" do system "make", "install", "DESTDIR=#{buildpath}/stage", - "datadir=#{HOMEBREW_PREFIX}/share/postgresql@15", - "libdir=#{lib}", - "pkglibdir=#{lib}/postgresql", - "includedir=#{include}", - "pkgincludedir=#{include}/postgresql", - "includedir_server=#{include}/postgresql/server", - "includedir_internal=#{include}/postgresql/internal" + "datadir=#{share}/postgresql@15", + "libdir=#{lib}/postgresql@15", + "pkglibdir=#{lib}/postgresql@15", + "includedir=#{include}/postgresql@15", + "pkgincludedir=#{include}/postgresql@15", + "includedir_server=#{include}/postgresql@15/server", + "includedir_internal=#{include}/postgresql@15/internal" end chdir "contrib/jsonb_plpython" do system "make", "install", "DESTDIR=#{buildpath}/stage", - "datadir=#{HOMEBREW_PREFIX}/share/postgresql@15", - "libdir=#{lib}", - "pkglibdir=#{lib}/postgresql", - "includedir=#{include}", - "pkgincludedir=#{include}/postgresql", - "includedir_server=#{include}/postgresql/server", - "includedir_internal=#{include}/postgresql/internal" + "datadir=#{share}/postgresql@15", + "libdir=#{lib}/postgresql@15", + "pkglibdir=#{lib}/postgresql@15", + "includedir=#{include}/postgresql@15", + "pkgincludedir=#{include}/postgresql@15", + "includedir_server=#{include}/postgresql@15/server", + "includedir_internal=#{include}/postgresql@15/internal" end - (lib/"postgresql").install Dir["stage/**/lib/postgresql/*"] - (include/"postgresql/server").install Dir["stage/**/include/postgresql/server/*"] + (lib/"postgresql@15").install Dir["stage/**/lib/postgresql@15/*"] + (include/"postgresql@15/server").install Dir["stage/**/include/postgresql@15/server/*"] + (share/"postgresql@15").install Dir["stage/**/share/postgresql@15/*"] (share/"postgresql@15/extension").install Dir["stage/**/share/postgresql@15/extension/*"] end end diff --git a/Formula/postgresql_plpy@16.rb b/Formula/postgresql_plpy@16.rb index a75a303..16050ff 100644 --- a/Formula/postgresql_plpy@16.rb +++ b/Formula/postgresql_plpy@16.rb @@ -1,10 +1,10 @@ class PostgresqlPlpyAT16 < Formula desc "Python3 as procedural language for Postgres" homepage "https://www.postgresql.org/" - url "https://ftp.postgresql.org/pub/source/v16.0/postgresql-16.0.tar.bz2" - sha256 "df9e823eb22330444e1d48e52cc65135a652a6fdb3ce325e3f08549339f51b99" + url "https://ftp.postgresql.org/pub/source/v16.1/postgresql-16.1.tar.bz2" + sha256 "ce3c4d85d19b0121fe0d3f8ef1fa601f71989e86f8a66f7dc3ad546dd5564fec" license "PostgreSQL" - revision 1 + revision 2 livecheck do url "https://ftp.postgresql.org/pub/source/" @@ -17,26 +17,28 @@ class PostgresqlPlpyAT16 < Formula deprecate! date: "2028-11-09", because: :unsupported depends_on "postgresql@16" - depends_on "python@3.10" + depends_on "python@3.11" def install print "#{buildpath}/stage" ENV.delete "PKG_CONFIG_LIBDIR" ENV.prepend "LDFLAGS", "-L#{Formula["openssl@3"].opt_lib} -L#{Formula["readline"].opt_lib}" ENV.prepend "CPPFLAGS", "-I#{Formula["openssl@3"].opt_include} -I#{Formula["readline"].opt_include}" - ENV.prepend "PYTHON", "#{HOMEBREW_PREFIX}/opt/python@3.10/bin/python3.10" + ENV.prepend "PYTHON", "#{HOMEBREW_PREFIX}/opt/python@3.11/bin/python3.11" - # Fix 'libintl.h' file not found for extensions - ENV.prepend "LDFLAGS", "-L#{Formula["gettext"].opt_lib}" - ENV.prepend "CPPFLAGS", "-I#{Formula["gettext"].opt_include}" + if OS.mac? + # Fix 'libintl.h' file not found for extensions + ENV.prepend "LDFLAGS", "-L#{Formula["gettext"].opt_lib}" + ENV.prepend "CPPFLAGS", "-I#{Formula["gettext"].opt_include}" + end args = std_configure_args + %W[ - --prefix=#{prefix} --datadir=#{HOMEBREW_PREFIX}/share/postgresql@16 - --libdir=#{opt_lib} - --includedir=#{opt_include} + --libdir=#{HOMEBREW_PREFIX}/lib/postgresql@16 + --includedir=#{HOMEBREW_PREFIX}/include/postgresql@16 --sysconfdir=#{etc} --docdir=#{doc} + --mandir=#{libexec}/man --enable-nls --enable-thread-safety --with-gssapi @@ -45,10 +47,12 @@ def install --with-libxml --with-libxslt --with-lz4 + --with-zstd --with-openssl --with-pam --with-python --with-uuid=e2fs + --with-extra-version=\ (#{tap.user}) ] if OS.mac? args += %w[ @@ -59,55 +63,56 @@ def install # PostgreSQL by default uses xcodebuild internally to determine this, # which does not work on CLT-only installs. - args << "PG_SYSROOT=#{MacOS.sdk_path}" if MacOS.sdk_root_needed? + args << "PG_SYSROOT=#{MacOS.sdk_path}" if OS.mac? && MacOS.sdk_root_needed? system "./configure", *args - system "make", "pkglibdir=#{opt_lib}/postgresql", - "pkgincludedir=#{opt_include}/postgresql", - "includedir_server=#{opt_include}/postgresql/server" + system "make", "pkglibdir=#{lib}/postgresql@16", + "pkgincludedir=#{include}/postgresql@16", + "includedir_server=#{include}/postgresql@16/server" mkdir "stage" chdir "src/pl/plpython" do system "make", "install", "DESTDIR=#{buildpath}/stage", - "datadir=#{HOMEBREW_PREFIX}/share/postgresql@16", - "libdir=#{lib}", - "pkglibdir=#{lib}/postgresql", - "includedir=#{include}", - "pkgincludedir=#{include}/postgresql", - "includedir_server=#{include}/postgresql/server", - "includedir_internal=#{include}/postgresql/internal" + "datadir=#{share}/postgresql@16", + "libdir=#{lib}/postgresql@16", + "pkglibdir=#{lib}/postgresql@16", + "includedir=#{include}/postgresql@16", + "pkgincludedir=#{include}/postgresql@16", + "includedir_server=#{include}/postgresql@16/server", + "includedir_internal=#{include}/postgresql@16/internal" end chdir "contrib/hstore_plpython" do system "make", "install", "DESTDIR=#{buildpath}/stage", - "datadir=#{HOMEBREW_PREFIX}/share/postgresql@16", - "libdir=#{lib}", - "pkglibdir=#{lib}/postgresql", - "includedir=#{include}", - "pkgincludedir=#{include}/postgresql", - "includedir_server=#{include}/postgresql/server", - "includedir_internal=#{include}/postgresql/internal" + "datadir=#{share}/postgresql@16", + "libdir=#{lib}/postgresql@16", + "pkglibdir=#{lib}/postgresql@16", + "includedir=#{include}/postgresql@16", + "pkgincludedir=#{include}/postgresql@16", + "includedir_server=#{include}/postgresql@16/server", + "includedir_internal=#{include}/postgresql@16/internal" end chdir "contrib/ltree_plpython" do system "make", "install", "DESTDIR=#{buildpath}/stage", - "datadir=#{HOMEBREW_PREFIX}/share/postgresql@16", - "libdir=#{lib}", - "pkglibdir=#{lib}/postgresql", - "includedir=#{include}", - "pkgincludedir=#{include}/postgresql", - "includedir_server=#{include}/postgresql/server", - "includedir_internal=#{include}/postgresql/internal" + "datadir=#{share}/postgresql@16", + "libdir=#{lib}/postgresql@16", + "pkglibdir=#{lib}/postgresql@16", + "includedir=#{include}/postgresql@16", + "pkgincludedir=#{include}/postgresql@16", + "includedir_server=#{include}/postgresql@16/server", + "includedir_internal=#{include}/postgresql@16/internal" end chdir "contrib/jsonb_plpython" do system "make", "install", "DESTDIR=#{buildpath}/stage", - "datadir=#{HOMEBREW_PREFIX}/share/postgresql@16", - "libdir=#{lib}", - "pkglibdir=#{lib}/postgresql", - "includedir=#{include}", - "pkgincludedir=#{include}/postgresql", - "includedir_server=#{include}/postgresql/server", - "includedir_internal=#{include}/postgresql/internal" + "datadir=#{share}/postgresql@16", + "libdir=#{lib}/postgresql@16", + "pkglibdir=#{lib}/postgresql@16", + "includedir=#{include}/postgresql@16", + "pkgincludedir=#{include}/postgresql@16", + "includedir_server=#{include}/postgresql@16/server", + "includedir_internal=#{include}/postgresql@16/internal" end - (lib/"postgresql").install Dir["stage/**/lib/postgresql/*"] - (include/"postgresql/server").install Dir["stage/**/include/postgresql/server/*"] - (share/"postgresql@16/extension").install Dir["stage/**/share/postgresql@16/extension/*"] + (lib/"postgresql@16").install Dir["stage/**/lib/postgresql@16/*"] + # (include/"postgresql@16/server").install Dir["stage/**/include/postgresql@16/server/*"] + # (share/"postgresql@16").install Dir["stage/**/share/postgresql@16/*"] + # (share/"postgresql@16/extension").install Dir["stage/**/share/postgresql@16/extension/*"] end end