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

Last change on this file since 45603 was 45603, checked in by jeremyhu@…, 11 years ago

x11 dependent ports: Force port: based X11 dependencies

As mentioned over the past month and a half on macports-dev:
http://lists.macosforge.org/pipermail/macports-dev/2008-December/006818.html
http://lists.macosforge.org/pipermail/macports-dev/2009-January/006870.html
http://lists.macosforge.org/pipermail/macports-dev/2009-January/007003.html

This should address the underlying problem in tickets:
http://trac.macports.org/ticket/17356
http://trac.macports.org/ticket/17558
http://trac.macports.org/ticket/17631

This commit updates all ports explicitly depending on X11. These ports now
explicitly rely on X11 libraries in MacPorts rather than using lib: based
dependencies satisfied by X11 libraries in $x11prefix. The former policy was
devised due to the difficulty of providing such libs easily to the MacPorts
community under the old monolythic X distribution. Due to the X.org project's
transition to the autoconf build system and modularization of the project as
well as the XQuartz projects efforts to make these new releases work on OSX,
MacPorts can now have more control over its offerings and provide users with
better consistency and stability.

Other ports that "inherited" the X11 dependency may still require a revision
bump to link against the new libs. If you find a binary or library linking
against $x11prefix/lib/lib*.dylib after 'sudo port upgrade outdated' (and
you're not using the +system_x11 variant), please report that, so we can get
it fixed.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.1 KB
Line 
1# $Id: Portfile 45603 2009-01-18 20:52:41Z jeremyhu@macports.org $
2
3PortSystem 1.0
4
5name         xpdf
6version      3.02
7revision     4
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-3.02pl1.patch                 \
39             xpdf-3.02pl2.patch
40
41checksums    ${xpdfmain} md5 599dc4cc65a07ee868cf92a667a913d2 \
42             xpdf-3.02pl1.patch 877118786dfe27d1b7aa5a6759cc6e45  \
43             xpdf-3.02pl2.patch 3a5cb165ae66781e0b21e6219ae06795
44extract.only ${xpdfmain}
45
46depends_lib      port:xorg-libs lib:libfreetype.6:freetype \
47                     port:libpaper port:openmotif port:t1lib
48depends_run  path:share/ghostscript/fonts:ghostscript
49
50patchfiles   xpdf-3.02-salvage-your-eye.patch \
51             patch-xpdf-NameToUnicodeTable.h.diff \
52             patch-xpdf-UnicodeMapTables.h.diff
53
54
55pre-patch {
56             system "cd ${workpath} && patch -p0 < ${distpath}/xpdf-3.02pl1.patch"
57             system "cd ${workpath} && patch -p0 < ${distpath}/xpdf-3.02pl2.patch"
58}
59
60post-patch {
61    reinplace "s|/usr/local|${prefix}|g" \
62        ${worksrcpath}/doc/sample-xpdfrc ${worksrcpath}/xpdf/GlobalParams.cc
63}
64
65configure.args  \
66    --with-x \
67    --mandir=${prefix}/share/man \
68    --with-appdef-dir=${prefix}/etc/X11/app-defaults \
69    --with-Xp-library=${prefix}/lib \
70    --with-Xp-includes=${prefix}/include \
71    --with-Xt-library=${prefix}/lib \
72    --with-Xt-includes=${prefix}/include \
73    --with-Xm-library=${prefix}/lib \
74    --with-Xm-includes=${prefix}/include \
75    --with-t1-library=${prefix}/lib \
76    --with-t1-includes=${prefix}/include \
77    --with-libpaper-library=${prefix}/lib \
78    --with-libpaper-includes=${prefix}/include \
79    --with-freetype2-library=${prefix}/lib \
80    --with-freetype2-includes=${prefix}/include/freetype2 \
81    --enable-wordlist \
82    --enable-opi
83configure.cxxflags-append "-I${prefix}/include/freetype2 -I${prefix}/include"
84configure.cflags-append "-I${x11prefix}/include"
85configure.cppflags-append "-I${x11prefix}/include"
86configure.ldflags-append "-lz"
87
88variant a4 description {Use A4 as the default paper size instead of Letter} {
89    configure.args-append --enable-a4-paper
90}
91
92variant with_poppler description {Add Poppler support} {
93        depends_run-append port:poppler
94        post-destroot {
95                foreach i { pdffonts pdfimages pdfinfo pdftoppm pdftops pdftotext } {
96                        delete ${destroot}${prefix}/bin/${i}
97                        delete ${destroot}${prefix}/share/man/man1/${i}.1
98                }
99        }
100}
101
102platform puredarwin {
103    depends_lib-delete port:openmotif
104    depends_lib-append port:lesstif
105    configure.args-delete \
106        --with-Xp-library=${prefix}/lib \
107        --with-Xp-includes=${prefix}/include \
108        --with-Xt-library=${prefix}/lib \
109        --with-Xt-includes=${prefix}/include \
110        --with-Xm-library=${prefix}/lib \
111        --with-Xm-includes=${prefix}/include
112}
113
114variant drm description {Obey access restrictions in PDF files} {
115    patchfiles-delete xpdf-3.02-salvage-your-eye.patch
116}
117
118post-install {
119    ui_msg " \
120        Xpdf language support packages are also available at \
121        http://www.foolabs.com/xpdf/download.html"
122}
123
Note: See TracBrowser for help on using the repository browser.