cairo: convert to the new template format.

This commit is contained in:
Juan RP 2013-04-10 15:45:31 +02:00
parent f0105c662b
commit a6267ac26b
3 changed files with 48 additions and 44 deletions

View file

@ -1,15 +0,0 @@
# Template file for 'cairo-devel'.
#
depends="fontconfig-devel glib-devel libpng-devel>=1.5.10
libXrender-devel>=0.9.7_3 pixman-devel cairo-${version}_${revision}"
short_desc="${short_desc} -- development files"
if [ "$build_option_opengl" -o "$build_option_gles2" ]; then
depends="${depends} MesaLib-devel"
fi
do_install() {
vmove usr/include usr
vmove usr/share usr
vmove usr/lib/pkgconfig usr/lib
}

View file

@ -4,7 +4,6 @@ version=1.12.14
revision=5
build_style=gnu-configure
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>"
license="LGPL-2.1, MPL-1.1"
@ -23,10 +22,57 @@ long_desc="
Bezier cubic splines, transforming and compositing translucent images, and
antialiased text rendering."
depends="pixman>=0.28"
hostmakedepends="which automake libtool pkg-config"
makedepends="libpng-devel>=1.5.10 fontconfig-devel pixman-devel>=0.28 libXrender-devel>=0.9.7_3 libglib-devel"
pre_configure() {
autoreconf -fi
}
# 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 gles2 by default on x86.
if [ "$XBPS_TARGET_MACHINE" = "i686" -o "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
build_options_default="gles2"
fi
if [ "$build_option_opengl" ]; then
configure_args+=" --enable-gl"
else
configure_args+=" --disable-gl"
fi
if [ "$build_option_gles2" ]; then
configure_args+=" --enable-egl --enable-glesv2"
else
configure_args+=" --disable-egl --disable-glesv2"
fi
if [ "$build_option_opengl" -o "$build_option_gles2" ]; then
makedepends+=" MesaLib-devel"
fi
cairo-devel_package() {
depends="fontconfig-devel glib-devel libpng-devel>=1.5.10 libXrender-devel>=0.9.7_3 pixman-devel cairo>=${version}"
short_desc+=" -- development files"
if [ "$build_option_opengl" -o "$build_option_gles2" ]; then
depends+=" MesaLib-devel"
fi
pkg_install() {
vmove usr/include usr
vmove usr/share usr
vmove usr/lib/pkgconfig usr/lib
}
}
cairo_package() {
depends="pixman>=0.28"
package_install() {
vmove "*"
}
}

View file

@ -1,27 +0,0 @@
# 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="gles2"
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"
fi
}