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 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name emacs-app |
---|
7 | version 24.1 |
---|
8 | categories aqua editors |
---|
9 | maintainers css hum openmaintainer |
---|
10 | |
---|
11 | description The GNU Emacs text editor (Cocoa version) |
---|
12 | |
---|
13 | long_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 | |
---|
23 | homepage http://www.gnu.org/software/emacs/ |
---|
24 | platforms darwin |
---|
25 | license GPL-3+ |
---|
26 | |
---|
27 | master_sites gnu:emacs |
---|
28 | distname emacs-${version} |
---|
29 | dist_subdir emacs |
---|
30 | checksums rmd160 0fed00042339f46b29449bd561d2f881d13d8d38 \ |
---|
31 | sha256 60d26dd1d9c0b955543ae83a2f4dd7c8b6af59e16a06822cfb175f1bf97c8bab |
---|
32 | |
---|
33 | depends_lib port:ncurses |
---|
34 | |
---|
35 | patchfiles patch-src_emacs.c.diff |
---|
36 | |
---|
37 | post-patch { |
---|
38 | reinplace "s|__PREFIX__|${prefix}|" ${worksrcpath}/src/emacs.c |
---|
39 | } |
---|
40 | |
---|
41 | configure.args --with-ns --without-x --without-dbus |
---|
42 | |
---|
43 | use_parallel_build yes |
---|
44 | |
---|
45 | destroot { |
---|
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 | |
---|
54 | post-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 |
---|
62 | variant 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 |
---|
71 | variant inline description {Add inline patch from MacEmacsJP} { |
---|
72 | patchfiles-append patch-macemacsjp-inline.diff |
---|
73 | } |
---|
74 | |
---|
75 | variant jpfont description {Add Japanese font patch from MacEmacsJP} { |
---|
76 | patchfiles-append patch-macemacsjp-jpfont.diff |
---|
77 | } |
---|
78 | |
---|
79 | variant patches requires fullscreen inline jpfont description {Add all patches: fullscreen, inline and jpfont} {} |
---|
80 | |
---|
81 | platform 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 | |
---|
91 | livecheck.type regex |
---|
92 | livecheck.url http://ftp.gnu.org/gnu/emacs/?C=M&O=D |
---|
93 | livecheck.regex emacs-(\\d+\\.\\d+\\w*)\\.tar |
---|