williamh 14/04/23 18:38:11 Modified: kmod-9999.ebuild kmod-17.ebuild ChangeLog Log: 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)
Revision Changes Path 1.74 sys-apps/kmod/kmod-9999.ebuild file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/kmod/kmod-9999.ebuild?rev=1.74&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/kmod/kmod-9999.ebuild?rev=1.74&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/kmod/kmod-9999.ebuild?r1=1.73&r2=1.74 Index: kmod-9999.ebuild =================================================================== RCS file: /var/cvsroot/gentoo-x86/sys-apps/kmod/kmod-9999.ebuild,v retrieving revision 1.73 retrieving revision 1.74 diff -u -r1.73 -r1.74 --- kmod-9999.ebuild 12 Apr 2014 18:52:06 -0000 1.73 +++ kmod-9999.ebuild 23 Apr 2014 18:38:11 -0000 1.74 @@ -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 @@ 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 @@ # 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 1.3 sys-apps/kmod/kmod-17.ebuild file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/kmod/kmod-17.ebuild?rev=1.3&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/kmod/kmod-17.ebuild?rev=1.3&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/kmod/kmod-17.ebuild?r1=1.2&r2=1.3 Index: kmod-17.ebuild =================================================================== RCS file: /var/cvsroot/gentoo-x86/sys-apps/kmod/kmod-17.ebuild,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- kmod-17.ebuild 12 Apr 2014 18:52:06 -0000 1.2 +++ kmod-17.ebuild 23 Apr 2014 18:38:11 -0000 1.3 @@ -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 @@ 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 @@ # 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 1.146 sys-apps/kmod/ChangeLog file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/kmod/ChangeLog?rev=1.146&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/kmod/ChangeLog?rev=1.146&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/kmod/ChangeLog?r1=1.145&r2=1.146 Index: ChangeLog =================================================================== RCS file: /var/cvsroot/gentoo-x86/sys-apps/kmod/ChangeLog,v retrieving revision 1.145 retrieving revision 1.146 diff -u -r1.145 -r1.146 --- ChangeLog 12 Apr 2014 18:52:06 -0000 1.145 +++ ChangeLog 23 Apr 2014 18:38:11 -0000 1.146 @@ -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 <willi...@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 <ssuomi...@gentoo.org> kmod-17.ebuild, kmod-9999.ebuild: