1 | # $Id: Portfile,v 1.18 2005/08/30 00:45:57 digdog Exp $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | name ghostscript |
---|
5 | version 8.51 |
---|
6 | homepage http://www.cs.wisc.edu/~ghost/ |
---|
7 | description AFPL Ghostscript, An interpreter for PostScript and PDF |
---|
8 | categories print |
---|
9 | platforms darwin |
---|
10 | maintainers digdog@opendarwin.org |
---|
11 | |
---|
12 | long_description 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. Versions \ |
---|
15 | entitled "AFPL Ghostscript" are distributed with a licence \ |
---|
16 | different from the GPL. |
---|
17 | |
---|
18 | master_sites sourceforge:${name}:source \ |
---|
19 | sourceforge:gs-fonts:fonts \ |
---|
20 | http://www.ijg.org/files/:jpeg \ |
---|
21 | ftp://ftp.uu.net/graphics/jpeg/:jpeg \ |
---|
22 | ftp://ftp.uunet.de/pub/graphics/jpeg/:jpeg \ |
---|
23 | sourceforge:libpng:libpng \ |
---|
24 | http://www.zlib.net/:zlib |
---|
25 | |
---|
26 | distfiles ${distname}.tar.gz:source \ |
---|
27 | ghostscript-fonts-std-8.11.tar.gz:fonts \ |
---|
28 | jpegsrc.v6b.tar.gz:jpeg \ |
---|
29 | libpng-1.2.8.tar.gz:libpng \ |
---|
30 | zlib-1.2.3.tar.gz:zlib |
---|
31 | |
---|
32 | checksums ${distname}.tar.gz md5 882a4cbe1704256f906e18e02c7b877b \ |
---|
33 | ghostscript-fonts-std-8.11.tar.gz md5 6865682b095f8c4500c54b285ff05ef6 \ |
---|
34 | jpegsrc.v6b.tar.gz md5 dbd5f3b47ed13132f04c685d608a7547 \ |
---|
35 | libpng-1.2.8.tar.gz md5 cac1512878fb98f2456df6dc50bc9bc7 \ |
---|
36 | zlib-1.2.3.tar.gz md5 debc62758716a169df9f62e6ab2bc634 |
---|
37 | |
---|
38 | # Should be depends_extract, but that isn't implemented |
---|
39 | # To understand why doing this, please check official document: |
---|
40 | # http://www.ghostscript.com/doc/AFPL/8.00/Make.htm#Third-party_libraries |
---|
41 | post-extract { |
---|
42 | file copy ${workpath}/jpeg-6b ${workpath}/${distname}/jpeg |
---|
43 | file copy ${workpath}/libpng-1.2.8 ${workpath}/${distname}/libpng |
---|
44 | file copy ${workpath}/zlib-1.2.3 ${workpath}/${distname}/zlib |
---|
45 | } |
---|
46 | |
---|
47 | build.target |
---|
48 | |
---|
49 | destroot.destdir prefix=${destroot}/${prefix} |
---|
50 | |
---|
51 | post-destroot { |
---|
52 | file copy ${workpath}/fonts ${destroot}/${prefix}/share/ghostscript |
---|
53 | } |
---|
54 | |
---|
55 | # Added variant that build the Ghostscript framework. (Thanks, Sal!) |
---|
56 | variant gslib { |
---|
57 | post-patch { |
---|
58 | cd ${workpath}/${name}-${version} |
---|
59 | reinplace "s|/Library/Frameworks|${destroot}${prefix}/Library/Frameworks|" \ |
---|
60 | src/macosx.mak |
---|
61 | } |
---|
62 | |
---|
63 | post-build { |
---|
64 | cd ${workpath}/${name}-${version} |
---|
65 | file rename Makefile Makefile.CONFIGURE |
---|
66 | file link Makefile src/macosx.mak |
---|
67 | system "make framework" |
---|
68 | file delete Makefile |
---|
69 | file rename Makefile.CONFIGURE Makefile |
---|
70 | } |
---|
71 | |
---|
72 | post-destroot { |
---|
73 | cd ${workpath}/${name}-${version} |
---|
74 | xinstall -m 755 -d ${destroot}${prefix}/Library/Frameworks |
---|
75 | file rename Makefile Makefile.CONFIGURE |
---|
76 | file link Makefile src/macosx.mak |
---|
77 | system "make framework_install" |
---|
78 | file delete Makefile |
---|
79 | file rename Makefile.CONFIGURE Makefile |
---|
80 | } |
---|
81 | } |
---|