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

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

ghostscript: version 9.01

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