# $Id: Portfile 90422 2012-03-05 02:29:31Z jeremyhu@macports.org $

PortSystem        1.0

name              xorg-libsm
version           1.2.1
categories        x11 devel
license           X11
maintainers       gmail.com:mvfranz
platforms         darwin macosx

description       X.org libSM
long_description  X Session Management Library

homepage          http://www.x.org/
master_sites      xorg:individual/lib/
distname          libSM-${version}
use_bzip2         yes
use_parallel_build yes

checksums           sha1    8d354a165e330022ffd3606aba562b8c8154213d \
                    rmd160  f092ef40158f9b4b71b98c20f9b0606a5e5f8e3a \
                    sha256  93c11d569c64f40723b93b44af1efb474a0cfe92573b0c8c330343cabb897f1d

depends_build \
	port:pkgconfig \
	port:xorg-xtrans

depends_lib \
	port:xorg-libice

configure.args \
	--without-libuuid \
	--without-xmlto \
	--without-fop \
	--disable-docs

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:fop \
		port:xmlto \
		port:xorg-sgml-doctools

	depends_skip_archcheck-append \
		xmlto

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

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

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

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