From 232c3ee6d0ebd7101327ca31c1c53f030465a93b Mon Sep 17 00:00:00 2001 From: ilovezfs Date: Sun, 12 Nov 2017 05:06:53 -0800 Subject: [PATCH] libpqxx: test .pc for missing postgresql paths Make sure the pkg-config file in the bottle contains the current Cellar path for postgresql since `pg_config` uses Cellar paths not opt paths. Closes #20557. Signed-off-by: ilovezfs --- Formula/libpqxx.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Formula/libpqxx.rb b/Formula/libpqxx.rb index c194f28a01..3fd787eb02 100644 --- a/Formula/libpqxx.rb +++ b/Formula/libpqxx.rb @@ -31,5 +31,10 @@ class Libpqxx < Formula system ENV.cxx, "test.cpp", "-L#{lib}", "-lpqxx", "-I#{include}", "-o", "test" # Running ./test will fail because there is no runnning postgresql server # system "./test" + + # `pg_config` uses Cellar paths not opt paths + postgresql_include = Formula["postgresql"].opt_include.realpath.to_s + assert_match postgresql_include, (lib/"pkgconfig/libpqxx.pc").read, + "Please revision bump libpqxx." end end