Portfile

# $Id: Portfile 22222 2007-02-22 14:02:15Z pipping@macports.org $

PortSystem 1.0

name mednafen
version 0.7.2
platforms darwin
categories emulators games
maintainers adamw@freebsd.org
description Super-fast and super-compatible emulator for many video game systems
long_description Medfafen is a portable (utilizing OpenGL and SDL) \
argument-driven multi-system emulator with many \
advanced features. The Atari Lynx, GameBoy, GameBoy \
Colour, GameBoy Advance, NES, PC Engine (TurboGrafx 16) \
and SuperGrafx are emulated. Mednafen has the ability \
to remap hotkey functions and virtual system inputs \
to a keyboard, a joystick, or both simultaneously. \
Save states are supported, as is real-time game \
rewinding.

homepage http://mednafen.sourceforge.net/
master_sites sourceforge
use_bzip2 yes
checksums md5 bad1852dd796588a78fa740610fcf477
depends_lib port:libsdl \
port:libsdl_net \
port:libsndfile \
port:libcdio \
port:zlib

# Just an FYI: even though it takes a billion years to compile
# src/gba/arm.cpp, it *does* finish eventually.

worksrcdir ${name}
configure.env LDFLAGS="-L${prefix}/lib" \
CPPFLAGS="-I${prefix}/include"

post-destroot {
xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
xinstall -m 755 ${worksrcpath}/README ${destroot}${prefix}/share/doc/${name}
xinstall -m 755 ${worksrcpath}/ChangeLog ${destroot}${prefix}/share/doc/${name}
eval xinstall [glob ${worksrcpath}/Documentation/*] ${destroot}${prefix}/share/doc/${name}
}

post-activate {

ui_msg "\n
Mednafen works by executing the ROM file of a game console you'd like to emulate. Note
that no ROM files are included with Mednafen, so first you must obtain the game console
ROM file of your choice, by legal means of course.

Supported ROM file formats are listed in section 'File Formats/Expansion Hardware'
in the Mednafen documenation at ${prefix}/share/doc/${name}. Once you've obtained a
supported type of game console ROM file, start the Mednafen command-line executable and use
the ROM filename (including path) as an argument. See the documentation for more options.
\n"
}