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 87595 2011-11-28 02:12:09Z dports@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup muniversal 1.0 |
---|
6 | |
---|
7 | name emacs |
---|
8 | conflicts xemacs |
---|
9 | version 24.1 |
---|
10 | |
---|
11 | categories editors |
---|
12 | license GPL-3+ |
---|
13 | maintainers dports openmaintainer |
---|
14 | description The GNU Emacs text editor |
---|
15 | long_description \ |
---|
16 | GNU Emacs is a self-documenting, customizable, extensible real-time \ |
---|
17 | display editor. Users new to Emacs will be able to use basic \ |
---|
18 | features fairly rapidly by studying the tutorial and using the \ |
---|
19 | self-documentation features. Emacs also has an extensive \ |
---|
20 | interactive manual browser. It is easily extensible since its \ |
---|
21 | editing commands are written in Lisp. |
---|
22 | |
---|
23 | platforms darwin freebsd |
---|
24 | homepage http://www.gnu.org/software/emacs/emacs.html |
---|
25 | master_sites gnu |
---|
26 | |
---|
27 | checksums rmd160 0fed00042339f46b29449bd561d2f881d13d8d38 \ |
---|
28 | sha256 60d26dd1d9c0b955543ae83a2f4dd7c8b6af59e16a06822cfb175f1bf97c8bab |
---|
29 | |
---|
30 | configure.args --without-x \ |
---|
31 | --without-dbus \ |
---|
32 | --without-gconf \ |
---|
33 | --without-libotf \ |
---|
34 | --without-m17n-flt \ |
---|
35 | --without-gpm \ |
---|
36 | --infodir ${prefix}/share/info/${name} |
---|
37 | |
---|
38 | depends_build port:pkgconfig \ |
---|
39 | port:texinfo |
---|
40 | depends_lib port:ncurses |
---|
41 | |
---|
42 | post-destroot { |
---|
43 | xinstall -d ${destroot}${prefix}/share/emacs/${version}/leim |
---|
44 | delete ${destroot}${prefix}/bin/ctags |
---|
45 | delete ${destroot}${prefix}/share/man/man1/ctags.1.gz |
---|
46 | } |
---|
47 | |
---|
48 | livecheck.type regex |
---|
49 | livecheck.url http://ftp.gnu.org/gnu/emacs/?C=M&O=D |
---|
50 | livecheck.regex ${name}-(\\d+\\.\\d+\\w*)\\.tar |
---|
51 | |
---|
52 | variant x11 description {Builds emacs as a X11 program with Lucid widgets} { |
---|
53 | configure.args-delete --without-x |
---|
54 | configure.args-append --with-x-toolkit=lucid \ |
---|
55 | --without-xaw3d \ |
---|
56 | --with-xpm \ |
---|
57 | --with-jpeg \ |
---|
58 | --with-tiff \ |
---|
59 | --with-gif \ |
---|
60 | --with-png \ |
---|
61 | --without-rsvg \ |
---|
62 | --with-xft |
---|
63 | depends_lib-append port:xorg-libXmu \ |
---|
64 | port:xorg-libXaw \ |
---|
65 | port:xpm \ |
---|
66 | port:jpeg \ |
---|
67 | port:tiff \ |
---|
68 | port:giflib \ |
---|
69 | port:libpng \ |
---|
70 | port:Xft2 |
---|
71 | |
---|
72 | # autoconf appears to be dropping linker flags for freetype & |
---|
73 | # fontconfig; work around this. See #28083 |
---|
74 | configure.ldflags-append -lfreetype -lfontconfig |
---|
75 | } |
---|
76 | |
---|
77 | platform darwin { |
---|
78 | post-patch { |
---|
79 | # Leopard's XCode 3.1.x ld(1) man page claims -no_pie is supported, but it's not |
---|
80 | if {${os.major} < 9} { |
---|
81 | reinplace "s:-fno-pie::" ${worksrcpath}/src/s/darwin.h |
---|
82 | } elseif {${os.major} > 10} { |
---|
83 | reinplace "s:-fno-pie:-fno-pie -Wl,-no_pie:" ${worksrcpath}/src/s/darwin.h |
---|
84 | |
---|
85 | # I believe the above reinplace is sufficient, but I'm leaving this to be safe --jeremyhu |
---|
86 | configure.ldflags-append -Wl,-no_pie |
---|
87 | } |
---|
88 | } |
---|
89 | } |
---|
90 | |
---|
91 | variant motif requires x11 description {Builds emacs as an X11 program with Motif widgets} { |
---|
92 | configure.args-delete --with-x-toolkit=lucid |
---|
93 | configure.args-append --with-x-toolkit=motif |
---|
94 | depends_lib-append lib:libXm:openmotif |
---|
95 | } |
---|
96 | |
---|
97 | variant gtk requires x11 description {Builds emacs as an X11 program with GTK+2 widgets} { |
---|
98 | configure.args-delete --with-x-toolkit=lucid |
---|
99 | configure.args-delete --without-gconf |
---|
100 | configure.args-delete --without-rsvg |
---|
101 | configure.args-append --with-x-toolkit=gtk |
---|
102 | configure.args-append --with-gconf |
---|
103 | configure.args-append --with-rsvg |
---|
104 | depends_lib-append port:gtk2 \ |
---|
105 | path:lib/pkgconfig/glib-2.0.pc:glib2 \ |
---|
106 | port:gconf \ |
---|
107 | port:librsvg |
---|
108 | } |
---|
109 | |
---|
110 | variant dbus description {Builds emacs with D-Bus support} { |
---|
111 | configure.args-delete --without-dbus |
---|
112 | configure.args-append --with-dbus |
---|
113 | depends_lib-append port:dbus |
---|
114 | } |
---|
115 | |
---|
116 | if {![variant_isset dbus]} { |
---|
117 | notes "D-Bus support is no longer included in the default Emacs installation. To build Emacs with D-Bus support, please install with the +dbus variant." |
---|
118 | } |
---|