# $Id: Portfile 60082 2009-11-01 13:40:22Z css@macports.org $

PortSystem 1.0

name            emacs-app-devel
version         20091101

categories      aqua editors
maintainers     css
description     The GNU Emacs text editor, recent CVS development version
long_description \
   GNU Emacs is a self-documenting, customizable, extensible real-time \
   display editor. Users new to Emacs will be able to use basic        \
   features fairly rapidly by studying the tutorial and using the      \
   self-documentation features. Emacs also has an extensive            \
   interactive manual browser. It is easily extensible since its       \
   editing commands are written in Lisp. This port uses the CVS version\
   of the code from a recent date, which includes the NextStep (aqua)  \
   option

platforms       darwin freebsd
homepage        http://www.gnu.org/software/emacs/emacs.html

fetch.type      cvs
cvs.root        :pserver:anonymous@cvs.savannah.gnu.org:/sources/emacs
cvs.date        2009-11-01
cvs.module      emacs
worksrcdir      emacs

configure.args  --with-ns --without-x --without-dbus
depends_lib     port:ncurses
use_parallel_build      yes

destroot {
	system "cd ${worksrcpath} && make install"     
	xinstall -m 755 -d ${destroot}${applications_dir}
	file copy ${worksrcpath}/nextstep/Emacs.app \
		${destroot}${applications_dir}
	file copy ${filespath}/site-start.el \
		${destroot}${applications_dir}/Emacs.app/Contents/Resources/site-lisp
}

post-destroot {
	reinplace "s|__PREFIX__|${prefix}|g" \
		${destroot}${applications_dir}/Emacs.app/Contents/Resources/site-lisp/site-start.el
}
