summaryrefslogtreecommitdiffhomepage
path: root/subr/pkg_install_pkgconfig.subr
blob: 314e1427e675e793a754d650f6b51ba2e3e8cf17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#
# set -o errexit -o noglob are assumed.
#

pkg_install_pkgconfig() {
	local _pc_path="";
	for _pc_path in $(find "${PKG_DESTDIR}" -name \*.pc); do
		if grep -Eq '^libdir=[^$]+$' "${_pc_path}"; then
			sed -i"" -e '/^libdir=[^$]\+$/s/^libdir=\(.\+\)$/libdir=${exec_prefix}\1/'	\
				-e '/^exec_prefix=$/s/^.*$/exec_prefix=${prefix}/'			\
					"${_pc_path}";
		fi;
	done;
};

# vim:filetype=sh