summaryrefslogtreecommitdiffhomepage
path: root/subr/pkg_install_pkgconfig.subr
blob: b46069a35ac0dbd63df71c534234a3240e86893f (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 __;
	for __ in $(find "${PWD}/../destdir" -name \*.pc); do 
		if grep -Eq '^libdir=[^$]+$' "${__}"; then
			sed -i	-e '/^libdir=[^$]\+$/s/^libdir=\(.\+\)$/libdir=${exec_prefix}\1/'	\
				-e '/^exec_prefix=$/s/^.*$/exec_prefix=${prefix}/'	\
					"${__}";
		fi;
	done;
};

# vim:filetype=sh