Skip to content

Commit

Permalink
Merge pull request #192231 from Homebrew/postgresql@12-13-14-updates
Browse files Browse the repository at this point in the history
postgresql@{12,13,14}: style updates, remove upstream doc caveat
  • Loading branch information
p-linnane authored Sep 28, 2024
2 parents c01a04e + 3e61b32 commit cdfc83a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 40 deletions.
18 changes: 5 additions & 13 deletions Formula/p/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,7 @@ def install
--with-perl
--with-uuid=e2fs
]
if OS.mac?
args += %w[
--with-bonjour
--with-tcl
]
end
args += %w[--with-bonjour --with-tcl] if OS.mac?

# PostgreSQL by default uses xcodebuild internally to determine this,
# which does not work on CLT-only installs.
Expand All @@ -98,12 +93,11 @@ def install
"pkgincludedir=#{include}/postgresql",
"includedir_server=#{include}/postgresql/server",
"includedir_internal=#{include}/postgresql/internal"
return unless OS.linux?

if OS.linux?
inreplace lib/"postgresql/pgxs/src/Makefile.global",
"LD = #{HOMEBREW_PREFIX}/Homebrew/Library/Homebrew/shims/linux/super/ld",
"LD = #{HOMEBREW_PREFIX}/bin/ld"
end
inreplace lib/"postgresql/pgxs/src/Makefile.global",
"LD = #{Superenv.shims_path}/ld",
"LD = #{HOMEBREW_PREFIX}/bin/ld"
end

def post_install
Expand Down Expand Up @@ -161,8 +155,6 @@ def caveats
caveats += <<~EOS
This formula has created a default database cluster with:
initdb --locale=C -E UTF-8 #{postgresql_datadir}
For more details, read:
https://www.postgresql.org/docs/#{version.major}/app-initdb.html
EOS

caveats
Expand Down
20 changes: 6 additions & 14 deletions Formula/p/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class PostgresqlAT13 < Formula
end

def install
ENV.delete "PKG_CONFIG_LIBDIR" if OS.mac? && version == :catalina
ENV.delete "PKG_CONFIG_LIBDIR" if OS.mac? && MacOS.version == :catalina
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}"

Expand All @@ -71,12 +71,7 @@ def install
--with-perl
--with-uuid=e2fs
]
if OS.mac?
args += %w[
--with-bonjour
--with-tcl
]
end
args += %w[--with-bonjour --with-tcl] if OS.mac?

# PostgreSQL by default uses xcodebuild internally to determine this,
# which does not work on CLT-only installs.
Expand All @@ -98,12 +93,11 @@ def install
"pkgincludedir=#{include}/postgresql",
"includedir_server=#{include}/postgresql/server",
"includedir_internal=#{include}/postgresql/internal"
return unless OS.linux?

if OS.linux?
inreplace lib/"postgresql/pgxs/src/Makefile.global",
"LD = #{HOMEBREW_PREFIX}/Homebrew/Library/Homebrew/shims/linux/super/ld",
"LD = #{HOMEBREW_PREFIX}/bin/ld"
end
inreplace lib/"postgresql/pgxs/src/Makefile.global",
"LD = #{Superenv.shims_path}/ld",
"LD = #{HOMEBREW_PREFIX}/bin/ld"
end

def post_install
Expand Down Expand Up @@ -161,8 +155,6 @@ def caveats
caveats += <<~EOS
This formula has created a default database cluster with:
initdb --locale=C -E UTF-8 #{postgresql_datadir}
For more details, read:
https://www.postgresql.org/docs/#{version.major}/app-initdb.html
EOS

caveats
Expand Down
18 changes: 5 additions & 13 deletions Formula/p/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,7 @@ def install
--with-uuid=e2fs
--with-extra-version=\ (#{tap.user})
]
if OS.mac?
args += %w[
--with-bonjour
--with-tcl
]
end
args += %w[--with-bonjour --with-tcl] if OS.mac?

# PostgreSQL by default uses xcodebuild internally to determine this,
# which does not work on CLT-only installs.
Expand All @@ -89,12 +84,11 @@ def install
"pkgincludedir=#{include}/#{name}",
"includedir_server=#{include}/#{name}/server",
"includedir_internal=#{include}/#{name}/internal"
return unless OS.linux?

if OS.linux?
inreplace lib/name/"pgxs/src/Makefile.global",
"LD = #{HOMEBREW_PREFIX}/Homebrew/Library/Homebrew/shims/linux/super/ld",
"LD = #{HOMEBREW_PREFIX}/bin/ld"
end
inreplace lib/name/"pgxs/src/Makefile.global",
"LD = #{Superenv.shims_path}/ld",
"LD = #{HOMEBREW_PREFIX}/bin/ld"
end

def post_install
Expand Down Expand Up @@ -162,8 +156,6 @@ def caveats
caveats += <<~EOS
This formula has created a default database cluster with:
initdb --locale=C -E UTF-8 #{postgresql_datadir}
For more details, read:
https://www.postgresql.org/docs/#{version.major}/app-initdb.html
EOS

caveats
Expand Down

0 comments on commit cdfc83a

Please sign in to comment.