source: trunk/dports/graphics/xpdf/Portfile @ 72519

Last change on this file since 72519 was 72519, checked in by devans@…, 7 years ago

xpdf: to ensure that xpdf and poppler can co-exist, make the functionality in the
+with_poppler variant the default behavior and remove the variant. Remove
conflicts poppler. See #17540, #26852, http://lists.macosforge.org/pipermail/macports-users/2010-October/022356.html.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.8 KB
Line 
1# $Id: Portfile 72519 2010-10-19 16:37:52Z devans@macports.org $
2
3PortSystem 1.0
4
5name         xpdf
6version      3.02
7revision     7
8description  Xpdf is a viewer for PDF files.
9long_description \
10    Xpdf is a viewer for Portable Document Format \
11    (PDF) files.  These are also sometimes also called \
12    Acrobat files, from the name of Adobes PDF software.
13
14maintainers    ricci openmaintainer
15categories   graphics print
16platforms    darwin
17homepage     http://www.foolabs.com/xpdf/
18
19master_sites \
20    ftp://ftp.funet.fi/pub/TeX/CTAN/support/xpdf/ \
21    ftp://ctan.unsw.edu.au/tex-archive/support/xpdf/ \
22    ftp://ftp.tex.ac.uk/tex-archive/support/xpdf/ \
23    ftp://ftp.kddlabs.co.jp/CTAN/support/xpdf/ \
24    ftp://ftp.meiji.ac.jp/pub/TeX/CTAN/support/xpdf/ \
25    ftp://ctan.tug.org/tex-archive/support/xpdf/ \
26    ftp://ftp.dante.de/tex-archive/support/xpdf/ \
27    ftp://gd.tuwien.ac.at/publishing/tex/CTAN/support/xpdf/ \
28    ftp://ftp.ntnu.no/pub/tex/CTAN/support/xpdf/ \
29    ftp://www.dnsbalance.ring.gr.jp/pub/text/CTAN/support/xpdf/ \
30    http://www.t.ring.gr.jp/archives/text/CTAN/support/xpdf/ \
31    ftp://ftp.chg.ru/pub/TeX/CTAN/support/xpdf/ \
32    ftp://ftp.foolabs.com/pub/xpdf/
33
34## checksums    md5 599dc4cc65a07ee868cf92a667a913d2
35
36set xpdfmain ${distname}${extract.suffix}
37distfiles    ${xpdfmain}        \
38             xpdf-${version}pl1.patch   \
39             xpdf-${version}pl2.patch   \
40             xpdf-${version}pl3.patch
41
42checksums           xpdf-${version}.tar.gz \
43                    md5     599dc4cc65a07ee868cf92a667a913d2 \
44                    sha1    f9940698840c8a8045677e8be68ab8580903e20a \
45                    rmd160  e900cb8670b8c430beaa45895fb474411cb1958d \
46                    xpdf-${version}pl1.patch \
47                    md5     877118786dfe27d1b7aa5a6759cc6e45 \
48                    sha1    cd3c8ed6e1fd3606098b85d5cc8a7d1aa305266d \
49                    rmd160  5c310f96760f72e9c1062b00c57c2ed035ac6757 \
50                    xpdf-${version}pl2.patch \
51                    md5     3a5cb165ae66781e0b21e6219ae06795 \
52                    sha1    d082ebe0d36cad0c04603950216f5c52de1c2593 \
53                    rmd160  0024e3d203d69e073a458570cec5679e260ad204 \
54                    xpdf-${version}pl3.patch \
55                    md5     581963ede0fb5715e1a69f01b5b8ce63 \
56                    sha1    23f496804802a3da530f1d0bab894bae3e938fc2 \
57                    rmd160  859ec3131d3c4526a6075ee639c5eb704194211b
58
59extract.only ${xpdfmain}
60
61depends_lib \
62        port:xorg-libXp port:xpm port:xorg-libXt port:freetype \
63        port:poppler port:libpaper lib:libXm:openmotif port:t1lib
64
65depends_run  path:share/ghostscript/fonts:ghostscript
66
67patchfiles   xpdf-${version}-salvage-your-eye.patch \
68             patch-xpdf-NameToUnicodeTable.h.diff \
69             patch-xpdf-UnicodeMapTables.h.diff
70
71
72pre-patch {
73                        system "cd ${workpath} && patch -p0 < ${distpath}/xpdf-${version}pl1.patch"
74                        system "cd ${workpath} && patch -p0 < ${distpath}/xpdf-${version}pl2.patch"
75                        system "cd ${workpath} && patch -p0 < ${distpath}/xpdf-${version}pl3.patch"
76}
77
78post-patch {
79    reinplace "s|/usr/local|${prefix}|g" \
80        ${worksrcpath}/doc/sample-xpdfrc ${worksrcpath}/xpdf/GlobalParams.cc
81}
82
83configure.args  \
84    --with-x \
85    --mandir=${prefix}/share/man \
86    --with-appdef-dir=${prefix}/etc/X11/app-defaults \
87    --with-Xp-library=${prefix}/lib \
88    --with-Xp-includes=${prefix}/include \
89    --with-Xt-library=${prefix}/lib \
90    --with-Xt-includes=${prefix}/include \
91    --with-Xm-library=${prefix}/lib \
92    --with-Xm-includes=${prefix}/include \
93    --with-t1-library=${prefix}/lib \
94    --with-t1-includes=${prefix}/include \
95    --with-libpaper-library=${prefix}/lib \
96    --with-libpaper-includes=${prefix}/include \
97    --with-freetype2-library=${prefix}/lib \
98    --with-freetype2-includes=${prefix}/include/freetype2 \
99    --enable-wordlist \
100    --enable-opi
101configure.cxxflags-append "-I${prefix}/include/freetype2 -I${prefix}/include"
102configure.ldflags-append "-lz"
103
104variant a4 description {Use A4 as the default paper size instead of Letter} {
105    configure.args-append --enable-a4-paper
106}
107
108platform puredarwin {
109    depends_lib-delete lib:libXm:openmotif
110    depends_lib-append port:lesstif
111    configure.args-delete \
112        --with-Xp-library=${prefix}/lib \
113        --with-Xp-includes=${prefix}/include \
114        --with-Xt-library=${prefix}/lib \
115        --with-Xt-includes=${prefix}/include \
116        --with-Xm-library=${prefix}/lib \
117        --with-Xm-includes=${prefix}/include
118}
119
120variant drm description {Obey access restrictions in PDF files} {
121    patchfiles-delete xpdf-${version}-salvage-your-eye.patch
122}
123
124post-destroot {
125    foreach i { pdffonts pdfimages pdfinfo pdftoppm pdftops pdftotext } {
126        delete ${destroot}${prefix}/bin/${i}
127        delete ${destroot}${prefix}/share/man/man1/${i}.1
128    }
129}
130
131post-install {
132    ui_msg " \
133        Xpdf language support packages are also available at \
134        http://www.foolabs.com/xpdf/download.html"
135}
136
Note: See TracBrowser for help on using the repository browser.