diff options
author | Sven Vermeulen <swift@gentoo.org> | 2012-06-25 20:05:08 +0000 |
---|---|---|
committer | Sven Vermeulen <swift@gentoo.org> | 2012-06-25 20:05:08 +0000 |
commit | 7729ba6a05db43265d6e269fa98691cd054a3c23 (patch) | |
tree | 0298325c36444771cdbb2e67f71cffa6fa503112 /sys-libs | |
parent | arm stable, bug #422071 (diff) | |
download | historical-7729ba6a05db43265d6e269fa98691cd054a3c23.tar.gz historical-7729ba6a05db43265d6e269fa98691cd054a3c23.tar.bz2 historical-7729ba6a05db43265d6e269fa98691cd054a3c23.zip |
Fix python 3 support, needed for bugs #408179 and #415091
Package-Manager: portage-2.1.10.49/cvs/Linux x86_64
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/libsemanage/ChangeLog | 7 | ||||
-rw-r--r-- | sys-libs/libsemanage/Manifest | 4 | ||||
-rw-r--r-- | sys-libs/libsemanage/libsemanage-2.1.6-r2.ebuild | 132 |
3 files changed, 141 insertions, 2 deletions
diff --git a/sys-libs/libsemanage/ChangeLog b/sys-libs/libsemanage/ChangeLog index 0295d091caa7..cb7b93a34873 100644 --- a/sys-libs/libsemanage/ChangeLog +++ b/sys-libs/libsemanage/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-libs/libsemanage # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/libsemanage/ChangeLog,v 1.48 2012/05/13 12:42:04 swift Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libsemanage/ChangeLog,v 1.49 2012/06/25 20:05:08 swift Exp $ + +*libsemanage-2.1.6-r2 (25 Jun 2012) + + 25 Jun 2012; <swift@gentoo.org> +libsemanage-2.1.6-r2.ebuild: + Fix python3 support 13 May 2012; <swift@gentoo.org> -libsemanage-2.1.0.ebuild: Removing obsoleted ebuild diff --git a/sys-libs/libsemanage/Manifest b/sys-libs/libsemanage/Manifest index af1e30e6b7e7..4db6bf5d8e9e 100644 --- a/sys-libs/libsemanage/Manifest +++ b/sys-libs/libsemanage/Manifest @@ -1,5 +1,7 @@ DIST libsemanage-2.1.6-nolevel.patch.gz 335 RMD160 6ee5142a5211e1144d83a37b2402148a238bed81 SHA1 39328a124f9d2f85538bb3c2fb81a0e2ee9f5453 SHA256 a8b340280c4bca90935fef12d5f212712627f91c207cf00daaa7b222962562ad DIST libsemanage-2.1.6.tar.gz 135818 RMD160 82632efe1cd178ee330e5336a4190e91310820f3 SHA1 f5c4c25a140e4c4134e3ac80034339aad3e29e6f SHA256 64e6849fe50fb463ec0ba24653a26e3452fa4aaa7d7e192213d5c5a7c525aebb +DIST patchbundle-libsemanage-2.1.6-gentoo-r2.tar.gz 759 RMD160 115dc6e5767141f71dbe5383f5ce61a5ff76e1da SHA1 5610a7ba847fa5af5ea4b46620bcec83b957f976 SHA256 c5c92710a7e27183dc6058cad4fe1a1587a9442ef30be791629e8034676840de +EBUILD libsemanage-2.1.6-r2.ebuild 4115 RMD160 14a96cacb6768a3c928ff9ab6f08d6c30e860042 SHA1 6487d53582fd32a9703c87c0654044559275756a SHA256 8b0712ef32a0ebc837e2811ca40aea4dd3bd141846cee553acc876abb5a3ca1f EBUILD libsemanage-2.1.6.ebuild 4068 RMD160 a1b4773d4aa7a48a26cdf1a0a99c098474edb8b0 SHA1 dfbf143bb69beab193f93a3495c2e1d62abef5bc SHA256 8ac5653004f93762261b251a0e9ce80291c2bbdf0726d2105725e730190f8fe0 -MISC ChangeLog 6706 RMD160 7d29db5241ab5bd02f89d4c294cd2c0c25bb46fb SHA1 08bd97ba23942e33e6c477943dc3c934b08847fb SHA256 7ceeda2476f6c99d7dcf53f755ad8724606871fda9cda01ad6e0ee1333b93ac3 +MISC ChangeLog 6830 RMD160 c52f849323a96dea83fad7a56e464d2ca39350e6 SHA1 44558de84a4b9e6c3306f4c4c48824f784b24111 SHA256 7ba3112a1920d84acd1f6449b02a86d29e603920e80f03df3458e60f83f4aa4b MISC metadata.xml 233 RMD160 67c97a29a07e867fd805293f51d8062063b3b0c2 SHA1 0c5466363e920e19c88f351f6e9011f48d94fd05 SHA256 c5a240155da9b7588e31ff668d3656486a16868654c076f7e1aea823a6b85ae9 diff --git a/sys-libs/libsemanage/libsemanage-2.1.6-r2.ebuild b/sys-libs/libsemanage/libsemanage-2.1.6-r2.ebuild new file mode 100644 index 000000000000..d804293926f4 --- /dev/null +++ b/sys-libs/libsemanage/libsemanage-2.1.6-r2.ebuild @@ -0,0 +1,132 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libsemanage/libsemanage-2.1.6-r2.ebuild,v 1.1 2012/06/25 20:05:08 swift Exp $ + +EAPI="3" +# Support for 4 depends on python.eclass +PYTHON_DEPEND="python? *" +SUPPORT_PYTHON_ABIS="1" +RESTRICT_PYTHON_ABIS="*-jython" + +inherit multilib python toolchain-funcs eutils + +SEPOL_VER="2.1.4" +SELNX_VER="2.1.9" + +DESCRIPTION="SELinux kernel and policy management library" +HOMEPAGE="http://userspace.selinuxproject.org" +SRC_URI="http://userspace.selinuxproject.org/releases/20120216/${P}.tar.gz + http://dev.gentoo.org/~swift/patches/libsemanage/patchbundle-libsemanage-2.1.6-gentoo-r2.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="python ruby" + +RDEPEND=">=sys-libs/libsepol-${SEPOL_VER} + >=sys-libs/libselinux-${SELNX_VER} + dev-libs/ustr + ruby? ( dev-lang/ruby )" +DEPEND="${RDEPEND} + sys-devel/bison + sys-devel/flex + ruby? ( >=dev-lang/swig-2.0.4-r1 ) + python? ( >=dev-lang/swig-2.0.4-r1 )" + +# tests are not meant to be run outside of the +# full SELinux userland repo +RESTRICT="test" + +pkg_setup() { + if use python; then + python_pkg_setup + fi +} + +src_prepare() { + echo "# Set this to true to save the linked policy." >> "${S}/src/semanage.conf" + echo "# This is normally only useful for analysis" >> "${S}/src/semanage.conf" + echo "# or debugging of policy." >> "${S}/src/semanage.conf" + echo "save-linked=false" >> "${S}/src/semanage.conf" + echo >> "${S}/src/semanage.conf" + echo "# Set this to 0 to disable assertion checking." >> "${S}/src/semanage.conf" + echo "# This should speed up building the kernel policy" >> "${S}/src/semanage.conf" + echo "# from policy modules, but may leave you open to" >> "${S}/src/semanage.conf" + echo "# dangerous rules which assertion checking" >> "${S}/src/semanage.conf" + echo "# would catch." >> "${S}/src/semanage.conf" + echo "expand-check=1" >> "${S}/src/semanage.conf" + echo >> "${S}/src/semanage.conf" + echo "# Modules in the module store can be compressed" >> "${S}/src/semanage.conf" + echo "# with bzip2. Set this to the bzip2 blocksize" >> "${S}/src/semanage.conf" + echo "# 1-9 when compressing. The higher the number," >> "${S}/src/semanage.conf" + echo "# the more memory is traded off for disk space." >> "${S}/src/semanage.conf" + echo "# Set to 0 to disable bzip2 compression." >> "${S}/src/semanage.conf" + echo "bzip-blocksize=0" >> "${S}/src/semanage.conf" + echo >> "${S}/src/semanage.conf" + echo "# Reduce memory usage for bzip2 compression and" >> "${S}/src/semanage.conf" + echo "# decompression of modules in the module store." >> "${S}/src/semanage.conf" + echo "bzip-small=true" >> "${S}/src/semanage.conf" + + EPATCH_MULTI_MSG="Applying libsemanage patches ... " \ + EPATCH_SUFFIX="patch" \ + EPATCH_SOURCE="${WORKDIR}/gentoo-patches" \ + EPATCH_FORCE="yes" \ + epatch +} + +src_compile() { + emake AR="$(tc-getAR)" CC="$(tc-getCC)" all || die + + if use python; then + python_copy_sources src + building() { + emake CC="$(tc-getCC)" PYLIBVER="python$(python_get_version)" PYPREFIX="python-$(python_get_version)" "$@" + } + python_execute_function -s --source-dir src building -- swigify + python_execute_function -s --source-dir src building -- pywrap + fi + + if use ruby; then + emake -C src CC="$(tc-getCC)" rubywrap || die + fi +} + +src_install() { + emake \ + DESTDIR="${D}" \ + LIBDIR="${D}usr/$(get_libdir)" \ + SHLIBDIR="${D}$(get_libdir)" \ + install || die + dosym "../../$(get_libdir)/libsemanage.so.1" "/usr/$(get_libdir)/libsemanage.so" || die + + if use python; then + installation() { + emake \ + DESTDIR="${D}" \ + PYLIBVER="python$(python_get_version)" \ + PYPREFIX="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}" \ + LIBDIR="${D}usr/$(get_libdir)" \ + install-rubywrap || die + fi +} + +pkg_postinst() { + if use python; then + python_mod_optimize semanage.py + fi +} + +pkg_postrm() { + if use python; then + python_mod_cleanup semanage.py + fi +} |