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

Last change on this file since 80607 was 80607, checked in by jmr@…, 6 years ago

ghostscript: license

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.8 KB
Line 
1# $Id: Portfile 80607 2011-07-15 20:15:51Z jmr@macports.org $
2
3PortSystem      1.0
4PortGroup       muniversal 1.0
5
6name            ghostscript
7version         9.02
8categories      print
9license         GPL-3+
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                sourceforge:mapping-for-pdf.adobe:misc
21set mrversion   20091116
22distfiles       ${distname}.tar.gz:source \
23                ghostscript-fonts-other-6.0.tar.gz:fonts \
24                mappingresources4pdf_2unicode_${mrversion}.tar.Z:misc \
25                mappingresources4pdf_other_${mrversion}.tar.Z:misc
26patchfiles      patch-base_unix-dll.mak.diff \
27                patch-base_stdpre.h.diff \
28                patch-base_unixinst.mak.diff
29
30checksums           ${distname}.tar.gz \
31                    md5     86cc3a0509c0d96a641d58879d54274b \
32                    sha1    1d8831e0dc23c658fe43c971ff1195507e1b3786 \
33                    rmd160  5e5aaf1b3d9be0c0689706956eb5d2a043ad1295 \
34                    ghostscript-fonts-other-6.0.tar.gz \
35                    md5     1a643ae62ef166562e4d422b1a601272 \
36                    sha1    da62dfcb9c10d96743c7e30c1eebe7166489798c \
37                    rmd160  ab60dbf71e7d91283a106c3df381cadfe173082f \
38                    mappingresources4pdf_2unicode_${mrversion}.tar.Z \
39                    md5     59267a7d0b818267c8ce85d1dbc4479a \
40                    sha1    aaf44cb1e5dd2043c932e641b0e41432aee2ca0d \
41                    rmd160  bc1b86e6a5f0e022f88070195eb3e01e167114a7 \
42                    mappingresources4pdf_other_${mrversion}.tar.Z \
43                    md5     202fa0a291fc1f5b50cfa239106c1b92 \
44                    sha1    fc4eabff932c1623f7ee0a34085e79a44d51d0e5 \
45                    rmd160  1e2ea9af6be8b60c9a54963e542fa06ceb2daccd
46
47depends_lib     port:expat \
48                port:fontconfig \
49                port:jpeg \
50                port:libiconv \
51                port:libidn \
52                port:libpaper \
53                port:libpng \
54                port:perl5 \
55                port:tiff \
56                port:xorg-libXext \
57                port:xorg-libXt \
58                port:zlib
59
60depends_build   port:pkgconfig
61
62post-extract {
63    foreach d {zlib libpng jpeg} {
64        move "${worksrcpath}/${d}" "${worksrcpath}/${d}_local"
65    }
66
67    move ${workpath}/MappingOther/Adobe-CNS1-ETen-B5 ${workpath}/MappingOther/Adobe-CNS1-ETenms-B5
68    eval copy -force [glob ${workpath}/ToUnicode/*]    ${worksrcpath}/Resource/CMap
69    eval copy -force [glob ${workpath}/MappingOther/*] ${worksrcpath}/Resource/CMap
70}
71
72post-patch {
73    reinplace "s|__PREFIX__|${prefix}|" ${worksrcpath}/base/unix-dll.mak
74
75    # Ensure that MacPorts perl is used
76    fs-traverse f ${worksrcpath} {
77        if [string match "*.pl" ${f}] {
78            reinplace "s|#!/usr/bin/perl|#!${prefix}/bin/perl|" ${f}
79        }
80    }
81}
82
83use_autoreconf yes
84autoreconf.args -fv
85
86# Make included JasPer uses its own headers rather than the system ones
87configure.cppflags-delete       "-I${prefix}/include"
88configure.cppflags-append       "-isystem${prefix}/include"
89
90# gs9.xx: The default optimization flag (-O2) causes pdfwrite's strange 'passed invalid object' problem.
91configure.optflags  -O0
92
93configure.args  --disable-compile-inits \
94                --disable-cups \
95                --disable-gtk \
96                --with-system-libtiff
97#               --disable-freetype
98
99build.target        so
100use_parallel_build  yes
101
102destroot.target     soinstall
103post-destroot {
104    system "strip ${destroot}${prefix}/bin/gsc ${destroot}${prefix}/bin/gsx"
105    ln -s gsc ${destroot}${prefix}/bin/gs
106
107    xinstall -m 755 -d ${destroot}${prefix}/share/${name}/fonts
108    foreach f {*.afm *.gsf *.pfa *.pfm} {
109        eval xinstall -m 644 [glob ${workpath}/fonts/${f}] ${destroot}${prefix}/share/${name}/fonts
110    }
111
112    xinstall -m 755 -d ${destroot}${prefix}/share/doc
113    ln -s ../${name}/${version}/doc ${destroot}${prefix}/share/doc/${name}
114}
115
116configure.universal_args-delete --disable-dependency-tracking
117
118variant no_x11 {
119    depends_lib-delete port:xorg-libXext
120    depends_lib-delete port:xorg-libXt
121    configure.args-append --without-x
122}
123
124variant cups description {Enable cups support} {
125    configure.args-delete --disable-cups
126    configure.args-append --enable-cups
127
128    # Informing user enable cups will install files outside of the common directory structure
129    destroot.violate_mtree yes
130}
131
132livecheck.type  regex
133livecheck.url   http://downloads.ghostscript.com/public/
134livecheck.regex ${name}-(\\d+(?:\\.\\d+)*)
Note: See TracBrowser for help on using the repository browser.