Towards an 'official' way of installing AMC using Homebrew

Added by Maël Valais over 6 years ago

Hi,

People at Institut de Recherche en Informatique de Toulouse are heavily relying on AMC but also like using MacOS. The easy way is to go with Macports; sadly, Homebrew is not supported altogether. In an other post, I saw an attempt to create a brew formula. The idea was good but realying on many external installations (perl dependencies) and was not actually working (the Glib package would refuse to install using CPAN, failing on tests).

The formula is on Github: https://github.com/maelvalais/homebrew-amc

In my attempt to create a Homebrew formula, here is what I managed to do:
- the formula only relies on an already installed Mactex installation
- everything else is vendored; perl and python dependencies are not installed globally on the system, they are installed in the formula's prefix
- the whole process only installs in the formula's prefix, meaning that it does not install stuff elsewhere

The main drawback is that the build process relies on the mactex dependency which cannot be installed automatically; this means that any pull request for adding AMC in the Homebrew/homebrew-core repository would be rejected (I think !). It would be awesome if we could install everything without the need for latex.
Also, the whole build takes some time (~3min); --I could create bottles (= precompiled binaries) but because of the many homebrew dependencies, I would have to rebuild a bottle each time a dependency is updated...-- bottles are now created so you don't even have to wait!

To install it:

brew install maelvalais/amc/auto-multiple-choice

If you rather want to install the HEAD version (the one on bitbucket), you can simply do: brew install maelvalais/amc/auto-multiple-choice --HEAD I had to disable the --HEAD possibility because we now use 'dist' tarballs that contain prebuilt documentation and allows me to have no dependency on Mactex during installation. Keeping --HEAD would be way too much hassle for me (it was really complicated). But I assure you I'll keep the formula up to date as much as possible so that you do not feel (too much) the need for --HEAD.

Notes
  • I had to make a lot of amends to Makefile-macports.conf to make it work We added a file Makefile-brew.conf in the repo, so Homebrew is kind of almost officially supported!
  • I used the ChangeLog's version number (1.3.0+hg2017-10-25) but I point to the 1.3.0.2132 revision hash...
I am a bit lost with the different numberings in this project:
  • 1.3.X is not used anymore?
  • 1.3.0.2132 uses the mercurial absolute revision number but it does not match the ChangeLog
  • 1.3.0+hg2017-10-25 exists in the Changelog but does not match the macports version

Anyway, any feedback on this formula is appreciated!


Replies (3)

RE: Towards an 'official' way of installing AMC using Homebrew - Added by Maël Valais over 6 years ago

Instead of using a gist, I put the formula in a proper tap. The correct way of installing is now:

brew install maelvalais/amc/auto-multiple-choice

RE: Towards an 'official' way of installing AMC using Homebrew - Added by Alexis Bienvenüe over 6 years ago

I had to make a lot of amends to Makefile-macports.conf to make it work

Maybe you can prepare a Makefile-homebrew.conf file that could be included in AMC?

1.3.X is not used anymore?

It is used for releases. AMC had a lot of small enhancements since 1.3.0, but with no proper release… Maybe when I will have some more time.

1.3.0+hg2017-10-25

Temporary version number used in the Changelog and in the PPA packages for the development version at the specified date. However the Changelog is not updated at each commit, so that this version number can be found in the Changelog for many different mercurial revisions.

RE: Towards an 'official' way of installing AMC using Homebrew - Added by Maël Valais over 6 years ago

Sure! I can prepare some patches in order to avoid the many patches I apply in the formula.

By the way, is there any way to edit my initial post? Weirdly, there is no 'edit' button
Update: the edit buttons appeared! Thanks!

(1-3/3)