[arch-commits] Commit in cairo/trunk (PKGBUILD cairo-1.12.16-lto-optional.patch)
Andreas Radke
andyrtr at nymeria.archlinux.org
Thu May 29 16:21:26 UTC 2014
Date: Thursday, May 29, 2014 @ 18:21:26
Author: andyrtr
Revision: 213823
upgpkg: cairo 1.12.16-2
fix build with gcc4.9 - make lto optional and disable it for now
Added:
cairo/trunk/cairo-1.12.16-lto-optional.patch
Modified:
cairo/trunk/PKGBUILD
----------------------------------+
PKGBUILD | 17 ++++++++++++++---
cairo-1.12.16-lto-optional.patch | 29 +++++++++++++++++++++++++++++
2 files changed, 43 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2014-05-29 12:21:35 UTC (rev 213822)
+++ PKGBUILD 2014-05-29 16:21:26 UTC (rev 213823)
@@ -4,7 +4,7 @@
pkgname=cairo
pkgver=1.12.16
-pkgrel=1
+pkgrel=2
pkgdesc="Cairo vector graphics library"
arch=(i686 x86_64)
license=('LGPL' 'MPL')
@@ -16,9 +16,19 @@
#optdepends=('xcb-util: for XCB backend') # really needed?
provides=('cairo-xcb')
replaces=('cairo-xcb')
-source=(http://cairographics.org/releases/$pkgname-$pkgver.tar.xz)
-sha1sums=('4f6e337d5d3edd7ea79d1426f575331552b003ec')
+source=(http://cairographics.org/releases/$pkgname-$pkgver.tar.xz
+ cairo-1.12.16-lto-optional.patch)
+sha1sums=('4f6e337d5d3edd7ea79d1426f575331552b003ec'
+ '80883e44a57942762995aea2f136701b1fa54568')
+prepare() {
+ cd $pkgname-$pkgver
+ # https://bugs.archlinux.org/task/40313 + https://bugs.gentoo.org/510782
+ # patch to make it optional is taken from Gentoo
+ patch -Np1 -i $srcdir/cairo-1.12.16-lto-optional.patch
+ autoreconf -vfi
+}
+
build() {
cd $pkgname-$pkgver
@@ -26,6 +36,7 @@
--sysconfdir=/etc \
--localstatedir=/var \
--disable-static \
+ --disable-lto \
--enable-tee \
--enable-gl \
--enable-egl \
Added: cairo-1.12.16-lto-optional.patch
===================================================================
--- cairo-1.12.16-lto-optional.patch (rev 0)
+++ cairo-1.12.16-lto-optional.patch 2014-05-29 16:21:26 UTC (rev 213823)
@@ -0,0 +1,29 @@
+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"
+-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"
+
+
More information about the arch-commits
mailing list