dev-python/pycairo: replace "lib" with correct libdir
authorMike Gilbert <floppym@gentoo.org>
Sat, 27 May 2017 04:11:12 +0000 (00:11 -0400)
committerMike Gilbert <floppym@gentoo.org>
Sat, 27 May 2017 04:11:12 +0000 (00:11 -0400)
This path is used to install the pkgconfig file(s). If the files are
installed in the wrong libdir, pkg-config in pygobject will fail to
find them.

Package-Manager: Portage-2.3.6_p1, Repoman-2.3.2_p69

dev-python/pycairo/pycairo-1.13.1-r1.ebuild [moved from dev-python/pycairo/pycairo-1.13.1.ebuild with 86% similarity]

similarity index 86%
rename from dev-python/pycairo/pycairo-1.13.1.ebuild
rename to dev-python/pycairo/pycairo-1.13.1-r1.ebuild
index 3686caad877468330ff44645f3817fd9fd65bd97..30b7fc97e0c475a5fbb92bc0f86950647ed6ce55 100644 (file)
@@ -27,9 +27,15 @@ DEPEND="${RDEPEND}
        test? ( dev-python/pytest[${PYTHON_USEDEP}] )
 "
 
+python_prepare_all() {
+       # Fix pkgconfig path
+       sed -i -e "/libdir =/s:\"lib\":\"$(get_libdir)\":" setup.py || die
+       distutils-r1_python_prepare_all
+}
+
 python_compile() {
        local enable_xpyb
-       [[ ${EPYTHON} == python2* ]] && enable_xpyb=$(usex xcb "--enable-xpyb" "")
+       python_is_python3 || enable_xpyb=$(usex xcb "--enable-xpyb" "")
 
        esetup.py build ${enable_xpyb}
 }