asciidoctor-diagram icon indicating copy to clipboard operation
asciidoctor-diagram copied to clipboard

Add Homebrew fomular

Open hcoona opened this issue 6 years ago • 11 comments

I'd like to have asciidoctor-diagram in Homebrew fomular just like asciidoctor

hcoona avatar Sep 29 '18 05:09 hcoona

I support this idea. It could really simplify installation. Would you be willing to contribute the formula (or at least get started)?

mojavelinux avatar Sep 29 '18 07:09 mojavelinux

I tried by modify asciidoctor fomular but failed to get it work. We need somebody familiar with the Homebrew gem mechanism.

https://gist.github.com/hcoona/e24394c3501e70513fcc57860b980f3a

There is a major issue: the asciidoctor cannot found asciidoctor-diagram gem.

There is a minor issue: the asciidoctor-diagram also build asciidoctor gem although I installed it by brew install asciidoctor. As a result, there are 2 asciidoctor commands provided by asciidoctor homebrew fomular & asciidoctor-diagram fomular. (The major issue occurs for either case)

hcoona avatar Sep 29 '18 08:09 hcoona

Can you be more specific about what didn't work?

mojavelinux avatar Sep 29 '18 08:09 mojavelinux

Was there any progress on this issue? Having installed Asciidoctor via brew, it would be great to be able to install the diagram extension the same way.

eddiejaoude avatar Nov 10 '20 10:11 eddiejaoude

This is not something I'm working on myself. It's not clear to me what the added value is of brew install asciidoctor-diagram over gem install asciidoctor-diagram to be honest.

pepijnve avatar Nov 10 '20 11:11 pepijnve

The reason why I want to install it via brew instead of gem, is for 2 reasons:

  1. I installed asciidoctor via brew
  2. In my dotfiles repo, I have a brew file with a list of items, but I do not have or use a gem file, so I would need to add it to my config just for the 1 item

eddiejaoude avatar Nov 10 '20 11:11 eddiejaoude

Maybe something like https://github.com/sportngin/brew-gem could help there?

pepijnve avatar Nov 10 '20 13:11 pepijnve

Oh nice, thank you 👍

eddiejaoude avatar Nov 10 '20 13:11 eddiejaoude

The problem here is that AsciiDoctor on Homebrew comes with a starter script which explicitly specifies a GEM_HOME:

$ less /usr/local/bin/asciidoctor
#!/bin/bash
GEM_HOME="/usr/local/Cellar/asciidoctor/2.0.15/libexec" exec "/usr/local/Cellar/asciidoctor/2.0.15/libexec/bin/asciidoctor"  "$@"

If you need the asciidoctor-diagram plugin, you need to install that to the version specific GEM_HOME directory. And you need to do that with any update of asciidoctor. I do have a cron Job on my MacBook which performs a nightly update of all formulas. Therefor it would be great if there was a asciidoctor-diagram formula which would then update the diagram feature as well.

ascheman avatar Jun 03 '21 13:06 ascheman

Checking in: has there been any further thoughts, movement, motivation for this?

johnnyutahh avatar Apr 06 '23 14:04 johnnyutahh

@johnnyutahh nothing from my side and no plans either. Pull requests, If necessary, are welcome of course.

pepijnve avatar Apr 06 '23 17:04 pepijnve