--- emacs-vcs-24.0.93.ebuild 29 Jan 2012 17:41:12 -0000 1.1 +++ emacs-vcs-24.0.93.ebuild 9 Feb 2012 21:57:55 -0000 @@ -30,7 +30,8 @@ LICENSE="GPL-3 FDL-1.3 BSD as-is MIT W3C unicode PSF-2" SLOT="24" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" -IUSE="alsa athena dbus gconf gif gnutls gpm gsettings gtk gtk3 gzip-el hesiod imagemagick jpeg kerberos libxml2 m17n-lib motif png selinux sound source svg tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm" +IUSE="alsa aqua athena dbus gconf gif gnutls gpm gsettings gtk gtk3 gzip-el hesiod imagemagick jpeg kerberos libxml2 m17n-lib motif png selinux sound source svg tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm" +REQUIRED_USE="aqua? ( !X )" RDEPEND="sys-libs/ncurses >=app-admin/eselect-emacs-1.2 @@ -104,6 +105,8 @@ || die "Upstream version number changed to ${FULL_VERSION}" fi + epatch "${FILESDIR}"/emacs-24.0.92-ns-appdirs.patch + if ! use alsa; then # ALSA is detected even if not requested by its USE flag. # Suppress it by supplying pkg-config with a wrong library name. @@ -188,6 +191,10 @@ ! use gtk && use gtk3 \ && ewarn "USE flag \"gtk3\" has no effect if \"gtk\" is not set." + elif use aqua; then + einfo "Configuring to build with Cocoa support" + myconf="${myconf} --with-ns --disable-ns-self-contained" + myconf="${myconf} --without-x" else myconf="${myconf} --without-x --without-ns" fi @@ -298,6 +305,15 @@ elisp-site-file-install "${T}/${SITEFILE}" || die dodoc README BUGS + + if use aqua; then + dodir /Applications/Gentoo + rm -rf "${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app + mv nextstep/Emacs.app \ + "${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app || die + elog "Emacs${EMACS_SUFFIX#emacs}.app is in ${EPREFIX}/Applications/Gentoo." + elog "You may want to copy or symlink it into /Applications by yourself." + fi } pkg_preinst() {