git: 3b5336de74e5 - main - devel/pycdc: New port: Python bytecode disassembler and decompiler

From: Vladimir Druzenko <vvd_at_FreeBSD.org>
Date: Wed, 07 Aug 2024 00:15:53 UTC
The branch main has been updated by vvd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3b5336de74e52f5e2ac15fa8def3cfdfcd61b3e3

commit 3b5336de74e52f5e2ac15fa8def3cfdfcd61b3e3
Author:     gatekeeper <tiago.gasiba@gmail.com>
AuthorDate: 2024-08-06 23:59:19 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-08-06 23:59:19 +0000

    devel/pycdc: New port: Python bytecode disassembler and decompiler
    
    NOTE: pycdc is also known as Decompyle++.
    Decompyle++ aims to translate compiled Python byte-code back into valid
    and human-readable Python source code. While other projects have achieved
    this with varied success, Decompyle++ is unique in that it seeks to
    support byte-code from any version of Python.
    Decompyle++ includes both a byte-code disassembler (pycdas) and a
    decompiler (pycdc).
    https://github.com/zrax/pycdc
    
    PR:     280659
---
 devel/pycdc/Makefile  | 28 ++++++++++++++++++++++++++++
 devel/pycdc/distinfo  |  3 +++
 devel/pycdc/pkg-descr |  9 +++++++++
 3 files changed, 40 insertions(+)

diff --git a/devel/pycdc/Makefile b/devel/pycdc/Makefile
new file mode 100644
index 000000000000..60896dd85286
--- /dev/null
+++ b/devel/pycdc/Makefile
@@ -0,0 +1,28 @@
+PORTNAME=	pycdc
+DISTVERSION=	g20240806
+CATEGORIES=	devel
+
+MAINTAINER=	tiago.gasiba@gmail.com
+COMMENT=	Python bytecode disassembler and decompiler
+
+LICENSE=	GPLv3
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	bash:shells/bash
+
+USES=		cmake shebangfix
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	zrax
+GH_TAGNAME=	48d1bfa
+
+SHEBANG_FILES=	tests/all_tests.sh \
+		tests/decompyle_test.sh
+
+PLIST_FILES=	bin/pycdas \
+		bin/pycdc
+
+do-test:
+	cd ${BUILD_WRKSRC} && ninja check
+
+.include <bsd.port.mk>
diff --git a/devel/pycdc/distinfo b/devel/pycdc/distinfo
new file mode 100644
index 000000000000..35160a485abc
--- /dev/null
+++ b/devel/pycdc/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1722986793
+SHA256 (zrax-pycdc-g20240806-48d1bfa_GH0.tar.gz) = 9cf11b5ed82f0527335bd83eb08f1c74c82430fa909d7168d9aabda651ab2d2a
+SIZE (zrax-pycdc-g20240806-48d1bfa_GH0.tar.gz) = 365803
diff --git a/devel/pycdc/pkg-descr b/devel/pycdc/pkg-descr
new file mode 100644
index 000000000000..595d306fc9bb
--- /dev/null
+++ b/devel/pycdc/pkg-descr
@@ -0,0 +1,9 @@
+NOTE: pycdc is also known as Decompyle++
+
+Decompyle++ aims to translate compiled Python byte-code back into valid
+and human-readable Python source code. While other projects have achieved
+this with varied success, Decompyle++ is unique in that it seeks to
+support byte-code from any version of Python.
+
+Decompyle++ includes both a byte-code disassembler (pycdas) and a
+decompiler (pycdc).