# $Id: Portfile 111122 2013-09-15 23:33:55Z jeremyhu@macports.org $

PortSystem 1.0

name        xorg-libX11
version     1.6.2
categories  x11 devel
license     X11
maintainers jeremyhu openmaintainer
description X.org libX11
homepage    http://www.x.org
platforms   darwin macosx
long_description libX11 is the main library used by X Window System applications to communicate with the X server.
master_sites     xorg:individual/lib/

distname    libX11-${version}
checksums           sha1    0dd74854e6f6bb8a322e88ba3e89f87c3dcf9e08 \
                    rmd160  ebfc49399f379b77c3fc2b540af41d4316c0fa67 \
                    sha256  2aa027e837231d2eeea90f3a4afe19948a6eb4c8b2bec0241eba7dbc8106bd16

use_bzip2   yes
use_parallel_build      yes

depends_build   port:pkgconfig \
                port:xorg-xtrans \
                port:xorg-bigreqsproto \
                port:xorg-xcmiscproto \
                port:xorg-xextproto \
                port:xorg-xf86bigfontproto \
                port:xorg-inputproto \
                port:xorg-util-macros

depends_lib     port:xorg-libXdmcp \
                port:xorg-libXau \
                port:xorg-libxcb \
                port:xorg-xproto \
                port:xorg-kbproto

configure.env-append RAWCPP=${configure.cpp}

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

build.args V=1

# Depending on ghostscript for the PDF documentation creates a dependency
# loop, so you may want to install first without the docs variant
variant docs description "Install extra documentation" {
    depends_build-append \
        port:xmlto \
        port:fop \
        port:xorg-sgml-doctools

    depends_skip_archcheck-append \
        xmlto

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

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

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

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