GHC 2017-11-19

4 comments.

, https://git.io/vFHbk in asciidoctor/asciidoctor
Submitted https://github.com/asciidoctor/asciidoctor.org/pull/747.

, https://git.io/vFHbI in asciidoctor/asciidoctor.org
Update Homebrew installation procedure for macOS
================================================

Ref https://github.com/asciidoctor/asciidoctor/pull/2469.

I also removed/updated some heavily outdated information.

, https://git.io/vFH1b in asciidoctor/asciidoctor
Sorry, I've been kinda busy and forgot to reply here. I'll submit a PR to update the docs soon.

, https://git.io/vFH1N in asciidoctor/asciidoctor
> In French the first sentence was a bit repetitive so I've decided to remove the first part.

Yeah, I was kind of following the style of other subsections like dnf and apt-get... They are indeed repetitive.

> because you don't install something into a "prefix".

I'm loosely using the term "prefix" in the sense of the traditional `configure --prefix=$PREFIX`; think of the standard [`prefix` variable](https://www.gnu.org/prep/standards/html_node/Directory-Variables.html) from GNU coding standards. For `gem` this is basically `GEM_HOME`; in fact, here's what we do in Homebrew:

```rb
  def install
    ENV["GEM_HOME"] = libexec
    system "gem", "build", "asciidoctor.gemspec"
    system "gem", "install", "asciidoctor-#{version}.gem"
    bin.install Dir[libexec/"bin/*"]
    bin.env_script_all_files(libexec/"bin", :GEM_HOME => ENV["GEM_HOME"])
  end
```

where `libexec` translates to `$HOMEBREW_PREFIX/Cellar/asciidoctor/$version/libexec`. So the resulting structure of installation is

```console
$ tree -L 3 /usr/local/Cellar/asciidoctor/1.5.6.1/
/usr/local/Cellar/asciidoctor/1.5.6.1/
├── CHANGELOG.adoc
├── INSTALL_RECEIPT.json
├── LICENSE.adoc
├── README.adoc
├── bin
│   ├── asciidoctor
│   └── asciidoctor-safe
└── libexec
    ├── bin
    │   ├── asciidoctor
    │   └── asciidoctor-safe
    ├── build_info
    ├── cache
    │   └── asciidoctor-1.5.6.1.gem
    ├── doc
    │   └── asciidoctor-1.5.6.1
    ├── extensions
    ├── gems
    │   └── asciidoctor-1.5.6.1
    └── specifications
        └── asciidoctor-1.5.6.1.gemspec

11 directories, 10 files
```