From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 9BD781387FC for ; Sat, 2 Feb 2013 16:21:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4241121C003; Sat, 2 Feb 2013 16:21:42 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B366121C003 for ; Sat, 2 Feb 2013 16:21:41 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9AAD533DD1C for ; Sat, 2 Feb 2013 16:21:40 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 36BEFE4073 for ; Sat, 2 Feb 2013 16:21:39 +0000 (UTC) From: "Thomas Sachau" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Sachau" Message-ID: <1359822077.03e973d15caed0979641409ea4a72a9a7e82c5ee.tommy@gentoo> Subject: [gentoo-commits] proj/multilib-portage:master commit in: dev-python/pycairo/, dev-python/pycairo/files/ X-VCS-Repository: proj/multilib-portage X-VCS-Files: dev-python/pycairo/Manifest dev-python/pycairo/files/py2cairo-1.10.0-ppc-darwin.patch dev-python/pycairo/pycairo-1.10.0-r4.ebuild X-VCS-Directories: dev-python/pycairo/ dev-python/pycairo/files/ X-VCS-Committer: tommy X-VCS-Committer-Name: Thomas Sachau X-VCS-Revision: 03e973d15caed0979641409ea4a72a9a7e82c5ee X-VCS-Branch: master Date: Sat, 2 Feb 2013 16:21:39 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 57a6caff-1c5a-4dd1-bbb4-59d90c74be32 X-Archives-Hash: 0f9fda62e6fb3f55574b91234af05d3d commit: 03e973d15caed0979641409ea4a72a9a7e82c5ee Author: Thomas Sachau gentoo org> AuthorDate: Sat Feb 2 16:21:17 2013 +0000 Commit: Thomas Sachau gentoo org> CommitDate: Sat Feb 2 16:21:17 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/multilib-portage.git;a=commit;h=03e973d1 Sync pycairo with main tree --- dev-python/pycairo/Manifest | 2 + .../pycairo/files/py2cairo-1.10.0-ppc-darwin.patch | 18 ++ dev-python/pycairo/pycairo-1.10.0-r4.ebuild | 193 ++++++++++++++++++++ 3 files changed, 213 insertions(+), 0 deletions(-) diff --git a/dev-python/pycairo/Manifest b/dev-python/pycairo/Manifest index 81ec4c5..d62fdad 100644 --- a/dev-python/pycairo/Manifest +++ b/dev-python/pycairo/Manifest @@ -1,3 +1,4 @@ +AUX py2cairo-1.10.0-ppc-darwin.patch 446 SHA256 c957cd14eb2c3fce0169a54b13665522fe1ada1af61a865903aad595afa309b1 SHA512 003e3266542242d349baa522552392aa448738f91a37ef0e6c8dedc3e0c179ca98167ab2ea7d75bd7d708f24f286099440a7a6a784767530eca161486403b033 WHIRLPOOL 0695123f4c9b3e82c22f1ba632243226d1dfe50442ea515abe440632221984c10aff233b8407a0e8dd4f594a1464c4fb7f121e43cfd0d03a2529ed1163e1a649 AUX py2cairo-1.10.0-svg_check.patch 2912 SHA256 c35d96be5be571c2f4c3415e4016a7e70a5edd6164818af80d16855e4e4efe72 SHA512 e0069738659db0fa3c0532efa7e53fed5f088ee4ce276fd6ddcfcd0ee1e8b4861a09330afe8a30bb45b912c7a93cf6e42dd6057ad7f5adabfdddeb58bc10bbe8 WHIRLPOOL 90ccae77f2641c1f9f4ad6f6497fd7912a952b7b948fe64845e8c60629d4f70c590fd33dd276c54cbc8251d45e8bd201841d7bc3fa04a37a314f1f375b8250c7 AUX py2cairo-1.10.0-xpyb.patch 952 SHA256 d6809bf00608d007f866040025392174e0cf3efe3ac03277436e00bacdcef54a SHA512 45fa1d32a8a4fc79b10e9221af286eef3f9d2c2b4991c066b1e18bd329feb764d07c4ebc58e1926ae86c4cb4a2ed0fd172f75f7479cec0be51ec5c5da6d4f13d WHIRLPOOL f8818581d471735748b546ffa0f4ac42bc5f623ae0ab383a70cf5977727ba933509497d3071aeb572e764c5e164680c16f8d476b0d8f1b7659dda7190b226cda AUX pycairo-1.10.0-svg_check.patch 2924 SHA256 f9d2bac70bcca57c523e69403cb7332bf4ade0427998b6a3dc16730bcc17b6c7 SHA512 a05fc725c9c8ac48b262795c6c6e56b3a432f73d69657565763292f74cbd8b3d4eaabc1a5dd5db0b74cad297cc330caed271c40fbb16d459019b4c75ab33ccef WHIRLPOOL ceaf8bf26f9783bd017fbfb6b81f00ece0122d1f57ad6ae3d87f40b39d7a4bbb47bab89891f3f12357f44f26039a6c63bf46b25765fac2412bd079c6e17dd6cf @@ -7,4 +8,5 @@ DIST pycairo-1.10.0-waf-multilib.patch 761 SHA256 8e9e081bf7b4beced282a8de265b6e DIST pycairo-1.10.0.tar.bz2 246556 SHA256 9aa4078e7eb5be583aeabbe8d87172797717f95e8c4338f0d4a17b683a7253be SHA512 a03db6f04cea504985f390b0734042390f491f32ae2bee1299dabbafd369fde36bb506ebb941d22bbc11b0d008c4f758baeacf309a7336880529455092db829f WHIRLPOOL e779d56d67ef18bbd052d81acb38d8b610ca4bbf787f4b0e3982633de55ff54d6dfa3e5ce1957321fba09f0ec2d12ce12057335de9d5ff3f84c2bc0530415e76 EBUILD pycairo-1.10.0-r2.ebuild 4956 SHA256 2ed5dfce4549fdb69c3dd6c2a64dd5d5b48f538bfef69c8858bb0820ac2f80db SHA512 d23987921a54ed7cd040c71b59bf51da0df4fae67dacd49bdb078770cf0021578c605a7ee6f6848560181d3701f3ac95a9b8185981180d020bd3b63d526b0572 WHIRLPOOL 862c8fd620f27c1c59d641a90ed89f96963713457b66be3dd9b9ccfb57b1ab987914419c405b3cd20ecdddd10dd01e98b9e277cb7cbccdc2555ea2fa9d22b64f EBUILD pycairo-1.10.0-r3.ebuild 5148 SHA256 0baedcb92b4622cad90300fff428e495eec9f1cf8be6c5a6c1b70928a5f6e8a0 SHA512 47cd2e04f412c178a80a68c2c89922bf35802247857004d550fc6f349f0eec497f3b8accac6e22cc26ce57fa51c3b93d4c447d926bf8d2bf845b6eb2104587a7 WHIRLPOOL be2c40ff1f8281c725e18cee33df9ffe86e696b596b0c4c267ff9da919a8241f23945d098fbf9f6ec1ef47acb0cee31b6979bc67c01e3a92393701b62b65ff92 +EBUILD pycairo-1.10.0-r4.ebuild 5903 SHA256 4abbd80068bc96d7066718b68d738fda21f6de50af1cc01de68f96b479cca656 SHA512 506fcfde0c93c478a91797020a10fcc1508fa4dd080fb9064d3961db8b408df87589a41bbcc2c18fc274ea9bcd1e798c586798efc206f6802a9e34f8e5652422 WHIRLPOOL 7dd8ce2bf6089510c1a68ff4b3f3e302f10b66d26afc7d290ae875df8efc760acfacff7d97850677fd0477dd30f5c338d4dc20febb8b94ee8d9d01a508e3268c MISC metadata.xml 244 SHA256 f5bde347c36c74889cbb32d29f06766c08eb3df6e0c468f00295681382c48457 SHA512 100f9b2326c73dff673bda4c5dfc0dd28bc756d80a039c1d3ac19124599a99e18b841ab28da191a79c6498c2dc157c0fed7639c855e2520cc3933f03e3de8a21 WHIRLPOOL 409c270895ffd477768bc9c329c9297c106d3f9572b84051ae66757f4d87c6f0a0b7d71aff602ff41b14400fc0afbf3990cbf1768a63f01fda6854043b66a35b diff --git a/dev-python/pycairo/files/py2cairo-1.10.0-ppc-darwin.patch b/dev-python/pycairo/files/py2cairo-1.10.0-ppc-darwin.patch new file mode 100644 index 0000000..e921ac3 --- /dev/null +++ b/dev-python/pycairo/files/py2cairo-1.10.0-ppc-darwin.patch @@ -0,0 +1,18 @@ +inspired by: +http://groups.google.com/group/waf-users/browse_thread/thread/2bd6774056c850bc/ +27bfdcac2fb9ec05?lnk=gst#27bfdcac2fb9ec05 + +we cannot "fix" the buildsystem, since it's bzip2-tarred *sigh* + + +--- waf ++++ waf +@@ -154,6 +154,8 @@ + + wafdir = find_lib() + sys.path.insert(0, wafdir) ++from waflib.Tools.c_config import MACRO_TO_DESTOS ++MACRO_TO_DESTOS['__POWERPC__'] = 'darwin' + + if __name__ == '__main__': + import waflib.extras.compat15 diff --git a/dev-python/pycairo/pycairo-1.10.0-r4.ebuild b/dev-python/pycairo/pycairo-1.10.0-r4.ebuild new file mode 100644 index 0000000..cab7674 --- /dev/null +++ b/dev-python/pycairo/pycairo-1.10.0-r4.ebuild @@ -0,0 +1,193 @@ +# Copyright 1999-2013 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 $ + +EAPI="5" +PYTHON_COMPAT=( python2_{6,7} python3_{1,2,3} ) + +inherit eutils python-r1 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 ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-fbsd ~ppc-macos ~x64-macos ~x86-linux ~x86-macos" +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_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 + +# @FUNCTION: waf-utils_waflibdir +# @USAGE: [] +# @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" + 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 + 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" + 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 + popd > /dev/null + + preparation() { + if [[ ${EPYTHON} == python3.* ]]; then + cp -r -l "${WORKDIR}/pycairo-${PYCAIRO_PYTHON3_VERSION}" "${BUILD_DIR}" || die + else + cp -r -l "${WORKDIR}/py2cairo-${PYCAIRO_PYTHON2_VERSION}" "${BUILD_DIR}" || die + fi + + } + python_foreach_impl preparation +} + +src_configure() { + if ! use svg; then + export PYCAIRO_DISABLE_SVG=1 + fi + + if ! use xcb; then + export PYCAIRO_DISABLE_XPYB=1 + fi + + # Added by grobian: + # If WAF_BINARY is an absolute path, the configure is different and fails to + # find Python.h due to a compiler misconfiguration. If WAF_BINARY is just + # ./waf or python waf, it works fine. Hooray for reinvented buildsystems + + # floppym: + # pycairo and py2cairo bundle different versions of waf (bug 447856) + WAF_BINARY="./waf" + python_foreach_impl run_in_build_dir waf-utils_src_configure --nopyc --nopyo +} + +src_compile() { + python_foreach_impl run_in_build_dir waf-utils_src_compile +} + +src_test() { + test_installation() { + ./waf install --destdir="${T}/tests/${BUILD_DIR}" + PYTHONPATH="${T}/tests/${BUILD_DIR}$(python_get_sitedir)" py.test -v + } + python_foreach_impl run_in_build_dir test_installation +} + +src_install() { + python_foreach_impl run_in_build_dir waf-utils_src_install + + dodoc AUTHORS NEWS README + + if use doc; then + pushd doc/_build/html > /dev/null || die + dohtml -r [a-z]* _static + popd > /dev/null || die + fi + + if use examples; then + insinto /usr/share/doc/${PF}/examples + doins -r examples/* + fi + + if [[ ${CHOST} == *-darwin* ]] ; then + # fix install_names; next to waf producing dylibs (not bundles) and + # calling them .bundle, it also has no idea what it should do to create + # proper ones (dylibs) + fix_darwin_install_names() { + local x="$(python_get_sitedir)/cairo/_cairo.bundle" + install_name_tool -id "${x}" "${ED}${x}" + } + python_foreach_impl fix_darwin_install_names + fi +} + +run_in_build_dir() { + pushd "${BUILD_DIR}" > /dev/null || die + "$@" + popd > /dev/null || die +}