summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid E. Narváez <david.narvaez@computer.org>2012-06-04 23:36:45 -0500
committerDavid E. Narváez <david.narvaez@computer.org>2012-06-04 23:36:45 -0500
commit1e8641939cb7db8c9a30c567819ef34e73c8086d (patch)
tree925c16b791baa962c4605896a86d09b1c9880587
downloaddMaggot-1e8641939cb7db8c9a30c567819ef34e73c8086d.tar.gz
dMaggot-1e8641939cb7db8c9a30c567819ef34e73c8086d.tar.bz2
dMaggot-1e8641939cb7db8c9a30c567819ef34e73c8086d.zip
Adding initial ebuilds for gcc-python-plugin
-rw-r--r--dev-util/gcc-python-plugin/ChangeLog10
-rw-r--r--dev-util/gcc-python-plugin/Manifest7
-rw-r--r--dev-util/gcc-python-plugin/files/gcc-python-plugin-man-target.diff14
-rw-r--r--dev-util/gcc-python-plugin/files/gcc-python-plugin-python3-docs.diff31
-rwxr-xr-xdev-util/gcc-python-plugin/files/gcc-with-python5
-rw-r--r--dev-util/gcc-python-plugin/gcc-python-plugin-0.9.ebuild102
-rw-r--r--dev-util/gcc-python-plugin/gcc-python-plugin-9999.ebuild95
7 files changed, 264 insertions, 0 deletions
diff --git a/dev-util/gcc-python-plugin/ChangeLog b/dev-util/gcc-python-plugin/ChangeLog
new file mode 100644
index 0000000..4c1ba4f
--- /dev/null
+++ b/dev-util/gcc-python-plugin/ChangeLog
@@ -0,0 +1,10 @@
+2012-06-04 <david.narvaez@computer.org>
+
+ * gcc-python-plugin-9999.ebuild: Adding live ebuild, will no support
+ patches and as of today, it doesn't build
+
+2012-06-04 <david.narvaez@computer.org>
+
+ * gcc-python-plugin-0.9.ebuild: Adding ebuild for version 0.9 including
+ man pages and documentation for Python 3
+
diff --git a/dev-util/gcc-python-plugin/Manifest b/dev-util/gcc-python-plugin/Manifest
new file mode 100644
index 0000000..891903c
--- /dev/null
+++ b/dev-util/gcc-python-plugin/Manifest
@@ -0,0 +1,7 @@
+AUX gcc-python-plugin-man-target.diff 425 RMD160 890bd6749bfc56d323eea820c5f7156d242bdf3b SHA1 29376f2b096431a7091ce0628d4d4c5e3632e129 SHA256 a4d2b1270e5f41a669e657cb1b04814f23e38dce05de4cb2748104e051e3f159
+AUX gcc-python-plugin-python3-docs.diff 1103 RMD160 9cdbd35167ec565d5bc1852e708359f6122693fa SHA1 62115e8bdf6127c5b5dc1b04987f493a0c75d27a SHA256 111ef08f5bc6bc37d8db661a11e8105dcd8ee107178165dc0d7e0ffad72973e5
+AUX gcc-with-python 127 RMD160 03cd9b0b45e0f4527f36e160e373b827645a08e3 SHA1 9a866473ca1accc9409a69fa5ec1c9e46fd6d71f SHA256 9b3e8c17f64b6cd59310069628238dce65c0aaba91d55b8b976dd3ab2f876617
+DIST gcc-python-plugin-0.9.tar.gz 660168 RMD160 57bec9e6c0672236ec3a749144864a7522db0afa SHA1 5d3d7eaf7c81721daa4764a519286aa874c46fc9 SHA256 4559d5c31fdb3394563931f1dfd4f69f35b48ec0ad8b3d0d9921389429cbe82a
+EBUILD gcc-python-plugin-0.9.ebuild 2089 RMD160 588d9f41d8cf34931307f1dd215b7e970bfaa39b SHA1 b7e1382321a182508f8c211797799657edd10b7c SHA256 9ac645782c845f852f7763e923d8f5d61ba0aebaa7fe00791b3c162172955973
+EBUILD gcc-python-plugin-9999.ebuild 1934 RMD160 c463b2ebd30d6a7e3c55d4b83500649327d948a7 SHA1 46f695975a61d51c1e55efc76371dbdd64efb0ed SHA256 2abe5332c50d51a6f3455886735b24df57cceedbd26284e76a7d2fbd20b63efd
+MISC ChangeLog 318 RMD160 9b4ea87aff581352b4595322fe2a4df1e73dead7 SHA1 3cb16c7dc657f663e8f3cfe77283530b8ad2fa43 SHA256 3064b62e222e92ce3d5e2c81a72a20667d12444025acdd2bcf933070eaf16f8f
diff --git a/dev-util/gcc-python-plugin/files/gcc-python-plugin-man-target.diff b/dev-util/gcc-python-plugin/files/gcc-python-plugin-man-target.diff
new file mode 100644
index 0000000..5936a72
--- /dev/null
+++ b/dev-util/gcc-python-plugin/files/gcc-python-plugin-man-target.diff
@@ -0,0 +1,14 @@
+diff --git a/Makefile b/Makefile
+index 7468de3..05c147b 100644
+--- a/Makefile
++++ b/Makefile
+@@ -184,6 +184,9 @@ show-ssa: plugin
+ html: docs/tables-of-passes.rst docs/passes.svg
+ cd docs && $(MAKE) html
+
++man: plugin
++ cd docs && $(MAKE) man
++
+ # We commit this generated file to SCM to allow the docs to be built without
+ # needing to build the plugin:
+ docs/tables-of-passes.rst: plugin generate-tables-of-passes-rst.py
diff --git a/dev-util/gcc-python-plugin/files/gcc-python-plugin-python3-docs.diff b/dev-util/gcc-python-plugin/files/gcc-python-plugin-python3-docs.diff
new file mode 100644
index 0000000..4063eb9
--- /dev/null
+++ b/dev-util/gcc-python-plugin/files/gcc-python-plugin-python3-docs.diff
@@ -0,0 +1,31 @@
+diff --git a/generate-tables-of-passes-rst.py b/generate-tables-of-passes-rst.py
+index 154276e..8bbf926 100644
+--- a/generate-tables-of-passes-rst.py
++++ b/generate-tables-of-passes-rst.py
+@@ -18,6 +18,7 @@
+ # We use this script to regenerate docs/tables-of-passes.rst
+ import gcc
+ import sys
++import six
+
+ from gccutils import Table
+
+@@ -36,7 +37,7 @@ p_to_s = pass_properties_to_str
+
+ def foo(t, ps, indent):
+ name = ps.name.replace('*', '\\*')
+- t.add_row(('%s%s' % (u'> ' * indent, name),
++ t.add_row(('%s%s' % (six.u('> ') * indent, name),
+ p_to_s(ps.properties_required),
+ p_to_s(ps.properties_provided),
+ p_to_s(ps.properties_destroyed)))
+@@ -89,8 +90,7 @@ for rootname, reflabel, ps in zip(('The lowering passes',
+ t = Table(['Pass Name', 'Required properties', 'Provided properties', 'Destroyed properties'],
+ sepchar='=')
+ foo(t, ps, 0)
+- from StringIO import StringIO
+- s = StringIO()
++ s = six.StringIO()
+ t.write(s)
+ for line in s.getvalue().splitlines():
+ print(' ' + line.rstrip()) \ No newline at end of file
diff --git a/dev-util/gcc-python-plugin/files/gcc-with-python b/dev-util/gcc-python-plugin/files/gcc-with-python
new file mode 100755
index 0000000..e0351c7
--- /dev/null
+++ b/dev-util/gcc-python-plugin/files/gcc-with-python
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+PYTHON_VERSION=$(eselect python show --ABI | sed 's/^\([0-9][0-9]*\)\..*/\1/');
+
+gcc-with-python${PYTHON_VERSION} $@ \ No newline at end of file
diff --git a/dev-util/gcc-python-plugin/gcc-python-plugin-0.9.ebuild b/dev-util/gcc-python-plugin/gcc-python-plugin-0.9.ebuild
new file mode 100644
index 0000000..811e911
--- /dev/null
+++ b/dev-util/gcc-python-plugin/gcc-python-plugin-0.9.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+SUPPORT_PYTHON_ABIS="1"
+PYTHON_DEPEND="*"
+PYTHON_EXPORT_PHASE_FUNCTIONS="1"
+
+inherit python eutils
+
+DESCRIPTION="GCC Python plugin for static analysis"
+HOMEPAGE="https://fedorahosted.org/gcc-python-plugin"
+SRC_URI="https://fedorahosted.org/releases/g/c/gcc-python-plugin/${P}.tar.gz"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="doc"
+
+DEPEND="${DEPEND}
+>=sys-devel/gcc-4.6
+dev-python/six
+dev-python/pygments
+media-gfx/graphviz
+doc? (
+ dev-python/sphinx
+ dev-python/pycairo
+)
+"
+
+RDEPEND="${DEPEND}"
+
+DEPEND="${DEPEND}
+doc? (
+ dev-python/sphinx
+ dev-python/pycairo
+)
+"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-python3-docs.diff"
+ epatch "${FILESDIR}/${PN}-man-target.diff"
+
+ python_src_prepare
+}
+
+src_configure() {
+ return
+}
+
+src_compile() {
+ rename_items() {
+ PLUGIN_NAME="python$(python_get_version --major)"
+ GCC_WITH_PYTHON_SCRIPT_NAME="gcc-with-${PLUGIN_NAME}"
+
+ 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
+
+ cd "${WORKDIR}/${P}-$(python_get_version -f)"
+
+ emake man
+
+ if use doc; then
+ emake html
+ fi
+}
+
+src_test() {
+ emake testcpybuilder test-suite testcpychecker
+}
+
+src_install() {
+ GCC_PLUGIN_DIR="$(gcc --print-file-name=plugin)"
+
+ install_plugin_files() {
+ dobin "gcc-with-python$(python_get_version --major)"
+ insinto "${GCC_PLUGIN_DIR}"
+ doins "python$(python_get_version --major).so"
+ insinto "$(python_get_sitedir)"
+ doins gccutils.py
+ doins -r libcpychecker
+ }
+
+ python_execute_function -s install_plugin_files
+ dobin "${FILESDIR}/gcc-with-python"
+
+ cd "${WORKDIR}/${P}-$(python_get_version -f)"
+
+ doman docs/_build/man/*
+
+ if use doc; then
+ dodoc -r examples
+ dodoc -r docs/_build/html
+ fi
+}
diff --git a/dev-util/gcc-python-plugin/gcc-python-plugin-9999.ebuild b/dev-util/gcc-python-plugin/gcc-python-plugin-9999.ebuild
new file mode 100644
index 0000000..9279756
--- /dev/null
+++ b/dev-util/gcc-python-plugin/gcc-python-plugin-9999.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+SUPPORT_PYTHON_ABIS="1"
+PYTHON_DEPEND="*"
+PYTHON_EXPORT_PHASE_FUNCTIONS="1"
+
+inherit git-2 python
+
+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"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS=""
+IUSE="doc"
+
+DEPEND="${DEPEND}
+>=sys-devel/gcc-4.6
+dev-python/six
+dev-python/pygments
+media-gfx/graphviz
+doc? (
+ dev-python/sphinx
+ dev-python/pycairo
+)
+"
+
+RDEPEND="${DEPEND}"
+
+DEPEND="${DEPEND}
+doc? (
+ dev-python/sphinx
+ dev-python/pycairo
+)
+"
+
+src_configure() {
+ return
+}
+
+src_compile() {
+ rename_items() {
+ PLUGIN_NAME="python$(python_get_version --major)"
+ GCC_WITH_PYTHON_SCRIPT_NAME="gcc-with-${PLUGIN_NAME}"
+
+ 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
+
+ cd "${WORKDIR}/${P}-$(python_get_version -f)"
+
+ emake man
+
+ if use doc; then
+ emake html
+ fi
+}
+
+src_test() {
+ emake testcpybuilder test-suite testcpychecker
+}
+
+src_install() {
+ GCC_PLUGIN_DIR="$(gcc --print-file-name=plugin)"
+
+ install_plugin_files() {
+ dobin "gcc-with-python$(python_get_version --major)"
+ insinto "${GCC_PLUGIN_DIR}"
+ doins "python$(python_get_version --major).so"
+ insinto "$(python_get_sitedir)"
+ doins gccutils.py
+ doins -r libcpychecker
+ }
+
+ python_execute_function -s install_plugin_files
+ dobin "${FILESDIR}/gcc-with-python"
+
+ cd "${WORKDIR}/${P}-$(python_get_version -f)"
+
+ doman docs/_build/man/*
+
+ if use doc; then
+ dodoc -r examples
+ dodoc -r docs/_build/html
+ fi
+}