Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Apr 2026 10:18:37 +0000
From:      Kevin Bowling <kbowling@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: e931506f463e - main - sysutils/py-greaseweazle: New port
Message-ID:  <69f0897d.46d1e.42ff0ee8@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by kbowling:

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

commit e931506f463e1a7da111701e373a0868a02c7be9
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2026-04-28 10:16:48 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-04-28 10:17:20 +0000

    sysutils/py-greaseweazle: New port
    
    Magnetic flux tool to read, write, analyze floppy disks.
    
    https://github.com/keirf/greaseweazle
---
 sysutils/Makefile                                  |  1 +
 sysutils/py-greaseweazle/Makefile                  | 30 ++++++++++++++++++++++
 sysutils/py-greaseweazle/distinfo                  |  3 +++
 .../files/patch-src-greaseweazle-tools-util.py     | 11 ++++++++
 sysutils/py-greaseweazle/pkg-descr                 |  9 +++++++
 sysutils/py-greaseweazle/pkg-message               | 14 ++++++++++
 6 files changed, 68 insertions(+)

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
+}
+]


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69f0897d.46d1e.42ff0ee8>