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) 022f7e
	local _pc_path;
Lucio Andrés Illanes Albornoz (arab, vxp) 022f7e
	for _pc_path in $(find "${PKG_DESTDIR}" -name \*.pc); do 
Lucio Andrés Illanes Albornoz (arab, vxp) 022f7e
		if grep -Eq '^libdir=[^$]+$' "${_pc_path}"; 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) 022f7e
				-e '/^exec_prefix=$/s/^.*$/exec_prefix=${prefix}/'			\
Lucio Andrés Illanes Albornoz (arab, vxp) 022f7e
					"${_pc_path}";
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