void-packages/srcpkgs/cairo/template.options

27 lines
810 B
Text

# 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"
fi
}