diff options
author | Jeremy Blosser | 2014-10-18 21:06:58 -0500 |
---|---|---|
committer | Jeremy Blosser | 2014-10-18 21:06:58 -0500 |
commit | 9e104c1905b276853d7f6b29e3f63c486316d1c1 (patch) | |
tree | 928e1c4474eaff607cdba480842c4679268de65e /x11-libs/cairo | |
parent | 9fd0c8394c26bcc7dc1bdc6ea0c7fd1871774a8e (diff) |
cairo: add a patch for --disable-lto option and a query for it; upstream
appears to have accepted this patch some time ago, but the commit isn't in the
repo. https://bugs.freedesktop.org/show_bug.cgi?id=60852
Diffstat (limited to 'x11-libs/cairo')
-rwxr-xr-x | x11-libs/cairo/CONFIGURE | 8 | ||||
-rw-r--r-- | x11-libs/cairo/HISTORY | 4 | ||||
-rwxr-xr-x | x11-libs/cairo/PRE_BUILD | 12 | ||||
-rw-r--r-- | x11-libs/cairo/cairo-1.12.16-lto-optional.patch | 28 |
4 files changed, 49 insertions, 3 deletions
diff --git a/x11-libs/cairo/CONFIGURE b/x11-libs/cairo/CONFIGURE index 6d4d95dd60..37d1778702 100755 --- a/x11-libs/cairo/CONFIGURE +++ b/x11-libs/cairo/CONFIGURE @@ -1,3 +1,7 @@ config_query_option CAIRO_OPTS "Enable cairo's tee surface backend feature?" n \ - "--enable-tee=yes" \ - "--enable-tee=no" + "--enable-tee=yes" \ + "--enable-tee=no" && + +config_query_option CAIRO_OPTS "Disable LTO?" n \ + "--disable-lto" \ + "" diff --git a/x11-libs/cairo/HISTORY b/x11-libs/cairo/HISTORY index 5938739a85..ebb35bb452 100644 --- a/x11-libs/cairo/HISTORY +++ b/x11-libs/cairo/HISTORY @@ -1,3 +1,7 @@ +2014-10-18 Jeremy Blosser <jblosser@sourcemage.org> + * PRE_BUILD, cairo-1.12.16-lto-optional.patch: add --disable-lto option. + * CONFIGURE: Query for --disable-lto. + 2014-09-09 Remko van der Vossen <wich@sourcemage.org> * DEPENDS: missing libxext diff --git a/x11-libs/cairo/PRE_BUILD b/x11-libs/cairo/PRE_BUILD index d77360e4f4..507e5bc0d6 100755 --- a/x11-libs/cairo/PRE_BUILD +++ b/x11-libs/cairo/PRE_BUILD @@ -2,10 +2,20 @@ default_pre_build && cd ${SOURCE_DIRECTORY} && if [[ "$CAIRO_BRANCH" == "scm" ]]; then - NOCONFIGURE=1 ./autogen.sh + CAIRO_AUTOGEN=y else # http://bugs.gentoo.org/show_bug.cgi?id=336696 patch -p1 -d "$SOURCE_DIRECTORY" < "$SPELL_DIRECTORY/cairo-1.10.0-buggy_gradients.patch" && # http://sourceforge.net/p/mingw-w64/bugs/396/ patch -p1 < "$SPELL_DIRECTORY/cairo-broken-lto-build.patch" +fi && + +if list_find "${CAIRO_OPTS}" "--disable-lto"; then + # https://bugs.freedesktop.org/show_bug.cgi?id=60852 + patch -p1 < "$SPELL_DIRECTORY/cairo-1.12.16-lto-optional.patch" && + CAIRO_AUTOGEN=y +fi && + +if [[ "$CAIRO_AUTOGEN" == "y" ]]; then + NOCONFIGURE=1 ./autogen.sh fi diff --git a/x11-libs/cairo/cairo-1.12.16-lto-optional.patch b/x11-libs/cairo/cairo-1.12.16-lto-optional.patch new file mode 100644 index 0000000000..8489dc4d47 --- /dev/null +++ b/x11-libs/cairo/cairo-1.12.16-lto-optional.patch @@ -0,0 +1,28 @@ +diff --git a/build/configure.ac.warnings b/build/configure.ac.warnings +index f984eb2..15b3da2 100644 +--- a/build/configure.ac.warnings ++++ b/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 -ffat-lto-objects -fuse-linker-plugin" +-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 -ffat-lto-objects -fuse-linker-plugin" ++ 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" + |