summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2013-01-27 16:35:33 +0000
committerMichał Górny <mgorny@gentoo.org>2013-01-27 16:35:33 +0000
commita8a99a1a87cf27d0467c73506afd65861fd10ab5 (patch)
tree7f455c042a63abf66acaa6f056215ec5f016d036 /eclass
parentStable for x86, wrt bug #450678 (diff)
downloadgentoo-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')
-rw-r--r--eclass/ChangeLog6
-rw-r--r--eclass/python-utils-r1.eclass31
2 files changed, 35 insertions, 2 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 99a43d9ca5fc..f3c0cd71ac91 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for eclass directory
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.646 2013/01/27 13:32:44 hd_brummy Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.647 2013/01/27 16:35:33 mgorny Exp $
+
+ 27 Jan 2013; Michał Górny <mgorny@gentoo.org> python-utils-r1.eclass:
+ Introduce python_doheader(), to install headers specific to a Python
+ implementation.
27 Jan 2013; Joerg Bornkessel <hd_brummy@gentoo.org> vdr-plugin-2.eclass:
reverted last changes
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