source: trunk/dports/aqua/emacs-mac-app/Portfile @ 118573

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

emacs-mac-app: update to 4.8.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.9 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 118573 2014-04-05 03:12:20Z hum@macports.org $
3
4PortSystem          1.0
5PortGroup           github 1.0
6
7github.setup        railwaycat emacs-mac-port 4.8 v
8
9name                emacs-mac-app
10categories          aqua editors
11maintainers         hum openmaintainer
12
13description         Emacs Mac port
14
15long_description    ${name} is "Mac port" addition to GNU Emacs 24. This provides a native \
16                    GUI support for Mac OS X 10.4 - 10.9.
17
18platforms           darwin
19license             GPL-3+
20
21set emacs_version   24.3
22
23checksums           rmd160  e0aed50ae12392cba28dce516aa38639162b5a5d \
24                    sha256  a9d77e5432513b7796e80b92f2bf6779ad502f485333291c62784c7c708dd16e
25
26depends_lib         port:ncurses \
27                    port:libxml2 \
28                    port:gnutls
29
30patchfiles          patch-src_emacs.c.diff
31
32universal_variant   no
33
34configure.args      --with-mac \
35                    --enable-mac-app=${applications_dir} \
36                    --without-rsvg \
37                    --without-imagemagick
38
39if {${os.major} >= 11 && ${os.platform} eq "darwin"} {
40    configure.cflags-append -fobjc-arc
41}
42
43post-destroot {
44    # move files into the app bundle.
45    # https://github.com/railwaycat/emacs-mac-port/blob/master/build-emacs.app.sh
46    set app_dir ${destroot}${applications_dir}/Emacs.app/Contents/Resources
47    foreach d [glob ${destroot}${prefix}/share/emacs/${emacs_version}/*] {
48        move ${d} ${app_dir}
49    }
50    move ${destroot}${prefix}/share/info ${app_dir}
51    move ${destroot}${prefix}/share/man  ${app_dir}
52    move ${destroot}${prefix}/var        ${app_dir}
53    move ${destroot}${prefix}/bin        ${app_dir}/../MacOS
54    xinstall -d ${app_dir}/../MacOS/libexec
55    foreach f [glob ${destroot}${prefix}/libexec/emacs/${emacs_version}/*/*] {
56        move ${f} ${app_dir}/../MacOS/libexec
57    }
58    delete ${destroot}${prefix}
59
60    # make the application binary a hard link.
61    delete ${app_dir}/../MacOS/Emacs
62    file link -hard ${app_dir}/../MacOS/Emacs ${app_dir}/../MacOS/bin/emacs
63
64    # install site-start.el.
65    set site_lisp ${destroot}${applications_dir}/Emacs.app/Contents/Resources/site-lisp
66    xinstall -d ${site_lisp}
67    file copy ${filespath}/site-start.el ${site_lisp}
68    reinplace "s|__PREFIX__|${prefix}|g" ${site_lisp}/site-start.el
69
70    # rename the app bundle to avoid a conflict with emacs-app.
71    move ${destroot}${applications_dir}/Emacs.app \
72         ${destroot}${applications_dir}/EmacsMac.app
73}
74
75variant rsvg description {Enable librsvg bindings} {
76    depends_lib-append     port:librsvg
77    configure.args-delete  --without-rsvg
78    configure.args-append  --with-rsvg
79}
80
81variant imagemagick description {Enable ImageMagick bindings} {
82    depends_lib-append     port:ImageMagick
83    configure.args-delete  --without-imagemagick
84    configure.args-append  --with-imagemagick
85}
Note: See TracBrowser for help on using the repository browser.