public
Description: Git mirror of the MacPorts svn repo
Homepage: http://www.macports.org
Clone URL: git://github.com/kballard/macports.git
Takanori Yamamoto (author)
Thu May 15 08:49:06 -0700 2008
commit  204b74f4d49ed17092646a0cdd7ef287cff1fa56
tree    b24f28bf8f80ee657c61fe7d63e06d37598a4767
parent  6cb35ccf132a2dadc8fc62a2fe94714982420e18
macports / dports / print / ghostscript / Portfile
100644 95 lines (80 sloc) 3.731 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# $Id$
 
PortSystem 1.0
 
name ghostscript
version 8.62
revision 1
categories print
maintainers takanori
description GPL Ghostscript, An interpreter for PostScript and PDF
long_description \
                Ghostscript is the well-known PostScript interpreter which \
                is available for all common and most esoteric platforms and \
                supports many different printers and some displays.
platforms darwin
homepage http://www.cs.wisc.edu/~ghost/
master_sites sourceforge:${name}:source \
                sourceforge:gs-fonts:fonts
distfiles ${distname}.tar.gz:source \
                ghostscript-fonts-std-8.11.tar.gz:fonts \
                ghostscript-fonts-other-6.0.tar.gz:fonts
patchfiles patch-src_macos-fw.mak.diff \
                patch-src_macosx.mak.diff \
                patch-src_unix-aux.mak.diff
checksums ${distname}.tar.gz md5 1dd7f0cc9adbcd9e5d6082067cc43ebb \
                ghostscript-fonts-std-8.11.tar.gz md5 6865682b095f8c4500c54b285ff05ef6 \
                ghostscript-fonts-other-6.0.tar.gz md5 1a643ae62ef166562e4d422b1a601272
 
depends_lib lib:libX11.6:XFree86 \
                port:expat \
                port:fontconfig \
                port:libiconv \
                port:pkgconfig
 
post-patch {
    foreach f {src/macosx.mak src/macos-fw.mak} {
        reinplace "s|@@DESTROOT@@|${destroot}|" ${worksrcpath}/${f}
        reinplace "s|@@PREFIX@@|${prefix}|" ${worksrcpath}/${f}
    }
}
 
# Ticket #11901, Thanks to Christian Cornelssen (ccorn@cs.tu-berlin.de).
# Make included JasPer uses its own headers rather than the system ones
configure.cppflags-delete "-I${prefix}/include"
configure.cppflags-append "-I${worksrcpath}/jasper/src/libjasper/include"
configure.cppflags-append "-I${prefix}/include"
 
configure.args --disable-compile-inits \
                --mandir='\${prefix}/share/man' \
                --disable-cups
 
build.target
use_parallel_build no
 
post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/${name}/fonts
    foreach f {*.afm *.gsf *.pfa *.pfb *.pfm fonts.dir fonts.scale} {
        eval xinstall -m 644 [glob ${workpath}/fonts/${f}] ${destroot}${prefix}/share/${name}/fonts
    }
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}-fonts
    xinstall -m 644 -W ${workpath}/fonts COPYING ChangeLog README README.tweaks TODO ${destroot}${prefix}/share/doc/${name}-fonts
 
    ln -s ../${name}/${version}/doc ${destroot}${prefix}/share/doc/${name}
}
 
livecheck.distname GPL Ghostscript
 
variant cups description {Enable cups support} {
    configure.args-delete --disable-cups
    configure.args-append --enable-cups
 
    # Informing user enable cups will install files outside of the common directory structure
    destroot.violate_mtree yes
}
 
# Added variant that build the Ghostscript framework. (Thanks, Sal!)
variant framework description {Build and install Ghostscript.framework} {
    post-build {
        move ${worksrcpath}/Makefile ${worksrcpath}/Makefile.CONFIGURE
        ln -s ${worksrcpath}/src/macosx.mak ${worksrcpath}/Makefile
        system "cd ${worksrcpath} && make framework"
        delete ${worksrcpath}/Makefile
        move ${worksrcpath}/Makefile.CONFIGURE ${worksrcpath}/Makefile
    }
 
    post-destroot {
        xinstall -m 755 -d ${destroot}${prefix}/Library/Frameworks
        move ${worksrcpath}/Makefile ${worksrcpath}/Makefile.CONFIGURE
        ln -s ${worksrcpath}/src/macosx.mak ${worksrcpath}/Makefile
        system "cd ${worksrcpath} && make framework_install"
        delete ${worksrcpath}/Makefile
        move ${worksrcpath}/Makefile.CONFIGURE ${worksrcpath}/Makefile
    }
}