description="libx11, library for client X"
url="http://xorg.freedesktop.org"

packager="spiky <spiky@nutyx.org>"
contributors="Pierre,Greg,Tnut"

makedepends=(xorgproto libxcb xorg-xtrans)

name=xorg-libx11
alias=(libX11)
version=1.8.3
_name=libX11

source=(http://ftp.x.org/pub/individual/lib/${_name}-$version.tar.xz)

build() {
cd ${_name}-$version
./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--disable-static \
--disable-thread-safety-constructor
make DESTDIR=$PKG install
}

package() {
rm $PKG/usr/lib/${_name}{,-xcb}.la
}

uptodate() {
local ext url name LINX
LYNX="lynx -read_timeout=20 -dump -listonly -nonumbers "
ext=".tar.bz2"
url="https://ftp.x.org/archive//individual//lib"
name="libX11-"
$LYNX $url/?C=M\;O=D|grep "$ext$"|grep "$url/$name"|sed "s@$ext\$@@"|sed "s@$url/$name@@"|head -1
}
