commit:     df259a18b9224191c6c409c7027d265469e9812c
Author:     Tim Harder <radhermit <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 31 04:06:50 2016 +0000
Commit:     Tim Harder <radhermit <AT> gentoo <DOT> org>
CommitDate: Thu Mar 31 04:11:33 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df259a18

net-irc/weechat: respect PYTHON_SINGLE_TARGET setting

Previously it would only build against python2.7.

Patch thanks to Oleg in bug #577638.

 .../weechat/{weechat-9999.ebuild => weechat-1.4-r1.ebuild}   | 12 +++++++++---
 net-irc/weechat/weechat-9999.ebuild                          | 10 ++++++++--
 2 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/net-irc/weechat/weechat-9999.ebuild 
b/net-irc/weechat/weechat-1.4-r1.ebuild
similarity index 94%
copy from net-irc/weechat/weechat-9999.ebuild
copy to net-irc/weechat/weechat-1.4-r1.ebuild
index da16374..a348523 100644
--- a/net-irc/weechat/weechat-9999.ebuild
+++ b/net-irc/weechat/weechat-1.4-r1.ebuild
@@ -11,7 +11,7 @@ if [[ ${PV} == "9999" ]] ; then
        EGIT_REPO_URI="https://github.com/weechat/weechat.git";
 else
        SRC_URI="https://weechat.org/files/src/${P}.tar.bz2";
-       KEYWORDS="~amd64 ~ppc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux 
~x86-linux"
+       KEYWORDS="~amd64 ~x86"
 fi
 
 DESCRIPTION="Portable and multi-interface IRC client"
@@ -107,7 +107,6 @@ src_configure() {
                "-DENABLE_DEMO=OFF"
                "-DENABLE_GTK=OFF"
                "-DENABLE_JAVASCRIPT=OFF"
-               "-DPYTHON_EXECUTABLE=${PYTHON}"
                $(cmake-utils_use_enable alias)
                $(cmake-utils_use_enable doc)
                $(cmake-utils_use_enable charset)
@@ -131,7 +130,14 @@ src_configure() {
                $(cmake-utils_use_enable trigger)
                $(cmake-utils_use_enable xfer)
        )
-       [[ ${EPYTHON} == python3* ]] && mycmakeargs+=( $(cmake-utils_use_enable 
python PYTHON3) )
+
+       if use python; then
+               python_export PYTHON_LIBPATH
+               mycmakeargs+=(
+                       -DPYTHON_EXECUTABLE="${PYTHON}"
+                       -DPYTHON_LIBRARY="${PYTHON_LIBPATH}"
+               )
+       fi
 
        cmake-utils_src_configure
 }

diff --git a/net-irc/weechat/weechat-9999.ebuild 
b/net-irc/weechat/weechat-9999.ebuild
index da16374..2c9d55e 100644
--- a/net-irc/weechat/weechat-9999.ebuild
+++ b/net-irc/weechat/weechat-9999.ebuild
@@ -107,7 +107,6 @@ src_configure() {
                "-DENABLE_DEMO=OFF"
                "-DENABLE_GTK=OFF"
                "-DENABLE_JAVASCRIPT=OFF"
-               "-DPYTHON_EXECUTABLE=${PYTHON}"
                $(cmake-utils_use_enable alias)
                $(cmake-utils_use_enable doc)
                $(cmake-utils_use_enable charset)
@@ -131,7 +130,14 @@ src_configure() {
                $(cmake-utils_use_enable trigger)
                $(cmake-utils_use_enable xfer)
        )
-       [[ ${EPYTHON} == python3* ]] && mycmakeargs+=( $(cmake-utils_use_enable 
python PYTHON3) )
+
+       if use python; then
+               python_export PYTHON_LIBPATH
+               mycmakeargs+=(
+                       -DPYTHON_EXECUTABLE="${PYTHON}"
+                       -DPYTHON_LIBRARY="${PYTHON_LIBPATH}"
+               )
+       fi
 
        cmake-utils_src_configure
 }

Reply via email to