Porting software to FreeBSD

I currently use a certain mail program (Mailspring) for multiple email clients on my Linux machines. I was wondering how hard it would be or if it is even possible to Port this to FreeBSD? Looking for some very good detailed instructions on doing so. Any help would be greatly appreciated.

Thanks!
 
It's an electron app. Electron is the pest for porting (and the porter's handbook will be of little help here). I really wouldn't recommend trying to start with such a thing…
 
It's an electron app. Electron is the pest for porting (and the porter's handbook will be of little help here). I really wouldn't recommend trying to start with such a thing…
Well that's a bummer because this has been such an awesome email client that works very well in OSX and Linux. Was really hoping to here that it could be done.
 
It's opensource, so it can be done. But it's not a port one should tackle as a beginner. Electron is the opposite of being friendly to things like reproducible builds, fetching of required distfiles, packaging, etc…

As an example, have a look at the port for Visual Studio Code: https://cgit.freebsd.org/ports/tree/editors/vscode/Makefile

I think this whole idea of "write a desktop app as if you were writing a browser app" is flawed and don't understand why people are using it…
 
Some months ago I've tried porting (I don't remember what software exactly) that used electron. It had so many chimichangas that I gave up. They say it's "simple because it's a web as desktop app" but actually isn't that simple and most of the time it relies on an horrid group of extra things. For linux usually is more straight-forward because they give you an appimage (that could work on freebsd, depending on the scenario) or just a binary thing that you can throw somewhere and run.
Back to the point, check what you have inside the mailspring package, if the app is just a simple .asar (like authy) you're lucky so you just need to run something like "electron app.asar". AFAIK, mailspring depends on some extra stuff, maybe it works just starting the app.asar.
 
  • Like
Reactions: sig
I personally just use whatever browser-based interface the email system provides. Yeah, you can hook Outlook up to Gmail, or to a different email service. Or, you can hook up any smartphone to any email service. SirDice has very good advice on how to start a porting project, but be prepared to spend a few months at least, learning both the Ports system and Electron/JavaScript and C/C++ and how to make the whole enchilada work, starting with a simple helloworld program.

If you have the patience and determination and skill for something like that, there's nothing to stop you from going down that road. Otherwise, I think you'd be better off looking in the FreeBSD ports for a replacement email client - there's plenty of alternatives.
 
I attempted to port Nylas N1(which became Mailspring) back in 2016, I'd already created a port for a very easy Go application (www/gohugo) and was high on success. Attempting to port N1 brought me crashing down. I think it might be a bit better today, I'm sure a year or two ago I saw work going into Electron for FreeBSD (from the FreeBSD side), so you might get lucky.
Menelkir seems to have some good advice!
 
If you port something that requires Electron to build or run then Electron itself has to be added to the ports tree too. You cannot have a port depending on something that's not in the ports tree. All its dependencies (build, run or library) will have to be added first.
 
It expired though:
Code:
This port expired on: 2020-12-31
 
This is just the typical python-2 foo and it's on the same list of exceptions as chromium… (well, for now, at least it wasn't hit by the big removal of anything requiring python-2. We will see how that is going …)
 
Back
Top