poppler: add gir pkg option and disable it in cross builds.

This commit is contained in:
Juan RP 2013-05-06 15:50:51 +02:00
parent 066257842a
commit 16c641fa02
1 changed files with 32 additions and 4 deletions

View File

@ -1,13 +1,13 @@
# Template build file for 'poppler'.
pkgname=poppler
version=0.22.3
revision=1
revision=2
build_style=gnu-configure
configure_args="--enable-zlib --enable-libcurl --enable-libjpeg
--enable-libtiff --disable-libopenjpeg --enable-cairo-output
--enable-xpdf-headers --disable-poppler-qt4 --disable-gtk-test"
hostmakedepends="pkg-config poppler-data"
makedepends="libpng-devel>=1.6 libglib-devel cairo-devel gobject-introspection tiff-devel lcms2-devel libcurl-devel"
makedepends="libpng-devel>=1.6 glib-devel cairo-devel tiff-devel lcms2-devel libcurl-devel"
short_desc="PDF rendering library"
maintainer="Juan RP <xtraeme@gmail.com>"
license="GPL-2"
@ -23,6 +23,30 @@ long_desc="
effort. And the poppler developers would like to move libpoppler
forward in a number of areas that doesn't fit within the goals of xpdf."
if [ "$CROSS_BUILD" ]; then
# needs glib-mkenums
hostmakedepends+=" automake libtool gtk-doc gettext-devel glib-devel"
pre_configure() {
autoreconf -fi
}
fi
# Package build options
build_options="gir"
desc_option_gir="Enable support for building gobject introspection data"
# Disable gir for cross builds.
if [ -z "$CROSS_BUILD" ]; then
build_options_default="gir"
fi
if [ "$build_option_gir" ]; then
configure_args+=" --enable-introspection"
makedepends+=" gobject-introspection"
else
configure_args+=" --disable-introspection"
fi
poppler-cpp-devel_package() {
depends="libstdc++-devel zlib-devel poppler-devel>=${version}"
short_desc+=" -- C++ bindings (development files)"
@ -61,7 +85,9 @@ poppler-glib-devel_package() {
pkg_install() {
vmove usr/include/poppler/glib
vmove usr/lib/libpoppler-glib.a
vmove usr/share/gir-1.0
if [ "$build_option_gir" ]; then
vmove usr/share/gir-1.0
fi
vmove usr/lib/pkgconfig/poppler-cairo.pc
vmove usr/lib/pkgconfig/poppler-glib.pc
}
@ -71,7 +97,9 @@ poppler-glib_package() {
short_desc+=" -- GLib bindings"
pkg_install() {
vmove "usr/lib/libpoppler-glib.so*"
vmove usr/lib/girepository-1.0
if [ "$build_option_gir" ]; then
vmove usr/lib/girepository-1.0
fi
}
}