source: trunk/dports/graphics/xpdf/Portfile

Last change on this file was 134978, checked in by khindenburg@…, 2 years ago

xpdf: remove usage of lesstif (in preparation of obsoleting it)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.7 KB
Line 
1# $Id: Portfile 134978 2015-04-12 20:06:43Z ryandesign@macports.org $
2
3PortSystem 1.0
4
5name         xpdf
6conflicts    pdf2json
7version      3.04
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    nomaintainer
15categories   graphics print
16license      {GPL-2 GPL-3}
17platforms    darwin
18homepage     http://www.foolabs.com/xpdf/
19
20master_sites \
21    ftp://ftp.funet.fi/pub/TeX/CTAN/support/xpdf/ \
22    ftp://ctan.unsw.edu.au/tex-archive/support/xpdf/ \
23    ftp://ftp.tex.ac.uk/tex-archive/support/xpdf/ \
24    ftp://ftp.kddlabs.co.jp/CTAN/support/xpdf/ \
25    ftp://ftp.meiji.ac.jp/pub/TeX/CTAN/support/xpdf/ \
26    ftp://ctan.tug.org/tex-archive/support/xpdf/ \
27    ftp://ftp.dante.de/tex-archive/support/xpdf/ \
28    ftp://gd.tuwien.ac.at/publishing/tex/CTAN/support/xpdf/ \
29    ftp://ftp.ntnu.no/pub/tex/CTAN/support/xpdf/ \
30    ftp://www.dnsbalance.ring.gr.jp/pub/text/CTAN/support/xpdf/ \
31    http://www.t.ring.gr.jp/archives/text/CTAN/support/xpdf/ \
32    ftp://ftp.chg.ru/pub/TeX/CTAN/support/xpdf/ \
33    ftp://ftp.foolabs.com/pub/xpdf/
34
35checksums           ${distfiles} \
36                    rmd160  fb29aad21054d5d3b349aec4806262feeca1bd8e \
37                    sha256  11390c74733abcb262aaca4db68710f13ffffd42bfe2a0861a5dfc912b2977e5
38
39depends_lib \
40        port:xorg-libXp port:xpm port:xorg-libXt port:freetype \
41        port:libpaper lib:libXm:openmotif
42
43depends_run  path:share/ghostscript/fonts:ghostscript
44
45patch.post_args     -p1
46patchfiles   patch-xpdf-NameToUnicodeTable.h.diff \
47             patch-xpdf-UnicodeMapTables.h.diff
48
49post-patch {
50    reinplace "s|/usr/local|${prefix}|g" \
51        ${worksrcpath}/doc/sample-xpdfrc ${worksrcpath}/xpdf/GlobalParams.cc
52}
53
54configure.args  \
55    --with-x \
56    --mandir=${prefix}/share/man \
57    --with-appdef-dir=${prefix}/etc/X11/app-defaults \
58    --with-Xp-library=${prefix}/lib \
59    --with-Xp-includes=${prefix}/include \
60    --with-Xt-library=${prefix}/lib \
61    --with-Xt-includes=${prefix}/include \
62    --with-Xm-library=${prefix}/lib \
63    --with-Xm-includes=${prefix}/include \
64    --with-libpaper-library=${prefix}/lib \
65    --with-libpaper-includes=${prefix}/include \
66    --with-freetype2-library=${prefix}/lib \
67    --with-freetype2-includes=${prefix}/include/freetype2 \
68    --enable-wordlist \
69    --enable-opi
70configure.cxxflags-append "-I${prefix}/include/freetype2 -I${prefix}/include"
71configure.ldflags-append "-lz"
72
73variant a4 description {Use A4 as the default paper size instead of Letter} {
74    configure.args-append --enable-a4-paper
75}
76
77variant drm description {Obey access restrictions in PDF files} {}
78if {![variant_isset drm]} {
79    patchfiles-append ${distname}-salvage-your-eye.patch
80}
81
82variant no_mangle_names description {do not mangle the CLI tool names, conflicts with poppler} {
83        conflicts-append poppler
84}
85
86# t1lib support should not be on by default; see https://trac.macports.org/ticket/29629
87variant t1lib description {Include t1lib support (moved to variant due to security issue)} {
88    depends_lib-append          port:t1lib
89    configure.args-append       --with-t1-library=${prefix}/lib \
90                                                        --with-t1-includes=${prefix}/include \
91}
92
93post-destroot {
94        if {! [variant_isset no_mangle_names]} {
95                ## rename the CLI tools to xpdf-${TOOL_NAME} to avoid conflicts with poppler
96                foreach binFile { pdfdetach pdffonts pdfimages pdfinfo pdftoppm pdftops pdftotext } {
97                        move ${destroot}${prefix}/bin/${binFile}  ${destroot}${prefix}/bin/${name}-${binFile}
98                        move ${destroot}${prefix}/share/man/man1/${binFile}.1 ${destroot}${prefix}/share/man/man1/${name}-${binFile}.1
99                }
100        }
101}
102
103notes "
104Xpdf language support packages are also available at
105        http://www.foolabs.com/xpdf/download.html
106and are available in MacPorts as xpdf-LANG_NAME.
107"
Note: See TracBrowser for help on using the repository browser.