Blame subr/pkg_install_pkgconfig.subr

Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
#
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
# set -o errexit -o noglob are assumed.
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
#
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
pkg_install_pkgconfig() {
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
	local __;
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
	for __ in $(find "${PWD}/../destdir" -name \*.pc); do 
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
		if grep -Eq '^libdir=[^$]+$' "${__}"; then
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
			sed -i	-e '/^libdir=[^$]\+$/s/^libdir=\(.\+\)$/libdir=${exec_prefix}\1/'	\
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
				-e '/^exec_prefix=$/s/^.*$/exec_prefix=${prefix}/'	\
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
					"${__}";
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
		fi;
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
	done;
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
};
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
Lucio Andrés Illanes Albornoz (arab, vxp) c27bea
# vim:filetype=sh