summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillermo Rodríguez <guille.rodriguez@gmail.com>2019-11-21 10:17:05 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-11-26 08:08:15 +0100
commitff9c000c51e488e4b0b6c5c8271776bf7519f6c7 (patch)
treea79f0b129b9d98ef65512fe3c78acd1427681029
parenta8c25281c634ca5c48ec80876214ed161cba672f (diff)
downloadptxdist-ff9c000c51e488e4b0b6c5c8271776bf7519f6c7.tar.gz
ptxdist-ff9c000c51e488e4b0b6c5c8271776bf7519f6c7.tar.xz
python3-pycparser: New package
pycparser is a complete parser of the C language, written in pure Python using the PLY parsing library. It parses C code into an AST and can serve as a front-end for C compilers or analysis tools. Guillermo Rodriguez <guille.rodriguez@gmail.com> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--rules/python3-pycparser.in10
-rw-r--r--rules/python3-pycparser.make54
2 files changed, 64 insertions, 0 deletions
diff --git a/rules/python3-pycparser.in b/rules/python3-pycparser.in
new file mode 100644
index 000000000..07cd9960e
--- /dev/null
+++ b/rules/python3-pycparser.in
@@ -0,0 +1,10 @@
+## SECTION=python3
+
+config PYTHON3_PYCPARSER
+ tristate
+ select PYTHON3
+ prompt "python3-pycparser"
+ help
+ pycparser is a complete parser of the C language, written in pure
+ Python using the PLY parsing library. It parses C code into an AST
+ and can serve as a front-end for C compilers or analysis tools.
diff --git a/rules/python3-pycparser.make b/rules/python3-pycparser.make
new file mode 100644
index 000000000..2f5132674
--- /dev/null
+++ b/rules/python3-pycparser.make
@@ -0,0 +1,54 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2019 by Guillermo Rodriguez <guille.rodriguez@gmail.com>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_PYTHON3_PYCPARSER) += python3-pycparser
+
+#
+# Paths and names
+#
+PYTHON3_PYCPARSER_VERSION := 2.18
+PYTHON3_PYCPARSER_MD5 := 72370da54358202a60130e223d488136
+PYTHON3_PYCPARSER := pycparser-$(PYTHON3_PYCPARSER_VERSION)
+PYTHON3_PYCPARSER_SUFFIX := tar.gz
+PYTHON3_PYCPARSER_URL := https://pypi.python.org/packages/source/p/pycparser/$(PYTHON3_PYCPARSER).$(PYTHON3_PYCPARSER_SUFFIX)
+PYTHON3_PYCPARSER_SOURCE := $(SRCDIR)/$(PYTHON3_PYCPARSER).$(PYTHON3_PYCPARSER_SUFFIX)
+PYTHON3_PYCPARSER_DIR := $(BUILDDIR)/$(PYTHON3_PYCPARSER)
+PYTHON3_PYCPARSER_LICENSE := BSD-3-Clause
+PYTHON3_PYCPARSER_LICENSE_FILES := \
+ file://LICENSE;md5=86f1cedb4e6410a88ce8e30b91079169
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+PYTHON3_PYCPARSER_CONF_TOOL := python3
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/python3-pycparser.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, python3-pycparser)
+ @$(call install_fixup, python3-pycparser, PRIORITY, optional)
+ @$(call install_fixup, python3-pycparser, SECTION, base)
+ @$(call install_fixup, python3-pycparser, AUTHOR, "Guillermo Rodriguez <guille.rodriguez@gmail.com>")
+ @$(call install_fixup, python3-pycparser, DESCRIPTION, missing)
+
+ @$(call install_glob, python3-pycparser, 0, 0, -, \
+ /usr/lib/python$(PYTHON3_MAJORMINOR)/site-packages/pycparser,, *.py)
+
+ @$(call install_finish, python3-pycparser)
+
+ @$(call touch)
+
+# vim: syntax=make