diff options
| author | Kevin Bowling <kbowling@FreeBSD.org> | 2026-04-28 10:16:48 +0000 |
|---|---|---|
| committer | Kevin Bowling <kbowling@FreeBSD.org> | 2026-04-28 10:17:20 +0000 |
| commit | e931506f463e1a7da111701e373a0868a02c7be9 (patch) | |
| tree | 8fb66049b80b379cfbdcc8794856415bfbc064e0 | |
| parent | 000a1b398bdc37e981b791f5e05ed03d48775b77 (diff) | |
sysutils/py-greaseweazle: New port
Magnetic flux tool to read, write, analyze floppy disks.
https://github.com/keirf/greaseweazle
| -rw-r--r-- | sysutils/Makefile | 1 | ||||
| -rw-r--r-- | sysutils/py-greaseweazle/Makefile | 30 | ||||
| -rw-r--r-- | sysutils/py-greaseweazle/distinfo | 3 | ||||
| -rw-r--r-- | sysutils/py-greaseweazle/files/patch-src-greaseweazle-tools-util.py | 11 | ||||
| -rw-r--r-- | sysutils/py-greaseweazle/pkg-descr | 9 | ||||
| -rw-r--r-- | sysutils/py-greaseweazle/pkg-message | 14 |
6 files changed, 68 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile index eb54a0477e64..2e3208bca59f 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -1077,6 +1077,7 @@ SUBDIR += py-focker SUBDIR += py-glances SUBDIR += py-google-compute-engine + SUBDIR += py-greaseweazle SUBDIR += py-hared SUBDIR += py-hcloud SUBDIR += py-healthchecks diff --git a/sysutils/py-greaseweazle/Makefile b/sysutils/py-greaseweazle/Makefile new file mode 100644 index 000000000000..cab85537de15 --- /dev/null +++ b/sysutils/py-greaseweazle/Makefile @@ -0,0 +1,30 @@ +PORTNAME= greaseweazle +DISTVERSIONPREFIX= v +DISTVERSION= 1.23 +CATEGORIES= sysutils python +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= kbowling@FreeBSD.org +COMMENT= Tools for accessing a floppy drive at the raw flux level +WWW= https://github.com/keirf/greaseweazle + +LICENSE= UNLICENSE +LICENSE_FILE= ${WRKSRC}/COPYING + +BUILD_DEPENDS= ${PY_SETUPTOOLS} \ + ${PYTHON_PKGNAMEPREFIX}setuptools-scm>=0:devel/py-setuptools-scm@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}bitarray>=3:devel/py-bitarray@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}crcmod>0:devel/py-crcmod@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pyserial>0:comms/py-pyserial@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} + +USES= python + +USE_GITHUB= yes +GH_ACCOUNT= keirf +USE_PYTHON= autoplist concurrent pep517 + +MAKE_ENV= SETUPTOOLS_SCM_PRETEND_VERSION=${PORTVERSION} + +.include <bsd.port.mk> diff --git a/sysutils/py-greaseweazle/distinfo b/sysutils/py-greaseweazle/distinfo new file mode 100644 index 000000000000..0fdeb0e6fbd8 --- /dev/null +++ b/sysutils/py-greaseweazle/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1777352742 +SHA256 (keirf-greaseweazle-v1.23_GH0.tar.gz) = 991b89e3f4ff084f5a5f315f81d0816cf6ee3d2e916b504af6c06718de1f2abf +SIZE (keirf-greaseweazle-v1.23_GH0.tar.gz) = 135181 diff --git a/sysutils/py-greaseweazle/files/patch-src-greaseweazle-tools-util.py b/sysutils/py-greaseweazle/files/patch-src-greaseweazle-tools-util.py new file mode 100644 index 000000000000..6bc44878afc8 --- /dev/null +++ b/sysutils/py-greaseweazle/files/patch-src-greaseweazle-tools-util.py @@ -0,0 +1,11 @@ +--- src/greaseweazle/tools/util.py.orig 2025-12-17 09:54:59 UTC ++++ src/greaseweazle/tools/util.py +@@ -356,6 +356,9 @@ + def score_port(x, old_port=None): + score = 0 ++ # pyserial's FreeBSD DevInfo may lack USB attributes on non-USB ports ++ if not hasattr(x, 'manufacturer'): ++ return score + if x.manufacturer == "Keir Fraser" and x.product == "Greaseweazle": + score = 20 + elif x.vid == 0x1209 and x.pid == 0x4d69: diff --git a/sysutils/py-greaseweazle/pkg-descr b/sysutils/py-greaseweazle/pkg-descr new file mode 100644 index 000000000000..5038fbb4c652 --- /dev/null +++ b/sysutils/py-greaseweazle/pkg-descr @@ -0,0 +1,9 @@ +Greaseweazle is a set of tools for accessing a floppy drive at the raw +flux level. This allows reading and writing of raw flux data, as well as +conversion between various floppy disk image formats. It supports a wide +range of floppy disk formats including IBM, Amiga, Commodore 64, Apple, +and Macintosh. + +The "gw" command-line tool communicates with a Greaseweazle USB device to +read, write, and manipulate floppy disks at a level below the normal +operating system disk interface. diff --git a/sysutils/py-greaseweazle/pkg-message b/sysutils/py-greaseweazle/pkg-message new file mode 100644 index 000000000000..f380b94f75ad --- /dev/null +++ b/sysutils/py-greaseweazle/pkg-message @@ -0,0 +1,14 @@ +[ +{ type: install + message: <<EOM +Greaseweazle devices require firmware with CLEAR_FEATURE(ENDPOINT_HALT) +support to work reliably on FreeBSD. Without this fix, the device will +stop responding after the first use until physically unplugged. + +See https://github.com/keirf/greaseweazle-firmware/pull/18 +This fix may be included in firmware version 1.7 or later. + +Update your device firmware with: gw update +EOM +} +] |
