summaryrefslogtreecommitdiffstats
path: root/source/l/cairo
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/cairo')
-rwxr-xr-xsource/l/cairo/cairo.SlackBuild25
-rw-r--r--source/l/cairo/cairo.c088ba1faab9579efdaed7a524124901a17801b0.diff60
-rw-r--r--source/l/cairo/slack-desc8
3 files changed, 21 insertions, 72 deletions
diff --git a/source/l/cairo/cairo.SlackBuild b/source/l/cairo/cairo.SlackBuild
index 79170d358..faed7d184 100755
--- a/source/l/cairo/cairo.SlackBuild
+++ b/source/l/cairo/cairo.SlackBuild
@@ -1,6 +1,6 @@
-#!/bin/sh
+#!/bin/bash
-# Copyright 2008, 2009, 2010, 2011, 2013, 2015, 2016 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2011, 2013, 2015, 2016, 2018 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,6 +20,7 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=cairo
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
@@ -35,6 +36,14 @@ if [ -z "$ARCH" ]; then
esac
fi
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
NUMJOBS=${NUMJOBS:-" -j7 "}
if [ "$ARCH" = "i586" ]; then
@@ -51,7 +60,6 @@ else
LIBDIRSUFFIX=""
fi
-CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
rm -rf $PKG
@@ -60,7 +68,7 @@ mkdir -p $TMP $PKG
cd $TMP
rm -rf $PKGNAM-$VERSION
tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
-cd $PKGNAM-$VERSION
+cd $PKGNAM-$VERSION || exit 1
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -68,8 +76,6 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-zcat $CWD/cairo.c088ba1faab9579efdaed7a524124901a17801b0.diff.gz | patch -p1 --verbose || exit 1
-
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
@@ -91,7 +97,7 @@ CFLAGS="$SLKCFLAGS" \
--enable-gl \
--enable-gobject \
--enable-xml \
- --build=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux || exit 1
# None of these are 'stable' yet...
# --enable-qt \
@@ -108,7 +114,10 @@ CFLAGS="$SLKCFLAGS" \
# --enable-trace
make $NUMJOBS || make || exit 1
-make install DESTDIR=$PKG
+make install DESTDIR=$PKG || exit 1
+
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
diff --git a/source/l/cairo/cairo.c088ba1faab9579efdaed7a524124901a17801b0.diff b/source/l/cairo/cairo.c088ba1faab9579efdaed7a524124901a17801b0.diff
deleted file mode 100644
index c954cc7dd..000000000
--- a/source/l/cairo/cairo.c088ba1faab9579efdaed7a524124901a17801b0.diff
+++ /dev/null
@@ -1,60 +0,0 @@
-From c088ba1faab9579efdaed7a524124901a17801b0 Mon Sep 17 00:00:00 2001
-From: Uli Schlachter <psychon@znc.in>
-Date: Sat, 18 Jun 2016 15:08:52 +0200
-Subject: [PATCH] xlib: Fix double free in _get_image_surface()
-
-If XShmGetImage() fails, the code tries to continue with its normal,
-non-shared-memory path. However, the image variable, which was previously set to
-NULL, now points to an already-destroyed surface, causing a double-free when the
-function cleans up after itself (actually, its an assertion failure because the
-reference count of the surface is zero, but technically this is still a double
-free).
-
-Fix this by setting image=NULL after destroying the surface that this refers to,
-to make sure this surface will not be destroyed again.
-
-While we are here (multiple changes in a single commit are bad...), also fix the
-cleanup done in bail. In practice, &image->base should be safe when image==NULL,
-because this just adds some offset to the pointer (the offset here is actually
-zero, so this doesn't do anything at all). However, the C standard does not
-require this to be safe, so let's handle this case specially.
-
-Note that anything that is fixed by this change is still buggy, because the only
-reason why XShmGetImage() could fail would be BadDrawable, meaning that the
-target we draw to does not exist or was already destroyed. This patch will
-likely just cause X11 errors elsewhere and drawing to (possible) invalid
-drawables is not supported by cairo anyway. This means that if SHM fails, the
-following fallback code has a high chance of failing, too.
-
-Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=91967
-Signed-off-by: Uli Schlachter <psychon@znc.in>
----
- src/cairo-xlib-surface.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
-index 3f407c3..555c1fe 100644
---- a/src/cairo-xlib-surface.c
-+++ b/src/cairo-xlib-surface.c
-@@ -807,6 +807,7 @@ _get_image_surface (cairo_xlib_surface_t *surface,
- }
-
- cairo_surface_destroy (&image->base);
-+ image = NULL;
- }
- }
-
-@@ -1011,7 +1012,8 @@ _get_image_surface (cairo_xlib_surface_t *surface,
- cairo_device_release (&display->base);
-
- if (unlikely (status)) {
-- cairo_surface_destroy (&image->base);
-+ if (image)
-+ cairo_surface_destroy (&image->base);
- return _cairo_surface_create_in_error (status);
- }
-
---
-2.8.1
-
-
diff --git a/source/l/cairo/slack-desc b/source/l/cairo/slack-desc
index b70ae035b..6f09629ba 100644
--- a/source/l/cairo/slack-desc
+++ b/source/l/cairo/slack-desc
@@ -1,8 +1,8 @@
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
+# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
# leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
@@ -14,7 +14,7 @@ cairo: identical output on all output media while taking advantage of display
cairo: hardware acceleration when available (eg. through the X Render
cairo: Extension or OpenGL).
cairo:
-cairo:
+cairo: Homepage: https://cairographics.org
cairo:
cairo: