source: trunk/dports/graphics/xfig/Portfile

Last change on this file was 151503, checked in by larryv@…, 11 months ago

xfig: Give patches patchy extensions

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.8 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 151503 2016-08-17 05:40:58Z ryandesign@macports.org $
3
4PortSystem 1.0
5
6name                xfig
7version             3.2.5c
8categories          graphics x11
9license             Permissive
10maintainers         nomaintainer
11
12description         Facility for Interactive Generation of figures under X11
13long_description    \
14    Xfig is a menu-driven tool that allows the user to draw and \
15    manipulate objects interactively in an X window.  The \
16    resulting pictures can be saved, printed on PostScript \
17    printers or converted to a variety of other formats (e.g. to \
18    allow inclusion in LaTeX documents).
19
20homepage            http://xfig.org/
21platforms           darwin
22master_sites        sourceforge:mcj
23
24distname            ${name}.${version}
25distfiles           ${distname}.full${extract.suffix}
26
27checksums           rmd160  e1c496dabd70520319f18bf1f591ecd910feff3c \
28                    sha256  ea628f975b79ab175ab29220cc118274466497f6217f2989928317be2993a1f9
29
30depends_lib         port:Xaw3d \
31                    port:xorg-libXi \
32                    port:libpng \
33                    port:jpeg \
34                    port:zlib
35
36depends_run         port:ghostscript \
37                    port:transfig
38
39use_xmkmf           yes
40xmkmf.args-append   -DUseSeparateConfDir=NO -DBuildHtmlManPages=NO
41
42patchfiles          patch-Imakefile.diff \
43                    patch-fig.h.diff \
44                    patch-f_util.c.diff \
45                    patch-w_keyboard.c.diff \
46                    patch-w_export.c.diff \
47                    patch-w_print.c.diff \
48                    patch-w_util.c.diff \
49                    patch-main_c.diff
50
51post-extract {
52    foreach d "${worksrcpath}/Doc ${worksrcpath}/Libraries" {
53        fs-traverse x ${d} {
54            if {[file isdirectory ${x}]} {
55                file attributes ${x} -permissions 0755
56            } else {
57                file attributes ${x} -permissions 0644
58            }
59        }
60    }
61}
62
63post-patch {
64    reinplace "s|__PREFIX|${prefix}|g" ${worksrcpath}/Imakefile
65    reinplace "s|__DESTROOT|${destroot}|g" ${worksrcpath}/Imakefile
66}
67
68destroot.target install.all install.man
69post-destroot {
70    set docdir ${destroot}${prefix}/share/doc/${name}
71    xinstall -d ${docdir}
72    eval xinstall -m 644 -W ${worksrcpath} \
73        CHANGES \
74        Doc/TODO \
75        [glob ${worksrcpath}/Doc/FORMAT*] \
76        FIGAPPS \
77        README \
78        ${docdir}
79}
80
81# https://trac.macports.org/ticket/25935
82if {[string match "*gcc-4.2" ${configure.compiler}]} {
83    # Fix font selection bug when w_fontpanel.o is compiled with optimization by gcc 4.2
84    pre-build {
85        system -W ${worksrcpath} "${build.cmd} CDEBUGFLAGS=-O0 w_fontpanel.o"
86    }
87}
88
89livecheck.regex     xfig.(\[0-9.a-z\]+).full${extract.suffix}
Note: See TracBrowser for help on using the repository browser.