# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the Collabora Office project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#

$(eval $(call gb_UnpackedTarball_UnpackedTarball,pixman))

$(eval $(call gb_UnpackedTarball_set_tarball,pixman,$(PIXMAN_TARBALL),,cairo))

ifneq ($(MSYSTEM),)
# pixman 0.46.4 ships symlinks under .gitlab-ci.d/meson-cross/ (links to files
# extracted later); git-bash/msys tar fails to create them since MSYS defaults
# to not create links
ifeq ($(filter winsymlinks%,$(MSYS)),)
$(call gb_UnpackedTarball_get_target,pixman): export MSYS:=$(MSYS) winsymlinks
endif
endif

ifeq ($(OS)-$(ENABLE_HEADLESS),WNT-TRUE)
$(eval $(call gb_UnpackedTarball_add_file,pixman,pixman/pixman-config.h,external/cairo/configs/wnt_pixman_pixman-config.h))
$(eval $(call gb_UnpackedTarball_add_file,pixman,pixman/pixman-version.h,external/cairo/configs/wnt_pixman_pixman-version.h))
endif

$(eval $(call gb_UnpackedTarball_set_patchlevel,pixman,2))

$(eval $(call gb_UnpackedTarball_add_patches,pixman,\
	external/cairo/pixman/pixman-0.24.4.patch \
	external/cairo/pixman/pixman-ubsan.patch \
	external/cairo/pixman/pixman-wasm.patch \
))

# vim: set noet sw=4 ts=4:
