1
0
mirror of https://git.freebsd.org/ports.git synced 2026-06-02 11:08:52 +00:00

sysutils/py-greaseweazle: New port

Magnetic flux tool to read, write, analyze floppy disks.

https://github.com/keirf/greaseweazle
This commit is contained in:
Kevin Bowling
2026-04-28 03:16:48 -07:00
parent 000a1b398b
commit e931506f46
6 changed files with 68 additions and 0 deletions
+1
View File
@@ -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
+30
View File
@@ -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>
+3
View File
@@ -0,0 +1,3 @@
TIMESTAMP = 1777352742
SHA256 (keirf-greaseweazle-v1.23_GH0.tar.gz) = 991b89e3f4ff084f5a5f315f81d0816cf6ee3d2e916b504af6c06718de1f2abf
SIZE (keirf-greaseweazle-v1.23_GH0.tar.gz) = 135181
@@ -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:
+9
View File
@@ -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.
+14
View File
@@ -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
}
]