From 0e3779dd73bd05191399fd15acdc3728703844bd Mon Sep 17 00:00:00 2001 From: layman Date: Thu, 16 Mar 2017 19:52:56 -0400 Subject: Updating everything here --- dev-util/gcc-python-plugin/Manifest | 16 +-- .../files/gcc-python-plugin-0.15-internal-fn.patch | 10 ++ .../files/gcc-python-plugin-cpp-compilation.diff | 107 --------------------- .../files/gcc-python-plugin-man-target.diff | 14 --- .../files/gcc-python-plugin-python3-docs.diff | 31 ------ dev-util/gcc-python-plugin/files/gcc-with-python | 4 +- .../gcc-python-plugin-0.11.ebuild | 89 ----------------- .../gcc-python-plugin-0.12-r1.ebuild | 89 ----------------- .../gcc-python-plugin-0.12-r2.ebuild | 91 ------------------ .../gcc-python-plugin-0.12.ebuild | 89 ----------------- .../gcc-python-plugin-0.15.ebuild | 93 ++++++++++++++++++ .../gcc-python-plugin-9999.ebuild | 41 ++++---- 12 files changed, 131 insertions(+), 543 deletions(-) create mode 100644 dev-util/gcc-python-plugin/files/gcc-python-plugin-0.15-internal-fn.patch delete mode 100644 dev-util/gcc-python-plugin/files/gcc-python-plugin-cpp-compilation.diff delete mode 100644 dev-util/gcc-python-plugin/files/gcc-python-plugin-man-target.diff delete mode 100644 dev-util/gcc-python-plugin/files/gcc-python-plugin-python3-docs.diff delete mode 100644 dev-util/gcc-python-plugin/gcc-python-plugin-0.11.ebuild delete mode 100644 dev-util/gcc-python-plugin/gcc-python-plugin-0.12-r1.ebuild delete mode 100644 dev-util/gcc-python-plugin/gcc-python-plugin-0.12-r2.ebuild delete mode 100644 dev-util/gcc-python-plugin/gcc-python-plugin-0.12.ebuild create mode 100644 dev-util/gcc-python-plugin/gcc-python-plugin-0.15.ebuild diff --git a/dev-util/gcc-python-plugin/Manifest b/dev-util/gcc-python-plugin/Manifest index 0b73566..cfb107c 100644 --- a/dev-util/gcc-python-plugin/Manifest +++ b/dev-util/gcc-python-plugin/Manifest @@ -1,12 +1,6 @@ -AUX gcc-python-plugin-cpp-compilation.diff 3437 SHA256 43d2b86ac9b1645a0b050bd0da54d7804f8909fefe181d215ec0c07ee5c403ad SHA512 a9f463dedc1a2016cbc38f48e12c8ee6092274fe151e8e551bd9d7ae7b4b97433d07a54f35a48184d52596b9a0071a9faffca746edf7289449071a3976eba4be WHIRLPOOL af53d4d21814f744ef1ab1f183ee209987d4ca7de96671030471e60a9de6c11314bf978972097a2f98bc01d135b2437b31ad334b63cca4ed1a351ca5ad88937b -AUX gcc-python-plugin-man-target.diff 425 SHA256 a4d2b1270e5f41a669e657cb1b04814f23e38dce05de4cb2748104e051e3f159 SHA512 484c4600c8a70dfe2e455d14ad2d70f773f3091894259af8ffaa433c676c0fd8dd55f8e83455d257173686bb724402ed7471bc0eff88f62cba03336bd5d5019c WHIRLPOOL ac6755859918827a73f9331b228644dd32ba97075597522e7f90ecfca82a54f2f4138800fc87dbcc519e9972f42854e6422af4232926a0e00d15af44ceb848cb -AUX gcc-python-plugin-python3-docs.diff 1103 SHA256 111ef08f5bc6bc37d8db661a11e8105dcd8ee107178165dc0d7e0ffad72973e5 SHA512 e498673528d0c3af1ea7ff141fc308eef455be69f2531e65241cc67b1b532be48b79b57971264e3e8c7622abc2df15fa5ac1fee3710e29392b7d63e34ad5f661 WHIRLPOOL 1a191d3a5d29c37d97c74b2c99a960cd855145ce2a6dfaaf91ab108c62f98eed312ad841d220c4fc74b3f22aa80f00d1f28016bb0cfce5b6aa421a707ff6b652 -AUX gcc-with-python 127 SHA256 9b3e8c17f64b6cd59310069628238dce65c0aaba91d55b8b976dd3ab2f876617 SHA512 7005cfd21e60129ccb00e9c9bb7de5f02c8315b403c680b88ec05fd75622c783ebaeeb4778ec60792dba74eb7e14f5b2fff6c180a9b16826cb81f3380d2b94f3 WHIRLPOOL d5aa88eef40bd975478fc668ad0a5d155eb430e9216ea1508f6a97ab4e41f171aca8eba86704859d2cb92cde7424ef8dfaee9386af38ef7232812475a1e99c4d -DIST gcc-python-plugin-0.11.tar.gz 839171 SHA256 8015ffe2c09123b74c194b8a390ec3584ef8b2f02990d4ad033a1f7759f1eb79 SHA512 0a7966617690df7ca322f4ed197713444d4f12ff95c37d76ab609a49f4e1c08351e5185eeefdff7f99c23683dd1ae78020d53c01e4c5b29fae0d402a8142a2b6 WHIRLPOOL 1154c55853f70daa0e070244c84cfae5a5561500e0827248e77bcab190e806488dcd527cc65cfc01ba95991a42ec3409b43c7610563e4e151d00f5c85f940b16 -DIST gcc-python-plugin-0.12.tar.gz 1030708 SHA256 790fc5af26d58dade58995612858b861bbc1a86183655e656325739d6e979dec SHA512 155b933f1ce42b0926e302b070e2002f6498c4bc8ce26d712295286ada9f0dbfe841a67d4ef56ccfa4d15b55be9ec471c765a0421b11871cd8d4474c79931b78 WHIRLPOOL cb91ebd34de179f5590fe883b0fa4aead2522a1294bf92c5af267a3ca4a4b7205c213e8fc23b33698579023cc6d7fb4ba4afaec26e3ae4989a0423e3b8ccc00b -EBUILD gcc-python-plugin-0.11.ebuild 1931 SHA256 e41e7e25f3f1edbe2dd15a52c36f97a9b1c28c172113caa1a64f1b2e01a33dcc SHA512 8ceed52f7b94b32de46026547a6a6b322403d22f6072da30b529a5b4ac82b75bf435c4b544689ec3777f5ae87000bfe3eda3b082365ae2bbab7934dbced580a2 WHIRLPOOL 58ca8267ff11343544fbc80368e0381f2f05198f1af2c4cc9be34eb1c36ed996480dd855975d911c9b9275150dbaa9d22830b46466b5027d5f755f33b574b74f -EBUILD gcc-python-plugin-0.12-r1.ebuild 1903 SHA256 08b4c877185d8cfd783f28816a28fac56ac698d24102365a12aba17e532d6704 SHA512 0e9372e371928925faf6c424211df27c766543f97528ce5d1c7030e20b6d8cb5c57b06a67e81d93784eefbb2fd914857a01355a42f2f584891d39f82e4cf495e WHIRLPOOL ca442979b2c0952229b5cac475c1a07a2137139ea6c5e71882d3d68715058d9169dda125e26888eb1e3eda8387f37a7f5b36a5d5de421fcef7dfb4b784cd6408 -EBUILD gcc-python-plugin-0.12-r2.ebuild 1967 SHA256 b0033b35d5d80be53a558ba022de3c47e47eaa137c775fc197edad036a055e3c SHA512 ed9f92a0478b9f400eccc525ee2216de730df709f504e178a03fa412225c7b46717a22459117b697257da6374c093d3cbad10a4f3650679986c6bb16e9e32716 WHIRLPOOL c77de26ddabff5b8477a426af0fa8d54857ffbceb8f40f73096bf8cda402bdec3765de49e8c65a051f3911181b0207088031a7f9353fcd8c0aff15337eb615c5 -EBUILD gcc-python-plugin-0.12.ebuild 1903 SHA256 7705944d9c9688d49ba1bec5fda8c73dd8935faf3c1b89aaa944348aa1bb1294 SHA512 40b737e261295afdce9f40d5fee614ceb54c4f2235c401212a672e2f05fc499487a28f9edd27c9446dd355e4941d3a2ead126d1d604074b834ae4db7f26fded6 WHIRLPOOL d43a3470433b01644a24e3dda7f30d88c3af4a9cb2e4bf914a3a562172020928daa4f8f4546e8d6b6b892dd37451d7e1dde2f7de6536bc2af4d9dc5161b251af -EBUILD gcc-python-plugin-9999.ebuild 1878 SHA256 1438333583206be80f27ab0f7cd8c52a1218b8c284091d1544b08703c66e51bf SHA512 e1511b92c9fe56ccb780a39e9cddf283e8452175564108a1ec7ebd5a815600b1fce052ee6bb28c2c756c716f3638dad28668a901b04a27fdfee16a3811fd7eae WHIRLPOOL 9b5f8e0a12dcbbd85e2fa281b2abe6a59068fe7f95711195ad81146fb4ae1dd5ed60a4a2e55278a994377865e0dad44611d62b0140fd945e3eaf272a6296837c +AUX gcc-python-plugin-0.15-internal-fn.patch 314 SHA256 6da866a747a503d1fcfdc2dde491ea67035710bfd1744ea2058433d62d805011 SHA512 45a57d8a4f4d681f1ce22a00e0c33d92246dce8ae775f3411a0b8b477678ee4cd7701d8b9240d25a5c8f79697d368c6153f0de8599203fe9bc0976b634303b91 WHIRLPOOL d3f3da22c8ba53f210e7f4dd9bccee81e4e2334985b80ef81f70e2a404272159c3667a962dfcabe458581027c9b582268c7556cd93e6cbd52acfd12c9107e715 +AUX gcc-with-python 48 SHA256 541d46eed2e5c2586b65db2277a37b2af9aeb0326d84e04a7a0fb83ffeccbb7a SHA512 2e6fdc7a66944ecb616dcc1ca2dd7ea099dca695b004f2c8d7d8d342d82c4cdaf88c876a11e4735b475510cb44386961eeab6cbcb878e479bd12d4e7a8fe20f8 WHIRLPOOL e0a41f86199767ac66b5debb2c9d211f949efa7c663249d84e289fe53897f9d9b47f04af6cc0ceb662a983d5e49db36fd23092b3ea86998009810e604d17ef7f +DIST v0.15.tar.gz 2101885 SHA256 fcb7596616fcb07f611b992f7603ca80f85181b23692693d1097977913419e74 SHA512 db9678bedb774de3996ab2548acf36ca5a4fe29ec1da4beafcfe1ce1a0d4784303eaa7ef777a203f50484c1fd0dcb921ce5df5469d0fcd2bacf65193efa1f6eb WHIRLPOOL 4de629aa8e3dbc59684ce45ec1da5c3a2eac10d47cce78ddeaa3e0870555bda5566c54bfef0aa7d5495c91092a1ecd6fac1a283b185b04235af7070c74e613ae +EBUILD gcc-python-plugin-0.15.ebuild 1906 SHA256 194648b386555f5ac0259173edfb030c40a6678a402c0ebd3b39d9178f45a4f5 SHA512 8125c808ae099fabfc1665a7c5a864385b8b665b8c079b9e4699b7c72a196309b5947dfb076175617b726bf1954b4aba83f245084889eeabf46e5777968cdcad WHIRLPOOL 00ff7555604d721aa335a570a7dcb7d9e1805286caf15666400d3eb6d1c00635fb80552bdb1f2483112db30e5b370afde4916bca47beb7b9fbcd183da376e802 +EBUILD gcc-python-plugin-9999.ebuild 1832 SHA256 1a1ebff0ac48c7451e85843b30dc7652ffaca24b9d7652f7e52cbb2644aea87b SHA512 d1b1cf30e73e4e492d96346ef475661eb57aa39d78454216f43470d882a780da615196348ce3ad82b4d9159ed2f4dc3167ee53b81c99f4bda5805a0e3cfb01d5 WHIRLPOOL 22914177e088ce3f97a9fe9d5779fa6e5e489214f97845a0b14875bd39831ddfec66ba471c439175c660d02ce16f34547561bca1fe75e567e18ca82d6c2fc11e MISC ChangeLog 849 SHA256 f6c7f3feb67f0cf7147a8f8a06486b4715a3d3b10e44caed08be03b637946686 SHA512 4ebab561c62afba78ea045383737f0c72f548ca984f27658d9dd20237b102e70973955894992d52c49735f83620fc32894f4794b7a4fbee35042aa63f0fbfe83 WHIRLPOOL ddaf5c3356dcbe9a1ed9852ef4b546dedbe4696f3d85eb9e96dc02bb8452d93efaa2042573248f69004b3f6271f6e08ae9408421644837820ebabbf949815372 diff --git a/dev-util/gcc-python-plugin/files/gcc-python-plugin-0.15-internal-fn.patch b/dev-util/gcc-python-plugin/files/gcc-python-plugin-0.15-internal-fn.patch new file mode 100644 index 0000000..7e26f7a --- /dev/null +++ b/dev-util/gcc-python-plugin/files/gcc-python-plugin-0.15-internal-fn.patch @@ -0,0 +1,10 @@ +--- gcc-c-api/gcc-callgraph.c~ 2016-02-15 09:13:55.000000000 -0500 ++++ gcc-c-api/gcc-callgraph.c 2017-03-16 19:03:13.528318488 -0400 +@@ -24,6 +24,7 @@ + #include "tree-ssa-alias.h" + #include "basic-block.h" + #if (GCC_VERSION >= 4009) ++#include "internal-fn.h" + #include "gimple-expr.h" + #endif + #include "gimple.h" diff --git a/dev-util/gcc-python-plugin/files/gcc-python-plugin-cpp-compilation.diff b/dev-util/gcc-python-plugin/files/gcc-python-plugin-cpp-compilation.diff deleted file mode 100644 index f020425..0000000 --- a/dev-util/gcc-python-plugin/files/gcc-python-plugin-cpp-compilation.diff +++ /dev/null @@ -1,107 +0,0 @@ -diff --git a/Makefile b/Makefile -index 05c147b..56c0321 100644 ---- a/Makefile -+++ b/Makefile -@@ -102,9 +102,9 @@ GCC_PYTHON_PLUGIN_SO := python.so - CPPFLAGS+= -I$(GCCPLUGINS_DIR)/include -I$(GCCPLUGINS_DIR)/include/c-family -I. $(PYTHON_INCLUDES) - # Allow user to pick optimization, choose whether warnings are fatal, - # and choose debugging information level. --CFLAGS?=-O2 -Werror -g -+CFLAGS?=-O2 -g - # Force these settings --CFLAGS+= -fPIC -fno-strict-aliasing -Wall -+CFLAGS+= -fPIC -fno-strict-aliasing -Wno-write-strings -fpermissive - LIBS+= $(PYTHON_LIBS) - ifneq "$(PLUGIN_PYTHONPATH)" "" - CPPFLAGS+= -DPLUGIN_PYTHONPATH='"$(PLUGIN_PYTHONPATH)"' -diff --git a/gcc-python-wrapper.c b/gcc-python-wrapper.c -index 93feb58..c8b6ed0 100644 ---- a/gcc-python-wrapper.c -+++ b/gcc-python-wrapper.c -@@ -136,10 +136,55 @@ PyTypeObject PyGccWrapperMetaType = { - "gcc.WrapperMeta", /*tp_name*/ - sizeof(PyGccWrapperTypeObject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ -- -- .tp_flags = Py_TPFLAGS_DEFAULT, -- .tp_base = &PyType_Type, -- .tp_new = gcc_python_wrapper_meta_tp_new, -+ NULL, /* tp_dealloc */ -+ NULL, /* tp_print */ -+ NULL, /* tp_getattr */ -+ NULL, /* tp_setattr */ -+#if PY_MAJOR_VERSION < 3 -+ 0, /*tp_compare*/ -+#else -+ 0, /*reserved*/ -+#endif -+ NULL, /* tp_repr */ -+ NULL, /* tp_as_number */ -+ NULL, /* tp_as_sequence */ -+ NULL, /* tp_as_mapping */ -+ NULL, /* tp_hash */ -+ NULL, /* tp_call */ -+ NULL, /* tp_str */ -+ NULL, /* tp_getattro */ -+ NULL, /* tp_setattro */ -+ NULL, /* tp_as_buffer */ -+ Py_TPFLAGS_DEFAULT, /* tp_flags */ -+ 0, /*tp_doc*/ -+ NULL, /* tp_traverse */ -+ NULL, /* tp_clear */ -+ NULL, /* tp_richcompare */ -+ 0, /* tp_weaklistoffset */ -+ NULL, /* tp_iter */ -+ NULL, /* tp_iternext */ -+ NULL, /* tp_methods */ -+ NULL, /* tp_members */ -+ NULL, /* tp_getset */ -+ &PyType_Type, /* tp_base */ -+ NULL, /* tp_dict */ -+ NULL, /* tp_descr_get */ -+ NULL, /* tp_descr_set */ -+ 0, /* tp_dictoffset */ -+ NULL, /* tp_init */ -+ NULL, /* tp_alloc */ -+ gcc_python_wrapper_meta_tp_new, /* tp_new */ -+ NULL, /* tp_free */ -+ NULL, /* tp_is_gc */ -+ NULL, /* tp_bases */ -+ NULL, /* tp_mro */ -+ NULL, /* tp_cache */ -+ NULL, /* tp_subclasses */ -+ NULL, /* tp_weaklist */ -+ NULL, /* tp_del */ -+#if PY_VERSION_HEX >= 0x02060000 -+ 0, /*tp_version_tag*/ -+#endif - }; - - /* Maintain a circular linked list of PyGccWrapper instances: */ -diff --git a/gcc-python.c b/gcc-python.c -index f037988..5421181 100644 ---- a/gcc-python.c -+++ b/gcc-python.c -@@ -81,11 +81,11 @@ gcc_python_define_macro(PyObject *self, - PyObject *args, PyObject *kwargs) - { - const char *macro; -- char *keywords[] = {"macro", -+ const char *keywords[] = {"macro", - NULL}; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, -- "s:define_preprocessor_name", keywords, -+ "s:define_preprocessor_name", (char**)keywords, - ¯o)) { - return NULL; - } -@@ -463,7 +463,7 @@ static struct PyModuleDef gcc_module_def = { - }; - #endif - --static PyMODINIT_FUNC PyInit_gcc(void) -+PyMODINIT_FUNC PyInit_gcc(void) - { - #if PY_MAJOR_VERSION == 3 - PyObject *m; 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 deleted file mode 100644 index 5936a72..0000000 --- a/dev-util/gcc-python-plugin/files/gcc-python-plugin-man-target.diff +++ /dev/null @@ -1,14 +0,0 @@ -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 deleted file mode 100644 index 4063eb9..0000000 --- a/dev-util/gcc-python-plugin/files/gcc-python-plugin-python3-docs.diff +++ /dev/null @@ -1,31 +0,0 @@ -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 index e0351c7..6ba6268 100755 --- a/dev-util/gcc-python-plugin/files/gcc-with-python +++ b/dev-util/gcc-python-plugin/files/gcc-with-python @@ -1,5 +1,3 @@ #!/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 +"gcc-with-$(eselect python show)" $@ diff --git a/dev-util/gcc-python-plugin/gcc-python-plugin-0.11.ebuild b/dev-util/gcc-python-plugin/gcc-python-plugin-0.11.ebuild deleted file mode 100644 index 253309c..0000000 --- a/dev-util/gcc-python-plugin/gcc-python-plugin-0.11.ebuild +++ /dev/null @@ -1,89 +0,0 @@ -# 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 toolchain-funcs versionator 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" - -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 -} diff --git a/dev-util/gcc-python-plugin/gcc-python-plugin-0.12-r1.ebuild b/dev-util/gcc-python-plugin/gcc-python-plugin-0.12-r1.ebuild deleted file mode 100644 index e6b0dba..0000000 --- a/dev-util/gcc-python-plugin/gcc-python-plugin-0.12-r1.ebuild +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=5 - -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" - -RDEPEND="${DEPEND}" - -DEPEND="${DEPEND} -dev-python/sphinx -doc? ( -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 -r gccutils - 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-0.12-r2.ebuild b/dev-util/gcc-python-plugin/gcc-python-plugin-0.12-r2.ebuild deleted file mode 100644 index 4afb2f2..0000000 --- a/dev-util/gcc-python-plugin/gcc-python-plugin-0.12-r2.ebuild +++ /dev/null @@ -1,91 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=5 - -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" - -RDEPEND="${DEPEND}" - -DEPEND="${DEPEND} -dev-python/sphinx -doc? ( -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 -r gccutils - doins -r libcpychecker - } - - python_execute_function -s install_plugin_files - dobin "${FILESDIR}/gcc-with-python" - - cd "${WORKDIR}/${P}-$(python_get_version -f)" - - insinto "${GCC_PLUGIN_DIR}" - doins "gcc-c-api/libgcc-c-api.so" - 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-0.12.ebuild b/dev-util/gcc-python-plugin/gcc-python-plugin-0.12.ebuild deleted file mode 100644 index 366a36a..0000000 --- a/dev-util/gcc-python-plugin/gcc-python-plugin-0.12.ebuild +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=5 - -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" - -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 -r gccutils - 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-0.15.ebuild b/dev-util/gcc-python-plugin/gcc-python-plugin-0.15.ebuild new file mode 100644 index 0000000..d939da3 --- /dev/null +++ b/dev-util/gcc-python-plugin/gcc-python-plugin-0.15.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python{2_7,3_4,3_5} ) + +inherit python-r1 eutils + +DESCRIPTION="GCC Python plugin for static analysis" +HOMEPAGE="https://github.com/davidmalcolm/gcc-python-plugin" +SRC_URI="https://github.com/davidmalcolm/${PN}/archive/v${PV}.tar.gz" +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="doc" + +DEPEND="${DEPEND} +>=sys-devel/gcc-4.9 +dev-python/six +dev-python/pygments +media-gfx/graphviz" + +RDEPEND="${DEPEND}" + +DEPEND="${DEPEND} +dev-python/sphinx +doc? ( +dev-python/pycairo +)" + +src_prepare() { + default + epatch ${FILESDIR}/gcc-python-plugin-0.15-internal-fn.patch + python_setup + python_copy_sources +} + +src_configure() { + return +} + +src_compile() { + 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_foreach_impl run_in_build_dir compile_plugin + + cd "${WORKDIR}/${P}-${EPYTHON}" + + 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-${EPYTHON}" + insinto "${GCC_PLUGIN_DIR}" + doins "${EPYTHON}.so" + insinto "$(python_get_sitedir)" + doins -r gccutils + doins -r libcpychecker + } + + python_foreach_impl run_in_build_dir install_plugin_files + dobin "${FILESDIR}/gcc-with-python" + + cd "${WORKDIR}/${P}-${EPYTHON}" + + 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 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/* -- cgit v1.2.3-65-gdbad