Page 1 of 1

Use homebrew to build BII

Posted: Sat Jun 27, 2020 4:36 am
by rickyzhang
I used macport to get its dependencies to build BII in Mac OS X.

But Travis CI support homebrew rather than macport. I'm not familiar with homebrew.

If anyone knows the BII dependencies in hombrew, please let me know. I'd like to add Mac OS X to Travis CI, as well.

This will help any broken build as early as possible in upstream repository.

Thanks

Re: Use homebrew to build BII

Posted: Tue Jul 07, 2020 5:41 pm
by adespoton
Homebrew has the same packages as MacPorts; you should just be able to collect the dependency tree and then do brew install <package> and it'll download and install the binaries when available, and download, build and install the source where the binaries are unavailable. Homebrew tends to be more mac-like in how it works, and less like BSD ports. But the packages are pretty much the same.

Re: Use homebrew to build BII

Posted: Tue Jul 07, 2020 10:09 pm
by rickyzhang
I tried. But I can't find gtk2-devel from homebrew.

I incorporated Mac OS X in the Travis CI. But I haven't added GUI UI in the CI due to the missing dependency. I only added SDL2 from homebrew.

If your Mac OS X uses homebrew, please let me know how you add X11 and gtk libraries from homebrew.

See below:

https://github.com/cebix/macemu/blob/ma ... ml#L43-L47

Re: Use homebrew to build BII

Posted: Tue Jul 07, 2020 11:21 pm
by adespoton
Hmm... it appears to provide gtk+, gtk-mac-integration, and a number of gtk-based apps. It looks like you'd have to roll your own formula to get gtk2-devel... which seems odd. I know I've complied gtk-based software via brew. Maybe the integration package is enough?

For X11, it provides an aqua stub IIRC so you don't need to use X; compiled software shows up using aqua instead.

That said, brew contains wireshark, which requires X, so there must be a way. You could check the wireshark formula to see how it manages things.

Re: Use homebrew to build BII

Posted: Wed Jul 08, 2020 11:00 am
by rickyzhang
Thanks for your advice.

Homebrew is quit different from Macports. It is built instruction is in form of JSON.

I checked each of Wireshark's dependencies. None of them relates to X11 or gtk. Surprise. Surprise. Surprise.
See below:
https://formulae.brew.sh/api/formula/wireshark.json

The Gnome App gedit does shows gtk+3. But it is not gtk2. Anyway, I will give a try in Travis by adding gtk+3 but no X11 and see if it works.

https://formulae.brew.sh/formula/gedit#default

Thanks

Re: Use homebrew to build BII

Posted: Wed Jul 08, 2020 12:07 pm
by rickyzhang
I added gtk+3 like gedit in homebrew

https://github.com/cebix/macemu/compare ... for-mac-os


But it didn't find the gtk in Travis.

https://travis-ci.org/github/rickyzhang ... 18825#L232

Do you install homebrew in your Mac? Could you build BII with the following configure:

Code: Select all

cd BasiliskII/src/Unix
NO_CONFIGURE=1 ./autogen.sh
./configure --enable-sdl-video --enable-sdl-audio --disable-vosf --disable-jit-compiler --with-x --with-gtk --with-mon --with-sdl2 --enable-addressing=banks
make -j 4
All my Mac install Macports. It takes forever to build and maintain it. So I don't want to delete Macports and try on homebrew.

I don't have Mac OS VM, otherwise I will install homebrew and give a try.

Re: Use homebrew to build BII

Posted: Wed Jul 08, 2020 3:05 pm
by adespoton
I've only got limited access to my Mac dev environment, but I'll try to fit in a build and see what happens. I've been looking to see whether there's a virtual environment that can be deployed to keep the two separate on the same host, but haven't found anything I'd trust yet.