diff options
author | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2011-02-06 21:37:43 +0000 |
---|---|---|
committer | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2011-02-06 21:37:43 +0000 |
commit | cf521bc72b1dfe782161180948d79165c64f6b2d (patch) | |
tree | 8faeb9f27dfd0d7a7116fc44b508f5755b5ddb5c /app-admin | |
parent | Drop to ~mips (diff) | |
download | historical-cf521bc72b1dfe782161180948d79165c64f6b2d.tar.gz historical-cf521bc72b1dfe782161180948d79165c64f6b2d.tar.bz2 historical-cf521bc72b1dfe782161180948d79165c64f6b2d.zip |
Set SUPPORT_PYTHON_ABIS (bug #308279). Fix building with SWIG 2.
Package-Manager: portage-2.2.0_alpha20/cvs/Linux x86_64
Diffstat (limited to 'app-admin')
-rw-r--r-- | app-admin/setools/ChangeLog | 8 | ||||
-rw-r--r-- | app-admin/setools/Manifest | 14 | ||||
-rw-r--r-- | app-admin/setools/setools-3.3.7.ebuild | 104 |
3 files changed, 98 insertions, 28 deletions
diff --git a/app-admin/setools/ChangeLog b/app-admin/setools/ChangeLog index 52247b50a05a..4df0f844aa5a 100644 --- a/app-admin/setools/ChangeLog +++ b/app-admin/setools/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for app-admin/setools -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/setools/ChangeLog,v 1.62 2010/05/12 13:30:25 pebenito Exp $ +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/setools/ChangeLog,v 1.63 2011/02/06 21:37:43 arfrever Exp $ + + 06 Feb 2011; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> + setools-3.3.7.ebuild: + Set SUPPORT_PYTHON_ABIS (bug #308279). Fix building with SWIG 2. *setools-3.3.7 (12 May 2010) diff --git a/app-admin/setools/Manifest b/app-admin/setools/Manifest index b43720ae1a65..5a09c8b7a645 100644 --- a/app-admin/setools/Manifest +++ b/app-admin/setools/Manifest @@ -1,6 +1,3 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - AUX apol_tcl_fc.c.diff 1077 RMD160 1db09fde3eb402aa9fe92c0740568bdef7b7586d SHA1 350110b8beb653b6c7b5052530de3d34ae88fc1e SHA256 3457cbba134699babd6882655cfc1957fb0768591690736c4a67c71310ac09b9 AUX setools-3.3.6-headers.diff 3278 RMD160 d42b64452e61e584bf6e391058fd06d0c74d4051 SHA1 516f50ee1a8a5084ec64fccb918b190e6efc1fa1 SHA256 97a3c02386cc77800e7fe8c69e84824802782db3c5f2903d2e4057a3fd5a552d DIST setools-2.4.tar.bz2 1181584 RMD160 67c77950a4138300a3da4f17ab0d51b2d482bc18 SHA1 3dd26552388180087b11884857c3f5e5c8058acf SHA256 fcd0bc7390275cce8b4c0dbf8cc3471c3ab73724b1b373d40625cc477794fc2e @@ -12,13 +9,6 @@ EBUILD setools-2.4.ebuild 1811 RMD160 fbb9be57e3712d12d6c4c032aa810bce6ec025f8 S EBUILD setools-3.3.4.ebuild 1491 RMD160 295c5f51b4ef1ebf3289c139462a049ba049d4ba SHA1 288540aaf519a3b7eb351a3378b5b1e089b6d196 SHA256 6f9815e9c57abe2c5cfde0e6025cfed6a86fc7c7c5913d7093b119c9a534eeb0 EBUILD setools-3.3.5.ebuild 1492 RMD160 35825d3e6760a20b2d436d82d385496e23912d83 SHA1 da5a36b9e4a0518f24851cf57d1daa9cf386572a SHA256 58424c71c16a723554673eab34d46ba6af6f69bc87a77cd6642a80c8876ab89a EBUILD setools-3.3.6.ebuild 1730 RMD160 4a1f8457412aadb79348e9e8be68fb90bd1810dc SHA1 9e15510cd01f09426e7d918d3bfe2f2a67ecb60e SHA256 12cd55794ed03565c151948b41590390d1ba198dbc0b1f95f5de842b6697b98c -EBUILD setools-3.3.7.ebuild 1694 RMD160 8c1b3ea5449ea0af92f704dda36f45a729462c93 SHA1 75a3371664467caab764a3ad9462c7450d649c5d SHA256 b1d973cd5c2c9f8b67f7e25241e62c6798c4f1c2327b6f763875f61da5940833 -MISC ChangeLog 8438 RMD160 034a4b7eb6572264dbc69c65f38832bece664ba9 SHA1 cdbc99a84e4a22727490233ebbb52dd571d76839 SHA256 565b0574ac026bd2f270007cae754a72898774d1eee3261689c3fa3fab7d7f03 +EBUILD setools-3.3.7.ebuild 3957 RMD160 3ce52d9a9a6b1f9a2fb7785cad3b27745f51e202 SHA1 944761732af8a1c3dc42f045f9f04cc67bed16c3 SHA256 557c702e257b91aba93c3a38bccbee09a2603896fd43c367af2bb4b4e09c66b0 +MISC ChangeLog 8603 RMD160 8c4ebfea9be2af84b4c4dc676f102e1997f0ed46 SHA1 29ea377bb4b49bae5ce3b1eab3f593acaf69d4e5 SHA256 829b0bc0a44c286acf699c51491c307e70de3e1c1ae971eb034646242d9343ff MISC metadata.xml 369 RMD160 c37d0796a65a30cccd5d520514223758d68cff47 SHA1 47f913e33c294a7287f04669b9c5279009be7fdf SHA256 58f5b1ba9b602226f7a76b1ebd8edc824e3488f5c9bce9cc53fc2b9dcf2ef84f ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.14 (GNU/Linux) - -iEYEARECAAYFAkvqrYIACgkQWczwbOluxW+ZVwCfToyMLyl//FyCtYzoHgi6UkY+ -VoMAoOiKIotlGw2T8El/W2GnfXfCzdcv -=Hi8g ------END PGP SIGNATURE----- diff --git a/app-admin/setools/setools-3.3.7.ebuild b/app-admin/setools/setools-3.3.7.ebuild index 57c2a645a5fe..ef67aeffffd7 100644 --- a/app-admin/setools/setools-3.3.7.ebuild +++ b/app-admin/setools/setools-3.3.7.ebuild @@ -1,8 +1,13 @@ -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/setools/setools-3.3.7.ebuild,v 1.1 2010/05/12 13:30:25 pebenito Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/setools/setools-3.3.7.ebuild,v 1.2 2011/02/06 21:37:43 arfrever Exp $ -inherit java-pkg-opt-2 autotools +EAPI="2" +PYTHON_DEPEND="python? 2" +SUPPORT_PYTHON_ABIS="1" +RESTRICT_PYTHON_ABIS="3.* *-jython" + +inherit autotools java-pkg-opt-2 python DESCRIPTION="SELinux policy tools" HOMEPAGE="http://www.tresys.com/selinux/selinux_policy_tools.shtml" @@ -24,10 +29,7 @@ DEPEND=">=sys-libs/libsepol-2.0.37 >=dev-lang/swig-1.3.28 >=virtual/jdk-1.4 ) - python? ( - >=dev-lang/python-2.4 - >=dev-lang/swig-1.3.28 - ) + python? ( >=dev-lang/swig-1.3.28 ) X? ( >=dev-lang/tk-8.4.9 >=gnome-base/libglade-2.0 @@ -39,7 +41,6 @@ RDEPEND=">=sys-libs/libsepol-2.0.37 >=dev-db/sqlite-3.2 dev-libs/libxml2 java? ( >=virtual/jre-1.4 ) - python? ( >=dev-lang/python-2.4 ) X? ( >=dev-lang/tk-8.4.9 >=dev-tcltk/bwidget-1.8 @@ -47,14 +48,38 @@ RDEPEND=">=sys-libs/libsepol-2.0.37 >=x11-libs/gtk+-2.8 )" -src_unpack() { - unpack ${A} +RESTRICT="test" + +pkg_setup() { + if use java; then + java-pkg-opt-2_pkg_setup + fi + + if use python; then + python_pkg_setup + PYTHON_DIRS="libapol/swig/python libpoldiff/swig/python libqpol/swig/python libseaudit/swig/python libsefs/swig/python" + fi +} + +src_prepare() { + # Disable broken check for SWIG version. + sed -e "s/AC_PROG_SWIG(1.3.28)/AC_PROG_SWIG/" -i configure.ac || die "sed failed" + + local dir + for dir in ${PYTHON_DIRS}; do + # Python bindings are built/installed manually. + sed -e "s/MAYBE_PYSWIG = python/MAYBE_PYSWIG =/" -i ${dir%python}Makefile.am || die "sed failed" + # Make PYTHON_LDFLAGS replaceable during running `make`. + sed -e "/^AM_LDFLAGS =/s/@PYTHON_LDFLAGS@/\$(PYTHON_LDFLAGS)/" -i ${dir}/Makefile.am || die "sed failed" + done - cd "${S}" eautoreconf + + # Disable byte-compilation of Python modules. + echo '#!/bin/sh' > py-compile } -src_compile() { +src_configure() { econf \ --with-java-prefix=${JAVA_HOME} \ --disable-selinux-check \ @@ -68,10 +93,61 @@ src_compile() { # work around swig c99 issues. it does not require # c99 anyway. sed -i -e 's/-std=gnu99//' "${S}/libseaudit/swig/python/Makefile" +} - emake || die +src_compile() { + default + + if use python; then + local dir + for dir in ${PYTHON_DIRS}; do + python_copy_sources ${dir} + building() { + emake \ + SWIG_PYTHON_CPPFLAGS="-I$(python_get_includedir)" \ + PYTHON_LDFLAGS="$(python_get_library -l)" \ + pyexecdir="$(python_get_sitedir)" \ + pythondir="$(python_get_sitedir)" + } + python_execute_function \ + --action-message "Building of Python bindings from ${dir} directory with \$(python_get_implementation) \$(python_get_version)" \ + --failure-message "Building of Python bindings from ${dir} directory with \$(python_get_implementation) \$(python_get_version) failed" \ + -s --source-dir ${dir} \ + building + done + fi } src_install() { - emake DESTDIR="${D}" install || die "install failed." + emake DESTDIR="${D}" install || die "emake install failed" + + if use python; then + local dir + for dir in ${PYTHON_DIRS}; do + installation() { + emake \ + DESTDIR="${D}" \ + pyexecdir="$(python_get_sitedir)" \ + pythondir="$(python_get_sitedir)" \ + install + } + python_execute_function \ + --action-message "Installation of Python bindings from ${dir} directory with \$(python_get_implementation) \$(python_get_version)" \ + --failure-message "Installation of Python bindings from ${dir} directory with \$(python_get_implementation) \$(python_get_version) failed" \ + -s --source-dir ${dir} \ + installation + done + fi +} + +pkg_postinst() { + if use python; then + python_mod_optimize setools + fi +} + +pkg_postrm() { + if use python; then + python_mod_cleanup setools + fi } |