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
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
20 include ..
/..
/..
/make-rules
/shared-macros.mk
23 COMPONENT_MJR_VERSION
= 2.74
24 COMPONENT_MNR_VERSION
= 6
25 COMPONENT_VERSION
= $(COMPONENT_MJR_VERSION
).
$(COMPONENT_MNR_VERSION
)
26 COMPONENT_SUMMARY
= GNOME core libraries
27 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(COMPONENT_VERSION
)
28 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.xz
29 COMPONENT_ARCHIVE_HASH
= sha256
:069cf7e51cd261eb163aaf06c8d1754c6835f31252180aff5814e5afc7757fbc
30 COMPONENT_ARCHIVE_URL
= https
://download.gnome.org
/sources
/$(COMPONENT_NAME
)/$(COMPONENT_MJR_VERSION
)/$(COMPONENT_ARCHIVE
)
31 COMPONENT_PROJECT_URL
= https
://wiki.gnome.org
/Projects
/GLib
/
32 COMPONENT_FMRI
= library
/glib2
33 COMPONENT_CLASSIFICATION
= Desktop
(GNOME
)/Libraries
34 COMPONENT_LICENSE
= GPLv2
35 COMPONENT_LICENSE_FILE
= COPYING
37 include $(WS_MAKE_RULES
)/common.mk
39 # /usr/lib and /usr/lib/$(MACH64) needed to make dbus-daemon program available
40 PATH
= $(PATH.gnu
):/usr
/lib
:/usr
/lib
/$(MACH64
)
42 # socketpair(3socket) requires -lsocket -lnsl
43 LDFLAGS
+= -lsocket
-lnsl
45 # Support for hexadecimal strings in strtod() is available in C99 mode only,
46 # but we cannot use -std=c99 because float/double support is broken there
47 # (https://www.illumos.org/issues/14935)
50 # We need standard conforming getpwnam_r()/getpwuid_r()
51 CPPFLAGS
+= $(CPP_XPG6MODE
)
53 # Some warnings are treated as errors by default but we do not want that
54 CFLAGS
+= -Wno-error
=format-nonliteral
55 CFLAGS
+= -Wno-error
=format-security
57 # We do not have getxattr() so disable xattr
58 CONFIGURE_OPTIONS
+= -Dxattr
=false
59 CONFIGURE_OPTIONS
+= -Dman
=true
61 COMPONENT_POST_CONFIGURE_ACTION
= \
62 ( cd
$(@D
); $(GSED
) -i
"s/_FILE_OFFSET_BITS=64/_FILE_OFFSET_BITS=$(BITS)/g" .
/build.ninja
)
64 # We need to install libraries and set correct LD_LIBRARY_PATH before test
65 $(TEST_TARGET
): $(INSTALL_TARGET
)
69 COMPONENT_BUILD_ENV
+= DFLAGS
=$(DFLAGS.
$(BITS
))
71 # necessary otherwise make REQUIRED_PACKAGES will fail
72 COMPONENT_POST_INSTALL_ACTION
.32= $(GSED
) -i
-e
"s:\#!/usr/bin/env .*$$:\#!/usr/bin/python$(PYTHON_VERSION):" $(PROTOUSRBINDIR32
)/g
*
73 COMPONENT_POST_INSTALL_ACTION
.64= $(GSED
) -i
-e
"s:\#!/usr/bin/env .*$$:\#!/usr/bin/python$(PYTHON_VERSION):" $(PROTOUSRBINDIR
)/g
*
75 # Otherwise tests fail
78 # We need to install libraries and set correct LD_LIBRARY_PATH before test
79 $(TEST_TARGET
): $(INSTALL_TARGET
)
81 # dbus-daemon is in /usr/lib
82 COMPONENT_TEST_ENV
.32 = LD_LIBRARY_PATH
=$(PROTO_DIR
)/usr
/lib PATH
=$(PATH
):/usr
/lib
83 COMPONENT_TEST_ENV
.64 = LD_LIBRARY_PATH
=$(PROTO_DIR
)/usr
/lib
/$(MACH64
) PATH
=$(PATH
):/usr
/lib
/$(MACH64
)
84 COMPONENT_TEST_ENV
= $(COMPONENT_TEST_ENV.
$(BITS
))
85 COMPONENT_TEST_ENV
+= LC_ALL
=C.UTF-8
87 COMPONENT_TEST_TRANSFORMER
= $(NAWK
)
88 COMPONENT_TEST_TRANSFORMS
= "'/^(Fail|Ok|Expected Fail|Unexpected Pass|Skipped|Timeout)/'"
90 PYTHON_REQUIRED_PACKAGES
+= runtime
/python
92 # dbus-daemon is needed for testing
93 REQUIRED_PACKAGES
+= system
/library
/dbus
95 # update-desktop-database is needed for testing
96 REQUIRED_PACKAGES
+= library
/desktop
/desktop-file-utils
98 # Auto-generated dependencies
99 PYTHON_REQUIRED_PACKAGES
+= runtime
/python
100 REQUIRED_PACKAGES
+= library
/libffi
101 REQUIRED_PACKAGES
+= library
/pcre2
102 REQUIRED_PACKAGES
+= library
/zlib
103 REQUIRED_PACKAGES
+= shell/ksh93
104 REQUIRED_PACKAGES
+= system
/library