# $Id: Portfile 32256 2007-12-23 09:18:47Z ryandesign@macports.org $

PortSystem			1.0
PortGroup			python24 1.0
name				py-pythoncad
version				DS1-R22
categories-append	graphics x11
maintainers			nomaintainer
description			Python-based CAD package
long_description \
	PythonCAD is an open-source CAD package designed around Python. As \
	such, it aims to be a fully scriptable and customizable CAD program. It \
	is initially designed to run under Linux, one of the BSD flavors, or Unix.

platforms			darwin

homepage			http://www.pythoncad.org/
master_sites		${homepage}/releases/
distname			PythonCAD-${version}

use_bzip2			yes
checksums			md5 dfb6571769f90609577d3ba782e7eafc \
					sha1 41da005977224f078cf6b9290743d25051f0b891

depends_lib-append	port:py-gtk2

post-patch {
	reinplace "s|#!/usr/bin/env python|#!${prefix}/bin/python|" \
		${worksrcpath}/gtkpycad.py
}

post-destroot {
	xinstall -m 755 -W ${worksrcpath} gtkpycad.py ${destroot}${prefix}/bin
	xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
	xinstall -m 644 -W ${worksrcpath} NEWS PKG-INFO INSTALL README prefs.py \
		${destroot}${prefix}/share/doc/${name}
}

