Migrating the guide to AsciiDoc

Rainer Müller raimue at macports.org
Mon Apr 23 15:42:18 UTC 2018


On 2018-04-22 09:29, Mojca Miklavec wrote:
> Hi,
> 
> As requested during yesterday's meeting, here's the result of
> automatic conversion of our guide from xml (docbook) to asciidoc:
> 
>     https://github.com/macports/macports-guide/tree/master/guide/adoc
> 
> This was initially explored by Aljaž and gives quite nice results
> out-of-the-box, but there are still some issues with conversion that
> will have to be addressed either by fixing docbookrx itself or
> manually.

Ruby and gems are really strange...

Apparently, installing nokogiri with bundle fails because it tries to
execute pkg-config with DYLD_LIBRARY_PATH set, for whatever reason. This
leads to crashes as it draws in incompatible versions of libjpeg. I was
not even able to determine where this DYLD_LIBRARY_PATH in the
environment is coming from.

Here is a way to get it working:

$ git clone https://github.com/asciidoctor/docbookrx
$ cd docbookrx
$ sudo port install rb23-bundler
$ bundle-2.3 config --local build.nokogiri --use-system-libraries --with-xml2-dir=/opt/local --with-xml2-include=/opt/local/include/libxml2 --with-xslt-dir=/opt/local --with-zlib-dir=/opt/local --with-exslt-dir=/opt/local --without-pkg-config
$ bundle-2.3 install --path=.bundle/gems

Then go to the guide/xml/ directory of macports-guide:

$ BUNDLE_GEMFILE=~/src/docbookrx/Gemfile bundle-2.3 exec docbookrx guide.xml
$ mv *.adoc ../adoc/

Rainer


More information about the macports-dev mailing list