xref: /OK3568_Linux_fs/buildroot/package/pixman/pixman.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# pixman
4#
5################################################################################
6
7PIXMAN_VERSION = 0.40.0
8PIXMAN_SOURCE = pixman-$(PIXMAN_VERSION).tar.xz
9PIXMAN_SITE = https://xorg.freedesktop.org/releases/individual/lib
10PIXMAN_LICENSE = MIT
11PIXMAN_LICENSE_FILES = COPYING
12PIXMAN_CPE_ID_VENDOR = pixman
13
14PIXMAN_INSTALL_STAGING = YES
15PIXMAN_DEPENDENCIES = host-pkgconf
16HOST_PIXMAN_DEPENDENCIES = host-pkgconf
17
18ifeq ($(BR2_PREFER_ROCKCHIP_RGA),y)
19PIXMAN_DEPENDENCIES += rockchip-rga
20define PIXMAN_INSTALL_TARGET_ENV
21	echo "export PIXMAN_USE_RGA=1" > $(@D)/pixman.sh
22	$(INSTALL) -D -m 0644 $(@D)/pixman.sh \
23		$(TARGET_DIR)/etc/profile.d/pixman.sh
24endef
25
26PIXMAN_POST_INSTALL_TARGET_HOOKS += PIXMAN_INSTALL_TARGET_ENV
27endif
28
29# For 0001-Disable-tests.patch
30PIXMAN_AUTORECONF = YES
31
32# don't build gtk based demos
33PIXMAN_CONF_OPTS = --disable-gtk
34
35# The ARM SIMD code from pixman requires a recent enough ARM core, but
36# there is a runtime CPU check that makes sure it doesn't get used if
37# the HW doesn't support it. The only case where the ARM SIMD code
38# cannot be *built* at all is when the platform doesn't support ARM
39# instructions at all, so we have to disable that explicitly.
40ifeq ($(BR2_ARM_CPU_HAS_ARM),y)
41PIXMAN_CONF_OPTS += --enable-arm-simd
42else
43PIXMAN_CONF_OPTS += --disable-arm-simd
44endif
45
46ifeq ($(BR2_ARM_CPU_HAS_ARM)$(BR2_ARM_CPU_HAS_NEON),yy)
47PIXMAN_CONF_OPTS += --enable-arm-neon
48else
49PIXMAN_CONF_OPTS += --disable-arm-neon
50endif
51
52# disable iwmmxt support for CPU's that don't have
53# this feature
54ifneq ($(BR2_iwmmxt),y)
55PIXMAN_CONF_OPTS += --disable-arm-iwmmxt
56endif
57
58PIXMAN_CFLAGS = $(TARGET_CFLAGS)
59
60# toolchain gets confused about TLS access through GOT (PIC), so disable TLS
61# movhi	r4, %got_hiadj(%tls_ldo(fast_path_cache))
62# {standard input}:172: Error: bad expression
63ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII),y)
64PIXMAN_CFLAGS += -DPIXMAN_NO_TLS
65endif
66
67ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_101737),y)
68PIXMAN_CFLAGS += -O0
69endif
70
71PIXMAN_CONF_OPTS += CFLAGS="$(PIXMAN_CFLAGS)"
72
73$(eval $(autotools-package))
74$(eval $(host-autotools-package))
75