diff options
author | 2014-04-23 18:38:11 +0000 | |
---|---|---|
committer | 2014-04-23 18:38:11 +0000 | |
commit | c8e6a7e8a6ac08550bec3eb1bb9e4df4cd8d30b2 (patch) | |
tree | 7fcf151bd1a6428b8b820aaf03c3ac6d1bce7952 /sys-apps | |
parent | bump to 2.0.26 and remove old (diff) | |
download | gentoo-2-c8e6a7e8a6ac08550bec3eb1bb9e4df4cd8d30b2.tar.gz gentoo-2-c8e6a7e8a6ac08550bec3eb1bb9e4df4cd8d30b2.tar.bz2 gentoo-2-c8e6a7e8a6ac08550bec3eb1bb9e4df4cd8d30b2.zip |
Allow python modules to be built for multiple versions of python, thanks to Michal Gorny.
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 0x8568F528)
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/kmod/ChangeLog | 7 | ||||
-rw-r--r-- | sys-apps/kmod/kmod-17.ebuild | 40 | ||||
-rw-r--r-- | sys-apps/kmod/kmod-9999.ebuild | 40 |
3 files changed, 66 insertions, 21 deletions
diff --git a/sys-apps/kmod/ChangeLog b/sys-apps/kmod/ChangeLog index 5178c716d2e0..f98416d5d7cf 100644 --- a/sys-apps/kmod/ChangeLog +++ b/sys-apps/kmod/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-apps/kmod # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL -# $Header: /var/cvsroot/gentoo-x86/sys-apps/kmod/ChangeLog,v 1.145 2014/04/12 18:52:06 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/kmod/ChangeLog,v 1.146 2014/04/23 18:38:11 williamh Exp $ + + 23 Apr 2014; William Hubbs <williamh@gentoo.org> kmod-17.ebuild, + kmod-9999.ebuild: + Allow python modules to be built for multiple versions of python, thanks to + Michal Gorny. 12 Apr 2014; Samuli Suominen <ssuominen@gentoo.org> kmod-17.ebuild, kmod-9999.ebuild: diff --git a/sys-apps/kmod/kmod-17.ebuild b/sys-apps/kmod/kmod-17.ebuild index c16c379fd2fb..f228fc0d1680 100644 --- a/sys-apps/kmod/kmod-17.ebuild +++ b/sys-apps/kmod/kmod-17.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/kmod/kmod-17.ebuild,v 1.2 2014/04/12 18:52:06 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/kmod/kmod-17.ebuild,v 1.3 2014/04/23 18:38:11 williamh Exp $ EAPI=5 @@ -91,11 +91,11 @@ src_configure() { run_in_build_dir econf "${myeconfargs[@]}" "$@" } + BUILD_DIR="${WORKDIR}/build" + kmod_configure --disable-python + if use python; then python_parallel_foreach_impl kmod_configure --enable-python - else - BUILD_DIR="${WORKDIR}/build" - kmod_configure --disable-python fi } @@ -105,18 +105,38 @@ src_compile() { # wrt #494806 local MAKEOPTS="${MAKEOPTS} -j1" fi + + emake -C "${BUILD_DIR}" + if use python; then - python_foreach_impl run_in_build_dir emake - else - run_in_build_dir emake + local native_builddir=${BUILD_DIR} + + python_compile() { + echo 'python: $(pkgpyexec_LTLIBRARIES)' | + emake -C "${BUILD_DIR}" -f Makefile -f - python \ + VPATH="${native_builddir}:${S}" \ + native_builddir="${native_builddir}" \ + libkmod_python_kmod_{kmod,list,module,_util}_la_LIBADD='$(PYTHON_LIBS) $(native_builddir)/libkmod/libkmod.la' + } + + python_foreach_impl python_compile fi } src_install() { + emake -C "${BUILD_DIR}" DESTDIR="${D}" install + if use python; then - python_foreach_impl run_in_build_dir emake DESTDIR="${D}" install - else - run_in_build_dir emake DESTDIR="${D}" install + local native_builddir=${BUILD_DIR} + + python_install() { + emake -C "${BUILD_DIR}" DESTDIR="${D}" \ + VPATH="${native_builddir}:${S}" \ + install-pkgpyexecLTLIBRARIES \ + install-dist_pkgpyexecPYTHON + } + + python_foreach_impl python_install fi prune_libtool_files diff --git a/sys-apps/kmod/kmod-9999.ebuild b/sys-apps/kmod/kmod-9999.ebuild index 89b6d55e6567..06c14a04f9cd 100644 --- a/sys-apps/kmod/kmod-9999.ebuild +++ b/sys-apps/kmod/kmod-9999.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/kmod/kmod-9999.ebuild,v 1.73 2014/04/12 18:52:06 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/kmod/kmod-9999.ebuild,v 1.74 2014/04/23 18:38:11 williamh Exp $ EAPI=5 @@ -91,11 +91,11 @@ src_configure() { run_in_build_dir econf "${myeconfargs[@]}" "$@" } + BUILD_DIR="${WORKDIR}/build" + kmod_configure --disable-python + if use python; then python_parallel_foreach_impl kmod_configure --enable-python - else - BUILD_DIR="${WORKDIR}/build" - kmod_configure --disable-python fi } @@ -105,18 +105,38 @@ src_compile() { # wrt #494806 local MAKEOPTS="${MAKEOPTS} -j1" fi + + emake -C "${BUILD_DIR}" + if use python; then - python_foreach_impl run_in_build_dir emake - else - run_in_build_dir emake + local native_builddir=${BUILD_DIR} + + python_compile() { + echo 'python: $(pkgpyexec_LTLIBRARIES)' | + emake -C "${BUILD_DIR}" -f Makefile -f - python \ + VPATH="${native_builddir}:${S}" \ + native_builddir="${native_builddir}" \ + libkmod_python_kmod_{kmod,list,module,_util}_la_LIBADD='$(PYTHON_LIBS) $(native_builddir)/libkmod/libkmod.la' + } + + python_foreach_impl python_compile fi } src_install() { + emake -C "${BUILD_DIR}" DESTDIR="${D}" install + if use python; then - python_foreach_impl run_in_build_dir emake DESTDIR="${D}" install - else - run_in_build_dir emake DESTDIR="${D}" install + local native_builddir=${BUILD_DIR} + + python_install() { + emake -C "${BUILD_DIR}" DESTDIR="${D}" \ + VPATH="${native_builddir}:${S}" \ + install-pkgpyexecLTLIBRARIES \ + install-dist_pkgpyexecPYTHON + } + + python_foreach_impl python_install fi prune_libtool_files |