HOMEPAGE="http://www.gnu.org/software/emacs/" SRC_URI="mirror://gnu/emacs/${P}.tar.gz" DEPEND="libtiff-devel libgif-devel libjpeg-devel pkgconfig(dbus-1) pkgconfig(fontconfig) pkgconfig(freetype2) pkgconfig(gio-2.0) pkgconfig(glib-2.0) pkgconfig(gnutls) pkgconfig(gtk+-2.0) pkgconfig(librsvg-2.0) pkgconfig(libxml-2.0) pkgconfig(libpng14) pkgconfig(ncursesw) pkgconfig(sm) pkgconfig(Wand) pkgconfig(x11) pkgconfig(xft) pkgconfig(xpm) pkgconfig(xrender)" PATCH_URI=" adapt_to_new_cygstart.patch cygwin.h.patch xgselect-24.0.97.patch " PKG_NAMES="${PN} ${PN}-el ${PN}-X11" PKG_HINTS="${PN} ${PN}-el ${PN}-X11" CPPFLAGS=-I/usr/include/ncursesw LDFLAGS=-L/usr/lib/ncursesw CATEGORY="Editors Interpreters" emacs_SUMMARY="The extensible, customizable, self-documenting real-time display editor." emacs_X11_SUMMARY="X11 binaries for Emacs." emacs_el_SUMMARY="LISP source code for Emacs (including LEIM)." emacs_DESCRIPTION="Emacs is a powerful, customizable, self-documenting, modeless text editor. Emacs contains special code editing features, a scripting language (elisp), and the capability to read mail, news and more without leaving the editor. This package supplies everything needed for a non-X11 emacs." emacs_X11_DESCRIPTION="This package contains the X11 binaries for emacs. Install it if you want to run emacs using the X window system for display. The binaries also can be used in non-X11 mode." emacs_el_DESCRIPTION="This package contains the LISP source code for the various emacs addons including code for input methods for internationalization. Install it if you want to personalize built-in emacs functionality in some way on your machine." emacs_REQUIRES="xemacs-emacs-common alternatives" emacs_X11_REQUIRES="alternatives emacs font-adobe-dpi75 font-misc-misc" emacs_CONTENTS=" --exclude=usr/share/${PN}/${PV}/lisp*el.gz --exclude=usr/share/${PN}/${PV}/leim*el.gz --exclude=usr/bin/emacs-X11.exe --exclude=etc/postinstall/emacs-X11.sh --exclude=etc/preremove/emacs-X11.sh etc/ usr/" emacs_el_CONTENTS=" --exclude=usr/share/${PN}/${PV}/lisp*el --exclude=usr/share/${PN}/${PV}/leim*el --exclude=usr/share/${PN}/${PV}/lisp*elc --exclude=usr/share/${PN}/${PV}/leim*elc --exclude=usr/share/${PN}/${PV}/lisp/COPYING --exclude=usr/share/${PN}/${PV}/lisp/README --exclude=usr/share/${PN}/${PV}/lisp/calc/README --exclude=usr/share/${PN}/${PV}/lisp/calc/README.prev --exclude=usr/share/${PN}/${PV}/lisp/international/README --exclude=usr/share/${PN}/${PV}/lisp/term/README --exclude=usr/share/${PN}/${PV}/lisp/nxml/TODO --exclude=usr/share/${PN}/${PV}/lisp/forms-d2.dat usr/share/${PN}/${PV}/lisp usr/share/${PN}/${PV}/leim" emacs_X11_CONTENTS=" usr/bin/emacs-X11.exe etc/postinstall/emacs-X11.sh etc/preremove/emacs-X11.sh" DIFF_EXCLUDES="loaddefs.el config.in *.elc loaddefs.el~ subdirs.el~ config.in~" ACLOCAL_FLAGS='-I m4' src_compile() { cd ${S} cygautoreconf cd ${B} cygconf --with-x=no cygmake cp -v src/emacs.exe emacs-nox.exe make distclean cygconf --without-gsettings --without-gconf cygmake mv -v emacs-nox.exe src/emacs-nox.exe cp -v src/emacs.exe src/emacs-X11.exe } src_install() { cd ${B} cyginstall dobin src/emacs-nox.exe dobin src/emacs-X11.exe dobin ${C}/make-emacs-shortcut insinto /usr/bin doins ${S}/nt/icons/emacs.ico cd ${D} rm -fv \ usr/bin/${P}.exe \ usr/bin/emacs.exe \ usr/bin/b2m.exe \ usr/bin/rcs-checkin \ usr/bin/ctags.exe \ usr/bin/etags.exe \ usr/share/man/man1/ctags* \ usr/share/man/man1/etags* }