[MacPorts] #16056: poppler -- new version -- more variants
MacPorts
noreply at macports.org
Sat Aug 2 07:40:39 PDT 2008
#16056: poppler -- new version -- more variants
--------------------------------------+-------------------------------------
Reporter: jens.traube at t-online.de | Owner: macports-tickets at lists.macosforge.org
Type: enhancement | Status: reopened
Priority: Normal | Milestone: Port Enhancements
Component: ports | Version: 1.6.0
Resolution: | Keywords: pdf, qt4
--------------------------------------+-------------------------------------
Comment (by jens.traube at t-online.de):
== (1) What is the purpose of these variants? ==
I want to provide for a minimal installation of poppler. The port
"TeXworks" only needs the Qt4 bindings of poppler. But the current
portfile of "poppler" (version 0.8.3) provides for a maximal installation.
It leaves it to the configuration script, which of the available modules
gets compiled. Only three conditions are set: (A) "Don't compile poppler
Qt4 wrapper," (B) "Install unsupported xpdf headers," and (C) "Build with
zlib." Condition (A) bothers me. About (B) I can't tell you anything.
Condition (C) means simply: "use port zlib." That's it. Hence I started
the work on the portfile of poppler to resolve (A), but got more involved
in this task, than I wanted.
I installed poppler, based on the current portfile, without variant
"quartz". Apart from several command line tools, it consists of two
dynamic libraries:
{{{
libpoppler-glib.3.0.0.dylib
libpoppler.3.0.0.dylib
}}}
These libraries are linked to a lot of other libraries, but the current
portfile specifies only the dependencies to port "cairo" and "gtk2", which
is questionable to me, because poppler clearly depends on ports "freetype"
and "fontconfig" (see attached file "poppler-includes.txt").
The command line tool "otool" displays the following dependencies (I
removed the info about the compatibility version):
{{{
$ otool -L /opt/local/lib/libpoppler-glib.3.0.0.dylib
/opt/local/lib/libpoppler-glib.3.0.0.dylib:
/opt/local/lib/libpoppler-glib.3.dylib
/opt/local/lib/libpoppler.3.dylib
/opt/local/lib/libjpeg.62.dylib
/opt/local/lib/libxml2.2.dylib
/opt/local/lib/libz.1.dylib
/opt/local/lib/libgdk-x11-2.0.0.dylib
/opt/local/lib/libgdk_pixbuf-2.0.0.dylib
/opt/local/lib/libtiff.3.dylib
/opt/local/lib/libpangocairo-1.0.0.dylib
/opt/X11R6/lib/libSM.6.dylib
/opt/X11R6/lib/libICE.6.dylib
/opt/X11R6/lib/libX11.6.dylib
/opt/local/lib/libpangoft2-1.0.0.dylib
/opt/local/lib/libpango-1.0.0.dylib
/usr/lib/libSystem.B.dylib
/opt/local/lib/libgobject-2.0.0.dylib
/opt/local/lib/libgmodule-2.0.0.dylib
/opt/local/lib/libglib-2.0.0.dylib
/opt/local/lib/libintl.8.dylib
/opt/local/lib/libiconv.2.dylib
/opt/local/lib/libcairo.2.dylib
/opt/local/lib/libfreetype.6.dylib
/opt/local/lib/libfontconfig.1.dylib
/opt/local/lib/libexpat.1.dylib
/opt/local/lib/libpng12.0.dylib
/opt/local/lib/libXrender.1.dylib
/opt/local/lib/libpixman-1.0.dylib
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
/usr/lib/libstdc++.6.dylib
/usr/lib/libgcc_s.1.dylib
$
$
$ otool -L /opt/local/lib/libpoppler.3.0.0.dylib
/opt/local/lib/libpoppler.3.0.0.dylib:
/opt/local/lib/libpoppler.3.dylib
/opt/local/lib/libjpeg.62.dylib
/opt/local/lib/libxml2.2.dylib
/opt/local/lib/libz.1.dylib
/usr/lib/libSystem.B.dylib
/opt/local/lib/libiconv.2.dylib
/opt/local/lib/libfreetype.6.dylib
/opt/local/lib/libfontconfig.1.dylib
/opt/local/lib/libexpat.1.dylib
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
/usr/lib/libstdc++.6.dylib
/usr/lib/libgcc_s.1.dylib
$
}}}
See attached file "poppler-dependencies.pdf" for a listing of the port
dependencies. The first column of the table shows:
port "poppler" is dependend on following ports
-- freetype
-- fontconfig
-- gtk2
-- cairo
-- pango
-- glib2
-- gettext
-- expat
-- libiconv
-- libpixman
-- XFree86
-- xrender
-- jpeg
-- tiff
-- libpng
-- libxml2
-- zlib
Apart from the default installation of poppler (i.e. without any variant),
I also installed the variants and combinations of them:
{{{
$ port installed poppler
The following ports are currently installed:
poppler @0.8.4_0+abiword+darwin_8
poppler @0.8.4_0+abiword+darwin_8+glibCairo+glibSplash
poppler @0.8.4_0+darwin_8 (active)
poppler @0.8.4_0+darwin_8+glibCairo
poppler @0.8.4_0+darwin_8+glibCairo+quartz
poppler @0.8.4_0+darwin_8+glibSplash
poppler @0.8.4_0+darwin_8+glibSplash+quartz
poppler @0.8.4_0+darwin_8+qt4Splash
poppler @0.8.4_0+darwin_8+quartz
poppler @0.8.5_0+darwin_8+qt4
$
}}}
The table in file "poppler-dependencies.pdf" shows that
{{{poppler @0.8.4_0+abiword+darwin_8+glibCairo+glibSplash}}}
has the same port dependencies as
{{{poppler @0.8.4_0+darwin_8}}}
That is what I wanted to achieve. Each of the new variants, when used
alone, should provide for a minimal installation of poppler, and when used
in a certain combination, should provide for the same installation as the
default (i.e. poppler without variants).
Variant "qt4Splash" is the only variant I want to have. It has no
dependencies on ports "gtk2", "cairo", pango", "gettext2, "libpixman",
"XFree86", "xrender". "tiff", and "libxml2". Only this variant is needed
for port "TeXworks", if one wants to have a minimal installation. Variant
"qt4" is the other choice, if you want to have a maximal installation of
poppler. The variants "glibSplash", "glibCairo", and "abiword" are for
completeness.
If used alone, the variants "glibSplash" and "glibCairo" do not have much
less dependencies compared to the default installation of poppler, apart
from port "libxml2" (see file "poppler-dependencies.pdf"). The same
applies to installations "poppler+quartz" and "poppler+glibSplash+quartz".
There is an advantage to use "poppler+glibCairo+quartz", because of the
missing dependencies on port "gtk2" and "pango". And of course the
installation of "poppler+abiword" provides you with the least installation
requirements, which is interesting for those who installed port "abiword"
with variant "use_binary".
If these advantages do not justify the variants "glibSplash", "glibCairo",
and "abiword", then I shall remove them from the portfile, together with
the unusual and lengthy tcl procedures I have written
("setConfigureOptionsForMinimalInstallationOfSelectedPopplerVariant",
"setListOfPortDependenciesOfSelectedPopplerVariant").
Do you understand, how these procedures work?
Do you understand the meaning of the pre-fetch procedure?
== (2) Do these variants build multiple different .dylibs or do all
backends end up in one .dylib? ==
Common to all variants is the library:
{{{
libpoppler.3.0.0.dylib
}}}
Depending on the selected frontend (GLib and/or Qt4), the installation of
poppler contains additionally one of, or both of the following libraries:
{{{
libpoppler-glib.3.0.0.dylib
libpoppler-qt4.3.0.0.dylib
}}}
The source code for the Splash output device is contained in the poppler
distribution. Therefore symbols related to the Splash output device are
defined in libpoppler.3.0.0.dylib:
{{{
$ otool -Rv /opt/local/lib/libpoppler.3.0.0.dylib
/opt/local/lib/libpoppler.3.0.0.dylib:
Reference table (6091 entries)
module single module 6091 entries, at index 0
(...)
__ZN15SplashOutputDev10takeBitmapEv defined
(...)
}}}
Symbols related to the Cairo output device are defined in libpoppler-
glib.3.0.0.dylib:
{{{
$ otool -Rv /opt/local/lib/libpoppler-glib.3.0.0.dylib
/opt/local/lib/libpoppler-glib.3.0.0.dylib:
Reference table (1005 entries)
module single module 1005 entries, at index 0
(...)
__ZN14CairoOutputDev8startDocEP4XRef defined
(...)
}}}
--
Ticket URL: <http://trac.macports.org/ticket/16056#comment:10>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list