summaryrefslogtreecommitdiff
path: root/eclass/postgres.eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/postgres.eclass')
-rw-r--r--eclass/postgres.eclass6
1 files changed, 5 insertions, 1 deletions
diff --git a/eclass/postgres.eclass b/eclass/postgres.eclass
index e94ab56a40ae..c3dc24e9db52 100644
--- a/eclass/postgres.eclass
+++ b/eclass/postgres.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: postgres.eclass
@@ -150,6 +150,10 @@ postgres_pkg_setup() {
export PG_SLOT=${best_slot}
export PG_CONFIG=$(type -P pg_config${best_slot//./})
+ if [[ -z ${PG_CONFIG} ]] ; then
+ die "Could not find pg_config for ${PG_SLOT}. Is dev-db/postgresql:${PG_SLOT} installed?"
+ fi
+
local pg_pkg_config_path="$(${PG_CONFIG} --libdir)/pkgconfig"
if [[ -n "${PKG_CONFIG_PATH}" ]]; then
export PKG_CONFIG_PATH="${pg_pkg_config_path}:${PKG_CONFIG_PATH}"