source: trunk/dports/aqua/emacs-app/Portfile @ 87876

Last change on this file since 87876 was 87876, checked in by hum@…, 8 years ago

emacs-app: add lion fullscreen patch; fetch 23.3b source tarball and add livecheck as well as emacs port; take joint maintainership; see #32288, r87595.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.2 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 87876 2011-12-10 13:25:19Z hum@macports.org $
3
4PortSystem 1.0
5
6name            emacs-app
7version         23.3
8revision        3
9categories      aqua editors
10license         GPL-3+
11maintainers     css hum openmaintainer
12description     The GNU Emacs text editor (Cocoa version)
13
14long_description        GNU Emacs is a self-documenting, customizable,      \
15        extensible real-time display editor. This is a port of the latest   \
16        GNU Emacs source to the OpenStep (or NeXTstep) APIs, as implemented \
17        by Cocoa on OS X. It differs from Carbon ports of GNU Emacs in that \
18        it makes a more concerted attempt from the ground up to follow OS X \
19        desktop and UI conventions.
20
21# Note that this distribution can support GNUstep as well, but that
22# configuration is untested at this time.
23
24platforms       darwin
25homepage        http://www.gnu.org/software/emacs/
26master_sites    gnu:emacs
27dist_subdir     emacs
28distname        emacs-${version}b
29worksrcdir      emacs-${version}
30checksums       rmd160  d253874ecef5c09d35576cf508727f5863c80834 \
31                sha256  56cb6db717a9eb9679e12466559837c4047a175c89d8cc4d89d4c378562320f9
32
33depends_lib     port:ncurses
34use_parallel_build      yes
35
36configure.args  --with-ns --without-x --without-dbus
37
38patchfiles      patch-src_emacs.c.diff \
39                patch-src_unexmacosx.c.diff
40
41if {${configure.compiler} == "clang"} {
42    patchfiles-append   patch-clang.diff
43}
44
45# patch-fullscreen.diff
46#   http://gist.github.com/291150
47#   http://www.sanityinc.com/full-screen-support-for-cocoa-emacs-on-osx
48variant fullscreen description {Add fullscreen patch} {
49    patchfiles-append patch-fullscreen.diff
50}
51
52# inline and font patches are fetched from MacEmacsJP.
53#   http://svn.sourceforge.jp/svnroot/macemacsjp/inline_patch/trunk/
54#   revision 574.
55# patch-macemacsjp-inline.diff <= emacs-inline.patch
56# patch-macemacsjp-jpfont.diff <= font.patch
57
58variant inline description {Add inline patch from MacEmacsJP} {
59    patchfiles-append patch-macemacsjp-inline.diff
60}
61
62variant jpfont description {Add Japanese font patch from MacEmacsJP} {
63    patchfiles-append patch-macemacsjp-jpfont.diff
64}
65
66variant patches requires fullscreen inline jpfont description {Add all patches: fullscreen, inline and jpfont} {}
67
68platform darwin 11 {
69   patchfiles-append    patch-fix-title-bar.diff patch-src_darwin.h.diff
70   # patch-lion-fullscreen.diff
71   #   https://github.com/downloads/typester/emacs/emacs-23-lion-fullscreen-test.patch
72   if {[variant_isset fullscreen]} {
73       patchfiles-append    patch-lion-fullscreen.diff
74   }
75   configure.cflags-append      -fno-pie -O2
76   configure.ldflags-append     -fno-pie
77}
78
79post-patch {
80    reinplace "s|__PREFIX__|${prefix}|" ${worksrcpath}/src/emacs.c
81}
82
83destroot {
84        system "cd ${worksrcpath} && make install"
85        xinstall -m 755 -d ${destroot}${applications_dir}
86        file copy ${worksrcpath}/nextstep/Emacs.app \
87                ${destroot}${applications_dir}
88        file copy ${filespath}/site-start.el \
89                ${destroot}${applications_dir}/Emacs.app/Contents/Resources/site-lisp
90}
91
92post-destroot {
93        reinplace "s|__PREFIX__|${prefix}|g" \
94                ${destroot}${applications_dir}/Emacs.app/Contents/Resources/site-lisp/site-start.el
95}
96
97livecheck.type      regex
98livecheck.url       http://ftp.gnu.org/gnu/emacs/?C=M&O=D
99livecheck.regex     emacs-(\\d+\\.\\d+\\w*)\\.tar
Note: See TracBrowser for help on using the repository browser.