commit:     a320ae500c5ce81b923211e01c72105c068958b0
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 21 19:50:45 2017 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Sep 21 19:51:37 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a320ae50

net-libs/nfqueue-bindings: fix python_export in src_prepare (bug 606528)

Closes: https://bugs.gentoo.org/606528
Package-Manager: Portage-2.3.10, Repoman-2.3.3

 .../nfqueue-bindings/nfqueue-bindings-0.5.ebuild     | 20 +++++++++++++-------
 .../nfqueue-bindings/nfqueue-bindings-0.6.ebuild     | 20 +++++++++++++-------
 2 files changed, 26 insertions(+), 14 deletions(-)

diff --git a/net-libs/nfqueue-bindings/nfqueue-bindings-0.5.ebuild 
b/net-libs/nfqueue-bindings/nfqueue-bindings-0.5.ebuild
index 9b53a58b9d8..864546a6d19 100644
--- a/net-libs/nfqueue-bindings/nfqueue-bindings-0.5.ebuild
+++ b/net-libs/nfqueue-bindings/nfqueue-bindings-0.5.ebuild
@@ -47,13 +47,19 @@ pkg_setup() {
 }
 
 src_prepare() {
-       # Fix Perl destination directory
-       perl_set_version
-       sed -i "s|\${LIB_INSTALL_DIR}/perl\${PERL_VERSION}/|${VENDOR_ARCH}|" 
perl/CMakeLists.txt || die
-       sed -i 
"s|\${LIB_INSTALL_DIR}/python\${PYTHON_VERSION}/dist-packages/|$(python_get_sitedir)|"
 python/CMakeLists.txt || die
-       # Disable Perl/Python from USE flags
-       use perl || sed -i 's|ADD_SUBDIRECTORY(perl)||' CMakeLists.txt || die
-       use python || sed -i 's|ADD_SUBDIRECTORY(python)||' CMakeLists.txt || 
die
+       if use perl; then
+               # Fix Perl destination directory
+               perl_set_version
+               sed -i 
"s|\${LIB_INSTALL_DIR}/perl\${PERL_VERSION}/|${VENDOR_ARCH}|" 
perl/CMakeLists.txt || die
+       else
+               sed -i 's|ADD_SUBDIRECTORY(perl)||' CMakeLists.txt || die
+       fi
+
+       if use python; then
+               sed -i 
"s|\${LIB_INSTALL_DIR}/python\${PYTHON_VERSION}/dist-packages/|$(python_get_sitedir)|"
 python/CMakeLists.txt || die
+       else
+               sed -i 's|ADD_SUBDIRECTORY(python)||' CMakeLists.txt || die
+       fi
 }
 
 src_install() {

diff --git a/net-libs/nfqueue-bindings/nfqueue-bindings-0.6.ebuild 
b/net-libs/nfqueue-bindings/nfqueue-bindings-0.6.ebuild
index 2282bae8496..6c7f4afc4a1 100644
--- a/net-libs/nfqueue-bindings/nfqueue-bindings-0.6.ebuild
+++ b/net-libs/nfqueue-bindings/nfqueue-bindings-0.6.ebuild
@@ -45,13 +45,19 @@ pkg_setup() {
 }
 
 src_prepare() {
-       # Fix Perl destination directory
-       perl_set_version
-       sed -i "s|\${LIB_INSTALL_DIR}/perl\${PERL_VERSION}/|${VENDOR_ARCH}|" 
perl/CMakeLists.txt || die
-       sed -i 
"s|\${LIB_INSTALL_DIR}/python\${PYTHON_VERSION}/dist-packages/|$(python_get_sitedir)|"
 python/CMakeLists.txt || die
-       # Disable Perl/Python from USE flags
-       use perl || sed -i 's|ADD_SUBDIRECTORY(perl)||' CMakeLists.txt || die
-       use python || sed -i 's|ADD_SUBDIRECTORY(python)||' CMakeLists.txt || 
die
+       if use perl; then
+               # Fix Perl destination directory
+               perl_set_version
+               sed -i 
"s|\${LIB_INSTALL_DIR}/perl\${PERL_VERSION}/|${VENDOR_ARCH}|" 
perl/CMakeLists.txt || die
+       else
+               sed -i 's|ADD_SUBDIRECTORY(perl)||' CMakeLists.txt || die
+       fi
+
+       if use python; then
+               sed -i 
"s|\${LIB_INSTALL_DIR}/python\${PYTHON_VERSION}/dist-packages/|$(python_get_sitedir)|"
 python/CMakeLists.txt || die
+       else
+               sed -i 's|ADD_SUBDIRECTORY(python)||' CMakeLists.txt || die
+       fi
 }
 
 src_install() {

Reply via email to