tree-sitter: update to 0.24.5
[oi-userland.git] / components / library / glib / Makefile
blob11fea58e1a210674ac782f435a82eba5ac1689ed
2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
5 # 1.0 of the CDDL.
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
13 # Copyright 2016 Alexander Pyhalov
14 # Copyright 2019 Michal Nowak
15 # Copyright 2023 Friedrich Kink
18 BUILD_BITS= 64_and_32
19 BUILD_STYLE= meson
20 USE_DEFAULT_TEST_TRANSFORMS = yes
21 USE_COMMON_TEST_MASTER = no
23 include ../../../make-rules/shared-macros.mk
25 COMPONENT_NAME= glib
26 HUMAN_VERSION= 2.82.3
27 COMPONENT_SUMMARY= GNOME core libraries
28 COMPONENT_ARCHIVE_HASH= sha256:5d669bd01ad23b8ef8082c58a0d205f4007a9b9c42b0a69fe7aeb17bbee58ce4
29 COMPONENT_FMRI= library/glib2
30 COMPONENT_CLASSIFICATION= Desktop (GNOME)/Libraries
31 COMPONENT_LICENSE= LGPL-2.1-only
32 COMPONENT_LICENSE_FILE= COPYING
34 COMPONENT_FMRI.$(COMPONENT_NAME)-32 = $(COMPONENT_FMRI)/32
35 COMPONENT_SUMMARY.$(COMPONENT_NAME)-32 = $(COMPONENT_SUMMARY) (32-bit)
37 include $(WS_MAKE_RULES)/gnome.mk
38 include $(WS_MAKE_RULES)/common.mk
40 # GNU msgfmt is needed
41 PATH = $(PATH.gnu)
43 # socketpair(3socket) requires -lsocket -lnsl
44 LDFLAGS += -lsocket -lnsl
46 # Support for hexadecimal strings in strtod() is available in C99 mode only,
47 # but we cannot use -std=c99 because float/double support is broken there
48 # (https://www.illumos.org/issues/14935)
49 CFLAGS += -std=gnu11
51 # We need standard conforming getpwnam_r()/getpwuid_r()
52 CPPFLAGS += $(CPP_POSIX)
53 # Workaround for https://www.illumos.org/issues/16836
54 CPPFLAGS += $(CPP_XPG6MODE)
56 # We do not have getxattr() so disable xattr
57 CONFIGURE_OPTIONS += -Dxattr=false
58 CONFIGURE_OPTIONS.64 += -Dman-pages=enabled
59 CONFIGURE_OPTIONS += -Druntime_dir=$(VARDIR)/run
60 CONFIGURE_OPTIONS += -Dselinux=disabled
61 CONFIGURE_OPTIONS += -Dlibmount=disabled
62 CONFIGURE_OPTIONS += -Dbsymbolic_functions=false
63 CONFIGURE_OPTIONS += -Dfam=true
64 CONFIGURE_OPTIONS += -Ddtrace=disabled
65 CONFIGURE_OPTIONS += -Dsystemtap=disabled
66 CONFIGURE_OPTIONS += -Dsysprof=disabled
67 # see https://gitlab.gnome.org/GNOME/glib/-/issues/3421
68 CONFIGURE_OPTIONS += -Dglib_debug=disabled
69 # Our 32 bit libelf is missing the large file support
70 # https://www.illumos.org/issues/1587
71 CONFIGURE_OPTIONS.32 += -Dlibelf=disabled
73 # We need to install libraries and set correct LD_LIBRARY_PATH before test
74 $(TEST_TARGET): $(INSTALL_TARGET)
76 # Dtrace flags
77 DFLAGS.64 = -64
78 COMPONENT_BUILD_ENV += DFLAGS=$(DFLAGS.$(BITS))
80 # Without this the gi-compile-repository loads system libraries which makes the
81 # typelib compilation to fail
82 COMPONENT_BUILD_ENV += LD_LIBRARY_PATH=gio:glib:gobject
84 # dbus-daemon is in /usr/lib
85 COMPONENT_TEST_ENV.32 = LD_LIBRARY_PATH=$(PROTO_DIR)/usr/lib PATH=$(PATH):/usr/lib
86 COMPONENT_TEST_ENV.64 = LD_LIBRARY_PATH=$(PROTO_DIR)/usr/lib/$(MACH64) PATH=$(PATH):/usr/lib/$(MACH64)
87 COMPONENT_TEST_ENV = $(COMPONENT_TEST_ENV.$(BITS))
88 COMPONENT_TEST_ENV += LC_ALL=C.UTF-8
89 COMPONENT_TEST_ENV += TZ=UTC
91 # Dynamic library version number
92 SOVER := 0.$(shell printf '%s00.%s' $(wordlist 2,3,$(subst ., ,$(COMPONENT_VERSION))))
93 SOVER_RE = $(subst .,\.,$(SOVER))
95 # Replace library version number by SOVER
96 GENERATE_EXTRA_CMD += | $(GSED) -e 's/$(SOVER_RE)/$$(SOVER)/'
98 # SOVER is needed for manifest processing
99 PKG_MACROS += SOVER=$(SOVER)
101 # Build dependencies
102 PYTHON_REQUIRED_PACKAGES += library/python/docutils
104 # dbus-daemon is needed for testing
105 TEST_REQUIRED_PACKAGES += system/library/dbus
107 # update-desktop-database is needed for testing
108 TEST_REQUIRED_PACKAGES += library/desktop/desktop-file-utils
110 # Auto-generated dependencies
111 PYTHON_REQUIRED_PACKAGES += library/python/python-subunit
112 PYTHON_REQUIRED_PACKAGES += library/python/testtools
113 PYTHON_REQUIRED_PACKAGES += runtime/python
114 REQUIRED_PACKAGES += library/file-monitor/gamin
115 REQUIRED_PACKAGES += library/libffi
116 REQUIRED_PACKAGES += library/pcre2
117 REQUIRED_PACKAGES += library/zlib
118 REQUIRED_PACKAGES += shell/ksh93
119 REQUIRED_PACKAGES += system/library
120 REQUIRED_PACKAGES += system/library/math