#!/bin/sh
if ! [ -e $D/etc/pango ] ; then
	mkdir -p $D/etc/pango
fi

if [ "x$D" != "x" ]; then
	PSEUDO_UNLOAD=1 qemu-mipsel -r 3.2  -L $D -E LD_LIBRARY_PATH=$D/usr/lib:$D/lib $D/usr/bin/pango-querymodules \
		$D/usr/lib/pango/1.8.0/modules/*.so \
		> $D/etc/pango/pango.modules 2>/dev/null

	[ $? -ne 0 ] && exit 1

	sed -i -e "s:$D::" $D/etc/pango/pango.modules

	exit 0
fi
/usr/bin/pango-querymodules > /etc/pango/pango.modules
