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 <ilovezfs@icloud.com>
This commit is contained in:
ilovezfs 2017-11-12 05:06:53 -08:00
parent 2085ca2ed9
commit 232c3ee6d0

View file

@ -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