rrthomas / plptools

Tools for connection to EPOC devices
GNU General Public License v2.0
19 stars 8 forks source link

Add macOS support #7

Closed kapfab closed 8 months ago

kapfab commented 9 months ago

I made a few changes to allow plptools to build and run on macOS. ncpd, plpftp, plpprint and sisinstall work fine. I didn’t test plpfuse as making MacFuse/OSXFuse work on recent macOS releases is a mess (kernel extensions being deprecated), but it can compile successfully.

These changes have been tested on macOS Ventura (13.6.1) on an Apple Silicon (M1) Mac, they should also work on Intel Macs as they’re not architecture-specific. Building under Linux is still OK with these changes.

kapfab commented 9 months ago

Updated the README-related commit, let me know if it’s OK for you.

kapfab commented 8 months ago

Are you expecting further changes to merge this PR? I plan to create an Homebrew formula for plptools and I’d prefer to make it use the master branch of this official repo rather than my fork. Let me know if I can help.

rrthomas commented 8 months ago

Are you expecting further changes to merge this PR?

It looks from my last comment that I was, as I mention "a couple of minor style improvements", but I can't see any specific improvements, so I just read through the text changes again and commented on what leapt out at me.

kapfab commented 8 months ago

Unless I missed something, all of your comments were addressed and I made the macOS-specific instructions as short as possible. Let me know if you see anything else.

rrthomas commented 8 months ago

Sorry, I wasn't clear. I meant, I have just now made one new comment (see above).

kapfab commented 8 months ago

Reloaded the page but I can’t see it.

rrthomas commented 8 months ago

Reloaded the page but I can’t see it.

Sorry, I think that was because I hadn't submitted my review; now done.

rrthomas commented 8 months ago

Many thanks, I'll make a release shortly.

rrthomas commented 8 months ago

1.0.16 released; many thanks for your work, and happy brew-ing!

kapfab commented 8 months ago

Thank you! I’m glad so little changes were needed to make it work with macOS after all these years.

rrthomas commented 8 months ago

Yes! Looking at the changes, the additions to the Makefiles are strictly speaking bug fixes, not macOS-specific, while the changes to the code owe more to the unportability of serial code circa 2000.

I don't propose to change anything now, but just out of interest I looked into how much is standardized by POSIX. The main problem seems to be hardware flow control (CRTSCTS), which is not covered (and as you probably noticed, has a completely different API on AIX and HP/UX). Still, I think the code could be simplified were it likely to need to change.

kapfab commented 8 months ago

Yeah, POSIX is great but it’s not a panacea. Anyway, all the serial-related code for plptools is isolated in a single dedicated file which is not very complicated to amend when needed. I don’t think there are (m)any people still using plptools on Solaris, AIX, HP/UX or SGI, but who knows…