cairo: cross build and options support (currently opengl and gles2).

This commit is contained in:
Juan RP 2013-03-23 09:13:47 +01:00
parent 59743ff4ff
commit caeb7e714f
3 changed files with 52 additions and 4 deletions

View file

@ -1,7 +1,7 @@
# Template file for 'cairo-devel'.
#
depends="fontconfig-devel glib-devel libpng-devel>=1.5.10
libXrender-devel pixman-devel MesaLib-devel cairo-${version}_${revision}"
libXrender-devel>=0.9.7_3 pixman-devel cairo-${version}_${revision}"
short_desc="${short_desc} -- development files"
noarch=yes

View file

@ -1,9 +1,9 @@
# Template build file for 'cairo'.
pkgname=cairo
version=1.12.14
revision=1
revision=2
build_style=gnu-configure
configure_args="--disable-static --enable-tee --enable-gl"
configure_args="--disable-static --enable-tee"
subpackages="$pkgname-devel"
short_desc="Vector graphics library with cross-device output support"
maintainer="Juan RP <xtraeme@gmail.com>"
@ -11,7 +11,27 @@ license="LGPL-2.1, MPL-1.1"
homepage="http://cairographics.org"
distfiles="${homepage}/releases/$pkgname-$version.tar.xz"
checksum=96d0d1e3f9b74d2ca3469ff187c5e5f25649b1ad35cf06f4f3a83847dff4ac13
long_desc="
Cairo is a vector graphics library with cross-device output support. Currently
supported output targets include the X Window System and in-memory image
buffers. PostScript and PDF file output is planned. Cairo is designed to
produce identical output on all output media while taking advantage of display
hardware acceleration when available (eg. through the X Render Extension).
Cairo provides a stateful user-level API with capabilities similar to the PDF
1.4 imaging model. Cairo provides operations including stroking and filling
Bezier cubic splines, transforming and compositing translucent images, and
antialiased text rendering."
depends="pixman>=0.28"
makedepends="pkg-config libpng-devel>=1.5.10 fontconfig-devel
pixman-devel>=0.28 libXrender-devel glib-devel MesaLib-devel"
pixman-devel>=0.28 libXrender-devel>=0.9.7_3 glib-devel"
if [ "$XBPS_CROSS_BUILD" ]; then
makedepends="which automake pkg-config"
crossmakedepends="libpng-devel fontconfig-devel pixman-devel
libXrender-devel>=0.9.7_3 libglib-devel"
pre_configure() {
autoreconf -fi
}
fi

View file

@ -0,0 +1,28 @@
# Package build options
build_options="opengl gles2"
desc_option_opengl="Enable support for building the OpenGL surface backend"
desc_option_gles2="Enable support for building the GLESv2 surface backend"
# Enable gl by default on x86.
if [ "$XBPS_TARGET_MACHINE" = "i686" -o "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
build_options_default="opengl"
fi
do_options() {
if [ "$build_option_opengl" ]; then
configure_args="${configure_args} --enable-gl"
else
configure_args="${configure_args} --disable-gl"
fi
if [ "$build_option_gles2" ]; then
configure_args="${configure_args} --enable-egl --enable-glesv2"
else
configure_args="${configure_args} --disable-egl --disable-glesv2"
fi
if [ "$build_option_opengl" -o "$build_option_gles2" ]; then
makedepends="${makedepends} MesaLib-devel"
crossmakedepends="${makedepends}"
fi
}