diff --git a/devel/Makefile b/devel/Makefile index 531922000688..8d30ff65f664 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -6023,6 +6023,7 @@ SUBDIR += py-xarray SUBDIR += py-xarray-einstats SUBDIR += py-xarray-simlab + SUBDIR += py-xasm SUBDIR += py-xattr SUBDIR += py-xdg SUBDIR += py-xdis diff --git a/devel/py-xasm/Makefile b/devel/py-xasm/Makefile new file mode 100644 index 000000000000..34b250404ac4 --- /dev/null +++ b/devel/py-xasm/Makefile @@ -0,0 +1,25 @@ +PORTNAME= xasm +PORTVERSION= 1.2.0 +CATEGORIES= devel python +MASTER_SITES= PYPI \ + https://github.com/rocky/python-xasm/releases/download/${PORTVERSION}/ +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Python cross-version byte-code assembler +WWW= https://github.com/rocky/python-xasm + +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/LICENSE.gpl2 + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}xdis>=6.0.3:devel/py-xdis@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>=1.10.0:devel/py-six@${PY_FLAVOR} + +USES= python +USE_PYTHON= autoplist concurrent pep517 + +NO_ARCH= yes + +.include diff --git a/devel/py-xasm/distinfo b/devel/py-xasm/distinfo new file mode 100644 index 000000000000..3635d0d8e558 --- /dev/null +++ b/devel/py-xasm/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1722711125 +SHA256 (xasm-1.2.0.tar.gz) = 800ed4d0e2b582fa85c39362ea2958020b8fe48e96d13c2f0895c7f7b1f5f81f +SIZE (xasm-1.2.0.tar.gz) = 39887 diff --git a/devel/py-xasm/files/patch-____pkginfo____.py b/devel/py-xasm/files/patch-____pkginfo____.py new file mode 100644 index 000000000000..b4e7591c79d0 --- /dev/null +++ b/devel/py-xasm/files/patch-____pkginfo____.py @@ -0,0 +1,17 @@ +--- __pkginfo__.py.orig 2021-11-07 21:37:38 UTC ++++ __pkginfo__.py +@@ -35,12 +35,12 @@ ftp_url = None + author = "Rocky Bernstein" + author_email = "rb@dustyfeet.com" + ftp_url = None +-install_requires = [_six] ++install_requires = ["xdis >= 6.0.3"] + license = "GPL-2.0" + mailing_list = "python-debugger@googlegroups.com" + modname = "xasm" + py_modules = None +-setup_requires = ["pytest-runner", "xdis >= 6.0.3, < 6.1.0"] ++setup_requires = [] + # scripts = ['bin/pydisasm'] + short_desc = "Python cross-version byte-code assembler" + tests_require = ["pytest", _six] diff --git a/devel/py-xasm/pkg-descr b/devel/py-xasm/pkg-descr new file mode 100644 index 000000000000..c6b9580c6385 --- /dev/null +++ b/devel/py-xasm/pkg-descr @@ -0,0 +1,14 @@ +The Python xasm module has routines for assembly, and has a command to assemble +bytecode for several different versions of Python. + +Here are some potential uses: +- Make small changes to existing Python bytecode when you don't have source +- Craft custom and efficient bytecode +- Write an instruction-level optimizing compiler +- Experiment with and learn about Python bytecode +- Foil decompilers like uncompyle6 so that they can't disassemble bytecode (at + least for now) + +This support the same kinds of bytecode that xdis supports. This is pretty much +all released bytecode, although we tend to lag behind the latest Python +releases.