libsoup: added gir build option for cross compilation.

This commit is contained in:
Juan RP 2014-01-29 10:40:46 +01:00
parent 164a65cbab
commit 4db8130e12

View file

@ -1,11 +1,11 @@
# Template file for 'libsoup'
pkgname=libsoup
version=2.44.2
revision=1
revision=2
build_style=gnu-configure
configure_args="--disable-static"
hostmakedepends="pkg-config intltool gobject-introspection"
makedepends="libxml2-devel sqlite-devel glib-networking"
hostmakedepends="pkg-config intltool glib-devel libtool"
makedepends="libglib-devel libxml2-devel sqlite-devel glib-networking"
depends="glib-networking"
short_desc="HTTP library implementation in C"
maintainer="Juan RP <xtraeme@gmail.com>"
@ -14,12 +14,34 @@ license="LGPL-2.1"
distfiles="${GNOME_SITE}/$pkgname/${version%.*}/$pkgname-$version.tar.xz"
checksum=e7e4b5ab74a6c00fc267c9f5963852d28759ad3154dab6388e2d6e1962d598f3
# 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"
hostmakedepends+=" gobject-introspection"
else
configure_args+=" --disable-introspection"
fi
pre_configure() {
libtoolize -f
}
libsoup-devel_package() {
depends="libglib-devel libxml2-devel libsoup>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/lib/pkgconfig/libsoup-2.4.pc
vmove usr/share/gir-1.0/Soup-2.4.gir
if [ "$build_option_gir" ]; then
vmove usr/share/gir-1.0/Soup-2.4.gir
fi
vmove usr/include/libsoup-2.4
vmove usr/share/gtk-doc
vmove "usr/lib/libsoup-2.4.so"
@ -32,7 +54,9 @@ libsoup-gnome-devel_package() {
pkg_install() {
vmove "usr/include/libsoup-gnome*"
vmove "usr/lib/pkgconfig/*gnome*"
vmove "usr/share/gir-1.0/SoupGNOME*"
if [ "$build_option_gir" ]; then
vmove "usr/share/gir-1.0/SoupGNOME*"
fi
vmove "usr/lib/libsoup-gnome*.so"
}
}
@ -41,6 +65,8 @@ libsoup-gnome_package() {
short_desc+=" - GNOME libraries"
pkg_install() {
vmove "usr/lib/libsoup-gnome*.so.*"
vmove "usr/lib/girepository-1.0/SoupGNOME*"
if [ "$build_option_gir" ]; then
vmove "usr/lib/girepository-1.0/SoupGNOME*"
fi
}
}