pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/graphics/py-cairocffi Try open Cairo via dlopen first, ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/9ebd4099bfab
branches: trunk
changeset: 310548:9ebd4099bfab
user: joerg <joerg%pkgsrc.org@localhost>
date: Wed Jul 18 00:24:30 2018 +0000
description:
Try open Cairo via dlopen first, so that rpath is honoured. While it
doesn't currently work on OSX, the original code remains as fallback.
Bump revision.
diffstat:
graphics/py-cairocffi/Makefile | 4 +-
graphics/py-cairocffi/distinfo | 4 +-
graphics/py-cairocffi/patches/patch-cairocffi_____init____.py | 31 +++++++++++
3 files changed, 35 insertions(+), 4 deletions(-)
diffs (62 lines):
diff -r 27385f4ba39c -r 9ebd4099bfab graphics/py-cairocffi/Makefile
--- a/graphics/py-cairocffi/Makefile Wed Jul 18 00:09:12 2018 +0000
+++ b/graphics/py-cairocffi/Makefile Wed Jul 18 00:24:30 2018 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.12 2018/03/12 11:16:48 wiz Exp $
+# $NetBSD: Makefile,v 1.13 2018/07/18 00:24:30 joerg Exp $
DISTNAME= cairocffi-0.8.0
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= graphics python
MASTER_SITES= ${MASTER_SITE_PYPI:=c/cairocffi/}
diff -r 27385f4ba39c -r 9ebd4099bfab graphics/py-cairocffi/distinfo
--- a/graphics/py-cairocffi/distinfo Wed Jul 18 00:09:12 2018 +0000
+++ b/graphics/py-cairocffi/distinfo Wed Jul 18 00:24:30 2018 +0000
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.5 2017/07/16 09:29:58 adam Exp $
+$NetBSD: distinfo,v 1.6 2018/07/18 00:24:30 joerg Exp $
SHA1 (cairocffi-0.8.0.tar.gz) = 5d2a983b3a60dfd974c5c736338cd0ffacaae8cb
RMD160 (cairocffi-0.8.0.tar.gz) = ef591d28ca183e829b446b77bcd79069e3b00554
SHA512 (cairocffi-0.8.0.tar.gz) = 70179e05ca4a4efeaa39ade1ee1a96d280d198ecff5ae8c8fc634c24d8922ea6a3e1eb6cf5f55c5fc9d3f5b2fc3131a53051690eb86712762d8b6400df8a630a
Size (cairocffi-0.8.0.tar.gz) = 79217 bytes
-SHA1 (patch-cairocffi_____init____.py) = 6a9c75106a1041c9f81b73ec0d2e9062382130a2
+SHA1 (patch-cairocffi_____init____.py) = 25e068711b14523041f07163104fd8fb75d7e9cb
diff -r 27385f4ba39c -r 9ebd4099bfab graphics/py-cairocffi/patches/patch-cairocffi_____init____.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/py-cairocffi/patches/patch-cairocffi_____init____.py Wed Jul 18 00:24:30 2018 +0000
@@ -0,0 +1,31 @@
+$NetBSD: patch-cairocffi_____init____.py,v 1.1 2018/07/18 00:24:30 joerg Exp $
+
+--- cairocffi/__init__.py.orig 2017-02-03 11:41:24.000000000 +0000
++++ cairocffi/__init__.py
+@@ -12,6 +12,7 @@
+
+ import sys
+ import ctypes.util
++import sysconfig
+
+ from . import constants
+ from .compat import FileNotFoundError
+@@ -25,6 +26,18 @@ version_info = (1, 10, 0)
+
+ def dlopen(ffi, *names):
+ """Try various names for the same library, for different platforms."""
++ # First pass: try to dlopen the shared library directly.
++ # This may fail on systems where SHLIB_SUFFIX is broken like OSX.
++ suffix = sysconfig.get_config_var('SHLIB_SUFFIX') or sysconfig.get_config_var('SHLIB_EXT')
++ for name in names:
++ for lib_name in [name, 'lib' + name]:
++ try:
++ lib = ffi.dlopen(lib_name + suffix)
++ if lib:
++ return lib
++ except OSError:
++ pass
++ # Second pass: try to use ctypes as fallback.
+ for name in names:
+ for lib_name in [name, 'lib' + name]:
+ try:
Home |
Main Index |
Thread Index |
Old Index