summaryrefslogtreecommitdiffhomepage
path: root/vars/pkgconf_host.vars
blob: 386c3c106e3fe0c813f7b37e8c82bb8863cd796c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#
# set -o errexit -o noglob are assumed.
#

pkg_pkgconf_host_install_make_post() {
	if [ -e "${PKG_DESTDIR}/bin/${PKG_TARGET}-pkg-config" ]; then
		ex_rtl_fileop rm "${PKG_DESTDIR}/bin/${PKG_TARGET}-pkg-config";
	fi;
	cat > "${PKG_DESTDIR}/bin/${PKG_TARGET}-pkg-config" <<EOF
#!/bin/sh
if [ -z "\${PREFIX_NATIVE}" ]; then
	PREFIX_NATIVE="${PREFIX_NATIVE}";
fi;
"\$(dirname "\${0}")"/pkgconf --define-variable=prefix="\${PREFIX_NATIVE%/}/" "\${@}";
EOF
	chmod +x "${PKG_DESTDIR}/bin/${PKG_TARGET}-pkg-config";
	ex_rtl_fileop rm "${PKG_DESTDIR}/bin/pkg-config";
};

pkg_pkgconf_install_make_post() {
	if [ -e "${PREFIX_NATIVE}/bin/pkg-config" ]; then
		ex_rtl_fileop rm "${PREFIX_NATIVE}/bin/pkg-config";
	fi;
	ex_rtl_fileop ln_symbolic pkgconf "${PREFIX_NATIVE}/bin/pkg-config";
};

# vim:filetype=sh