# $Id: Portfile 83261 2011-08-29 08:54:49Z ryandesign@macports.org $

PortSystem 1.0

name			icoconvert
version			2.0
categories		graphics
platforms		darwin
maintainers		nomaintainer
description		convert Windows .ico icon files into .xpm and .png files
long_description	A small utility to convert Windows .ico icon files into \
			.xpm and .png files. This can be done in batches, and properly \
			supports transparencies as well as non 32x32 icon sizes. It also \
			supports 24 bit icons.

homepage		http://www.mox.net/tag/icoconvert/
master_sites	http://www.mox.net/downloads/ \
				http://www.xunix.org/~flz/distfiles/ \
				freebsd
checksums		md5 56fe4474c8eaae2c8b886331cda41aca

depends_lib		port:gd2

extract.post_args	"| tar -xf - --exclude 'icoconvert' --exclude 'icoconvert.static'"

use_configure	no

variant universal {}

build.target
build.args		CC=${configure.cc} \
			LIBDIR="${configure.ldflags} [get_canonical_archflags]" \
			FLAGS="${configure.cflags} ${configure.cppflags} [get_canonical_archflags]"

destroot {
	xinstall -m 755 -d ${destroot}${prefix}/bin \
		${destroot}${prefix}/share/doc/${name}
	xinstall -m 755 ${worksrcpath}/icoconvert ${destroot}${prefix}/bin
	xinstall -m 644 ${worksrcpath}/README ${destroot}${prefix}/share/doc/${name}
}
