diff options
author | Michał Górny <mgorny@gentoo.org> | 2013-01-27 16:35:33 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2013-01-27 16:35:33 +0000 |
commit | a8a99a1a87cf27d0467c73506afd65861fd10ab5 (patch) | |
tree | 7f455c042a63abf66acaa6f056215ec5f016d036 /eclass/python-utils-r1.eclass | |
parent | Stable for x86, wrt bug #450678 (diff) | |
download | gentoo-2-a8a99a1a87cf27d0467c73506afd65861fd10ab5.tar.gz gentoo-2-a8a99a1a87cf27d0467c73506afd65861fd10ab5.tar.bz2 gentoo-2-a8a99a1a87cf27d0467c73506afd65861fd10ab5.zip |
Introduce python_doheader(), to install headers specific to a Python implementation.
Diffstat (limited to 'eclass/python-utils-r1.eclass')
-rw-r--r-- | eclass/python-utils-r1.eclass | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 474ac08a9d21..53a45963d343 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/python-utils-r1.eclass,v 1.14 2013/01/21 19:28:16 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/python-utils-r1.eclass,v 1.15 2013/01/27 16:35:33 mgorny Exp $ # @ECLASS: python-utils-r1 # @MAINTAINER: @@ -618,5 +618,34 @@ python_domodule() { python_optimize "${ED}/${d}" } +# @FUNCTION: python_doheader +# @USAGE: <files>... +# @DESCRIPTION: +# Install the given headers into the implementation-specific include +# directory. This function is unconditionally recursive, i.e. you can +# pass directories instead of files. +# +# Example: +# @CODE +# src_install() { +# python_foreach_impl python_doheader foo.h bar.h +# } +# @CODE +python_doheader() { + debug-print-function ${FUNCNAME} "${@}" + + [[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).' + + local d PYTHON_INCLUDEDIR=${PYTHON_INCLUDEDIR} + [[ ${PYTHON_INCLUDEDIR} ]] || python_export PYTHON_INCLUDEDIR + + d=${PYTHON_INCLUDEDIR#${EPREFIX}} + + local INSDESTTREE + + insinto "${d}" + doins -r "${@}" || die +} + _PYTHON_UTILS_R1=1 fi |