Name libpixman-1.so.0
Description Low-level pixel manipulation library
Version 0.46.4-r0
Package Base pixman
Homepage https://gitlab.freedesktop.org/pixman
Maintainers ['Natanael Copa <ncopa@alpinelinux.org>']
Contributors []
Distro-repo https://gitlab.alpinelinux.org/alpine/aports/-/tree/3.22-stable/main/pixman
Sources []
Dependencies []
Optional-Dependencies []
Build-Dependencies []
Provides ['so:libpixman-1.so.0=0.46.4']
Builddate 20-07-2025 22:32:58
Architecture x86_64
Distro-Version v3.22
Licenses ['MIT']
Hash Q1975mlHhVWCo8M2Nh/MYSeJSasVA=
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=pixman
pkgver=0.46.4
pkgrel=0
pkgdesc="Low-level pixel manipulation library"
url="https://gitlab.freedesktop.org/pixman"
arch="all"
license="MIT"
makedepends="meson libpng-dev linux-headers"
subpackages="$pkgname-static $pkgname-dev $pkgname-dbg"
source="https://xorg.freedesktop.org/releases/individual/lib/pixman-$pkgver.tar.xz"

case "$CARCH" in
	# segfault in multiple tests
	riscv64) options="!check" ;;
esac


build() {
	case "$CARCH" in
	armhf|riscv64)
		# target-specific builtin not available
		local lto=false
		;;
	*)
		local lto=true
		;;
	esac
	# We need to increase the stacksize here: https://gitlab.gnome.org/GNOME/librsvg/-/issues/595
	LDFLAGS="$LDFLAGS -Wl,-z,stack-size=2097152" \
	# auto-features=auto: a lot of features are architecture dependent
	abuild-meson \
		--auto-features=auto \
		-Db_lto=$lto \
		-Ddefault_library=both \
		-Dlibpng=enabled \
		-Ddemos=disabled \
		-Dtests="$(want_check && echo enabled || echo disabled)" \
		. output
	meson compile -C output
}

check() {
	meson test --print-errorlogs -C output -t 10
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
83b133e7969ba34f883f4e08dcc5d388c4397f43ce836c191c05945fe77c16ff501d531600780c12678a0d08105828a6bdeff2156b63f9c1a84087bc7f40ae9f  pixman-0.46.4.tar.xz
"