source: trunk/dports/editors/emacs22/Portfile

Last change on this file was 139864, checked in by jmr@…, 2 years ago

emacs22: use workaround on darwin > 11 too

File size: 4.1 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 139864 2015-08-30 22:21:48Z ryandesign@macports.org $
3
4PortSystem 1.0
5PortGroup muniversal 1.0
6
7name            emacs22
8version         22.3
9revision        8
10
11categories      editors
12license         GPL-3+
13maintainers     dports openmaintainer
14description     The GNU Emacs text editor
15long_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
23platforms       darwin freebsd
24homepage        http://www.gnu.org/software/emacs/emacs.html
25master_sites    gnu:emacs
26distname        emacs-${version}
27checksums       md5     aa8ba34f548cd78b35914ae5a7bb87eb \
28                sha1    5e9b3e0205099a83be7198fd43ba1c9442a3feb0 \
29                rmd160  a7eed5099d0cab25f34152f1b18b5c1b4e2e0746
30
31patchfiles      patch-Makefile.in.diff \
32                patch-leim-Makefile.in.diff \
33                patch-unexmacosx.c.diff \
34                patch-unexmacosx.c-2.diff \
35                patch-s-darwin.h.diff \
36                patch-configure-ignore-xaw3d.diff
37
38set major       22
39set suffix      ".${name}"
40
41configure.args  --without-x \
42                --without-carbon \
43                --program-suffix=${suffix} \
44                --infodir=${prefix}/share/info/${name}
45
46depends_lib     port:ncurses
47
48
49post-destroot {
50    xinstall -d ${destroot}${prefix}/share/emacs/${version}/leim
51    # avoid conflict with ctags installed by the ctags port
52    delete ${destroot}${prefix}/bin/ctags${suffix}
53    delete ${destroot}${prefix}/share/man/man1/ctags.1
54
55    # remove non-version-specific site-lisp dir
56    delete ${destroot}${prefix}/share/emacs/site-lisp
57    delete ${destroot}${prefix}/var/games/emacs/snake-scores
58    delete ${destroot}${prefix}/var/games/emacs/tetris-scores
59
60    # add suffixes to man pages to match binary names
61    foreach f [glob -dir ${destroot}${prefix}/share/man/man1 *.1] {
62        move $f "[file rootname $f]${suffix}.1"
63    }
64
65    # give the emacs binary (and its manpage) a more sane name
66    move ${destroot}${prefix}/bin/emacs${suffix} \
67         ${destroot}${prefix}/bin/${name}
68    move ${destroot}${prefix}/bin/emacs-${version}${suffix} \
69         ${destroot}${prefix}/bin/emacs-${version}
70    move ${destroot}${prefix}/share/man/man1/emacs${suffix}.1 \
71         ${destroot}${prefix}/share/man/man1/${name}.1
72}
73
74livecheck.type  regex
75livecheck.url   http://ftp.gnu.org/gnu/emacs/?C=M&O=D
76livecheck.regex emacs-(${major}\\.\\d+\\w*)\\.tar
77
78variant x11 description {Builds emacs as a X11 program with Lucid widgets} {
79    configure.args-delete   --without-x
80    configure.args-append   --with-x-toolkit=lucid \
81                            --without-carbon \
82                            --with-xpm \
83                            --with-jpeg \
84                            --with-tiff \
85                            --with-gif \
86                            --with-png
87    depends_lib-append      port:xorg-libXmu \
88                            port:xorg-libXaw \
89                            port:xpm \
90                            lib:libjpeg:jpeg \
91                            lib:libtiff:tiff \
92                            port:giflib \
93                            lib:libpng:libpng
94}
95
96if {${os.platform} eq "darwin" && ${os.major} >= 11} {
97    configure.ldflags-append -Wl,-no_pie
98}
99
100variant motif requires x11 description {Builds emacs as an X11 program with Motif widgets} {
101    configure.args-delete   --with-x-toolkit=lucid
102    configure.args-append   --with-x-toolkit=motif
103    depends_lib-append      lib:libXm:openmotif
104}
105
106variant gtk requires x11 description {Builds emacs as an X11 program with GTK+2 widgets} {
107    configure.args-delete   --with-x-toolkit=lucid
108    configure.args-append   --with-x-toolkit=gtk
109    depends_lib-append      lib:libgtk.2:gtk2 \
110                            lib:libglib.2:glib2
111}
112
Note: See TracBrowser for help on using the repository browser.