Ticket #34844: Portfile

File Portfile, 3.3 KB (added by seanfarley (Sean Farley), 12 years ago)

emacs-app portfile

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$
3
4PortSystem          1.0
5
6name                emacs-app
7version             24.1
8categories          aqua editors
9maintainers         css hum openmaintainer
10
11description         The GNU Emacs text editor (Cocoa version)
12
13long_description    GNU Emacs is a self-documenting, customizable, extensible  \
14                    real-time display editor. This is a port of the latest GNU \
15                    Emacs source to the OpenStep (or NeXTstep) APIs, as        \
16                    implemented by Cocoa on OS X. It differs from Carbon ports \
17                    of GNU Emacs in that it makes a more concerted attempt     \
18                    from the ground up to follow OS X desktop and UI conventions.
19
20# Note that this distribution can support GNUstep as well, but that
21# configuration is untested at this time.
22
23homepage            http://www.gnu.org/software/emacs/
24platforms           darwin
25license             GPL-3+
26
27master_sites        gnu:emacs
28distname            emacs-${version}
29dist_subdir         emacs
30checksums           rmd160  0fed00042339f46b29449bd561d2f881d13d8d38 \
31                    sha256  60d26dd1d9c0b955543ae83a2f4dd7c8b6af59e16a06822cfb175f1bf97c8bab
32
33depends_lib         port:ncurses
34
35patchfiles          patch-src_emacs.c.diff
36
37post-patch {
38    reinplace "s|__PREFIX__|${prefix}|" ${worksrcpath}/src/emacs.c
39}
40
41configure.args      --with-ns --without-x --without-dbus
42
43use_parallel_build  yes
44
45destroot {
46    system "cd ${worksrcpath} && make install"
47    xinstall -m 755 -d ${destroot}${applications_dir}
48    file copy ${worksrcpath}/nextstep/Emacs.app \
49        ${destroot}${applications_dir}
50    file copy ${filespath}/site-start.el \
51        ${destroot}${applications_dir}/Emacs.app/Contents/Resources/site-lisp
52}
53
54post-destroot {
55    reinplace "s|__PREFIX__|${prefix}|g" \
56        ${destroot}${applications_dir}/Emacs.app/Contents/Resources/site-lisp/site-start.el
57}
58
59# patch-fullscreen.diff
60#   http://gist.github.com/291150
61#   http://www.sanityinc.com/full-screen-support-for-cocoa-emacs-on-osx
62variant fullscreen description {Add fullscreen patch} {
63    patchfiles-append   patch-fullscreen.diff
64}
65
66# inline and font patches are fetched from MacEmacsJP.
67#   http://svn.sourceforge.jp/svnroot/macemacsjp/inline_patch/trunk/
68#   revision 579 (2012/01/13).
69# patch-macemacsjp-inline.diff <= emacs-inline.patch
70# patch-macemacsjp-jpfont.diff <= font.patch
71variant inline description {Add inline patch from MacEmacsJP} {
72    patchfiles-append   patch-macemacsjp-inline.diff
73}
74
75variant jpfont description {Add Japanese font patch from MacEmacsJP} {
76    patchfiles-append   patch-macemacsjp-jpfont.diff
77}
78
79variant patches requires fullscreen inline jpfont description {Add all patches: fullscreen, inline and jpfont} {}
80
81platform darwin 11 {
82   # patch-lion-fullscreen.diff
83   #   https://github.com/downloads/typester/emacs/emacs-23-lion-fullscreen-test.patch
84   if {[variant_isset fullscreen]} {
85       patchfiles-append   patch-lion-fullscreen.diff
86   }
87   configure.cflags-append   -fno-pie -O2
88   configure.ldflags-append  -fno-pie
89}
90
91livecheck.type      regex
92livecheck.url       http://ftp.gnu.org/gnu/emacs/?C=M&O=D
93livecheck.regex     emacs-(\\d+\\.\\d+\\w*)\\.tar