void-packages/srcpkgs/pixman/template
Érico Rolim 3078a6a912 pixman: fix potential build errors with meson 0.56.x.
I couldn't reproduce the errors, so this commit is not entirely
necessary. It still works as a precaution.

The below is slightly erroneous, since the issue didn't repeat itself.

Apparently meson detects OpenMP as available on cross builds because it
can find the omp.h header, even though the library seems to be
available.

For reference, what the configure output of a native build looks like:

WARNING: OpenMP found but omp.h missing.
Run-time dependency OpenMP found: NO
2021-02-03 02:24:02 -03:00

42 lines
1.5 KiB
Bash

# Template file for 'pixman'
pkgname=pixman
version=0.40.0
revision=1
build_style=meson
# gtk is only necessary for demos, disabled to avoid dependency loop
configure_args="-Dgtk=disabled -Dgnu-inline-asm=enabled -Diwmmxt=disabled"
hostmakedepends="pkg-config perl"
checkdepends="libpng-devel libgomp-devel"
short_desc="Library of low-level pixel manipulation routines"
maintainer="Érico Nogueira <ericonr@disroot.org>"
license="MIT"
homepage="http://pixman.org/"
distfiles="https://www.cairographics.org/releases/${pkgname}-${version}.tar.gz"
checksum=6d200dec3740d9ec4ec8d1180e25779c00bc749f94278c8b9021f5534db223fc
# set stacksize for musl: https://gitlab.gnome.org/GNOME/librsvg/-/issues/595
LDFLAGS="-Wl,-z,stack-size=2097152"
if [ "$XBPS_CHECK_PKGS" ]; then
# libpng and openmp are used only for testing; the make-blue-noise.c file isn't built
# https://gitlab.freedesktop.org/pixman/pixman/-/blob/9b49f4e08751885289333fed652bf5e0f45976b4/pixman/dither/make-blue-noise.c
configure_args+=" -Dtests=enabled -Dlibpng=enabled -Dopenmp=enabled"
else
# dynamic libgomp is available only when running tests, better to disable explicitly.
# -Dtests will only take effect on the next release.
configure_args+=" -Dtests=disabled -Dopenmp=disabled"
fi
post_install() {
vlicense COPYING LICENSE
}
pixman-devel_package() {
depends="pixman>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
}
}