source: trunk/dports/editors/emacs23/Portfile @ 97387

Last change on this file since 97387 was 97387, checked in by dports@…, 7 years ago

emacs, emacs22, emacs23, emacs-snapshot: revbump for libpng update
(really only needed for +x11/+gtk variants)

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