PortSystem 1.0

name            xorg-libXaw
version         1.0.13
revision        2
categories      x11 devel
license         X11
maintainers     {jeremyhu @jeremyhu} openmaintainer
description     X.org libXaw
homepage        https://www.x.org
platforms       darwin macosx
long_description Athena Widgets toolkit
master_sites     xorg:individual/lib/

distname    libXaw-${version}
checksums           rmd160  d724ab50da224abc7808eaa6419909cbd0b5d320 \
                    sha256  8ef8067312571292ccc2bbe94c41109dcf022ea5a4ec71656a83d8cce9edb0cd

use_bzip2   yes
use_parallel_build      yes

depends_build   port:pkgconfig \
                port:groff

depends_lib     port:xorg-libsm \
                port:xorg-libXext \
                port:xorg-libXmu \
                port:xpm \
                port:xorg-libXt

patch.pre_args  -p1
patchfiles \
        0001-darwin-Remove-incorrect-export-of-vendorShellClassRe.patch

configure.args \
        --disable-specs \
        --without-xmlto \
        --without-fop

variant docs description "Install extra documentation" {
	depends_build-append \
		port:fop \
		port:xmlto \
		port:xorg-sgml-doctools

	depends_skip_archcheck-append \
		xmlto

	configure.args-delete \
		--without-fop \
		--without-xmlto \
		--disable-specs

	configure.args-append \
		--with-fop \
		--with-xmlto \
		--enable-specs

	configure.env-append \
		FOP=${prefix}/bin/fop \
		XMLTO=${prefix}/bin/xmlto
}

livecheck.type  regex
livecheck.url   https://xorg.freedesktop.org/archive/individual/lib/?C=M&O=D
livecheck.regex libXaw-(\\d+(?:\\.\\d+)*)