PKGBUILDs/xcb-util-cursor/static-compat/PKGBUILD

49 lines
1.7 KiB
Bash

# Contributor: AndyRTR <andyrtr@archlinux.org>
# Contributor: Bastien Dejean <nihilhill@gmail.com>
_pkgname=xcb-util-cursor
pkgname=static-compat-$_pkgname
pkgver=0.1.4
pkgrel=1
pkgdesc="XCB cursor library"
arch=('x86_64')
url="https://xcb.freedesktop.org"
license=('custom:MIT')
depends=('static-compat-xcb-util-image' 'static-compat-xcb-util-renderutil')
makedepends=('xorg-util-macros' 'static-compat-xorgproto' 'static-compat-configure')
options=(staticlibs)
source=(https://xorg.freedesktop.org/archive/individual/lib/${_pkgname}-${pkgver}.tar.xz{,.sig})
sha512sums=('d27dd59a4d7ded9994dca77774421dd9533e3ee823b880af35d3219bd7340c89fbc61d1d0fa10e2991de2cac9e6395e09497769d7b8728eedc691e76649107b1'
'SKIP')
validpgpkeys=('4A193C06D35E7C670FA4EF0BA2FB9E081F2D130E') # Alan Coopersmith <alan.coopersmith@oracle.com>
build() {
source static-compat-environment
cd ${_pkgname}-${pkgver}
export PATH=$PWD:$PATH
printf '#!/usr/bin/bash\nexec /usr/bin/pkg-config --static "$@"\n' > pkg-config
chmod +x pkg-config
static-compat-configure --disable-shared --enable-static
make
}
check() {
source static-compat-environment
cd ${_pkgname}-${pkgver}
make check
}
package() {
source static-compat-environment
cd ${_pkgname}-${pkgver}
make DESTDIR="${pkgdir}" install
# avoid linker error
# /usr/bin/ld: /usr/static-compat/lib/libxcb-image.a(xcb_image.o): in function `xcb_create_pixmap_from_bitmap_data':
# (.text+0x14b7): undefined reference to `xcb_aux_create_gc'
sed -i 's|Requires:.*|\0 xcb-util|g' "$pkgdir/$static_compat_prefix"/lib/pkgconfig/xcb-cursor.pc
install -D -m644 COPYING \
"${pkgdir}"/usr/share/licenses/${pkgname}/COPYING
}