summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2011-02-06 16:09:41 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2011-02-06 16:09:41 +0000
commit258e712a92499dce33236a7760eec365faf8a7e7 (patch)
treefdcc13145828eaa0a8b6216dd064a44621646e5c /sys-libs
parentFix bug #353811 (diff)
downloadgentoo-2-258e712a92499dce33236a7760eec365faf8a7e7.tar.gz
gentoo-2-258e712a92499dce33236a7760eec365faf8a7e7.tar.bz2
gentoo-2-258e712a92499dce33236a7760eec365faf8a7e7.zip
Add "python" and "ruby" USE flags.
(Portage version: 2.2.0_alpha20/cvs/Linux x86_64)
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/libsemanage/ChangeLog6
-rw-r--r--sys-libs/libsemanage/libsemanage-2.0.45.ebuild56
2 files changed, 43 insertions, 19 deletions
diff --git a/sys-libs/libsemanage/ChangeLog b/sys-libs/libsemanage/ChangeLog
index 2befba26ec1a..95cccf291dc7 100644
--- a/sys-libs/libsemanage/ChangeLog
+++ b/sys-libs/libsemanage/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-libs/libsemanage
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/libsemanage/ChangeLog,v 1.31 2011/02/05 23:02:24 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/libsemanage/ChangeLog,v 1.32 2011/02/06 16:09:41 arfrever Exp $
+
+ 06 Feb 2011; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
+ libsemanage-2.0.45.ebuild:
+ Add "python" and "ruby" USE flags.
05 Feb 2011; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
libsemanage-2.0.45.ebuild:
diff --git a/sys-libs/libsemanage/libsemanage-2.0.45.ebuild b/sys-libs/libsemanage/libsemanage-2.0.45.ebuild
index 8e93d01f25db..d22a8c5f5e57 100644
--- a/sys-libs/libsemanage/libsemanage-2.0.45.ebuild
+++ b/sys-libs/libsemanage/libsemanage-2.0.45.ebuild
@@ -1,9 +1,9 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/libsemanage/libsemanage-2.0.45.ebuild,v 1.3 2011/02/06 14:57:34 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/libsemanage/libsemanage-2.0.45.ebuild,v 1.4 2011/02/06 16:09:41 arfrever Exp $
EAPI="2"
-PYTHON_DEPEND="*"
+PYTHON_DEPEND="python? *"
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="*-jython"
@@ -19,13 +19,14 @@ SRC_URI="http://userspace.selinuxproject.org/releases/20100525/devel/${P}.tar.gz
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE=""
+IUSE="python ruby"
RDEPEND=">=sys-libs/libsepol-${SEPOL_VER}
>=sys-libs/libselinux-${SELNX_VER}
- dev-libs/ustr"
+ dev-libs/ustr
+ ruby? ( dev-lang/ruby )"
DEPEND="${RDEPEND}
- dev-lang/swig"
+ ruby? ( dev-lang/swig )"
# tests are not meant to be run outside of the
# full SELinux userland repo
@@ -59,11 +60,17 @@ src_prepare() {
src_compile() {
emake AR="$(tc-getAR)" CC="$(tc-getCC)" all || die
- python_copy_sources src
- building() {
- emake CC="$(tc-getCC)" PYLIBVER="python$(python_get_version)" pywrap
- }
- python_execute_function -s --source-dir src building
+ if use python; then
+ python_copy_sources src
+ building() {
+ emake CC="$(tc-getCC)" PYLIBVER="python$(python_get_version)" pywrap
+ }
+ python_execute_function -s --source-dir src building
+ fi
+
+ if use ruby; then
+ emake -C src CC="$(tc-getCC)" rubywrap || die
+ fi
}
src_install() {
@@ -74,20 +81,33 @@ src_install() {
install || die
dosym "../../$(get_libdir)/libsemanage.so.1" "/usr/$(get_libdir)/libsemanage.so" || die
- installation() {
- emake \
+ if use python; then
+ installation() {
+ emake \
+ DESTDIR="${D}" \
+ PYLIBVER="python$(python_get_version)" \
+ LIBDIR="${D}usr/$(get_libdir)" \
+ install-pywrap
+ }
+ python_execute_function -s --source-dir src installation
+ fi
+
+ if use ruby; then
+ emake -C src \
DESTDIR="${D}" \
- PYLIBVER="python$(python_get_version)" \
LIBDIR="${D}usr/$(get_libdir)" \
- install-pywrap
- }
- python_execute_function -s --source-dir src installation
+ install-rubywrap || die
+ fi
}
pkg_postinst() {
- python_mod_optimize semanage.py
+ if use python; then
+ python_mod_optimize semanage.py
+ fi
}
pkg_postrm() {
- python_mod_cleanup semanage.py
+ if use python; then
+ python_mod_cleanup semanage.py
+ fi
}