summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e50067c483feb08bf4682252bbadfb2232bbe65a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Maintainer:
# Contributor: Philipp A. <flying-sheep@web.de>
# Contributor: Doug Newgard <scimmia22 at outlook dot com>
# Contributor: NeoRaider <neoraider@universe-factory.net>
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>

_pkgname="libxcb"
pkgname="$_pkgname-git"
pkgver=1.16.r5.g3c94601
pkgrel=1
pkgdesc="X11 client-side library"
arch=(i686 x86_64)
#url="https://xcb.freedesktop.org/"
url="https://gitlab.freedesktop.org/xorg/lib/libxcb"
license=('X11')

depends=(
  'glibc'
  'libxau'
  'libxdmcp'
)
makedepends=(
  'libxslt'
  'python'
  'xorg-util-macros'
  'xorgproto'
)

if [ x"$pkgname" == x"$_pkgname" ] ; then
  # extra/libxcb
  depends+=('xcb-proto')
else
  # aur/libxcb-git
  depends+=('xcb-proto-git')
  makedepends+=('git')

  provides=("$_pkgname=${pkgver%%.r*}")
  conflicts=("$_pkgname")

  _pkgsrc="$_pkgname"
  source=("$_pkgsrc"::"git+$url.git")
  sha256sums=('SKIP')

  pkgver() {
    cd "$_pkgsrc"
    git describe --long --tags \
      | sed -E 's/^[^0-9]+//;s/([^-]*-g)/r\1/;s/-/./g'
  }
fi

build() {
  cd "$_pkgsrc"
  local _config_options=(
    --prefix='/usr'
    --enable-xinput
    --enable-xkb
    --disable-static

    --with-doxygen=no
  )

  ./autogen.sh "${_config_options[@]}"

  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

check() {
  cd "$_pkgsrc"
  make -k check
}

package() {
  cd "$_pkgsrc"
  make DESTDIR="${pkgdir:?}" install

  install -Dm644 "COPYING" -t "${pkgdir:?}/usr/share/licenses/$pkgname/"
}