You are not logged in.

#1 2010-12-02 16:14:20

ammon
Member
Registered: 2008-12-11
Posts: 413

Static poppler build

Is there a way to build poppler with static libraries (I need binary), actually all I need is pdftotext.
I need this to run on web server, on hosting that will not do me a favor and install poppler.
So it would run within /home/user on server.

Offline

#2 2010-12-03 01:53:27

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Static poppler build

I've never done this nor have ever had a need, so this is just a pointer...

poppler-0.14.4 > ./configure --help | grep static
  --enable-static[=PKGS]  build static libraries [default=yes]

Removing Arch's "--disable-static" line in the PKGBUILD may be a good start.

Last edited by skottish (2010-12-03 01:56:24)

Offline

#3 2010-12-03 15:44:52

ammon
Member
Registered: 2008-12-11
Posts: 413

Re: Static poppler build

Ok. I have edited PKGBUILD
This is what I used:

pkgbase=poppler
pkgname=('poppler')
pkgver=0.14.4
pkgrel=1
arch=(i686 x86_64)
license=('GPL')
makedepends=('libjpeg>=8.0.2' 'gcc-libs>=4.5.0' 'cairo>=1.10.0' 'libxml2>=2.7.7' 'fontconfig>=2.8.0' 'openjpeg>=1.3-3' 'gtk2>=2.22.0' 'qt>=4.7.0' 'pkgconfig' 'lcms>=1.19')
options=('!libtool')
url="http://poppler.freedesktop.org/"
source=(http://poppler.freedesktop.org/${pkgname}-${pkgver}.tar.gz)
md5sums=('a40fe96e1115f648ce4689e667743530')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-static --disable-abiword-output --disable-gtk-test --disable-libjpeg  --disable-poppler-qt --disable-libopenjpeg --disable-libpng --disable-poppler-glib --disable-poppler-cpp --disable-poppler-qt4 --disable-splash-output --disable-gdk
  make
}

package_poppler() {
  pkgdesc="PDF rendering library based on xpdf 3.0"
  depends=('libjpeg>=8.0.2' 'gcc-libs>=4.5.0' 'cairo>=1.10.0' 'libxml2>=2.7.7' 'fontconfig>=2.8.0' 'openjpeg>=1.3-3' 'lcms>=1.19' 'poppler-data>=0.4.3')
  conflicts=("poppler-qt3<${pkgver}")

  cd "${srcdir}/${pkgbase}-${pkgver}"
  make DESTDIR="${pkgdir}" install

  rm -rf "${pkgdir}"/usr/include/poppler/{glib,qt4}
  rm -f "${pkgdir}"/usr/lib/libpoppler-{glib,qt4}.so*
  rm -f "${pkgdir}"/usr/lib/pkgconfig/poppler-{glib,qt4}.pc
  rm -rf "${pkgdir}/usr/share/gtk-doc"
}

Compiles succedefully, but binary is still dynamicly linked:

pdftoabw: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped

Last edited by ammon (2010-12-03 18:20:22)

Offline

#4 2010-12-03 16:36:20

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Static poppler build

Ammon, please use [ code ] tags, they'd vastly improve the readability of your post.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#5 2010-12-05 18:30:30

ammon
Member
Registered: 2008-12-11
Posts: 413

Re: Static poppler build

Ok, can someone point me to some material so I can learn about this subject. In general, how to build static linux bins.
In aur there are few static builds, like pacman-static, obmenu-bin, wkhtmltopdf-static...
I see this way of distributing packages is much simpler then usuall AUR way, so I would like to learn about it.

Offline

Board footer

Powered by FluxBB