# $Id: Portfile,v 1.8 2006/04/14 23:33:17 mww Exp $

PortSystem 1.0

name			dosbox
version			0.65
categories		emulators
platforms		darwin
maintainers		mww@opendarwin.org
description		DOS-emulator featuring 386 realmode, filesystem, XMS, EMS
long_description	DOSBox is a DOS-emulator that uses the SDL-library. \
				It also emulates CPU:286/386 realmode, directory \
				file system/XMS/EMS, a SoundBlaster card for excellent \
				sound compatibility with older games.

homepage		http://dosbox.sourceforge.net/
master_sites	sourceforge
checksums		sha1 4e9b65c9c2091ab30a952e3b7e63b74df605f419

depends_lib		port:libsdl port:libsdl_net port:libsdl_sound \
				port:libpng port:zlib

configure.args	--mandir=${prefix}/share/man --disable-sdltest \
				--disable-alsatest
configure.env	CPPFLAGS="-I${prefix}/include" CXXFLAGS="-O2 -mdynamic-no-pic" \
				LDFLAGS="-L${prefix}/lib"

post-destroot {
	xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
	xinstall -W ${worksrcpath} README NEWS AUTHORS COPYING ChangeLog INSTALL \
		THANKS ${destroot}${prefix}/share/doc/${name}
}

platform darwin 8 {
	configure.env-append CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 \
		CXX=/usr/bin/g++-4.0
}

platform powerpc {
	configure.args-append --disable-dynamic-x86
}

