summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Marc-Antoine Perennou <keruspe@exherbo.org> 2017-09-12 10:01:41 +0200
committerAvatar Marc-Antoine Perennou <keruspe@exherbo.org> 2017-09-12 10:15:01 +0200
commit8458ab744c0220c83f3f356abb9eaa6d18e7196f (patch)
tree05aaa0d59ec588ed342ede4ef9d0cf35a7834457
parent7590b7756e124ae20b0abeb6813ea772d8b08080 (diff)
downloadgnome-8458ab744c0220c83f3f356abb9eaa6d18e7196f.tar.gz
gnome-8458ab744c0220c83f3f356abb9eaa6d18e7196f.tar.xz
pycairo: bump to 1.14.1
Signed-off-by: Marc-Antoine Perennou <keruspe@exherbo.org>
-rw-r--r--packages/dev-python/pycairo/files/libdir.patch32
-rw-r--r--packages/dev-python/pycairo/pycairo-1.10.0-r2.exheres-064
-rw-r--r--packages/dev-python/pycairo/pycairo-1.14.1.exheres-034
3 files changed, 66 insertions, 64 deletions
diff --git a/packages/dev-python/pycairo/files/libdir.patch b/packages/dev-python/pycairo/files/libdir.patch
new file mode 100644
index 0000000..2c77901
--- /dev/null
+++ b/packages/dev-python/pycairo/files/libdir.patch
@@ -0,0 +1,32 @@
+Upstream: yes
+From 3b12b54478c295034f99ac9b2c801360779bd365 Mon Sep 17 00:00:00 2001
+From: Sander Sweers <infirit@gmail.com>
+Date: Fri, 1 Sep 2017 15:06:15 +0200
+Subject: [PATCH] Get libdir from sysconfig
+
+Multilib is handled differently across distribution. This hopefully is
+sufficient to figure out what the correct libdir is.
+
+diff --git a/setup.py b/setup.py
+index f1a5245..4a2e822 100755
+--- a/setup.py
++++ b/setup.py
+@@ -6,6 +6,7 @@ import sys
+ import os
+ import errno
+ from distutils.core import Extension, setup, Command, Distribution
++from distutils import sysconfig
+
+
+ PYCAIRO_VERSION = '1.15.2'
+@@ -119,8 +120,8 @@ class install_pkgconfig(Command):
+ return []
+
+ def run(self):
+- libdir = os.path.join(self.install_data, "lib")
+- install_dir = os.path.join(libdir, "pkgconfig")
++ python_lib = sysconfig.get_python_lib(True, True, self.install_data)
++ install_dir = os.path.join(os.path.dirname(python_lib), 'pkgconfig')
+ self.mkpath(install_dir)
+
+ if sys.version_info[0] == 3:
diff --git a/packages/dev-python/pycairo/pycairo-1.10.0-r2.exheres-0 b/packages/dev-python/pycairo/pycairo-1.10.0-r2.exheres-0
deleted file mode 100644
index bb4e465..0000000
--- a/packages/dev-python/pycairo/pycairo-1.10.0-r2.exheres-0
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright 2008 Saleem Abdulrasool <compnerd@compnerd.org>
-# Distributed under the terms of the GNU General Purpose License v2
-
-# define python_sup because of the download URLs
-require waf python [ blacklist=none multiunpack=true ]
-
-WAF_VER=1.7.15
-
-SUMMARY="Python bindings for Cairo"
-HOMEPAGE="http://www.cairographics.org/pycairo/"
-DOWNLOADS=""
-for MULTIBUILD_TARGET in ${MULTIBUILD_PYTHON_ABIS_TARGETS} ; do
- if [[ ${MULTIBUILD_TARGET} == 2.* ]] ; then
- DOWNLOADS+="python_abis:${MULTIBUILD_TARGET}? ( http://www.cairographics.org/releases/py2cairo-${PV}.tar.bz2 ) "
- else
- DOWNLOADS+="python_abis:${MULTIBUILD_TARGET}? ( http://www.cairographics.org/releases/${PNV}.tar.bz2 ) "
- fi
-done
-DOWNLOADS+="https://waf.googlecode.com/files/waf-${WAF_VER}"
-
-LICENCES="LGPL-2"
-SLOT="0"
-PLATFORMS="~amd64 ~x86"
-MYOPTIONS=""
-
-DEPENDENCIES="
- build:
- virtual/pkg-config[>=0.20]
- build+run:
- x11-libs/cairo[>=1.10.0]
-"
-
-unpack_one_multibuild() {
- if [[ ${MULTIBUILD_TARGET} == 2.* ]] ; then
- unpack py2cairo-${PV}.tar.bz2
- edo cd "${WORKBASE}/${MULTIBUILD_CLASS}/${MULTIBUILD_TARGET}"
- edo mv py2cairo-${PV} ${PNV}
- else
- unpack ${PNV}.tar.bz2
- fi
-}
-
-prepare_one_multibuild() {
- edo cp "${FETCHEDDIR}"/waf-${WAF_VER} waf
- chmod +x waf
-
- # Upstream: yes
- edo sed -e 's/tool_options/load/' -e 's/check_tool/load/' -i wscript
-
- default
-}
-
-configure_one_multibuild() {
- waf_src_configure
-}
-
-compile_one_multibuild() {
- waf_src_compile
-}
-
-install_one_multibuild() {
- waf_src_install
-}
-
diff --git a/packages/dev-python/pycairo/pycairo-1.14.1.exheres-0 b/packages/dev-python/pycairo/pycairo-1.14.1.exheres-0
new file mode 100644
index 0000000..0f50ea8
--- /dev/null
+++ b/packages/dev-python/pycairo/pycairo-1.14.1.exheres-0
@@ -0,0 +1,34 @@
+# Copyright 2008 Saleem Abdulrasool <compnerd@compnerd.org>
+# Distributed under the terms of the GNU General Purpose License v2
+
+# define python_sup because of the download URLs
+require github [ user=pygobject tag=v${PV} ] setup-py [ blacklist=none import=distutils ]
+
+SUMMARY="Python bindings for Cairo"
+HOMEPAGE="http://www.cairographics.org/pycairo/"
+
+LICENCES="LGPL-2"
+SLOT="0"
+PLATFORMS="~amd64 ~x86"
+MYOPTIONS=""
+
+DEPENDENCIES="
+ build:
+ virtual/pkg-config
+ build+run:
+ x11-libs/cairo[>=1.13.1]
+"
+
+DEFAULT_SRC_PREPARE_PATCHES=( "${FILES}"/libdir.patch )
+
+prepare_one_multibuild() {
+ edo sed -e "s/pkg-config/${PKG_CONFIG}/" -i setup.py
+ setup-py_prepare_one_multibuild
+}
+
+src_install() {
+ setup-py_src_install
+ edo mv "${IMAGE}"usr/{,$(exhost --target)/}include
+ edo mv "${IMAGE}"usr/{,$(exhost --target)/}lib/pkgconfig
+ edo rmdir "${IMAGE}"usr/lib
+}