diff options
author | 2010-09-20 18:41:56 +0000 | |
---|---|---|
committer | 2010-09-20 18:41:56 +0000 | |
commit | b61da3d6fb294299bbd9889a12cbdbc2c9bde627 (patch) | |
tree | 43c9e297a20838277a92b97141e20b2220e9af0c /sys-libs | |
parent | Respect LDFLAGS (bug #338172). Simply a lot of the ebuild. (diff) | |
download | gentoo-2-b61da3d6fb294299bbd9889a12cbdbc2c9bde627.tar.gz gentoo-2-b61da3d6fb294299bbd9889a12cbdbc2c9bde627.tar.bz2 gentoo-2-b61da3d6fb294299bbd9889a12cbdbc2c9bde627.zip |
Version bump (bug #311641). Support installation for multiple Python ABIs, don't install .a, .la, .pyc and .pyo files into Python site-packages directories, fix tests with Python 3, avoid breaking strict-aliasing rules with Python 2 (bug #316953).
(Portage version: 2.2_rc85_p6/cvs/Linux x86_64)
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/libcap-ng/ChangeLog | 12 | ||||
-rw-r--r-- | sys-libs/libcap-ng/files/libcap-ng-0.6.4-fix_tests_building.patch | 27 | ||||
-rw-r--r-- | sys-libs/libcap-ng/files/libcap-ng-0.6.4-python.patch | 86 | ||||
-rw-r--r-- | sys-libs/libcap-ng/libcap-ng-0.6.4.ebuild | 109 |
4 files changed, 233 insertions, 1 deletions
diff --git a/sys-libs/libcap-ng/ChangeLog b/sys-libs/libcap-ng/ChangeLog index b0706099379d..9d2ad194805b 100644 --- a/sys-libs/libcap-ng/ChangeLog +++ b/sys-libs/libcap-ng/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for sys-libs/libcap-ng # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcap-ng/ChangeLog,v 1.14 2010/07/19 21:16:52 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcap-ng/ChangeLog,v 1.15 2010/09/20 18:41:56 arfrever Exp $ + +*libcap-ng-0.6.4 (20 Sep 2010) + + 20 Sep 2010; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> + +libcap-ng-0.6.4.ebuild, +files/libcap-ng-0.6.4-fix_tests_building.patch, + +files/libcap-ng-0.6.4-python.patch: + Version bump (bug #311641). Support installation for multiple Python ABIs, + don't install .a, .la, .pyc and .pyo files into Python site-packages + directories, fix tests with Python 3, avoid breaking strict-aliasing rules + with Python 2 (bug #316953). 19 Jul 2010; Jeroen Roovers <jer@gentoo.org> libcap-ng-0.6.2.ebuild: Stable for HPPA (bug #314523). diff --git a/sys-libs/libcap-ng/files/libcap-ng-0.6.4-fix_tests_building.patch b/sys-libs/libcap-ng/files/libcap-ng-0.6.4-fix_tests_building.patch new file mode 100644 index 000000000000..52a8e4ba2c5a --- /dev/null +++ b/sys-libs/libcap-ng/files/libcap-ng-0.6.4-fix_tests_building.patch @@ -0,0 +1,27 @@ +https://fedorahosted.org/libcap-ng/changeset/2 + +--- src/test/Makefile.am ++++ src/test/Makefile.am +@@ -1,5 +1,5 @@ + # Makefile.am -- +-# Copyright 2009 Red Hat Inc., Durham, North Carolina. ++# Copyright 2009,10 Red Hat Inc., Durham, North Carolina. + # All Rights Reserved. + # + # This library is free software; you can redistribute it and/or +@@ -20,6 +20,7 @@ + # Steve Grubb <sgrubb@redhat.com> + # + ++INCLUDES = -I${top_srcdir} -I${top_srcdir}/src + check_PROGRAMS = lib_test thread_test + TESTS = $(check_PROGRAMS) + +--- src/test/thread_test.c ++++ src/test/thread_test.c +@@ -1,4 +1,5 @@ + #include <stdio.h> ++#include <stdlib.h> + #include <cap-ng.h> + #include <pthread.h> + diff --git a/sys-libs/libcap-ng/files/libcap-ng-0.6.4-python.patch b/sys-libs/libcap-ng/files/libcap-ng-0.6.4-python.patch new file mode 100644 index 000000000000..fdf8a51cb69b --- /dev/null +++ b/sys-libs/libcap-ng/files/libcap-ng-0.6.4-python.patch @@ -0,0 +1,86 @@ +https://fedorahosted.org/libcap-ng/changeset/9 + +--- bindings/python/Makefile.am ++++ bindings/python/Makefile.am +@@ -29,7 +29,8 @@ + pyexec_PYTHON = capng.py + pyexec_LTLIBRARIES = _capng.la + pyexec_SOLIBRARIES = _capng.so +-_capng_la_LDFLAGS = -module -avoid-version ++_capng_la_CFLAGS = -shared ++_capng_la_LDFLAGS = -module -avoid-version -shared + _capng_la_HEADERS: $(top_builddir)/config.h + _capng_la_DEPENDENCIES =${top_srcdir}/src/cap-ng.h ${top_builddir}/src/libcap-ng.la + nodist__capng_la_SOURCES = capng_wrap.c +--- bindings/python/test/capng-test.py ++++ bindings/python/test/capng-test.py +@@ -10,15 +10,15 @@ + import capng + last = capng.CAP_LAST_CAP + +-print "Doing basic bit tests..." ++print("Doing basic bit tests...") + capng.capng_clear(capng.CAPNG_SELECT_BOTH) + if capng.capng_have_capabilities(capng.CAPNG_SELECT_BOTH) != capng.CAPNG_NONE: +- print "Failed clearing capabilities\n" ++ print("Failed clearing capabilities\n") + sys.exit(1) + + capng.capng_fill(capng.CAPNG_SELECT_BOTH) + if capng.capng_have_capabilities(capng.CAPNG_SELECT_BOTH) != capng.CAPNG_FULL: +- print "Failed filling capabilities" ++ print("Failed filling capabilities") + sys.exit(1) + + text = capng.capng_print_caps_numeric(capng.CAPNG_PRINT_BUFFER, capng.CAPNG_SELECT_CAPS) +@@ -26,42 +26,42 @@ + if len < 80 and last > 30: + last = 30 + +-print "Doing advanced bit tests for %d capabilities...\n" % (last) ++print("Doing advanced bit tests for %d capabilities...\n" % (last)) + for i in range(last+1): + capng.capng_clear(capng.CAPNG_SELECT_BOTH) + rc = capng.capng_update(capng.CAPNG_ADD, capng.CAPNG_EFFECTIVE, i) + if rc: +- print "Failed update test 1" ++ print("Failed update test 1") + sys.exit(1) + + rc = capng.capng_have_capability(capng.CAPNG_EFFECTIVE, int(i)) + if rc <= capng.CAPNG_NONE: +- print "Failed have capability test 1" ++ print("Failed have capability test 1") + capng.capng_print_caps_numeric(capng.CAPNG_PRINT_STDOUT, capng.CAPNG_SELECT_CAPS) + sys.exit(1) + + if capng.capng_have_capabilities(capng.CAPNG_SELECT_CAPS) != capng.CAPNG_PARTIAL: +- print "Failed have capabilities test 1" ++ print("Failed have capabilities test 1") + sys.exit(1) + + capng.capng_fill(capng.CAPNG_SELECT_BOTH) + rc = capng.capng_update(capng.CAPNG_DROP, capng.CAPNG_EFFECTIVE, i) + if rc: +- print "Failed update test 3" ++ print("Failed update test 3") + sys.exit(1) + + if capng.capng_have_capabilities(capng.CAPNG_SELECT_CAPS)!=capng.CAPNG_PARTIAL: +- print "Failed have capabilities test 3" ++ print("Failed have capabilities test 3") + capng.capng_print_caps_numeric(capng.CAPNG_PRINT_STDOUT, capng.CAPNG_SELECT_CAPS) + sys.exit(1) + + rc = capng.capng_update(capng.CAPNG_ADD, capng.CAPNG_EFFECTIVE, i) + if rc: +- print "Failed update test 4" ++ print("Failed update test 4") + sys.exit(1) + + if capng.capng_have_capabilities(capng.CAPNG_SELECT_CAPS) != capng.CAPNG_FULL: +- print "Failed have capabilities test 4" ++ print("Failed have capabilities test 4") + capng.capng_print_caps_numeric(capng.CAPNG_PRINT_STDOUT, capng.CAPNG_SELECT_CAPS) + sys.exit(1) + diff --git a/sys-libs/libcap-ng/libcap-ng-0.6.4.ebuild b/sys-libs/libcap-ng/libcap-ng-0.6.4.ebuild new file mode 100644 index 000000000000..59ddb65f208d --- /dev/null +++ b/sys-libs/libcap-ng/libcap-ng-0.6.4.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcap-ng/libcap-ng-0.6.4.ebuild,v 1.1 2010/09/20 18:41:56 arfrever Exp $ + +EAPI="2" +SUPPORT_PYTHON_ABIS="1" + +inherit eutils autotools flag-o-matic python + +DESCRIPTION="POSIX 1003.1e capabilities" +HOMEPAGE="http://people.redhat.com/sgrubb/libcap-ng/" +SRC_URI="http://people.redhat.com/sgrubb/libcap-ng/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86" +IUSE="python" + +RDEPEND="sys-apps/attr + python? ( dev-lang/python )" +DEPEND="${RDEPEND} + sys-kernel/linux-headers + python? ( dev-lang/swig )" + +PYTHON_CFLAGS=("2.* + -fno-strict-aliasing") + +pkg_setup() { + use python && python_pkg_setup +} + +src_prepare() { + # Disable byte-compilation of Python modules. + echo "#!/bin/sh" > py-compile + + # Python bindings are built/tested/installed manually. + sed -e "/^SUBDIRS/s/ python//" -i bindings/Makefile.am + + epatch "${FILESDIR}"/${PN}-gentoo.patch + epatch "${FILESDIR}"/${P}-python.patch + epatch "${FILESDIR}"/${P}-fix_tests_building.patch + eautoreconf + + use sparc && replace-flags -O? -O0 +} + +src_configure() { + econf $(use_enable python) +} + +src_compile() { + default + + if use python; then + python_copy_sources bindings/python + + building() { + emake \ + CFLAGS="${CFLAGS}" \ + PYTHON_VERSION="$(python_get_version)" \ + pyexecdir="$(python_get_sitedir)" \ + pythondir="$(python_get_sitedir)" + } + python_execute_function -s --source-dir bindings/python building + fi +} + +src_test() { + default + + if use python; then + testing() { + emake \ + PYTHON_VERSION="$(python_get_version)" \ + pyexecdir="$(python_get_sitedir)" \ + pythondir="$(python_get_sitedir)" \ + TESTS_ENVIRONMENT="PYTHONPATH=..:../.libs" \ + check + } + python_execute_function -s --source-dir bindings/python testing + fi +} + +src_install() { + emake install DESTDIR="${D}" || die "emake install failed" + + if use python; then + installation() { + emake \ + DESTDIR="${D}" \ + PYTHON_VERSION="$(python_get_version)" \ + pyexecdir="$(python_get_sitedir)" \ + pythondir="$(python_get_sitedir)" \ + install + } + python_execute_function -s --source-dir bindings/python installation + + python_clean_installation_image + fi + + dodoc ChangeLog README +} + +pkg_postinst() { + use python && python_mod_optimize capng.py +} + +pkg_postrm() { + use python && python_mod_cleanup capng.py +} |