#!/bin/sh

if [ "$2" = "POST-INSTALL" ]; then
	pygtk_check_file="/usr/local/share/examples/py-gtk/Makefile"

	if [ -e "$pygtk_check_file" ]; then
		if ! grep -q numpy "$pygtk_check_file"; then
			message="Dependent x11-toolkits/py-gtk2 port was built with NUMPY option disabled, but mypaint requires it to be enabled. Please rebuild x11-toolkits/py-gtk2 WITH_NUMPY, instead mypaint won't run"
		fi
	else
		message="Note that dependent x11-toolkits/py-gtk2 port should be build with NUMPY option enabled"
	fi

	if [ -n "$message" ]; then
		echo "======================================================================"
		echo
		echo $message | fmt -w 70
		echo
		echo "======================================================================"
	fi
fi
