1 | # $Id: Portfile 102865 2013-02-09 19:16:59Z jeremyhu@macports.org $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | PortGroup muniversal 1.0 |
---|
5 | |
---|
6 | name ghostscript |
---|
7 | version 9.06 |
---|
8 | revision 3 |
---|
9 | categories print |
---|
10 | license GPL-3+ |
---|
11 | maintainers takanori openmaintainer |
---|
12 | description GPL Ghostscript, An interpreter for PostScript and PDF |
---|
13 | long_description \ |
---|
14 | Ghostscript is the well-known PostScript interpreter which \ |
---|
15 | is available for all common and most esoteric platforms and \ |
---|
16 | supports many different printers and some displays. |
---|
17 | platforms darwin |
---|
18 | homepage http://www.cs.wisc.edu/~ghost/ |
---|
19 | master_sites http://downloads.ghostscript.com/public/:source \ |
---|
20 | sourceforge:gs-fonts:fonts \ |
---|
21 | sourceforge:mapping-for-pdf.adobe:misc |
---|
22 | set mrversion 20091116 |
---|
23 | distfiles ${distname}.tar.gz:source \ |
---|
24 | ghostscript-fonts-other-6.0.tar.gz:fonts \ |
---|
25 | mappingresources4pdf_2unicode_${mrversion}.tar.Z:misc \ |
---|
26 | mappingresources4pdf_other_${mrversion}.tar.Z:misc |
---|
27 | patchfiles patch-base_unix-dll.mak.diff \ |
---|
28 | patch-base_stdpre.h.diff \ |
---|
29 | patch-bigendian.diff \ |
---|
30 | ghostscript-9.05-cross.patch \ |
---|
31 | ghostscript-9.05-cross-so.patch |
---|
32 | |
---|
33 | checksums ${distname}.tar.gz \ |
---|
34 | md5 153ddb0622cb155d2f600146f1e28d84 \ |
---|
35 | sha1 a3de8ccb877ee9b7437a598196eb6afa11bf31dc \ |
---|
36 | rmd160 5a51a07d9ea00ef1f29684a1b5f2c889976b7712 \ |
---|
37 | ghostscript-fonts-other-6.0.tar.gz \ |
---|
38 | md5 1a643ae62ef166562e4d422b1a601272 \ |
---|
39 | sha1 da62dfcb9c10d96743c7e30c1eebe7166489798c \ |
---|
40 | rmd160 ab60dbf71e7d91283a106c3df381cadfe173082f \ |
---|
41 | mappingresources4pdf_2unicode_${mrversion}.tar.Z \ |
---|
42 | md5 59267a7d0b818267c8ce85d1dbc4479a \ |
---|
43 | sha1 aaf44cb1e5dd2043c932e641b0e41432aee2ca0d \ |
---|
44 | rmd160 bc1b86e6a5f0e022f88070195eb3e01e167114a7 \ |
---|
45 | mappingresources4pdf_other_${mrversion}.tar.Z \ |
---|
46 | md5 202fa0a291fc1f5b50cfa239106c1b92 \ |
---|
47 | sha1 fc4eabff932c1623f7ee0a34085e79a44d51d0e5 \ |
---|
48 | rmd160 1e2ea9af6be8b60c9a54963e542fa06ceb2daccd |
---|
49 | |
---|
50 | depends_lib port:expat \ |
---|
51 | port:fontconfig \ |
---|
52 | port:freetype \ |
---|
53 | port:jbig2dec \ |
---|
54 | port:jpeg \ |
---|
55 | port:lcms2 \ |
---|
56 | port:libiconv \ |
---|
57 | port:libidn \ |
---|
58 | port:libpaper \ |
---|
59 | port:libpng \ |
---|
60 | port:perl5 \ |
---|
61 | port:tiff \ |
---|
62 | port:xorg-libXext \ |
---|
63 | port:xorg-libXt \ |
---|
64 | port:zlib |
---|
65 | # port:ijs |
---|
66 | |
---|
67 | depends_build port:pkgconfig |
---|
68 | |
---|
69 | post-extract { |
---|
70 | foreach d {freetype jbig2dec jpeg lcms2 libpng tiff zlib} { |
---|
71 | move "${worksrcpath}/${d}" "${worksrcpath}/${d}_local" |
---|
72 | } |
---|
73 | |
---|
74 | move ${workpath}/MappingOther/Adobe-CNS1-ETen-B5 ${workpath}/MappingOther/Adobe-CNS1-ETenms-B5 |
---|
75 | eval copy -force [glob ${workpath}/ToUnicode/*] ${worksrcpath}/Resource/CMap |
---|
76 | eval copy -force [glob ${workpath}/MappingOther/*] ${worksrcpath}/Resource/CMap |
---|
77 | } |
---|
78 | |
---|
79 | post-patch { |
---|
80 | reinplace "s|__PREFIX__|${prefix}|" ${worksrcpath}/base/unix-dll.mak |
---|
81 | |
---|
82 | # Ensure that MacPorts perl is used |
---|
83 | fs-traverse f ${worksrcpath} { |
---|
84 | if [string match "*.pl" ${f}] { |
---|
85 | reinplace "s|#!/usr/bin/perl|#!${prefix}/bin/perl|" ${f} |
---|
86 | } |
---|
87 | } |
---|
88 | } |
---|
89 | |
---|
90 | use_autoreconf yes |
---|
91 | autoreconf.args -fv |
---|
92 | |
---|
93 | # Make included OpenJPEG uses its own headers rather than the system ones |
---|
94 | configure.cppflags-delete "-I${prefix}/include" |
---|
95 | configure.cppflags-append "-isystem${prefix}/include" |
---|
96 | |
---|
97 | configure.args --disable-compile-inits \ |
---|
98 | --disable-cups \ |
---|
99 | --disable-gtk \ |
---|
100 | --without-luratech \ |
---|
101 | --with-system-libtiff |
---|
102 | |
---|
103 | build.target so |
---|
104 | use_parallel_build yes |
---|
105 | |
---|
106 | if {[variant_isset universal]} { |
---|
107 | build.target-delete so |
---|
108 | build.target-append cross_prepare so |
---|
109 | lappend merger_build_env(i386) ARCH=i386 |
---|
110 | lappend merger_build_env(x86_64) ARCH=x86_64 |
---|
111 | lappend merger_build_env(ppc) ARCH=ppc |
---|
112 | lappend merger_build_env(ppc64) ARCH=ppc64 |
---|
113 | } |
---|
114 | |
---|
115 | destroot.target soinstall |
---|
116 | post-destroot { |
---|
117 | system "strip ${destroot}${prefix}/bin/gsc ${destroot}${prefix}/bin/gsx" |
---|
118 | ln -s gsc ${destroot}${prefix}/bin/gs |
---|
119 | |
---|
120 | xinstall -m 755 -d ${destroot}${prefix}/share/${name}/fonts |
---|
121 | foreach f {*.afm *.gsf *.pfa *.pfm} { |
---|
122 | eval xinstall -m 644 [glob ${workpath}/fonts/${f}] ${destroot}${prefix}/share/${name}/fonts |
---|
123 | } |
---|
124 | |
---|
125 | xinstall -m 755 -d ${destroot}${prefix}/share/doc |
---|
126 | ln -s ../${name}/${version}/doc ${destroot}${prefix}/share/doc/${name} |
---|
127 | } |
---|
128 | |
---|
129 | configure.universal_args-delete --disable-dependency-tracking |
---|
130 | |
---|
131 | variant no_x11 { |
---|
132 | depends_lib-delete port:xorg-libXext |
---|
133 | depends_lib-delete port:xorg-libXt |
---|
134 | configure.args-append --without-x |
---|
135 | } |
---|
136 | |
---|
137 | variant cups description {Enable CUPS driver} { |
---|
138 | configure.args-delete --disable-cups |
---|
139 | configure.args-append --enable-cups |
---|
140 | } |
---|
141 | |
---|
142 | livecheck.type regex |
---|
143 | livecheck.url http://downloads.ghostscript.com/public/ |
---|
144 | livecheck.regex ${name}-(\\d+(?:\\.\\d+)*) |
---|