source: trunk/dports/editors/emacs23/Portfile

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

ncurses: update to 6.0, rev bump dependents due to new ABI

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.4 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 139469 2015-08-18 01:10:17Z ryandesign@macports.org $
3
4PortSystem 1.0
5PortGroup  muniversal 1.0
6
7name            emacs23
8version         23.4
9revision        6
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}
27dist_subdir     emacs
28
29checksums       rmd160  5fb7e4cd4270a524b8723ad86a145a0e47336bf7 \
30                sha256  b9a2b8434052771f797d2032772eba862ff9aa143029efc72295170607289c18
31
32patchfiles      patch-configure.diff \
33                patch-src_xgselect.c.diff \
34                patch-lisp_files.el.diff
35
36set major       [lindex [split ${version} .] 0]
37set suffix      ".${name}"
38
39configure.args  --without-x \
40                --without-dbus \
41                --without-gconf \
42                --without-libotf \
43                --without-m17n-flt \
44                --without-gpm \
45                --program-suffix=${suffix} \
46                --infodir ${prefix}/share/info/${name}
47
48depends_build   port:pkgconfig \
49                port:texinfo
50depends_lib     port:ncurses
51
52post-destroot {
53    xinstall -d ${destroot}${prefix}/share/emacs/${version}/leim
54    delete ${destroot}${prefix}/bin/ctags${suffix}
55    delete ${destroot}${prefix}/share/man/man1/ctags.1
56    # remove non-version-specific site-lisp dir
57    delete ${destroot}${prefix}/share/emacs/site-lisp
58    delete ${destroot}${prefix}/var/games/emacs/snake-scores
59    delete ${destroot}${prefix}/var/games/emacs/tetris-scores
60   
61    # would be better to rename this and rewrite with appropriate paths
62    delete ${destroot}${prefix}/share/applications/emacs.desktop
63    delete ${destroot}${prefix}/share/icons
64   
65    # add suffixes to man pages to match binary names
66    foreach f [glob -dir ${destroot}${prefix}/share/man/man1 *.1] {
67        move $f "[file rootname $f]${suffix}.1"
68    }
69
70    # give the emacs binary (and its manpage) a more sane name
71    move ${destroot}${prefix}/bin/emacs${suffix} \
72         ${destroot}${prefix}/bin/${name}
73    move ${destroot}${prefix}/bin/emacs-${version}${suffix} \
74         ${destroot}${prefix}/bin/emacs-${version}
75    move ${destroot}${prefix}/share/man/man1/emacs${suffix}.1 \
76         ${destroot}${prefix}/share/man/man1/${name}.1
77
78}
79
80livecheck.type  regex
81livecheck.url   http://ftp.gnu.org/gnu/emacs/?C=M&O=D
82livecheck.regex emacs-(${major}\\.\\d+\\w*)\\.tar
83
84variant x11 description {Builds emacs as a X11 program with Lucid widgets} {
85    configure.args-delete   --without-x
86    configure.args-append   --with-x-toolkit=lucid \
87                            --without-xaw3d \
88                            --with-xpm \
89                            --with-jpeg \
90                            --with-tiff \
91                            --with-gif \
92                            --with-png \
93                            --without-rsvg \
94                            --with-xft
95    depends_lib-append      port:xorg-libXmu \
96                            port:xorg-libXaw \
97                            port:xpm \
98                            port:jpeg \
99                            port:tiff \
100                            port:giflib \
101                            port:libpng \
102                            port:Xft2
103
104    # autoconf appears to be dropping linker flags for freetype &
105    # fontconfig; work around this. See #28083
106    configure.ldflags-append -lfreetype -lfontconfig
107}
108
109platform darwin {
110    post-patch {
111        # Leopard's XCode 3.1.x ld(1) man page claims -no_pie is supported, but it's not
112        if {${os.major} < 9} {
113            reinplace "s:-fno-pie::" ${worksrcpath}/src/s/darwin.h
114        } elseif {${os.major} > 10} {
115            reinplace "s:-fno-pie:-fno-pie -Wl,-no_pie:" ${worksrcpath}/src/s/darwin.h
116
117            # I believe the above reinplace is sufficient, but I'm leaving this to be safe --jeremyhu
118            configure.ldflags-append -Wl,-no_pie
119        }
120    }
121}
122
123variant motif requires x11 description {Builds emacs as an X11 program with Motif widgets} {
124    configure.args-delete   --with-x-toolkit=lucid
125    configure.args-append   --with-x-toolkit=motif
126    depends_lib-append      lib:libXm:openmotif
127}
128
129variant gtk requires x11 description {Builds emacs as an X11 program with GTK+2 widgets} {
130    configure.args-delete   --with-x-toolkit=lucid
131    configure.args-delete   --without-gconf
132    configure.args-delete   --without-rsvg
133    configure.args-append   --with-x-toolkit=gtk
134    configure.args-append   --with-gconf
135    configure.args-append   --with-rsvg
136    depends_lib-append      port:gtk2 \
137                            path:lib/pkgconfig/glib-2.0.pc:glib2 \
138                            port:gconf \
139                            port:librsvg
140}
141
142variant dbus description {Builds emacs with D-Bus support} {
143    configure.args-delete   --without-dbus
144    configure.args-append   --with-dbus
145    depends_lib-append      port:dbus
146}
Note: See TracBrowser for help on using the repository browser.