#!/bin/sh

[ "$2" != "POST-DEINSTALL" ] && exit 0

if grep -q '^/lib/libgcc$' $PKG_PREFIX/etc/ld.so.conf; then
	grep -v '^/lib/libgcc$' $PKG_PREFIX/etc/ld.so.conf > $PKG_PREFIX/etc/ld.so.conf.tmp || exit 1
	mv -f $PKG_PREFIX/etc/ld.so.conf.tmp $PKG_PREFIX/etc/ld.so.conf || exit 1
fi

$PKG_PREFIX/sbin/ldconfig || true
