├── .cirrus.yml ├── README.md ├── formula_renames.json ├── postgresql-common.rb ├── postgresql@10.rb ├── postgresql@11.rb ├── postgresql@12.rb ├── postgresql@13.rb ├── postgresql@14.rb ├── postgresql@15.rb ├── postgresql@16.rb ├── postgresql@17.rb ├── postgresql@18.rb ├── postgresql@8.3.rb ├── postgresql@8.4.rb ├── postgresql@9.0.rb ├── postgresql@9.1.rb ├── postgresql@9.2.rb ├── postgresql@9.3.rb ├── postgresql@9.4.rb ├── postgresql@9.5.rb └── postgresql@9.6.rb /.cirrus.yml: -------------------------------------------------------------------------------- 1 | task: 2 | name: macOS 3 | trigger_type: manual 4 | macos_instance: 5 | matrix: 6 | - image: ghcr.io/cirruslabs/macos-runner:sonoma 7 | env: 8 | matrix: 9 | - PACKAGE: postgresql-common 10 | - PACKAGE: postgresql@18 11 | - PACKAGE: postgresql@17 12 | - PACKAGE: postgresql@16 13 | - PACKAGE: postgresql@15 14 | - PACKAGE: postgresql@14 15 | - PACKAGE: postgresql@13 16 | - PACKAGE: postgresql@12 17 | - PACKAGE: postgresql@11 18 | - PACKAGE: postgresql@10 19 | - PACKAGE: postgresql@9.6 20 | - PACKAGE: postgresql@9.5 21 | - PACKAGE: postgresql@9.4 22 | install_opt: '--HEAD' 23 | - PACKAGE: postgresql@9.3 24 | install_opt: '--HEAD' 25 | - PACKAGE: postgresql@9.2 26 | install_opt: '--HEAD' 27 | setup_script: 28 | - brew update 29 | - mkdir -p $(brew --repo)/Library/Taps/cirrus 30 | - ln -s $PWD $(brew --repo)/Library/Taps/cirrus/homebrew-testtap 31 | - brew tap --repair 32 | build_script: 33 | - brew install -v $install_opt cirrus/testtap/$PACKAGE 34 | - brew postinstall cirrus/testtap/$PACKAGE 35 | - brew audit --except=file,specs cirrus/testtap/$PACKAGE 36 | - brew test cirrus/testtap/$PACKAGE 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Homebrew PostgreSQL things 2 | ========================== 3 | 4 | These formulae allow installing multiple versions of PostgreSQL in parallel. This is similar to what you can do on certain Linux distributions, for example Debian. 5 | 6 | To install something, first `brew tap petere/postgresql` and then `brew install `. Since there might be name overlaps with core Homebrew formulae, you should use fully qualified formula names like `brew install petere/postgresql/postgresql-common`. 7 | 8 | [![Build Status](https://travis-ci.org/petere/homebrew-postgresql.svg?branch=master)](https://travis-ci.org/petere/homebrew-postgresql) 9 | 10 | Details 11 | ------- 12 | 13 | Since PostgreSQL major releases have incompatible data directories and other occasional incompatibilities, it is useful for many developers to keep several major versions installed in parallel for development, testing, and production. So far, Homebrew had inconsistent support for that and did not provide the full range of supported major versions. This tap provides versioned formulae named `postgresql@9.5`, `postgresql@9.6`, etc. that you can install in parallel. Technically, these are "keg-only", which has the nice side effect that they are automatically installed in side-by-side directories `/usr/local/opt/postgresql@9.6/` etc. 14 | 15 | To use the programs installed by these formulae, do one or more of the following, in increasing order of preference: 16 | 17 | - Call all programs explicitly with `/usr/local/opt/postgresql@9.6/bin/...`. This will be boring in the long run. 18 | - Add your preferred `/usr/local/opt/postgresql@x.y/bin` etc. to your path. Preferably to the front, to come before the operating system's PostgreSQL installation. This will work alright, but depending on your setup, it might be difficult to get everything on the OS to see the same path. 19 | - `brew link -f` the `postgresql@x.y` formula you prefer to use. 20 | - Install the `postgresql-common` package (see below). 21 | 22 | The versioned formulae can be installed alongside the main `postgresql` formula in Homebrew. But there will be a conflict if you do `brew link -f` or install `postgresql-common`, so in those cases you have to uninstall the main `postgresql` package first. This is not a problem, however, because the versioned packages provide the same functionality. 23 | 24 | Build options 25 | ------------- 26 | 27 | The standard `postgresql` formula in Homebrew is missing a number of build options and also has a number of build options that I find useless. These formulae enable all `configure` options that macOS can support, but also remove a number of Homebrew-level build options, to reduce complexity. I have also dropped supported for legacy macOS concerns, such as 32-bit Intel and PowerPC and really old macOS releases. Mainly because I can't test that anymore, YMMV. 28 | 29 | Old versions 30 | ------------ 31 | 32 | I keep old and deprecated versions of PostgreSQL in this repository instead of removing them, because they are sometimes useful to have handy, and also for curiosity. But note that over time, the oldest versions will stop building and/or running on newer operating system versions. The PostgreSQL major versions that are still maintained upstream are expected to work, but anything beyond that is best-effort and YMMV. 33 | 34 | postgresql-common cluster manager 35 | --------------------------------- 36 | 37 | `postgresql-common` is a port of the postgresql-common package from Debian, which contains programs that help manage these multiple versioned installations, and programs to manage multiple PostgreSQL instances (clusters). The port a bit experimental, but it works. 38 | 39 | See `/usr/local/opt/postgresql-common/README.Debian` to get started. If you have used Debian or Ubuntu before, you'll feel right at home (I hope). 40 | 41 | The general idea is that for server-side operations you use the special wrapper scripts `pg_createcluster`, `pg_dropcluster`, `pg_ctlcluster`, and `pg_lsclusters` instead of `initdb` and `pg_ctl`. The scripts take version numbers and instance names (which map to directory names). For example: 42 | 43 | pg_createcluster 9.6 test 44 | pg_ctlcluster 9.6 test start 45 | 46 | See the respective man pages for details. 47 | 48 | For client-side operations, to usual tools such as `psql` and `pg_dump` are wrapped to automatically use the right version for the instance they are connecting to, so you usually don't need to do anything special. See the man page `pg_wrapper` for details. 49 | 50 | Extensions 51 | ---------- 52 | 53 | To install extensions, I recommend 54 | [Pex](https://github.com/petere/pex). It has support for multiple 55 | PostgreSQL installations and can easily support to the installation 56 | scheme used by these packages. Example: 57 | 58 | pex -g /usr/local/opt/postgresql@9.6 install ip4r 59 | -------------------------------------------------------------------------------- /formula_renames.json: -------------------------------------------------------------------------------- 1 | { 2 | "postgresql-8.3": "postgresql@8.3", 3 | "postgresql-8.4": "postgresql@8.4", 4 | "postgresql-9.0": "postgresql@9.0", 5 | "postgresql-9.1": "postgresql@9.1", 6 | "postgresql-9.2": "postgresql@9.2", 7 | "postgresql-9.3": "postgresql@9.3", 8 | "postgresql-9.4": "postgresql@9.4", 9 | "postgresql-9.5": "postgresql@9.5", 10 | "postgresql-9.6": "postgresql@9.6", 11 | "postgresql-10": "postgresql@10" 12 | } 13 | -------------------------------------------------------------------------------- /postgresql-common.rb: -------------------------------------------------------------------------------- 1 | class PostgresqlCommon < Formula 2 | desc "PostgreSQL database-cluster manager" 3 | homepage "https://packages.qa.debian.org/p/postgresql-common.html" 4 | version = "189+hb1" 5 | url "https://github.com/petere/postgresql-common/archive/#{version}.tar.gz" 6 | version version 7 | sha256 "8db9347cdecee81507dcd92d61c9f20f72d5ed4fac9a1a8afe93e75e9398bc84" 8 | license "GPL-2.0-or-later" 9 | 10 | head "https://github.com/petere/postgresql-common.git", branch: "homebrew" 11 | 12 | depends_on "gnu-sed" => :build 13 | depends_on "coreutils" 14 | 15 | conflicts_with "postgresql", because: "both install the same binaries" 16 | 17 | def install 18 | ENV.prepend_path "PATH", Formula["gnu-sed"].opt_bin 19 | ENV.prepend_path "PATH", Formula["gnu-sed"].opt_libexec/"gnubin" 20 | 21 | %w[Makefile PgCommon.pm].each do |f| 22 | inreplace f, "/usr/local/opt", HOMEBREW_PREFIX/"opt" 23 | end 24 | system "make", "install", "GSED=sed", "prefix=#{prefix}", "sysconfdir=#{etc}", "localstatedir=#{var}" 25 | prefix.install "debian/README.Debian", "architecture.html" 26 | 27 | (var/"lib/postgresql").mkpath 28 | (var/"log/postgresql").mkpath 29 | end 30 | 31 | test do 32 | system bin/"pg_lsclusters" 33 | end 34 | end 35 | -------------------------------------------------------------------------------- /postgresql@10.rb: -------------------------------------------------------------------------------- 1 | class PostgresqlAT10 < Formula 2 | desc "Relational database management system" 3 | homepage "https://www.postgresql.org/" 4 | version = "10.23" 5 | url "https://ftp.postgresql.org/pub/source/v#{version}/postgresql-#{version}.tar.bz2" 6 | sha256 "94a4b2528372458e5662c18d406629266667c437198160a18cdfd2c4a4d6eee9" 7 | license "PostgreSQL" 8 | 9 | livecheck do 10 | url "https://ftp.postgresql.org/pub/source/" 11 | regex(%r{href=["']?v?(10(?:\.\d+)*)/?["' >]}i) 12 | end 13 | 14 | head do 15 | url "https://git.postgresql.org/git/postgresql.git", branch: "REL_10_STABLE" 16 | 17 | depends_on "docbook-xsl" => :build 18 | depends_on "open-sp" => :build 19 | depends_on "petere/sgml/docbook-sgml" => :build 20 | end 21 | 22 | keg_only :versioned_formula 23 | 24 | option "with-cassert", "Enable assertion checks (for debugging)" 25 | deprecated_option "enable-cassert" => "with-cassert" 26 | 27 | # https://www.postgresql.org/support/versioning/ 28 | deprecate! date: "2022-11-10", because: :unsupported 29 | 30 | depends_on "pkg-config" => :build 31 | 32 | depends_on "gettext" 33 | depends_on "icu4c" 34 | depends_on "openldap" 35 | depends_on "openssl" 36 | depends_on "python@3" 37 | depends_on "readline" 38 | depends_on "tcl-tk" 39 | 40 | def install 41 | args = %W[ 42 | --prefix=#{prefix} 43 | --enable-dtrace 44 | --enable-nls 45 | --with-bonjour 46 | --with-gssapi 47 | --with-icu 48 | --with-ldap 49 | --with-libxml 50 | --with-libxslt 51 | --with-openssl 52 | --with-uuid=e2fs 53 | --with-pam 54 | --with-perl 55 | --with-python 56 | --with-tcl 57 | PYTHON=python3 58 | XML2_CONFIG=: 59 | ] 60 | 61 | # Add include and library directories of dependencies, so that 62 | # they can be used for compiling extensions. Superenv does this 63 | # when compiling this package, but won't record it for pg_config. 64 | deps = %w[gettext icu4c openldap openssl@1.1 readline tcl-tk] 65 | with_includes = deps.map { |f| Formula[f].opt_include }.join(":") 66 | with_libraries = deps.map { |f| Formula[f].opt_lib }.join(":") 67 | args << "--with-includes=#{with_includes}" 68 | args << "--with-libraries=#{with_libraries}" 69 | 70 | args << "--enable-cassert" if build.with? "cassert" 71 | 72 | extra_version = "" 73 | extra_version += "+git" if build.head? 74 | extra_version += " (Homebrew petere/postgresql)" 75 | args << "--with-extra-version=#{extra_version}" 76 | 77 | ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" 78 | 79 | system "./configure", *args 80 | system "make", "install-world" 81 | end 82 | 83 | def caveats 84 | <<~EOS 85 | To use this PostgreSQL installation, do one or more of the following: 86 | 87 | - Call all programs explicitly with #{opt_prefix}/bin/... 88 | - Add #{opt_bin} to your PATH 89 | - brew link -f #{name} 90 | - Install the postgresql-common package 91 | 92 | To access the man pages, do one or more of the following: 93 | - Refer to them by their full path, like `man #{opt_share}/man/man1/psql.1` 94 | - Add #{opt_share}/man to your MANPATH 95 | - brew link -f #{name} 96 | EOS 97 | end 98 | 99 | test do 100 | system "#{bin}/initdb", "pgdata" 101 | end 102 | end 103 | -------------------------------------------------------------------------------- /postgresql@11.rb: -------------------------------------------------------------------------------- 1 | class PostgresqlAT11 < Formula 2 | desc "Relational database management system" 3 | homepage "https://www.postgresql.org/" 4 | version = "11.22" 5 | url "https://ftp.postgresql.org/pub/source/v#{version}/postgresql-#{version}.tar.bz2" 6 | sha256 "2cb7c97d7a0d7278851bbc9c61f467b69c094c72b81740b751108e7892ebe1f0" 7 | license "PostgreSQL" 8 | 9 | livecheck do 10 | url "https://ftp.postgresql.org/pub/source/" 11 | regex(%r{href=["']?v?(11(?:\.\d+)*)/?["' >]}i) 12 | end 13 | 14 | head do 15 | url "https://git.postgresql.org/git/postgresql.git", branch: "REL_11_STABLE" 16 | 17 | depends_on "docbook-xsl" => :build 18 | end 19 | 20 | keg_only :versioned_formula 21 | 22 | option "with-cassert", "Enable assertion checks (for debugging)" 23 | deprecated_option "enable-cassert" => "with-cassert" 24 | 25 | # https://www.postgresql.org/support/versioning/ 26 | deprecate! date: "2023-11-09", because: :unsupported 27 | 28 | depends_on "pkg-config" => :build 29 | 30 | depends_on "gettext" 31 | depends_on "icu4c" 32 | depends_on "openldap" 33 | depends_on "openssl" 34 | depends_on "python@3" 35 | depends_on "readline" 36 | depends_on "tcl-tk" 37 | depends_on "llvm" => :optional 38 | 39 | def install 40 | args = %W[ 41 | --prefix=#{prefix} 42 | --enable-dtrace 43 | --enable-nls 44 | --with-bonjour 45 | --with-gssapi 46 | --with-icu 47 | --with-ldap 48 | --with-libxml 49 | --with-libxslt 50 | --with-openssl 51 | --with-uuid=e2fs 52 | --with-pam 53 | --with-perl 54 | --with-python 55 | --with-tcl 56 | PYTHON=python3 57 | XML2_CONFIG=: 58 | ] 59 | 60 | # Add include and library directories of dependencies, so that 61 | # they can be used for compiling extensions. Superenv does this 62 | # when compiling this package, but won't record it for pg_config. 63 | deps = %w[gettext icu4c openldap openssl@1.1 readline tcl-tk] 64 | with_includes = deps.map { |f| Formula[f].opt_include }.join(":") 65 | with_libraries = deps.map { |f| Formula[f].opt_lib }.join(":") 66 | args << "--with-includes=#{with_includes}" 67 | args << "--with-libraries=#{with_libraries}" 68 | 69 | args << "--enable-cassert" if build.with? "cassert" 70 | args << "--with-llvm" if build.with? "llvm" 71 | 72 | extra_version = "" 73 | extra_version += "+git" if build.head? 74 | extra_version += " (Homebrew petere/postgresql)" 75 | args << "--with-extra-version=#{extra_version}" 76 | 77 | ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" 78 | 79 | system "./configure", *args 80 | system "make", "install-world" 81 | end 82 | 83 | def caveats 84 | <<~EOS 85 | To use this PostgreSQL installation, do one or more of the following: 86 | 87 | - Call all programs explicitly with #{opt_prefix}/bin/... 88 | - Add #{opt_bin} to your PATH 89 | - brew link -f #{name} 90 | - Install the postgresql-common package 91 | 92 | To access the man pages, do one or more of the following: 93 | - Refer to them by their full path, like `man #{opt_share}/man/man1/psql.1` 94 | - Add #{opt_share}/man to your MANPATH 95 | - brew link -f #{name} 96 | EOS 97 | end 98 | 99 | test do 100 | system "#{bin}/initdb", "pgdata" 101 | end 102 | end 103 | -------------------------------------------------------------------------------- /postgresql@12.rb: -------------------------------------------------------------------------------- 1 | class PostgresqlAT12 < Formula 2 | desc "Relational database management system" 3 | homepage "https://www.postgresql.org/" 4 | version = "12.22" 5 | url "https://ftp.postgresql.org/pub/source/v#{version}/postgresql-#{version}.tar.bz2" 6 | sha256 "8df3c0474782589d3c6f374b5133b1bd14d168086edbc13c6e72e67dd4527a3b" 7 | license "PostgreSQL" 8 | 9 | livecheck do 10 | url "https://ftp.postgresql.org/pub/source/" 11 | regex(%r{href=["']?v?(12(?:\.\d+)*)/?["' >]}i) 12 | end 13 | 14 | head do 15 | url "https://git.postgresql.org/git/postgresql.git", branch: "REL_12_STABLE" 16 | 17 | depends_on "docbook-xsl" => :build 18 | end 19 | 20 | keg_only :versioned_formula 21 | 22 | option "with-cassert", "Enable assertion checks (for debugging)" 23 | deprecated_option "enable-cassert" => "with-cassert" 24 | 25 | # https://www.postgresql.org/support/versioning/ 26 | deprecate! date: "2024-11-14", because: :unsupported 27 | 28 | depends_on "pkg-config" => :build 29 | 30 | depends_on "gettext" 31 | depends_on "icu4c" 32 | depends_on "openldap" 33 | depends_on "openssl" 34 | depends_on "python@3" 35 | depends_on "readline" 36 | depends_on "tcl-tk" 37 | depends_on "llvm" => :optional 38 | 39 | def install 40 | args = %W[ 41 | --prefix=#{prefix} 42 | --enable-dtrace 43 | --enable-nls 44 | --with-bonjour 45 | --with-gssapi 46 | --with-icu 47 | --with-ldap 48 | --with-libxml 49 | --with-libxslt 50 | --with-openssl 51 | --with-uuid=e2fs 52 | --with-pam 53 | --with-perl 54 | --with-python 55 | --with-tcl 56 | PYTHON=python3 57 | XML2_CONFIG=: 58 | ] 59 | 60 | # Add include and library directories of dependencies, so that 61 | # they can be used for compiling extensions. Superenv does this 62 | # when compiling this package, but won't record it for pg_config. 63 | deps = %w[gettext icu4c openldap openssl@1.1 readline tcl-tk] 64 | with_includes = deps.map { |f| Formula[f].opt_include }.join(":") 65 | with_libraries = deps.map { |f| Formula[f].opt_lib }.join(":") 66 | args << "--with-includes=#{with_includes}" 67 | args << "--with-libraries=#{with_libraries}" 68 | 69 | args << "--enable-cassert" if build.with? "cassert" 70 | args << "--with-llvm" if build.with? "llvm" 71 | 72 | extra_version = "" 73 | extra_version += "+git" if build.head? 74 | extra_version += " (Homebrew petere/postgresql)" 75 | args << "--with-extra-version=#{extra_version}" 76 | 77 | ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" 78 | 79 | system "./configure", *args 80 | system "make", "install-world" 81 | end 82 | 83 | def caveats 84 | <<~EOS 85 | To use this PostgreSQL installation, do one or more of the following: 86 | 87 | - Call all programs explicitly with #{opt_prefix}/bin/... 88 | - Add #{opt_bin} to your PATH 89 | - brew link -f #{name} 90 | - Install the postgresql-common package 91 | 92 | To access the man pages, do one or more of the following: 93 | - Refer to them by their full path, like `man #{opt_share}/man/man1/psql.1` 94 | - Add #{opt_share}/man to your MANPATH 95 | - brew link -f #{name} 96 | EOS 97 | end 98 | 99 | test do 100 | system "#{bin}/initdb", "pgdata" 101 | end 102 | end 103 | -------------------------------------------------------------------------------- /postgresql@13.rb: -------------------------------------------------------------------------------- 1 | class PostgresqlAT13 < Formula 2 | desc "Relational database management system" 3 | homepage "https://www.postgresql.org/" 4 | version = "13.21" 5 | url "https://ftp.postgresql.org/pub/source/v#{version}/postgresql-#{version}.tar.bz2" 6 | sha256 "dcda1294df45f033b0656cf7a8e4afbbc624c25e1b144aec79530f74d7ef4ab4" 7 | license "PostgreSQL" 8 | 9 | livecheck do 10 | url "https://ftp.postgresql.org/pub/source/" 11 | regex(%r{href=["']?v?(13(?:\.\d+)*)/?["' >]}i) 12 | end 13 | 14 | head do 15 | url "https://git.postgresql.org/git/postgresql.git", branch: "REL_13_STABLE" 16 | 17 | depends_on "docbook-xsl" => :build 18 | end 19 | 20 | keg_only :versioned_formula 21 | 22 | option "with-cassert", "Enable assertion checks (for debugging)" 23 | deprecated_option "enable-cassert" => "with-cassert" 24 | 25 | # https://www.postgresql.org/support/versioning/ 26 | deprecate! date: "2025-11-13", because: :unsupported 27 | 28 | depends_on "pkg-config" => :build 29 | 30 | depends_on "gettext" 31 | depends_on "icu4c" 32 | depends_on "openldap" 33 | depends_on "openssl" 34 | depends_on "python@3" 35 | depends_on "readline" 36 | depends_on "tcl-tk" 37 | depends_on "llvm" => :optional 38 | 39 | def install 40 | args = %W[ 41 | --prefix=#{prefix} 42 | --enable-dtrace 43 | --enable-nls 44 | --with-bonjour 45 | --with-gssapi 46 | --with-icu 47 | --with-ldap 48 | --with-libxml 49 | --with-libxslt 50 | --with-openssl 51 | --with-uuid=e2fs 52 | --with-pam 53 | --with-perl 54 | --with-python 55 | --with-tcl 56 | PYTHON=python3 57 | XML2_CONFIG=: 58 | ] 59 | 60 | # Add include and library directories of dependencies, so that 61 | # they can be used for compiling extensions. Superenv does this 62 | # when compiling this package, but won't record it for pg_config. 63 | deps = %w[gettext icu4c openldap openssl@1.1 readline tcl-tk] 64 | with_includes = deps.map { |f| Formula[f].opt_include }.join(":") 65 | with_libraries = deps.map { |f| Formula[f].opt_lib }.join(":") 66 | args << "--with-includes=#{with_includes}" 67 | args << "--with-libraries=#{with_libraries}" 68 | 69 | args << "--enable-cassert" if build.with? "cassert" 70 | args << "--with-llvm" if build.with? "llvm" 71 | 72 | extra_version = "" 73 | extra_version += "+git" if build.head? 74 | extra_version += " (Homebrew petere/postgresql)" 75 | args << "--with-extra-version=#{extra_version}" 76 | 77 | ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" 78 | 79 | system "./configure", *args 80 | system "make", "install-world" 81 | end 82 | 83 | def caveats 84 | <<~EOS 85 | To use this PostgreSQL installation, do one or more of the following: 86 | 87 | - Call all programs explicitly with #{opt_prefix}/bin/... 88 | - Add #{opt_bin} to your PATH 89 | - brew link -f #{name} 90 | - Install the postgresql-common package 91 | 92 | To access the man pages, do one or more of the following: 93 | - Refer to them by their full path, like `man #{opt_share}/man/man1/psql.1` 94 | - Add #{opt_share}/man to your MANPATH 95 | - brew link -f #{name} 96 | EOS 97 | end 98 | 99 | test do 100 | system "#{bin}/initdb", "pgdata" 101 | end 102 | end 103 | -------------------------------------------------------------------------------- /postgresql@14.rb: -------------------------------------------------------------------------------- 1 | class PostgresqlAT14 < Formula 2 | desc "Relational database management system" 3 | homepage "https://www.postgresql.org/" 4 | version = "14.18" 5 | url "https://ftp.postgresql.org/pub/source/v#{version}/postgresql-#{version}.tar.bz2" 6 | sha256 "83ab29d6bfc3dc58b2ed3c664114fdfbeb6a0450c4b8d7fa69aee91e3ca14f8e" 7 | license "PostgreSQL" 8 | 9 | head do 10 | url "https://git.postgresql.org/git/postgresql.git", branch: "REL_14_STABLE" 11 | 12 | depends_on "docbook-xsl" => :build 13 | end 14 | 15 | keg_only :versioned_formula 16 | 17 | option "with-cassert", "Enable assertion checks (for debugging)" 18 | deprecated_option "enable-cassert" => "with-cassert" 19 | 20 | # https://www.postgresql.org/support/versioning/ 21 | deprecate! date: "2026-11-12", because: :unsupported 22 | 23 | depends_on "pkg-config" => :build 24 | 25 | depends_on "gettext" 26 | depends_on "icu4c" 27 | depends_on "lz4" 28 | depends_on "openldap" 29 | depends_on "openssl" 30 | depends_on "python@3" 31 | depends_on "readline" 32 | depends_on "tcl-tk" 33 | depends_on "llvm" => :optional 34 | 35 | def install 36 | args = %W[ 37 | --prefix=#{prefix} 38 | --enable-dtrace 39 | --enable-nls 40 | --with-bonjour 41 | --with-gssapi 42 | --with-icu 43 | --with-ldap 44 | --with-libxml 45 | --with-libxslt 46 | --with-lz4 47 | --with-openssl 48 | --with-uuid=e2fs 49 | --with-pam 50 | --with-perl 51 | --with-python 52 | --with-tcl 53 | PYTHON=python3 54 | XML2_CONFIG=: 55 | ] 56 | 57 | # Add include and library directories of dependencies, so that 58 | # they can be used for compiling extensions. Superenv does this 59 | # when compiling this package, but won't record it for pg_config. 60 | deps = %w[gettext icu4c openldap openssl@1.1 readline tcl-tk] 61 | with_includes = deps.map { |f| Formula[f].opt_include }.join(":") 62 | with_libraries = deps.map { |f| Formula[f].opt_lib }.join(":") 63 | args << "--with-includes=#{with_includes}" 64 | args << "--with-libraries=#{with_libraries}" 65 | 66 | args << "--enable-cassert" if build.with? "cassert" 67 | args << "--with-llvm" if build.with? "llvm" 68 | 69 | extra_version = "" 70 | extra_version += "+git" if build.head? 71 | extra_version += " (Homebrew petere/postgresql)" 72 | args << "--with-extra-version=#{extra_version}" 73 | 74 | ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" 75 | 76 | system "./configure", *args 77 | system "make", "install-world" 78 | end 79 | 80 | def caveats 81 | <<~EOS 82 | To use this PostgreSQL installation, do one or more of the following: 83 | 84 | - Call all programs explicitly with #{opt_prefix}/bin/... 85 | - Add #{opt_bin} to your PATH 86 | - brew link -f #{name} 87 | - Install the postgresql-common package 88 | 89 | To access the man pages, do one or more of the following: 90 | - Refer to them by their full path, like `man #{opt_share}/man/man1/psql.1` 91 | - Add #{opt_share}/man to your MANPATH 92 | - brew link -f #{name} 93 | EOS 94 | end 95 | 96 | test do 97 | system "#{bin}/initdb", "pgdata" 98 | end 99 | end 100 | -------------------------------------------------------------------------------- /postgresql@15.rb: -------------------------------------------------------------------------------- 1 | class PostgresqlAT15 < Formula 2 | desc "Relational database management system" 3 | homepage "https://www.postgresql.org/" 4 | version = "15.13" 5 | url "https://ftp.postgresql.org/pub/source/v#{version}/postgresql-#{version}.tar.bz2" 6 | version version 7 | sha256 "4f62e133d22ea08a0401b0840920e26698644d01a80c34341fb732dd0a90ca5d" 8 | license "PostgreSQL" 9 | 10 | head do 11 | url "https://git.postgresql.org/git/postgresql.git", branch: "REL_15_STABLE" 12 | 13 | depends_on "docbook-xsl" => :build 14 | end 15 | 16 | keg_only :versioned_formula 17 | 18 | option "with-cassert", "Enable assertion checks (for debugging)" 19 | deprecated_option "enable-cassert" => "with-cassert" 20 | 21 | # https://www.postgresql.org/support/versioning/ 22 | deprecate! date: "2027-11-11", because: :unsupported 23 | 24 | depends_on "pkg-config" => :build 25 | 26 | depends_on "gettext" 27 | depends_on "icu4c" 28 | depends_on "lz4" 29 | depends_on "openldap" 30 | depends_on "openssl" 31 | depends_on "python@3" 32 | depends_on "readline" 33 | depends_on "tcl-tk" 34 | depends_on "zstd" 35 | depends_on "llvm" => :optional 36 | 37 | def install 38 | args = %W[ 39 | --prefix=#{prefix} 40 | --enable-dtrace 41 | --enable-nls 42 | --with-bonjour 43 | --with-gssapi 44 | --with-icu 45 | --with-ldap 46 | --with-libxml 47 | --with-libxslt 48 | --with-lz4 49 | --with-openssl 50 | --with-uuid=e2fs 51 | --with-pam 52 | --with-perl 53 | --with-python 54 | --with-tcl 55 | --with-zstd 56 | PYTHON=python3 57 | XML2_CONFIG=: 58 | ] 59 | 60 | # Add include and library directories of dependencies, so that 61 | # they can be used for compiling extensions. Superenv does this 62 | # when compiling this package, but won't record it for pg_config. 63 | deps = %w[gettext icu4c openldap openssl@1.1 readline tcl-tk] 64 | with_includes = deps.map { |f| Formula[f].opt_include }.join(":") 65 | with_libraries = deps.map { |f| Formula[f].opt_lib }.join(":") 66 | args << "--with-includes=#{with_includes}" 67 | args << "--with-libraries=#{with_libraries}" 68 | 69 | args << "--enable-cassert" if build.with? "cassert" 70 | args << "--with-llvm" if build.with? "llvm" 71 | 72 | extra_version = "" 73 | extra_version += "+git" if build.head? 74 | extra_version += " (Homebrew petere/postgresql)" 75 | args << "--with-extra-version=#{extra_version}" 76 | 77 | ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" 78 | 79 | system "./configure", *args 80 | system "make", "install-world" 81 | end 82 | 83 | def caveats 84 | <<~EOS 85 | To use this PostgreSQL installation, do one or more of the following: 86 | 87 | - Call all programs explicitly with #{opt_prefix}/bin/... 88 | - Add #{opt_bin} to your PATH 89 | - brew link -f #{name} 90 | - Install the postgresql-common package 91 | 92 | To access the man pages, do one or more of the following: 93 | - Refer to them by their full path, like `man #{opt_share}/man/man1/psql.1` 94 | - Add #{opt_share}/man to your MANPATH 95 | - brew link -f #{name} 96 | EOS 97 | end 98 | 99 | test do 100 | system "#{bin}/initdb", "pgdata" 101 | end 102 | end 103 | -------------------------------------------------------------------------------- /postgresql@16.rb: -------------------------------------------------------------------------------- 1 | class PostgresqlAT16 < Formula 2 | desc "Relational database management system" 3 | homepage "https://www.postgresql.org/" 4 | version = "16.9" 5 | url "https://ftp.postgresql.org/pub/source/v#{version}/postgresql-#{version}.tar.bz2" 6 | version version 7 | sha256 "07c00fb824df0a0c295f249f44691b86e3266753b380c96f633c3311e10bd005" 8 | license "PostgreSQL" 9 | 10 | head do 11 | url "https://git.postgresql.org/git/postgresql.git", branch: "REL_16_STABLE" 12 | 13 | depends_on "docbook-xsl" => :build 14 | end 15 | 16 | keg_only :versioned_formula 17 | 18 | option "with-cassert", "Enable assertion checks (for debugging)" 19 | deprecated_option "enable-cassert" => "with-cassert" 20 | 21 | # https://www.postgresql.org/support/versioning/ 22 | deprecate! date: "2028-11-09", because: :unsupported 23 | 24 | depends_on "pkg-config" => :build 25 | 26 | depends_on "gettext" 27 | depends_on "icu4c" 28 | depends_on "krb5" 29 | depends_on "lz4" 30 | depends_on "openldap" 31 | depends_on "openssl" 32 | depends_on "python@3" 33 | depends_on "readline" 34 | depends_on "tcl-tk" 35 | depends_on "zstd" 36 | depends_on "llvm" => :optional 37 | 38 | def install 39 | args = %W[ 40 | --prefix=#{prefix} 41 | --enable-dtrace 42 | --enable-nls 43 | --with-bonjour 44 | --with-gssapi 45 | --with-icu 46 | --with-ldap 47 | --with-libxml 48 | --with-libxslt 49 | --with-lz4 50 | --with-openssl 51 | --with-uuid=e2fs 52 | --with-pam 53 | --with-perl 54 | --with-python 55 | --with-tcl 56 | --with-zstd 57 | PYTHON=python3 58 | XML2_CONFIG=: 59 | ] 60 | 61 | # Add include and library directories of dependencies, so that 62 | # they can be used for compiling extensions. Superenv does this 63 | # when compiling this package, but won't record it for pg_config. 64 | deps = %w[gettext icu4c openldap openssl@1.1 readline tcl-tk] 65 | with_includes = deps.map { |f| Formula[f].opt_include }.join(":") 66 | with_libraries = deps.map { |f| Formula[f].opt_lib }.join(":") 67 | args << "--with-includes=#{with_includes}" 68 | args << "--with-libraries=#{with_libraries}" 69 | 70 | args << "--enable-cassert" if build.with? "cassert" 71 | args << "--with-llvm" if build.with? "llvm" 72 | 73 | extra_version = "" 74 | extra_version += "+git" if build.head? 75 | extra_version += " (Homebrew petere/postgresql)" 76 | args << "--with-extra-version=#{extra_version}" 77 | 78 | ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" 79 | 80 | system "./configure", *args 81 | system "make", "install-world" 82 | end 83 | 84 | def caveats 85 | <<~EOS 86 | To use this PostgreSQL installation, do one or more of the following: 87 | 88 | - Call all programs explicitly with #{opt_prefix}/bin/... 89 | - Add #{opt_bin} to your PATH 90 | - brew link -f #{name} 91 | - Install the postgresql-common package 92 | 93 | To access the man pages, do one or more of the following: 94 | - Refer to them by their full path, like `man #{opt_share}/man/man1/psql.1` 95 | - Add #{opt_share}/man to your MANPATH 96 | - brew link -f #{name} 97 | EOS 98 | end 99 | 100 | test do 101 | system "#{bin}/initdb", "pgdata" 102 | end 103 | end 104 | -------------------------------------------------------------------------------- /postgresql@17.rb: -------------------------------------------------------------------------------- 1 | class PostgresqlAT17 < Formula 2 | desc "Relational database management system" 3 | homepage "https://www.postgresql.org/" 4 | version = "17.5" 5 | url "https://ftp.postgresql.org/pub/source/v#{version}/postgresql-#{version}.tar.bz2" 6 | version version 7 | sha256 "fcb7ab38e23b264d1902cb25e6adafb4525a6ebcbd015434aeef9eda80f528d8" 8 | license "PostgreSQL" 9 | 10 | head do 11 | url "https://git.postgresql.org/git/postgresql.git", branch: "REL_17_STABLE" 12 | 13 | depends_on "docbook-xsl" => :build 14 | end 15 | 16 | keg_only :versioned_formula 17 | 18 | option "with-cassert", "Enable assertion checks (for debugging)" 19 | deprecated_option "enable-cassert" => "with-cassert" 20 | 21 | # https://www.postgresql.org/support/versioning/ 22 | deprecate! date: "2029-11-08", because: :unsupported 23 | 24 | depends_on "docbook-xsl" => :build 25 | depends_on "pkg-config" => :build 26 | 27 | depends_on "gettext" 28 | depends_on "icu4c" 29 | depends_on "krb5" 30 | depends_on "lz4" 31 | depends_on "openldap" 32 | depends_on "openssl" 33 | depends_on "python@3" 34 | depends_on "readline" 35 | depends_on "tcl-tk" 36 | depends_on "zstd" 37 | depends_on "llvm" => :optional 38 | 39 | def install 40 | args = %W[ 41 | --prefix=#{prefix} 42 | --enable-dtrace 43 | --enable-nls 44 | --with-bonjour 45 | --with-gssapi 46 | --with-icu 47 | --with-ldap 48 | --with-libxml 49 | --with-libxslt 50 | --with-lz4 51 | --with-openssl 52 | --with-uuid=e2fs 53 | --with-pam 54 | --with-perl 55 | --with-python 56 | --with-tcl 57 | --with-zstd 58 | PYTHON=python3 59 | XML2_CONFIG=: 60 | ] 61 | 62 | # Add include and library directories of dependencies, so that 63 | # they can be used for compiling extensions. Superenv does this 64 | # when compiling this package, but won't record it for pg_config. 65 | deps = %w[gettext icu4c openldap openssl@1.1 readline tcl-tk] 66 | with_includes = deps.map { |f| Formula[f].opt_include }.join(":") 67 | with_libraries = deps.map { |f| Formula[f].opt_lib }.join(":") 68 | args << "--with-includes=#{with_includes}" 69 | args << "--with-libraries=#{with_libraries}" 70 | 71 | args << "--enable-cassert" if build.with? "cassert" 72 | args << "--with-llvm" if build.with? "llvm" 73 | 74 | extra_version = "" 75 | extra_version += "+git" if build.head? 76 | extra_version += " (Homebrew petere/postgresql)" 77 | args << "--with-extra-version=#{extra_version}" 78 | 79 | ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" 80 | 81 | system "./configure", *args 82 | system "make", "install-world" 83 | end 84 | 85 | def caveats 86 | <<~EOS 87 | To use this PostgreSQL installation, do one or more of the following: 88 | 89 | - Call all programs explicitly with #{opt_prefix}/bin/... 90 | - Add #{opt_bin} to your PATH 91 | - brew link -f #{name} 92 | - Install the postgresql-common package 93 | 94 | To access the man pages, do one or more of the following: 95 | - Refer to them by their full path, like `man #{opt_share}/man/man1/psql.1` 96 | - Add #{opt_share}/man to your MANPATH 97 | - brew link -f #{name} 98 | EOS 99 | end 100 | 101 | test do 102 | system "#{bin}/initdb", "pgdata" 103 | end 104 | end 105 | -------------------------------------------------------------------------------- /postgresql@18.rb: -------------------------------------------------------------------------------- 1 | class PostgresqlAT18 < Formula 2 | desc "Relational database management system" 3 | homepage "https://www.postgresql.org/" 4 | version = "18beta1" 5 | url "https://ftp.postgresql.org/pub/source/v#{version}/postgresql-#{version}.tar.bz2" 6 | version version 7 | sha256 "0b7c83df6195398aa67dbf5c002e7fa4082be393aae99aa69926d483f98eb885" 8 | license "PostgreSQL" 9 | 10 | head do 11 | url "https://git.postgresql.org/git/postgresql.git", branch: "master" 12 | 13 | depends_on "docbook-xsl" => :build 14 | end 15 | 16 | keg_only :versioned_formula 17 | 18 | option "with-cassert", "Enable assertion checks (for debugging)" 19 | deprecated_option "enable-cassert" => "with-cassert" 20 | 21 | # https://www.postgresql.org/support/versioning/ 22 | #deprecate! date: "2030-11-NN", because: :unsupported 23 | 24 | depends_on "docbook-xsl" => :build 25 | depends_on "pkg-config" => :build 26 | 27 | depends_on "gettext" 28 | depends_on "icu4c" 29 | depends_on "krb5" 30 | depends_on "lz4" 31 | depends_on "openldap" 32 | depends_on "openssl" 33 | depends_on "python@3" 34 | depends_on "readline" 35 | depends_on "tcl-tk" 36 | depends_on "zstd" 37 | depends_on "llvm" => :optional 38 | 39 | def install 40 | args = %W[ 41 | --prefix=#{prefix} 42 | --enable-dtrace 43 | --enable-nls 44 | --with-bonjour 45 | --with-gssapi 46 | --with-icu 47 | --with-ldap 48 | --with-libxml 49 | --with-libxslt 50 | --with-lz4 51 | --with-openssl 52 | --with-uuid=e2fs 53 | --with-pam 54 | --with-perl 55 | --with-python 56 | --with-tcl 57 | --with-zstd 58 | PYTHON=python3 59 | XML2_CONFIG=: 60 | ] 61 | 62 | # Add include and library directories of dependencies, so that 63 | # they can be used for compiling extensions. Superenv does this 64 | # when compiling this package, but won't record it for pg_config. 65 | deps = %w[gettext icu4c openldap openssl@1.1 readline tcl-tk] 66 | with_includes = deps.map { |f| Formula[f].opt_include }.join(":") 67 | with_libraries = deps.map { |f| Formula[f].opt_lib }.join(":") 68 | args << "--with-includes=#{with_includes}" 69 | args << "--with-libraries=#{with_libraries}" 70 | 71 | args << "--enable-cassert" if build.with? "cassert" 72 | args << "--with-llvm" if build.with? "llvm" 73 | 74 | extra_version = "" 75 | extra_version += "+git" if build.head? 76 | extra_version += " (Homebrew petere/postgresql)" 77 | args << "--with-extra-version=#{extra_version}" 78 | 79 | ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" 80 | 81 | system "./configure", *args 82 | system "make", "install-world" 83 | end 84 | 85 | def caveats 86 | <<~EOS 87 | To use this PostgreSQL installation, do one or more of the following: 88 | 89 | - Call all programs explicitly with #{opt_prefix}/bin/... 90 | - Add #{opt_bin} to your PATH 91 | - brew link -f #{name} 92 | - Install the postgresql-common package 93 | 94 | To access the man pages, do one or more of the following: 95 | - Refer to them by their full path, like `man #{opt_share}/man/man1/psql.1` 96 | - Add #{opt_share}/man to your MANPATH 97 | - brew link -f #{name} 98 | EOS 99 | end 100 | 101 | test do 102 | system "#{bin}/initdb", "pgdata" 103 | end 104 | end 105 | -------------------------------------------------------------------------------- /postgresql@8.3.rb: -------------------------------------------------------------------------------- 1 | class PostgresqlAT83 < Formula 2 | desc "Relational database management system" 3 | homepage "https://www.postgresql.org/" 4 | url "https://ftp.postgresql.org/pub/source/v8.3.23/postgresql-8.3.23.tar.bz2" 5 | sha256 "17a46617ddbeb16f37d79b43f4e72301b051e6ef888a2eac960375bf579018d9" 6 | license "PostgreSQL" 7 | head "https://git.postgresql.org/git/postgresql.git", branch: "REL8_3_STABLE" 8 | 9 | livecheck do 10 | url "https://ftp.postgresql.org/pub/source/" 11 | regex(%r{href=["']?v?(8\.3(?:\.\d+)*)/?["' >]}i) 12 | end 13 | 14 | keg_only :versioned_formula 15 | 16 | option "with-cassert", "Enable assertion checks (for debugging)" 17 | deprecated_option "enable-cassert" => "with-cassert" 18 | 19 | # https://www.postgresql.org/support/versioning/ 20 | deprecate! date: "2013-02-07", because: :unsupported 21 | 22 | depends_on "openldap" 23 | depends_on "ossp-uuid" 24 | depends_on "perl" 25 | depends_on "readline" 26 | depends_on "tcl-tk" 27 | 28 | # Fix PL/Python build: https://github.com/mxcl/homebrew/issues/11162 29 | # Fix uuid-ossp build issues: https://archives.postgresql.org/pgsql-general/2012-07/msg00654.php 30 | patch :DATA 31 | 32 | def install 33 | args = %W[ 34 | --prefix=#{prefix} 35 | --mandir=#{man} 36 | --enable-thread-safety 37 | --with-gssapi 38 | --with-krb5 39 | --with-ldap 40 | --with-libxml 41 | --with-libxslt 42 | --with-ossp-uuid 43 | --with-pam 44 | --with-perl 45 | --with-python 46 | --with-tcl 47 | XML2_CONFIG=: 48 | ] 49 | 50 | # Add include and library directories of dependencies, so that 51 | # they can be used for compiling extensions. Superenv does this 52 | # when compiling this package, but won't record it for pg_config. 53 | deps = %w[openldap readline tcl-tk] 54 | with_includes = deps.map { |f| Formula[f].opt_include }.join(":") 55 | with_libraries = deps.map { |f| Formula[f].opt_lib }.join(":") 56 | args << "--with-includes=#{with_includes}" 57 | args << "--with-libraries=#{with_libraries}" 58 | 59 | args << "--enable-cassert" if build.with? "cassert" 60 | 61 | system "./configure", *args 62 | system "make", "install" 63 | system "make", "-C", "contrib", "install" 64 | end 65 | 66 | def caveats 67 | <<~EOS 68 | To use this PostgreSQL installation, do one or more of the following: 69 | 70 | - Call all programs explicitly with #{opt_prefix}/bin/... 71 | - Add #{opt_bin} to your PATH 72 | - brew link -f #{name} 73 | - Install the postgresql-common package 74 | 75 | To access the man pages, do one or more of the following: 76 | - Refer to them by their full path, like `man #{opt_share}/man/man1/psql.1` 77 | - Add #{opt_share}/man to your MANPATH 78 | - brew link -f #{name} 79 | EOS 80 | end 81 | 82 | test do 83 | system "#{bin}/initdb", "pgdata" 84 | end 85 | end 86 | 87 | 88 | __END__ 89 | --- a/src/pl/plpython/Makefile 2011-09-23 08:03:52.000000000 +1000 90 | +++ b/src/pl/plpython/Makefile 2011-10-26 21:43:40.000000000 +1100 91 | @@ -24,8 +24,6 @@ 92 | # Darwin (OS X) has its own ideas about how to do this. 93 | ifeq ($(PORTNAME), darwin) 94 | shared_libpython = yes 95 | -override python_libspec = -framework Python 96 | -override python_additional_libs = 97 | endif 98 | 99 | # If we don't have a shared library and the platform doesn't allow it 100 | --- a/contrib/uuid-ossp/uuid-ossp.c 2012-07-30 18:34:53.000000000 -0700 101 | +++ b/contrib/uuid-ossp/uuid-ossp.c 2012-07-30 18:35:03.000000000 -0700 102 | @@ -9,6 +9,8 @@ 103 | *------------------------------------------------------------------------- 104 | */ 105 | 106 | +#define _XOPEN_SOURCE 107 | + 108 | #include "postgres.h" 109 | #include "fmgr.h" 110 | #include "utils/builtins.h" 111 | -------------------------------------------------------------------------------- /postgresql@8.4.rb: -------------------------------------------------------------------------------- 1 | class PostgresqlAT84 < Formula 2 | desc "Relational database management system" 3 | homepage "https://www.postgresql.org/" 4 | url "https://ftp.postgresql.org/pub/source/v8.4.22/postgresql-8.4.22.tar.bz2" 5 | sha256 "5c1d56ce77448706d9dd03b2896af19d9ab1b9b8dcdb96c39707c74675ca3826" 6 | license "PostgreSQL" 7 | head "https://git.postgresql.org/git/postgresql.git", branch: "REL8_4_STABLE" 8 | 9 | livecheck do 10 | url "https://ftp.postgresql.org/pub/source/" 11 | regex(%r{href=["']?v?(8\.4(?:\.\d+)*)/?["' >]}i) 12 | end 13 | 14 | keg_only :versioned_formula 15 | 16 | option "with-cassert", "Enable assertion checks (for debugging)" 17 | deprecated_option "enable-cassert" => "with-cassert" 18 | 19 | # https://www.postgresql.org/support/versioning/ 20 | deprecate! date: "2014-07-24", because: :unsupported 21 | 22 | depends_on "gettext" 23 | depends_on "openldap" 24 | depends_on "ossp-uuid" 25 | depends_on "perl" 26 | depends_on "readline" 27 | depends_on "tcl-tk" 28 | 29 | # Fix uuid-ossp build issues: https://archives.postgresql.org/pgsql-general/2012-07/msg00654.php 30 | patch :DATA 31 | 32 | def install 33 | args = %W[ 34 | --prefix=#{prefix} 35 | --enable-dtrace 36 | --enable-nls 37 | --enable-thread-safety 38 | --with-gssapi 39 | --with-krb5 40 | --with-ldap 41 | --with-libxml 42 | --with-libxslt 43 | --with-ossp-uuid 44 | --with-pam 45 | --with-perl 46 | --with-python 47 | --with-tcl 48 | XML2_CONFIG=: 49 | ] 50 | 51 | # Add include and library directories of dependencies, so that 52 | # they can be used for compiling extensions. Superenv does this 53 | # when compiling this package, but won't record it for pg_config. 54 | deps = %w[gettext openldap readline tcl-tk] 55 | with_includes = deps.map { |f| Formula[f].opt_include }.join(":") 56 | with_libraries = deps.map { |f| Formula[f].opt_lib }.join(":") 57 | args << "--with-includes=#{with_includes}" 58 | args << "--with-libraries=#{with_libraries}" 59 | 60 | args << "--enable-cassert" if build.with? "cassert" 61 | 62 | system "./configure", *args 63 | system "make", "install" 64 | system "make", "-C", "contrib", "install" 65 | end 66 | 67 | def caveats 68 | <<~EOS 69 | To use this PostgreSQL installation, do one or more of the following: 70 | 71 | - Call all programs explicitly with #{opt_prefix}/bin/... 72 | - Add #{opt_bin} to your PATH 73 | - brew link -f #{name} 74 | - Install the postgresql-common package 75 | 76 | To access the man pages, do one or more of the following: 77 | - Refer to them by their full path, like `man #{opt_share}/man/man1/psql.1` 78 | - Add #{opt_share}/man to your MANPATH 79 | - brew link -f #{name} 80 | EOS 81 | end 82 | 83 | test do 84 | system "#{bin}/initdb", "pgdata" 85 | end 86 | end 87 | 88 | 89 | __END__ 90 | --- a/contrib/uuid-ossp/uuid-ossp.c 2012-07-30 18:34:53.000000000 -0700 91 | +++ b/contrib/uuid-ossp/uuid-ossp.c 2012-07-30 18:35:03.000000000 -0700 92 | @@ -9,6 +9,8 @@ 93 | *------------------------------------------------------------------------- 94 | */ 95 | 96 | +#define _XOPEN_SOURCE 97 | + 98 | #include "postgres.h" 99 | #include "fmgr.h" 100 | #include "utils/builtins.h" 101 | -------------------------------------------------------------------------------- /postgresql@9.0.rb: -------------------------------------------------------------------------------- 1 | class PostgresqlAT90 < Formula 2 | desc "Relational database management system" 3 | homepage "https://www.postgresql.org/" 4 | url "https://ftp.postgresql.org/pub/source/v9.0.23/postgresql-9.0.23.tar.bz2" 5 | sha256 "3dbcbe19c814139a3f4be8bc6b49db804753cbc49979f345083e835c52b4d7de" 6 | license "PostgreSQL" 7 | 8 | livecheck do 9 | url "https://ftp.postgresql.org/pub/source/" 10 | regex(%r{href=["']?v?(9\.0(?:\.\d+)*)/?["' >]}i) 11 | end 12 | 13 | head do 14 | url "https://git.postgresql.org/git/postgresql.git", branch: "REL9_0_STABLE" 15 | 16 | depends_on "docbook-xsl" => :build 17 | depends_on "open-sp" => :build 18 | depends_on "petere/sgml/docbook-dsssl" => :build 19 | depends_on "petere/sgml/docbook-sgml" => :build 20 | depends_on "petere/sgml/openjade" => :build 21 | end 22 | 23 | keg_only :versioned_formula 24 | 25 | option "with-cassert", "Enable assertion checks (for debugging)" 26 | deprecated_option "enable-cassert" => "with-cassert" 27 | 28 | # https://www.postgresql.org/support/versioning/ 29 | deprecate! date: "2015-10-08", because: :unsupported 30 | 31 | depends_on "gettext" 32 | depends_on "openldap" 33 | depends_on "ossp-uuid" 34 | depends_on "perl" 35 | depends_on "python@3" 36 | depends_on "readline" 37 | depends_on "tcl-tk" 38 | 39 | # Fix uuid-ossp build issues: https://archives.postgresql.org/pgsql-general/2012-07/msg00654.php 40 | patch :DATA 41 | 42 | def install 43 | args = %W[ 44 | --prefix=#{prefix} 45 | --enable-dtrace 46 | --enable-nls 47 | --with-bonjour 48 | --with-gssapi 49 | --with-krb5 50 | --with-ldap 51 | --with-libxml 52 | --with-libxslt 53 | --with-ossp-uuid 54 | --with-pam 55 | --with-perl 56 | --with-python 57 | --with-tcl 58 | PYTHON=#{Formula["python@3"].opt_bin/"python3"} 59 | XML2_CONFIG=: 60 | ] 61 | 62 | # Add include and library directories of dependencies, so that 63 | # they can be used for compiling extensions. Superenv does this 64 | # when compiling this package, but won't record it for pg_config. 65 | deps = %w[gettext openldap readline tcl-tk] 66 | with_includes = deps.map { |f| Formula[f].opt_include }.join(":") 67 | with_libraries = deps.map { |f| Formula[f].opt_lib }.join(":") 68 | args << "--with-includes=#{with_includes}" 69 | args << "--with-libraries=#{with_libraries}" 70 | 71 | args << "--enable-cassert" if build.with? "cassert" 72 | 73 | ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" 74 | 75 | system "./configure", *args 76 | system "make", "install-world" 77 | end 78 | 79 | def caveats 80 | <<~EOS 81 | To use this PostgreSQL installation, do one or more of the following: 82 | 83 | - Call all programs explicitly with #{opt_prefix}/bin/... 84 | - Add #{opt_bin} to your PATH 85 | - brew link -f #{name} 86 | - Install the postgresql-common package 87 | 88 | To access the man pages, do one or more of the following: 89 | - Refer to them by their full path, like `man #{opt_share}/man/man1/psql.1` 90 | - Add #{opt_share}/man to your MANPATH 91 | - brew link -f #{name} 92 | EOS 93 | end 94 | 95 | test do 96 | system "#{bin}/initdb", "pgdata" 97 | end 98 | end 99 | 100 | 101 | __END__ 102 | --- a/contrib/uuid-ossp/uuid-ossp.c 2012-07-30 18:34:53.000000000 -0700 103 | +++ b/contrib/uuid-ossp/uuid-ossp.c 2012-07-30 18:35:03.000000000 -0700 104 | @@ -9,6 +9,8 @@ 105 | *------------------------------------------------------------------------- 106 | */ 107 | 108 | +#define _XOPEN_SOURCE 109 | + 110 | #include "postgres.h" 111 | #include "fmgr.h" 112 | #include "utils/builtins.h" 113 | -------------------------------------------------------------------------------- /postgresql@9.1.rb: -------------------------------------------------------------------------------- 1 | class PostgresqlAT91 < Formula 2 | desc "Relational database management system" 3 | homepage "https://www.postgresql.org/" 4 | version = "9.1.24" 5 | url "https://ftp.postgresql.org/pub/source/v#{version}/postgresql-#{version}.tar.bz2" 6 | sha256 "de0d84e9f32af145fcd66d8d324f6ef1a0b17944ea344b7bbe9d99fff68ae5d3" 7 | license "PostgreSQL" 8 | 9 | livecheck do 10 | url "https://ftp.postgresql.org/pub/source/" 11 | regex(%r{href=["']?v?(9\.1(?:\.\d+)*)/?["' >]}i) 12 | end 13 | 14 | head do 15 | url "https://git.postgresql.org/git/postgresql.git", branch: "REL9_1_STABLE" 16 | 17 | depends_on "docbook-xsl" => :build 18 | depends_on "open-sp" => :build 19 | depends_on "petere/sgml/docbook-dsssl" => :build 20 | depends_on "petere/sgml/docbook-sgml" => :build 21 | depends_on "petere/sgml/openjade" => :build 22 | end 23 | 24 | keg_only :versioned_formula 25 | 26 | option "with-cassert", "Enable assertion checks (for debugging)" 27 | deprecated_option "enable-cassert" => "with-cassert" 28 | 29 | # https://www.postgresql.org/support/versioning/ 30 | deprecate! date: "2016-10-27", because: :unsupported 31 | 32 | depends_on "gettext" 33 | depends_on "openldap" 34 | depends_on "ossp-uuid" 35 | depends_on "perl" 36 | depends_on "python@3" 37 | depends_on "readline" 38 | depends_on "tcl-tk" 39 | 40 | # Fix uuid-ossp build issues: https://archives.postgresql.org/pgsql-general/2012-07/msg00654.php 41 | patch :DATA 42 | 43 | def install 44 | args = %W[ 45 | --prefix=#{prefix} 46 | --enable-dtrace 47 | --enable-nls 48 | --with-bonjour 49 | --with-gssapi 50 | --with-krb5 51 | --with-ldap 52 | --with-libxml 53 | --with-libxslt 54 | --with-ossp-uuid 55 | --with-pam 56 | --with-perl 57 | --with-python 58 | --with-tcl 59 | PYTHON=#{Formula["python@3"].opt_bin/"python3"} 60 | XML2_CONFIG=: 61 | ] 62 | 63 | # Add include and library directories of dependencies, so that 64 | # they can be used for compiling extensions. Superenv does this 65 | # when compiling this package, but won't record it for pg_config. 66 | deps = %w[gettext openldap readline tcl-tk] 67 | with_includes = deps.map { |f| Formula[f].opt_include }.join(":") 68 | with_libraries = deps.map { |f| Formula[f].opt_lib }.join(":") 69 | args << "--with-includes=#{with_includes}" 70 | args << "--with-libraries=#{with_libraries}" 71 | 72 | args << "--enable-cassert" if build.with? "cassert" 73 | 74 | ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" 75 | 76 | system "./configure", *args 77 | system "make", "install-world" 78 | end 79 | 80 | def caveats 81 | <<~EOS 82 | To use this PostgreSQL installation, do one or more of the following: 83 | 84 | - Call all programs explicitly with #{opt_prefix}/bin/... 85 | - Add #{opt_bin} to your PATH 86 | - brew link -f #{name} 87 | - Install the postgresql-common package 88 | 89 | To access the man pages, do one or more of the following: 90 | - Refer to them by their full path, like `man #{opt_share}/man/man1/psql.1` 91 | - Add #{opt_share}/man to your MANPATH 92 | - brew link -f #{name} 93 | EOS 94 | end 95 | 96 | test do 97 | system "#{bin}/initdb", "pgdata" 98 | end 99 | end 100 | 101 | 102 | __END__ 103 | --- a/contrib/uuid-ossp/uuid-ossp.c 2012-07-30 18:34:53.000000000 -0700 104 | +++ b/contrib/uuid-ossp/uuid-ossp.c 2012-07-30 18:35:03.000000000 -0700 105 | @@ -9,6 +9,8 @@ 106 | *------------------------------------------------------------------------- 107 | */ 108 | 109 | +#define _XOPEN_SOURCE 110 | + 111 | #include "postgres.h" 112 | #include "fmgr.h" 113 | #include "utils/builtins.h" 114 | -------------------------------------------------------------------------------- /postgresql@9.2.rb: -------------------------------------------------------------------------------- 1 | class PostgresqlAT92 < Formula 2 | desc "Relational database management system" 3 | homepage "https://www.postgresql.org/" 4 | version = "9.2.24" 5 | url "https://ftp.postgresql.org/pub/source/v#{version}/postgresql-#{version}.tar.bz2" 6 | sha256 "a754c02f7051c2f21e52f8669a421b50485afcde9a581674d6106326b189d126" 7 | license "PostgreSQL" 8 | 9 | livecheck do 10 | url "https://ftp.postgresql.org/pub/source/" 11 | regex(%r{href=["']?v?(9\.2(?:\.\d+)*)/?["' >]}i) 12 | end 13 | 14 | head do 15 | url "https://git.postgresql.org/git/postgresql.git", branch: "REL9_2_STABLE" 16 | 17 | depends_on "docbook-xsl" => :build 18 | depends_on "open-sp" => :build 19 | depends_on "petere/sgml/docbook-dsssl" => :build 20 | depends_on "petere/sgml/docbook-sgml" => :build 21 | depends_on "petere/sgml/openjade" => :build 22 | end 23 | 24 | keg_only :versioned_formula 25 | 26 | option "with-cassert", "Enable assertion checks (for debugging)" 27 | deprecated_option "enable-cassert" => "with-cassert" 28 | 29 | # https://www.postgresql.org/support/versioning/ 30 | deprecate! date: "2017-11-09", because: :unsupported 31 | 32 | depends_on "gettext" 33 | depends_on "openldap" 34 | depends_on "openssl" 35 | depends_on "ossp-uuid" 36 | depends_on "perl" 37 | depends_on "python@3" 38 | depends_on "readline" 39 | depends_on "tcl-tk" 40 | 41 | # Fix uuid-ossp build issues: https://archives.postgresql.org/pgsql-general/2012-07/msg00654.php 42 | patch :DATA 43 | 44 | def install 45 | args = %W[ 46 | --prefix=#{prefix} 47 | --enable-dtrace 48 | --enable-nls 49 | --with-bonjour 50 | --with-gssapi 51 | --with-krb5 52 | --with-ldap 53 | --with-libxml 54 | --with-libxslt 55 | --with-openssl 56 | --with-ossp-uuid 57 | --with-pam 58 | --with-perl 59 | --with-python 60 | --with-tcl 61 | PYTHON=#{Formula["python@3"].opt_bin/"python3"} 62 | XML2_CONFIG=: 63 | ] 64 | 65 | # Add include and library directories of dependencies, so that 66 | # they can be used for compiling extensions. Superenv does this 67 | # when compiling this package, but won't record it for pg_config. 68 | deps = %w[gettext openldap openssl@1.1 readline tcl-tk] 69 | with_includes = deps.map { |f| Formula[f].opt_include }.join(":") 70 | with_libraries = deps.map { |f| Formula[f].opt_lib }.join(":") 71 | args << "--with-includes=#{with_includes}" 72 | args << "--with-libraries=#{with_libraries}" 73 | 74 | args << "--enable-cassert" if build.with? "cassert" 75 | 76 | ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" 77 | 78 | system "./configure", *args 79 | system "make", "install-world" 80 | end 81 | 82 | def caveats 83 | <<~EOS 84 | To use this PostgreSQL installation, do one or more of the following: 85 | 86 | - Call all programs explicitly with #{opt_prefix}/bin/... 87 | - Add #{opt_bin} to your PATH 88 | - brew link -f #{name} 89 | - Install the postgresql-common package 90 | 91 | To access the man pages, do one or more of the following: 92 | - Refer to them by their full path, like `man #{opt_share}/man/man1/psql.1` 93 | - Add #{opt_share}/man to your MANPATH 94 | - brew link -f #{name} 95 | EOS 96 | end 97 | 98 | test do 99 | system "#{bin}/initdb", "pgdata" 100 | end 101 | end 102 | 103 | 104 | __END__ 105 | --- a/contrib/uuid-ossp/uuid-ossp.c 2012-07-30 18:34:53.000000000 -0700 106 | +++ b/contrib/uuid-ossp/uuid-ossp.c 2012-07-30 18:35:03.000000000 -0700 107 | @@ -9,6 +9,8 @@ 108 | *------------------------------------------------------------------------- 109 | */ 110 | 111 | +#define _XOPEN_SOURCE 112 | + 113 | #include "postgres.h" 114 | #include "fmgr.h" 115 | #include "utils/builtins.h" 116 | -------------------------------------------------------------------------------- /postgresql@9.3.rb: -------------------------------------------------------------------------------- 1 | class PostgresqlAT93 < Formula 2 | desc "Relational database management system" 3 | homepage "https://www.postgresql.org/" 4 | version = "9.3.25" 5 | url "https://ftp.postgresql.org/pub/source/v#{version}/postgresql-#{version}.tar.bz2" 6 | sha256 "e4953e80415d039ccd33d34be74526a090fd585cf93f296cd9c593972504b6db" 7 | license "PostgreSQL" 8 | 9 | livecheck do 10 | url "https://ftp.postgresql.org/pub/source/" 11 | regex(%r{href=["']?v?(9\.3(?:\.\d+)*)/?["' >]}i) 12 | end 13 | 14 | head do 15 | url "https://git.postgresql.org/git/postgresql.git", branch: "REL9_3_STABLE" 16 | 17 | depends_on "docbook-xsl" => :build 18 | depends_on "open-sp" => :build 19 | depends_on "petere/sgml/docbook-dsssl" => :build 20 | depends_on "petere/sgml/docbook-sgml" => :build 21 | depends_on "petere/sgml/openjade" => :build 22 | end 23 | 24 | keg_only :versioned_formula 25 | 26 | option "with-cassert", "Enable assertion checks (for debugging)" 27 | deprecated_option "enable-cassert" => "with-cassert" 28 | 29 | # https://www.postgresql.org/support/versioning/ 30 | deprecate! date: "2018-11-08", because: :unsupported 31 | 32 | depends_on "gettext" 33 | depends_on "openldap" 34 | depends_on "openssl" 35 | depends_on "ossp-uuid" 36 | depends_on "perl" 37 | depends_on "python@3" 38 | depends_on "readline" 39 | depends_on "tcl-tk" 40 | 41 | # Fix uuid-ossp build issues: https://archives.postgresql.org/pgsql-general/2012-07/msg00654.php 42 | patch :DATA 43 | 44 | def install 45 | args = %W[ 46 | --prefix=#{prefix} 47 | --enable-dtrace 48 | --enable-nls 49 | --with-bonjour 50 | --with-gssapi 51 | --with-krb5 52 | --with-ldap 53 | --with-libxml 54 | --with-libxslt 55 | --with-openssl 56 | --with-ossp-uuid 57 | --with-pam 58 | --with-perl 59 | --with-python 60 | --with-tcl 61 | PYTHON=#{Formula["python@3"].opt_bin/"python3"} 62 | XML2_CONFIG=: 63 | ] 64 | 65 | # Add include and library directories of dependencies, so that 66 | # they can be used for compiling extensions. Superenv does this 67 | # when compiling this package, but won't record it for pg_config. 68 | deps = %w[gettext openldap openssl@1.1 readline tcl-tk] 69 | with_includes = deps.map { |f| Formula[f].opt_include }.join(":") 70 | with_libraries = deps.map { |f| Formula[f].opt_lib }.join(":") 71 | args << "--with-includes=#{with_includes}" 72 | args << "--with-libraries=#{with_libraries}" 73 | 74 | args << "--enable-cassert" if build.with? "cassert" 75 | 76 | ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" 77 | 78 | system "./configure", *args 79 | system "make", "install-world" 80 | end 81 | 82 | def caveats 83 | <<~EOS 84 | To use this PostgreSQL installation, do one or more of the following: 85 | 86 | - Call all programs explicitly with #{opt_prefix}/bin/... 87 | - Add #{opt_bin} to your PATH 88 | - brew link -f #{name} 89 | - Install the postgresql-common package 90 | 91 | To access the man pages, do one or more of the following: 92 | - Refer to them by their full path, like `man #{opt_share}/man/man1/psql.1` 93 | - Add #{opt_share}/man to your MANPATH 94 | - brew link -f #{name} 95 | EOS 96 | end 97 | 98 | test do 99 | system "#{bin}/initdb", "pgdata" 100 | end 101 | end 102 | 103 | 104 | __END__ 105 | --- a/contrib/uuid-ossp/uuid-ossp.c 2012-07-30 18:34:53.000000000 -0700 106 | +++ b/contrib/uuid-ossp/uuid-ossp.c 2012-07-30 18:35:03.000000000 -0700 107 | @@ -9,6 +9,8 @@ 108 | *------------------------------------------------------------------------- 109 | */ 110 | 111 | +#define _XOPEN_SOURCE 112 | + 113 | #include "postgres.h" 114 | #include "fmgr.h" 115 | #include "utils/builtins.h" 116 | -------------------------------------------------------------------------------- /postgresql@9.4.rb: -------------------------------------------------------------------------------- 1 | class PostgresqlAT94 < Formula 2 | desc "Relational database management system" 3 | homepage "https://www.postgresql.org/" 4 | version = "9.4.26" 5 | url "https://ftp.postgresql.org/pub/source/v#{version}/postgresql-#{version}.tar.bz2" 6 | sha256 "f5c014fc4a5c94e8cf11314cbadcade4d84213cfcc82081c9123e1b8847a20b9" 7 | license "PostgreSQL" 8 | 9 | livecheck do 10 | url "https://ftp.postgresql.org/pub/source/" 11 | regex(%r{href=["']?v?(9\.4(?:\.\d+)*)/?["' >]}i) 12 | end 13 | 14 | head do 15 | url "https://git.postgresql.org/git/postgresql.git", branch: "REL9_4_STABLE" 16 | 17 | depends_on "docbook-xsl" => :build 18 | depends_on "open-sp" => :build 19 | depends_on "petere/sgml/docbook-dsssl" => :build 20 | depends_on "petere/sgml/docbook-sgml" => :build 21 | depends_on "petere/sgml/openjade" => :build 22 | end 23 | 24 | keg_only :versioned_formula 25 | 26 | option "with-cassert", "Enable assertion checks (for debugging)" 27 | deprecated_option "enable-cassert" => "with-cassert" 28 | 29 | # https://www.postgresql.org/support/versioning/ 30 | deprecate! date: "2020-02-13", because: :unsupported 31 | 32 | depends_on "gettext" 33 | depends_on "openldap" 34 | depends_on "openssl" 35 | depends_on "perl" 36 | depends_on "python@3" 37 | depends_on "readline" 38 | depends_on "tcl-tk" 39 | 40 | def install 41 | args = %W[ 42 | --prefix=#{prefix} 43 | --enable-dtrace 44 | --enable-nls 45 | --with-bonjour 46 | --with-gssapi 47 | --with-ldap 48 | --with-libxml 49 | --with-libxslt 50 | --with-openssl 51 | --with-uuid=e2fs 52 | --with-pam 53 | --with-perl 54 | --with-python 55 | --with-tcl 56 | PYTHON=#{Formula["python@3"].opt_bin/"python3"} 57 | XML2_CONFIG=: 58 | ] 59 | 60 | # Add include and library directories of dependencies, so that 61 | # they can be used for compiling extensions. Superenv does this 62 | # when compiling this package, but won't record it for pg_config. 63 | deps = %w[gettext openldap openssl@1.1 readline tcl-tk] 64 | with_includes = deps.map { |f| Formula[f].opt_include }.join(":") 65 | with_libraries = deps.map { |f| Formula[f].opt_lib }.join(":") 66 | args << "--with-includes=#{with_includes}" 67 | args << "--with-libraries=#{with_libraries}" 68 | 69 | args << "--enable-cassert" if build.with? "cassert" 70 | 71 | extra_version = "" 72 | extra_version += "+git" if build.head? 73 | extra_version += " (Homebrew petere/postgresql)" 74 | args << "--with-extra-version=#{extra_version}" 75 | 76 | ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" 77 | 78 | system "./configure", *args 79 | system "make", "install-world" 80 | end 81 | 82 | def caveats 83 | <<~EOS 84 | To use this PostgreSQL installation, do one or more of the following: 85 | 86 | - Call all programs explicitly with #{opt_prefix}/bin/... 87 | - Add #{opt_bin} to your PATH 88 | - brew link -f #{name} 89 | - Install the postgresql-common package 90 | 91 | To access the man pages, do one or more of the following: 92 | - Refer to them by their full path, like `man #{opt_share}/man/man1/psql.1` 93 | - Add #{opt_share}/man to your MANPATH 94 | - brew link -f #{name} 95 | EOS 96 | end 97 | 98 | test do 99 | system "#{bin}/initdb", "pgdata" 100 | end 101 | end 102 | -------------------------------------------------------------------------------- /postgresql@9.5.rb: -------------------------------------------------------------------------------- 1 | class PostgresqlAT95 < Formula 2 | desc "Relational database management system" 3 | homepage "https://www.postgresql.org/" 4 | version = "9.5.25" 5 | url "https://ftp.postgresql.org/pub/source/v#{version}/postgresql-#{version}.tar.bz2" 6 | sha256 "7628c55eb23768a2c799c018988d8f2ab48ee3d80f5e11259938f7a935f0d603" 7 | license "PostgreSQL" 8 | 9 | livecheck do 10 | url "https://ftp.postgresql.org/pub/source/" 11 | regex(%r{href=["']?v?(9\.5(?:\.\d+)*)/?["' >]}i) 12 | end 13 | 14 | head do 15 | url "https://git.postgresql.org/git/postgresql.git", branch: "REL9_5_STABLE" 16 | 17 | depends_on "docbook-xsl" => :build 18 | depends_on "open-sp" => :build 19 | depends_on "petere/sgml/docbook-dsssl" => :build 20 | depends_on "petere/sgml/docbook-sgml" => :build 21 | depends_on "petere/sgml/openjade" => :build 22 | end 23 | 24 | keg_only :versioned_formula 25 | 26 | option "with-cassert", "Enable assertion checks (for debugging)" 27 | deprecated_option "enable-cassert" => "with-cassert" 28 | 29 | # https://www.postgresql.org/support/versioning/ 30 | deprecate! date: "2021-02-11", because: :unsupported 31 | 32 | depends_on "gettext" 33 | depends_on "openldap" 34 | depends_on "openssl" 35 | depends_on "python@3" 36 | depends_on "readline" 37 | depends_on "tcl-tk" 38 | 39 | def install 40 | args = %W[ 41 | --prefix=#{prefix} 42 | --enable-dtrace 43 | --enable-nls 44 | --with-bonjour 45 | --with-gssapi 46 | --with-ldap 47 | --with-libxml 48 | --with-libxslt 49 | --with-openssl 50 | --with-uuid=e2fs 51 | --with-pam 52 | --with-perl 53 | --with-python 54 | --with-tcl 55 | PYTHON=#{Formula["python@3"].opt_bin/"python3"} 56 | XML2_CONFIG=: 57 | ] 58 | 59 | # Add include and library directories of dependencies, so that 60 | # they can be used for compiling extensions. Superenv does this 61 | # when compiling this package, but won't record it for pg_config. 62 | deps = %w[gettext openldap openssl@1.1 readline tcl-tk] 63 | with_includes = deps.map { |f| Formula[f].opt_include }.join(":") 64 | with_libraries = deps.map { |f| Formula[f].opt_lib }.join(":") 65 | args << "--with-includes=#{with_includes}" 66 | args << "--with-libraries=#{with_libraries}" 67 | 68 | args << "--enable-cassert" if build.with? "cassert" 69 | 70 | extra_version = "" 71 | extra_version += "+git" if build.head? 72 | extra_version += " (Homebrew petere/postgresql)" 73 | args << "--with-extra-version=#{extra_version}" 74 | 75 | ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" 76 | 77 | system "./configure", *args 78 | system "make", "install-world" 79 | end 80 | 81 | def caveats 82 | <<~EOS 83 | To use this PostgreSQL installation, do one or more of the following: 84 | 85 | - Call all programs explicitly with #{opt_prefix}/bin/... 86 | - Add #{opt_bin} to your PATH 87 | - brew link -f #{name} 88 | - Install the postgresql-common package 89 | 90 | To access the man pages, do one or more of the following: 91 | - Refer to them by their full path, like `man #{opt_share}/man/man1/psql.1` 92 | - Add #{opt_share}/man to your MANPATH 93 | - brew link -f #{name} 94 | EOS 95 | end 96 | 97 | test do 98 | system "#{bin}/initdb", "pgdata" 99 | end 100 | end 101 | -------------------------------------------------------------------------------- /postgresql@9.6.rb: -------------------------------------------------------------------------------- 1 | class PostgresqlAT96 < Formula 2 | desc "Relational database management system" 3 | homepage "https://www.postgresql.org/" 4 | version = "9.6.24" 5 | url "https://ftp.postgresql.org/pub/source/v#{version}/postgresql-#{version}.tar.bz2" 6 | sha256 "aeb7a196be3ebed1a7476ef565f39722187c108dd47da7489be9c4fcae982ace" 7 | license "PostgreSQL" 8 | 9 | livecheck do 10 | url "https://ftp.postgresql.org/pub/source/" 11 | regex(%r{href=["']?v?(9\.6(?:\.\d+)*)/?["' >]}i) 12 | end 13 | 14 | head do 15 | url "https://git.postgresql.org/git/postgresql.git", branch: "REL9_6_STABLE" 16 | 17 | depends_on "docbook-xsl" => :build 18 | depends_on "open-sp" => :build 19 | depends_on "petere/sgml/docbook-dsssl" => :build 20 | depends_on "petere/sgml/docbook-sgml" => :build 21 | depends_on "petere/sgml/openjade" => :build 22 | end 23 | 24 | keg_only :versioned_formula 25 | 26 | option "with-cassert", "Enable assertion checks (for debugging)" 27 | deprecated_option "enable-cassert" => "with-cassert" 28 | 29 | # https://www.postgresql.org/support/versioning/ 30 | deprecate! date: "2021-11-11", because: :unsupported 31 | 32 | depends_on "gettext" 33 | depends_on "openldap" 34 | depends_on "openssl" 35 | depends_on "python@3" 36 | depends_on "readline" 37 | depends_on "tcl-tk" 38 | 39 | def install 40 | args = %W[ 41 | --prefix=#{prefix} 42 | --enable-dtrace 43 | --enable-nls 44 | --with-bonjour 45 | --with-gssapi 46 | --with-ldap 47 | --with-libxml 48 | --with-libxslt 49 | --with-openssl 50 | --with-uuid=e2fs 51 | --with-pam 52 | --with-perl 53 | --with-python 54 | --with-tcl 55 | PYTHON=#{Formula["python@3"].opt_bin/"python3"} 56 | XML2_CONFIG=: 57 | ] 58 | 59 | # Add include and library directories of dependencies, so that 60 | # they can be used for compiling extensions. Superenv does this 61 | # when compiling this package, but won't record it for pg_config. 62 | deps = %w[gettext openldap openssl@1.1 readline tcl-tk] 63 | with_includes = deps.map { |f| Formula[f].opt_include }.join(":") 64 | with_libraries = deps.map { |f| Formula[f].opt_lib }.join(":") 65 | args << "--with-includes=#{with_includes}" 66 | args << "--with-libraries=#{with_libraries}" 67 | 68 | args << "--enable-cassert" if build.with? "cassert" 69 | 70 | extra_version = "" 71 | extra_version += "+git" if build.head? 72 | extra_version += " (Homebrew petere/postgresql)" 73 | args << "--with-extra-version=#{extra_version}" 74 | 75 | ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog" 76 | 77 | system "./configure", *args 78 | system "make", "install-world" 79 | end 80 | 81 | def caveats 82 | <<~EOS 83 | To use this PostgreSQL installation, do one or more of the following: 84 | 85 | - Call all programs explicitly with #{opt_prefix}/bin/... 86 | - Add #{opt_bin} to your PATH 87 | - brew link -f #{name} 88 | - Install the postgresql-common package 89 | 90 | To access the man pages, do one or more of the following: 91 | - Refer to them by their full path, like `man #{opt_share}/man/man1/psql.1` 92 | - Add #{opt_share}/man to your MANPATH 93 | - brew link -f #{name} 94 | EOS 95 | end 96 | 97 | test do 98 | system "#{bin}/initdb", "pgdata" 99 | end 100 | end 101 | --------------------------------------------------------------------------------