diff --git a/srcpkgs/cairo/patches/cairo-1.12.16-lto-optional.patch b/srcpkgs/cairo/patches/cairo-1.12.16-lto-optional.patch new file mode 100644 index 00000000000..1b769819e77 --- /dev/null +++ b/srcpkgs/cairo/patches/cairo-1.12.16-lto-optional.patch @@ -0,0 +1,29 @@ +diff --git a/build/configure.ac.warnings b/build/configure.ac.warnings +index f984eb2..15b3da2 100644 +--- build/configure.ac.warnings ++++ build/configure.ac.warnings +@@ -38,13 +38,18 @@ dnl options. Namely, the following: + + dnl -flto working really needs a test link, not just a compile + +-safe_MAYBE_WARN="$MAYBE_WARN" +-MAYBE_WARN="$MAYBE_WARN -flto" +-AC_TRY_LINK([],[ ++AC_ARG_ENABLE(lto, ++ AS_HELP_STRING([--disable-lto], ++ [Do not try to use Link-Time Optimization])) ++if test "x$enable_lto" != "xno"; then ++ safe_MAYBE_WARN="$MAYBE_WARN" ++ MAYBE_WARN="$MAYBE_WARN -flto" ++ AC_TRY_LINK([],[ + int main(int argc, char **argv) { return 0; } +-],[],[ ++ ],[],[ + MAYBE_WARN="$safe_MAYBE_WARN" +-]) ++ ]) ++fi + + MAYBE_WARN="$MAYBE_WARN -fno-strict-aliasing -fno-common" + + diff --git a/srcpkgs/cairo/template b/srcpkgs/cairo/template index 65469c25b04..16345b9fa31 100644 --- a/srcpkgs/cairo/template +++ b/srcpkgs/cairo/template @@ -1,10 +1,10 @@ # Template build file for 'cairo'. pkgname=cairo version=1.12.16 -revision=4 +revision=5 build_style=gnu-configure -configure_args="--disable-static --enable-tee - $(vopt_enable opengl gl) $(vopt_enable gles2 egl) $(vopt_enable gles2 glesv2)" +configure_args="--disable-static --disable-lto --enable-tee --enable-egl + $(vopt_enable opengl gl) $(vopt_enable gles2 glesv2)" short_desc="Vector graphics library with cross-device output support" maintainer="Juan RP " license="LGPL-2.1, MPL-1.1" @@ -22,7 +22,7 @@ pre_configure() { # Package build options build_options="gles2 opengl" -build_options_default="gles2" +build_options_default="opengl" if [ "$build_option_opengl" -o "$build_option_gles2" ]; then makedepends+=" MesaLib-devel"