From: "Thomas Sachau" <tommy@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/multilib-portage:master commit in: dev-python/pycairo/, dev-python/pycairo/files/
Date: Sun, 26 Apr 2015 21:16:46 +0000 (UTC) [thread overview]
Message-ID: <1430083112.ee67ea8a9daea840351a640688dbfd9b5c476fc6.tommy@gentoo> (raw)
commit: ee67ea8a9daea840351a640688dbfd9b5c476fc6
Author: Thomas Sachau <tommy <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 26 21:18:32 2015 +0000
Commit: Thomas Sachau <tommy <AT> gentoo <DOT> org>
CommitDate: Sun Apr 26 21:18:32 2015 +0000
URL: https://gitweb.gentoo.org/proj/multilib-portage.git/commit/?id=ee67ea8a
Update pycairo, initial patch by vloo via irc
.../pycairo/files/pycairo-1.10.0-waf-unpack.patch | 12 ++
dev-python/pycairo/pycairo-1.10.0-r2.ebuild | 167 --------------------
dev-python/pycairo/pycairo-1.10.0-r3.ebuild | 174 ---------------------
dev-python/pycairo/pycairo-1.10.0-r4.ebuild | 19 ++-
4 files changed, 25 insertions(+), 347 deletions(-)
diff --git a/dev-python/pycairo/files/pycairo-1.10.0-waf-unpack.patch b/dev-python/pycairo/files/pycairo-1.10.0-waf-unpack.patch
new file mode 100644
index 0000000..7d54ba1
--- /dev/null
+++ b/dev-python/pycairo/files/pycairo-1.10.0-waf-unpack.patch
@@ -0,0 +1,12 @@
+--- a/waf
++++ b/waf
+@@ -153,6 +153,9 @@
+ return dir
+
+ wafdir = find_lib()
++if sys.argv[1:] == ['unpack']:
++ print(wafdir)
++ exit()
+ sys.path.insert(0, wafdir)
+ from waflib.Tools.c_config import MACRO_TO_DESTOS
+ MACRO_TO_DESTOS['__POWERPC__'] = 'darwin'
diff --git a/dev-python/pycairo/pycairo-1.10.0-r2.ebuild b/dev-python/pycairo/pycairo-1.10.0-r2.ebuild
deleted file mode 100644
index d6c42a7..0000000
--- a/dev-python/pycairo/pycairo-1.10.0-r2.ebuild
+++ /dev/null
@@ -1,167 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pycairo/pycairo-1.10.0-r2.ebuild,v 1.7 2012/02/13 19:35:24 xarthisius Exp $
-
-EAPI="3"
-PYTHON_DEPEND="2:2.6 3:3.1"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="2.4 2.5 3.0 *-jython"
-
-inherit eutils python waf-utils
-
-PYCAIRO_PYTHON2_VERSION="${PV}"
-PYCAIRO_PYTHON3_VERSION="${PV}"
-
-DESCRIPTION="Python bindings for the cairo library"
-HOMEPAGE="http://cairographics.org/pycairo/ http://pypi.python.org/pypi/pycairo"
-SRC_URI="http://cairographics.org/releases/py2cairo-${PYCAIRO_PYTHON2_VERSION}.tar.bz2
- http://cairographics.org/releases/pycairo-${PYCAIRO_PYTHON3_VERSION}.tar.bz2
- http://dev.gentoo.org/~binki/distfiles/dev-python/${PN}/${P}-waf-multilib.patch"
-
-# LGPL-3 for pycairo 1.10.0.
-# || ( LGPL-2.1 MPL-1.1 ) for pycairo 1.8.10.
-LICENSE="LGPL-3 || ( LGPL-2.1 MPL-1.1 )"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
-IUSE="doc examples +svg test"
-
-RDEPEND=">=x11-libs/cairo-1.10.0[svg?]"
-DEPEND="${RDEPEND}
- dev-util/pkgconfig
- test? ( dev-python/pytest )"
-
-PYTHON_CFLAGS=("2.* + -fno-strict-aliasing")
-
-# In case if waf-utils.eclass actually accepts waf-utils_waflibdir() as
-# a function.
-unset waf-utils_waflibdir 2>/dev/null
-
-# @FUNCTION: waf-utils_waflibdir
-# @USAGE: [<waf-binary>]
-# @DESCRIPTION:
-# Echoes the absolute path to the directory containing waf-based
-# project's waflib python module. Ensures that the waflib shipped with a
-# project is unpacked if it isn't already. This waflib may be safely
-# patched because waf-lite will not touch the waflib directory when it
-# is run if it already exists. Uses the waf binary in WAF_BINARY or the
-# first argument.
-#
-# @EXAMPLE
-# @CODE
-# pushd "$(waf-utils_waflibdir)" || die "Unable to patch waflib"
-# epatch "${FILESDIR}"/${P}-waf-fix.patch
-# popd
-# @CODE
-#
-# Note that if you are using the python eclass, you must either call
-# python_set_active_version or call waf-utils_waflibdir() from within a
-# function run by python_execute().
-#
-# @CODE
-# SUPPORT_PYTHON_ABIS=1
-# inherit python
-#
-# src_prepare() {
-# python_copy_sources
-#
-# myprepare() {
-# epatch "${FILESDIR}"/${P}-sourcecode-fix.patch
-#
-# pushd "$(waf-utils_saflibdir "$(PYTHON)" waf)" || die "Unable to patch waflib"
-# epatch "${FILESDIR}"/${P}-waf-fix.patch
-# popd
-# }
-# python_execute_function -s myprepare
-# }
-# @CODE
-waf-utils_waflibdir() {
- debug-print-function ${FUNCNAME} "$@"
-
- # @ECLASS-VARIABLE: WAF_BINARY
- # @DESCRIPTION:
- # Eclass can use different waf executable. Usually it is located in "${S}/waf".
- : ${WAF_BINARY:="${S}/waf"}
-
- local waf_binary=${WAF_BINARY}
- [[ -n ${1} ]] && waf_binary=${1}
-
- python -c "import imp, sys; sys.argv[0] = '${waf_binary}'; waflite = imp.load_source('waflite', '${waf_binary}'); print(waflite.find_lib());" \
- || die "Unable to locate or unpack waflib module from the waf script at ${waf_binary}"
-}
-
-# When moving between the different build dirs, we want to use the waf
-# associated with each build dir.
-WAF_BINARY=./waf
-
-src_prepare() {
-
- pushd "${WORKDIR}/pycairo-${PYCAIRO_PYTHON3_VERSION}" > /dev/null
- rm -f src/config.h || die
- epatch "${FILESDIR}/${PN}-1.10.0-svg_check.patch"
- popd > /dev/null
-
- pushd "${WORKDIR}/py2cairo-${PYCAIRO_PYTHON2_VERSION}" > /dev/null
- rm -f src/config.h || die
- epatch "${FILESDIR}/py2cairo-1.10.0-svg_check.patch"
- popd > /dev/null
-
- preparation() {
- local srcdir=${WORKDIR}/${P}-${PYTHON_ABI}
- if [[ "${PYTHON_ABI}" == 3.* ]]; then
- cp -r "${WORKDIR}/pycairo-${PYCAIRO_PYTHON3_VERSION}" "${srcdir}"
- else
- cp -r "${WORKDIR}/py2cairo-${PYCAIRO_PYTHON2_VERSION}" "${srcdir}"
- fi
-
- cd "$(waf-utils_waflibdir ${srcdir}/waf)" || die "Unable to patch waflib"
- epatch "${DISTDIR}"/${P}-waf-multilib.patch
- }
- python_execute_function preparation
-}
-
-src_configure() {
- if ! use svg; then
- export PYCAIRO_DISABLE_SVG="1"
- fi
-
- python_execute_function -s waf-utils_src_configure --nopyc --nopyo
-}
-
-src_compile() {
- python_execute_function -s waf-utils_src_compile
-}
-
-src_test() {
- test_installation() {
- ./waf install --destdir="${T}/tests/${PYTHON_ABI}"
- }
- python_execute_function -q -s test_installation
-
- python_execute_py.test -P '${T}/tests/${PYTHON_ABI}${EPREFIX}$(python_get_sitedir)' -s
-}
-
-src_install() {
- python_execute_function -s waf-utils_src_install
-
- dodoc AUTHORS NEWS README || die "dodoc failed"
-
- if use doc; then
- pushd doc/_build/html > /dev/null
- insinto /usr/share/doc/${PF}/html
- doins -r [a-z]* _static || die "Installation of documentation failed"
- popd > /dev/null
- fi
-
- if use examples; then
- insinto /usr/share/doc/${PF}/examples
- doins -r examples/* || die "Installation of examples failed"
- fi
-}
-
-pkg_postinst() {
- python_mod_optimize cairo
-}
-
-pkg_postrm() {
- python_mod_cleanup cairo
-}
diff --git a/dev-python/pycairo/pycairo-1.10.0-r3.ebuild b/dev-python/pycairo/pycairo-1.10.0-r3.ebuild
deleted file mode 100644
index 5ebe57a..0000000
--- a/dev-python/pycairo/pycairo-1.10.0-r3.ebuild
+++ /dev/null
@@ -1,174 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pycairo/pycairo-1.10.0-r2.ebuild,v 1.7 2012/02/13 19:35:24 xarthisius Exp $
-
-EAPI="4"
-PYTHON_DEPEND="2:2.6 3:3.1"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="2.4 2.5 3.0 *-jython"
-
-inherit eutils python waf-utils
-
-PYCAIRO_PYTHON2_VERSION="${PV}"
-PYCAIRO_PYTHON3_VERSION="${PV}"
-
-DESCRIPTION="Python bindings for the cairo library"
-HOMEPAGE="http://cairographics.org/pycairo/ http://pypi.python.org/pypi/pycairo"
-SRC_URI="http://cairographics.org/releases/py2cairo-${PYCAIRO_PYTHON2_VERSION}.tar.bz2
- http://cairographics.org/releases/pycairo-${PYCAIRO_PYTHON3_VERSION}.tar.bz2
- http://dev.gentoo.org/~binki/distfiles/dev-python/${PN}/${P}-waf-multilib.patch"
-
-# LGPL-3 for pycairo 1.10.0.
-# || ( LGPL-2.1 MPL-1.1 ) for pycairo 1.8.10.
-LICENSE="LGPL-3 || ( LGPL-2.1 MPL-1.1 )"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
-IUSE="doc examples +svg test xcb"
-
-RDEPEND=">=x11-libs/cairo-1.10.0[svg?,xcb?]
- xcb? ( x11-libs/xpyb )"
-DEPEND="${RDEPEND}
- virtual/pkgconfig
- test? ( dev-python/pytest )"
-
-PYTHON_CFLAGS=("2.* + -fno-strict-aliasing")
-
-# In case if waf-utils.eclass actually accepts waf-utils_waflibdir() as
-# a function.
-unset waf-utils_waflibdir 2>/dev/null
-
-# @FUNCTION: waf-utils_waflibdir
-# @USAGE: [<waf-binary>]
-# @DESCRIPTION:
-# Echoes the absolute path to the directory containing waf-based
-# project's waflib python module. Ensures that the waflib shipped with a
-# project is unpacked if it isn't already. This waflib may be safely
-# patched because waf-lite will not touch the waflib directory when it
-# is run if it already exists. Uses the waf binary in WAF_BINARY or the
-# first argument.
-#
-# @EXAMPLE
-# @CODE
-# pushd "$(waf-utils_waflibdir)" || die "Unable to patch waflib"
-# epatch "${FILESDIR}"/${P}-waf-fix.patch
-# popd
-# @CODE
-#
-# Note that if you are using the python eclass, you must either call
-# python_set_active_version or call waf-utils_waflibdir() from within a
-# function run by python_execute().
-#
-# @CODE
-# SUPPORT_PYTHON_ABIS=1
-# inherit python
-#
-# src_prepare() {
-# python_copy_sources
-#
-# myprepare() {
-# epatch "${FILESDIR}"/${P}-sourcecode-fix.patch
-#
-# pushd "$(waf-utils_saflibdir "$(PYTHON)" waf)" || die "Unable to patch waflib"
-# epatch "${FILESDIR}"/${P}-waf-fix.patch
-# popd
-# }
-# python_execute_function -s myprepare
-# }
-# @CODE
-waf-utils_waflibdir() {
- debug-print-function ${FUNCNAME} "$@"
-
- # @ECLASS-VARIABLE: WAF_BINARY
- # @DESCRIPTION:
- # Eclass can use different waf executable. Usually it is located in "${S}/waf".
- : ${WAF_BINARY:="${S}/waf"}
-
- local waf_binary=${WAF_BINARY}
- [[ -n ${1} ]] && waf_binary=${1}
-
- python -c "import imp, sys; sys.argv[0] = '${waf_binary}'; waflite = imp.load_source('waflite', '${waf_binary}'); print(waflite.find_lib());" \
- || die "Unable to locate or unpack waflib module from the waf script at ${waf_binary}"
-}
-
-# When moving between the different build dirs, we want to use the waf
-# associated with each build dir.
-WAF_BINARY=./waf
-
-src_prepare() {
-
- pushd "${WORKDIR}/pycairo-${PYCAIRO_PYTHON3_VERSION}" > /dev/null
- rm -f src/config.h || die
- epatch "${FILESDIR}/${PN}-1.10.0-svg_check.patch"
- epatch "${FILESDIR}/${PN}-1.10.0-xpyb.patch"
- popd > /dev/null
-
- pushd "${WORKDIR}/py2cairo-${PYCAIRO_PYTHON2_VERSION}" > /dev/null
- rm -f src/config.h || die
- epatch "${FILESDIR}/py2cairo-1.10.0-svg_check.patch"
- epatch "${FILESDIR}/py2cairo-1.10.0-xpyb.patch"
- popd > /dev/null
-
- preparation() {
- local srcdir=${WORKDIR}/${P}-${PYTHON_ABI}
- if [[ "${PYTHON_ABI}" == 3.* ]]; then
- cp -r "${WORKDIR}/pycairo-${PYCAIRO_PYTHON3_VERSION}" "${srcdir}"
- else
- cp -r "${WORKDIR}/py2cairo-${PYCAIRO_PYTHON2_VERSION}" "${srcdir}"
- fi
-
- cd "$(waf-utils_waflibdir ${srcdir}/waf)" || die "Unable to patch waflib"
- epatch "${DISTDIR}"/${P}-waf-multilib.patch
- }
- python_execute_function preparation
-}
-
-src_configure() {
- if ! use svg; then
- export PYCAIRO_DISABLE_SVG=1
- fi
-
- if ! use xcb; then
- export PYCAIRO_DISABLE_XPYB=1
- fi
-
- python_execute_function -s waf-utils_src_configure --nopyc --nopyo
-}
-
-src_compile() {
- python_execute_function -s waf-utils_src_compile
-}
-
-src_test() {
- test_installation() {
- ./waf install --destdir="${T}/tests/${PYTHON_ABI}"
- }
- python_execute_function -q -s test_installation
-
- python_execute_py.test -P '${T}/tests/${PYTHON_ABI}${EPREFIX}$(python_get_sitedir)' -s
-}
-
-src_install() {
- python_execute_function -s waf-utils_src_install
-
- dodoc AUTHORS NEWS README || die "dodoc failed"
-
- if use doc; then
- pushd doc/_build/html > /dev/null
- insinto /usr/share/doc/${PF}/html
- doins -r [a-z]* _static || die "Installation of documentation failed"
- popd > /dev/null
- fi
-
- if use examples; then
- insinto /usr/share/doc/${PF}/examples
- doins -r examples/* || die "Installation of examples failed"
- fi
-}
-
-pkg_postinst() {
- python_mod_optimize cairo
-}
-
-pkg_postrm() {
- python_mod_cleanup cairo
-}
diff --git a/dev-python/pycairo/pycairo-1.10.0-r4.ebuild b/dev-python/pycairo/pycairo-1.10.0-r4.ebuild
index be59836..06b1311 100644
--- a/dev-python/pycairo/pycairo-1.10.0-r4.ebuild
+++ b/dev-python/pycairo/pycairo-1.10.0-r4.ebuild
@@ -1,9 +1,10 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/pycairo/pycairo-1.10.0-r4.ebuild,v 1.4 2013/01/14 17:29:27 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/pycairo/pycairo-1.10.0-r4.ebuild,v 1.21 2015/04/08 08:05:21 mgorny Exp $
EAPI="5"
-PYTHON_COMPAT=( python2_{6,7} python3_{1,2,3} )
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+PYTHON_REQ_USE='threads(+)'
inherit eutils python-r1 waf-utils
@@ -35,8 +36,6 @@ DEPEND="${RDEPEND}
test? ( dev-python/pytest[${PYTHON_USEDEP}] )
"
-PYTHON_CFLAGS=("2.* + -fno-strict-aliasing")
-
# In case if waf-utils.eclass actually accepts waf-utils_waflibdir() as
# a function.
unset waf-utils_waflibdir 2>/dev/null
@@ -104,6 +103,7 @@ src_prepare() {
rm -f src/config.h || die
epatch "${FILESDIR}/${PN}-1.10.0-svg_check.patch"
epatch "${FILESDIR}/${PN}-1.10.0-xpyb.patch"
+ epatch "${FILESDIR}/${PN}-1.10.0-waf-unpack.patch"
epatch "${FILESDIR}"/py2cairo-1.10.0-ppc-darwin.patch
cd "$(waf-utils_waflibdir waf)" || die "Unable to patch waflib"
epatch "${DISTDIR}"/${P}-waf-multilib.patch
@@ -119,8 +119,14 @@ src_prepare() {
popd > /dev/null
preparation() {
- if [[ ${EPYTHON} == python3.* ]]; then
+ if python_is_python3; then
cp -r -l "${WORKDIR}/pycairo-${PYCAIRO_PYTHON3_VERSION}" "${BUILD_DIR}" || die
+ pushd "${BUILD_DIR}" > /dev/null
+ wafdir="$(./waf unpack)"
+ pushd "${wafdir}" > /dev/null
+ epatch "${FILESDIR}/${PN}-1.10.0-waf-py3_4.patch"
+ popd > /dev/null
+ popd > /dev/null
else
cp -r -l "${WORKDIR}/py2cairo-${PYCAIRO_PYTHON2_VERSION}" "${BUILD_DIR}" || die
fi
@@ -149,6 +155,7 @@ src_configure() {
}
src_compile() {
+ MAKEOPTS="$MAKEOPTS -j1"
python_foreach_impl run_in_build_dir waf-utils_src_compile
}
next reply other threads:[~2015-04-26 21:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-26 21:16 Thomas Sachau [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-02-02 16:21 [gentoo-commits] proj/multilib-portage:master commit in: dev-python/pycairo/, dev-python/pycairo/files/ Thomas Sachau
2012-11-17 10:53 Thomas Sachau
2012-02-20 3:51 Nathan Phillip Brink
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1430083112.ee67ea8a9daea840351a640688dbfd9b5c476fc6.tommy@gentoo \
--to=tommy@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox