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

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

gnutls: Bump to 3.1.10 and revbump dependents

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