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

49 lines
1.7 KiB
Bash

# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: Andreas Radke <andyrtr@archlinux.org>
_pkgname=xcb-util-image
pkgname=static-compat-$_pkgname
pkgver=0.4.1
pkgrel=2
pkgdesc="Utility libraries for XC Binding - Port of Xlib's XImage and XShmImage functions"
arch=('x86_64')
url="https://xcb.freedesktop.org"
license=('custom')
depends=('static-compat-xcb-util')
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=('9b47ba38b91196d76541b6ccabeaf291d3b91036f15422909cd6a79b3fd1a9786d5b1728e411bc41cfdf3d60a253485f4ef7c65ffa6ae646fa93439ec782746e'
'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-image.pc
install -D -m644 COPYING \
"${pkgdir}"/usr/share/licenses/${pkgname}/COPYING
}