# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           ruby 1.0

# The version of Ruby chosen here works across all OS versions and CPU
# architectures.  Don't change it without preserving this property.
# The choice of Ruby versions doesn't affect clients.
#
# The asciidoctor website still lists 3.3 as the highest compatible CRuby
# version.  The documentation indicates that this version has a short-term
# fix for an issue with CRuby 3.4, but there's no good reason to exercise
# it, since having multiple versions of Ruby installed isn't very expensive.
#
ruby.setup          asciidoctor 2.0.26 gem {} rubygems ruby33
name                asciidoctor
revision            0

# Prevent addition of the ruby interpreter version number as suffix to command line tools
ruby.link_binaries_suffix

categories          textproc
platforms           {darwin any}
supported_archs     noarch

license             MIT
maintainers         {fwright.net:fw @fhgwright} openmaintainer
description         A fast text processor & publishing toolchain for \
                    converting AsciiDoc to HTML5, DocBook & more
long_description    Asciidoctor is a fast, open source, Ruby-based \
                    text processor for parsing AsciiDoc into \
                    a document model and converting it to output \
                    formats such as HTML 5, DocBook 5, manual pages, \
                    PDF, EPUB 3, and other formats. Asciidoctor also \
                    has an ecosystem of extensions, converters, build \
                    plugins, and tools to help you author and publish \
                    content written in AsciiDoc.
homepage            https://asciidoctor.org/

checksums           rmd160  920a15977e19f2b7741a0c2616d48502eebbb3a7 \
                    sha256  16e3accf1fc206bbd6335848649d7fd65f31d2daa60d85af13d47a8ee4b071c1 \
                    size    284672

# Use normal distfile location, instead of 'ruby'.
dist_subdir         ${name}

post-destroot {
    set man1 ${destroot}${prefix}/share/man/man1
    xinstall -d ${man1}
    ln -s ${ruby.gemdir}/gems/${name}-${version}/man/${name}.1 ${man1}
}
