summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/gcc-python-plugin/gcc-python-plugin-9999.ebuild')
-rw-r--r--dev-util/gcc-python-plugin/gcc-python-plugin-9999.ebuild41
1 files changed, 22 insertions, 19 deletions
diff --git a/dev-util/gcc-python-plugin/gcc-python-plugin-9999.ebuild b/dev-util/gcc-python-plugin/gcc-python-plugin-9999.ebuild
index b1e812e..36d48dd 100644
--- a/dev-util/gcc-python-plugin/gcc-python-plugin-9999.ebuild
+++ b/dev-util/gcc-python-plugin/gcc-python-plugin-9999.ebuild
@@ -1,25 +1,22 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-EAPI=5
+EAPI=6
-SUPPORT_PYTHON_ABIS="1"
-PYTHON_DEPEND="*"
-PYTHON_EXPORT_PHASE_FUNCTIONS="1"
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
-inherit git-2 python
+inherit git-r3 python-r1
DESCRIPTION="GCC Python plugin for static analysis"
-HOMEPAGE="https://fedorahosted.org/gcc-python-plugin"
-EGIT_REPO_URI="git://git.fedorahosted.org/gcc-python-plugin.git"
+HOMEPAGE="https://github.com/davidmalcolm/gcc-python-plugin"
+EGIT_REPO_URI="https://github.com/davidmalcolm/gcc-python-plugin.git"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS=""
IUSE="doc"
DEPEND="${DEPEND}
->=sys-devel/gcc-4.6
+>=sys-devel/gcc-6
dev-python/six
dev-python/pygments
media-gfx/graphviz"
@@ -32,25 +29,31 @@ doc? (
dev-python/pycairo
)"
+src_prepare() {
+ default
+ python_setup
+ python_copy_sources
+}
+
src_configure() {
return
}
src_compile() {
- rename_items() {
- PLUGIN_NAME="python$(python_get_version --major)"
+ compile_plugin() {
+ PLUGIN_NAME="${EPYTHON}"
GCC_WITH_PYTHON_SCRIPT_NAME="gcc-with-${PLUGIN_NAME}"
+ make plugin || die "Error building plugin"
cp python.so "${PLUGIN_NAME}.so"
cp gcc-with-python "${GCC_WITH_PYTHON_SCRIPT_NAME}"
sed -i -e"s|-fplugin=[^ ]*|-fplugin=${PLUGIN_NAME}|" "${GCC_WITH_PYTHON_SCRIPT_NAME}"
sed -i -e"s|-fplugin-arg-python-script|-fplugin-arg-${PLUGIN_NAME}-script|" "${GCC_WITH_PYTHON_SCRIPT_NAME}"
}
- python_execute_function -d -s plugin
- python_execute_function -s rename_items
+ python_foreach_impl run_in_build_dir compile_plugin
- cd "${WORKDIR}/${P}-$(python_get_version -f)"
+ cd "${WORKDIR}/${P}-${EPYTHON}"
emake man
@@ -67,18 +70,18 @@ src_install() {
GCC_PLUGIN_DIR="$(gcc --print-file-name=plugin)"
install_plugin_files() {
- dobin "gcc-with-python$(python_get_version --major)"
+ dobin "gcc-with-${EPYTHON}"
insinto "${GCC_PLUGIN_DIR}"
- doins "python$(python_get_version --major).so"
+ doins "${EPYTHON}.so"
insinto "$(python_get_sitedir)"
doins -r gccutils
doins -r libcpychecker
}
- python_execute_function -s install_plugin_files
+ python_foreach_impl run_in_build_dir install_plugin_files
dobin "${FILESDIR}/gcc-with-python"
- cd "${WORKDIR}/${P}-$(python_get_version -f)"
+ cd "${WORKDIR}/${P}-${EPYTHON}"
doman docs/_build/man/*