PKGNAME=pixman
PKGSEC=libs
PKGDEP="glibc libpng"
PKGDES="Pixel manipulation library for X and Cairo"

ABTYPE=meson
MESON_AFTER=(
	'-Dgnu-inline-asm=enabled'
	'-Dopenmp=enabled'
	'-Dtimers=true'
	'-Dgnuplot=false'
	'-Dgtk=disabled'
	'-Dlibpng=enabled'
)
MESON_AFTER__RETRO=(
	"${MESON_AFTER[@]}"
	'-Dopenmp=disabled'
)
MESON_AFTER__AMD64=(
	"${MESON_AFTER[@]}"
	'-Dmmx=enabled'
	'-Dsse2=enabled'
	'-Dssse3=disabled'
)
MESON_AFTER__ARM64=(
	"${MESON_AFTER[@]}"
	'-Dneon=disabled'
)
MESON_AFTER__LOONGSON3=(
	"${MESON_AFTER[@]}"
	'-Dloongson-mmi=enabled'
	'-Dmips-dspr2=disabled'
)
MESON_AFTER__PPC64EL=(
	"${MESON_AFTER[@]}"
	'-Dvmx=enabled'
)
MESON_AFTER__ARMV4=(
	"${MESON_AFTER__RETRO[@]}"
	'-Darm-simd=disabled'
	'-Dneon=disabled'
)
MESON_AFTER__ARMV6HF=(
	"${MESON_AFTER__RETRO[@]}"
	'-Darm-simd=enabled'
	'-Dneon=disabled'
)
MESON_AFTER__ARMV7HF=(
	"${MESON_AFTER__RETRO[@]}"
	'-Darm-simd=enabled'
	'-Dneon=enabled'
)
MESON_AFTER__I486=(
	"${MESON_AFTER__RETRO[@]}"
	'-Dmmx=disabled'
	'-Dsse2=disabled'
	'-Dssse3=disabled'
)
MESON_AFTER__LOONGSON2F=(
	"${MESON_AFTER__RETRO[@]}"
	'-Dloongson-mmi=enabled'
	'-Dmips-dspr2=disabled'
)
MESON_AFTER__POWERPC=(
	"${MESON_AFTER__RETRO[@]}"
	'-Dvmx=disabled'
)
MESON_AFTER__PPC64=(
	"${MESON_AFTER__RETRO[@]}"
	'-Dvmx=disabled'
)

# FIXME: lto1: fatal error: target specific builtin not available compilation
# terminated.
NOLTO__LOONGARCH64=1
NOLTO__LOONGARCH64_NOSIMD=${NOLTO__LOONGARCH64}

# Needed by Afterglow, whereas FAIL_ARCH defaults to mainline-only.
FAIL_ARCH="!(mainline|retro)"
