midipix / build / midipix_build

Forked from build/midipix_build 4 years ago
Clone
Blob Blame History Raw
#
# set -o errexit -o noglob are assumed.
#

pkg_pkgconf_host_install_post() {
	if [ -e "${PREFIX}/bin/${TARGET}-pkg-config" ]; then
		build_fileop rm "${PREFIX}/bin/${TARGET}-pkg-config";
	fi;
	cat > "${PREFIX}/bin/${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 "${PREFIX}/bin/${TARGET}-pkg-config";
	build_fileop rm "${PREFIX}/bin/pkg-config";
};

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

# vim:filetype=sh