source: trunk/dports/print/ghostscript/Portfile @ 71901

Last change on this file since 71901 was 71901, checked in by takanori@…, 9 years ago

ghostscript 9.00 (official)
Ticket #26588

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.2 KB
Line 
1# $Id: Portfile 71901 2010-09-26 11:11:51Z takanori@macports.org $
2
3PortSystem      1.0
4PortGroup       muniversal 1.0
5
6name            ghostscript
7version         9.00
8revision        4
9categories      print
10maintainers     takanori openmaintainer
11description     GPL Ghostscript, An interpreter for PostScript and PDF
12long_description \
13                Ghostscript is the well-known PostScript interpreter which \
14                is available for all common and most esoteric platforms and \
15                supports many different printers and some displays.
16platforms       darwin
17homepage        http://www.cs.wisc.edu/~ghost/
18master_sites    sourceforge:${name}:source \
19                sourceforge:gs-fonts:fonts \
20                macports:pTeX:misc
21distfiles       ${distname}.tar.gz:source \
22                ghostscript-fonts-other-6.0.tar.gz:fonts \
23                mappingresources4pdf_2unicode-20091208.tar.Z:misc \
24                mappingresources4pdf_other-20091208.tar.Z:misc
25patchfiles      patch-base_unix-dll.mak.diff \
26                patch-base_stdpre.h.diff \
27                patch-base_unixinst.mak.diff
28checksums       ${distname}.tar.gz rmd160 771d5d517ee5962c9449148f258c784549af3fb4 \
29                ghostscript-fonts-other-6.0.tar.gz rmd160 ab60dbf71e7d91283a106c3df381cadfe173082f \
30                mappingresources4pdf_2unicode-20091208.tar.Z rmd160 bc1b86e6a5f0e022f88070195eb3e01e167114a7 \
31                mappingresources4pdf_other-20091208.tar.Z    rmd160 1e2ea9af6be8b60c9a54963e542fa06ceb2daccd
32
33depends_lib     port:xorg-libXext \
34                port:xorg-libXt \
35                port:expat \
36                port:fontconfig \
37                port:jpeg \
38                port:libiconv \
39                port:libidn \
40                port:libpaper \
41                port:libpng \
42                port:tiff \
43                port:zlib \
44                path:bin/perl:perl5
45
46depends_build   port:pkgconfig
47
48post-extract {
49    foreach d {zlib libpng jpeg} {
50        move "${worksrcpath}/${d}" "${worksrcpath}/${d}_local"
51    }
52
53    move ${workpath}/MappingOther/Adobe-CNS1-ETen-B5 ${workpath}/MappingOther/Adobe-CNS1-ETenms-B5
54    eval copy -force [glob ${workpath}/ToUnicode/*]    ${worksrcpath}/Resource/CMap
55    eval copy -force [glob ${workpath}/MappingOther/*] ${worksrcpath}/Resource/CMap
56}
57
58post-patch {
59    reinplace "s|__PREFIX__|${prefix}|" ${worksrcpath}/base/unix-dll.mak
60
61    # Ensure that MacPorts perl is used
62    fs-traverse f ${worksrcpath} {
63        if [string match "*.pl" ${f}] {
64            reinplace "s|#!/usr/bin/perl|#!${prefix}/bin/perl|" ${f}
65        }
66    }
67}
68
69use_autoreconf yes
70autoreconf.args -fv
71
72# Make included JasPer uses its own headers rather than the system ones
73configure.cppflags-delete       "-I${prefix}/include"
74configure.cppflags-append       "-isystem${prefix}/include"
75
76configure.args  --disable-compile-inits \
77                --disable-cups \
78                --disable-gtk \
79                --with-system-libtiff
80#               --disable-freetype
81
82build.target        so
83use_parallel_build  no
84
85destroot.target     soinstall
86post-destroot {
87    system "strip ${destroot}${prefix}/bin/gsc ${destroot}${prefix}/bin/gsx"
88    ln -s gsc ${destroot}${prefix}/bin/gs
89
90    xinstall -m 755 -d ${destroot}${prefix}/share/${name}/fonts
91    foreach f {*.afm *.gsf *.pfa *.pfm} {
92        eval xinstall -m 644 [glob ${workpath}/fonts/${f}] ${destroot}${prefix}/share/${name}/fonts
93    }
94
95    xinstall -m 755 -d ${destroot}${prefix}/share/doc
96    ln -s ../${name}/${version}/doc ${destroot}${prefix}/share/doc/${name}
97
98    xinstall -m 755 -d ${destroot}${prefix}/share/${name}/${version}/examples/cjk
99    eval xinstall -m 644 [glob ${worksrcpath}/examples/cjk/*.ps] ${destroot}${prefix}/share/${name}/${version}/examples/cjk
100}
101
102livecheck.distname      GPL Ghostscript
103
104configure.universal_args-delete --disable-dependency-tracking
105
106variant no_x11 {
107    depends_lib-delete port:xorg-libXext
108    depends_lib-delete port:xorg-libXt
109    configure.args-append --without-x
110}
111
112variant cups description {Enable cups support} {
113    configure.args-delete --disable-cups
114    configure.args-append --enable-cups
115
116    # Informing user enable cups will install files outside of the common directory structure
117    destroot.violate_mtree yes
118}
119
120livecheck.type  regex
121livecheck.url   http://ghostscript.com/releases/
122livecheck.regex ${name}-(\\d+(?:\\.\\d+)*)
Note: See TracBrowser for help on using the repository browser.