json-glib: update to 1.10.6
[oi-userland.git] / components / library / icu / Makefile
blobc1c67c6c09aa7beaaaa86ffc71692b758d7362ae
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 2017 Alexander Pyhalov
14 # Copyright 2021, 2023 Andreas Wacknitz
17 BUILD_BITS= 64_and_32
18 USE_PARALLEL_BUILD = yes
20 include ../../../make-rules/shared-macros.mk
22 COMPONENT_NAME = icu
23 COMPONENT_VERSION = 76.1
24 COMPONENT_REVISION = 0
25 COMPONENT_SUMMARY = International Components for Unicode
26 COMPONENT_SRC = $(COMPONENT_NAME)
27 COMPONENT_ARCHIVE = icu4c-$(subst .,_,$(HUMAN_VERSION))-src.tgz
28 COMPONENT_ARCHIVE_HASH = sha256:dfacb46bfe4747410472ce3e1144bf28a102feeaa4e3875bac9b4c6cf30f4f3e
29 COMPONENT_PROJECT_URL = https://icu.unicode.org/
30 COMPONENT_ARCHIVE_URL = https://github.com/unicode-org/icu/releases/download/release-$(subst .,-,$(HUMAN_VERSION))/$(COMPONENT_ARCHIVE)
31 COMPONENT_VERSION_MAJOR = $(firstword $(subst ., ,$(HUMAN_VERSION)))
32 COMPONENT_FMRI = library/icu-$(COMPONENT_VERSION_MAJOR)
33 COMPONENT_CLASSIFICATION = System/Internationalization
34 COMPONENT_LICENSE = ICU
35 COMPONENT_LICENSE_FILE = LICENSE
37 COMPONENT_FMRI.library-32 = $(COMPONENT_FMRI)/32
38 COMPONENT_SUMMARY.library-32 = $(COMPONENT_SUMMARY) (32-bit)
40 # The developer package is published only for the latest (our default) version.
41 ifeq ($(strip $(COMPONENT_VERSION_MAJOR)),$(strip $(ICU_VERSION)))
42 COMPONENT_FMRI.developer = developer/icu
43 COMPONENT_SUMMARY.developer = $(COMPONENT_SUMMARY) (development files)
44 endif
46 include $(WS_MAKE_RULES)/common.mk
48 # Testing expects GNU diff in PATH
49 PATH = $(PATH.gnu)
51 # https://unicode-org.atlassian.net/browse/ICU-22629
52 CXXFLAGS += -fexcess-precision=fast
54 COMPONENT_BUILD_TARGETS = all
56 CONFIGURE_SCRIPT = $(SOURCE_DIR)/source/runConfigureICU
58 CONFIGURE_OPTIONS = Solaris/GCC
59 CONFIGURE_OPTIONS += --prefix=$(CONFIGURE_PREFIX)
60 CONFIGURE_OPTIONS += --libdir=$(CONFIGURE_LIBDIR.$(BITS))
61 CONFIGURE_OPTIONS += --bindir=$(CONFIGURE_BINDIR.$(BITS))
62 CONFIGURE_OPTIONS += --sbindir=$(CONFIGURE_SBINDIR.$(BITS))
63 CONFIGURE_OPTIONS += --sysconfdir=$(ETCDIR)
64 CONFIGURE_OPTIONS += --with-data-packaging=library
65 CONFIGURE_OPTIONS += --enable-shared
66 CONFIGURE_OPTIONS += --disable-static
67 CONFIGURE_OPTIONS += --disable-samples
68 CONFIGURE_OPTIONS += --enable-renaming
70 # We do not need common developer files built during 32-bit build. Such files
71 # built during the 64-bit built are enough.
72 COMPONENT_POST_INSTALL_ACTION.32 += $(RM) -r $(PROTOUSRINCDIR) ;
73 COMPONENT_POST_INSTALL_ACTION.32 += $(RM) -r $(PROTOUSRSHAREDIR) ;
75 # Install additional man pages if we are building the latest (our default)
76 # version. Otherwise drop all developer files we do not need.
77 ifeq ($(strip $(COMPONENT_VERSION_MAJOR)),$(strip $(ICU_VERSION)))
78 COMPONENT_POST_INSTALL_ACTION.64 += \
79 $(INSTALL) -d $(PROTOUSRSHAREMANDIR)/man3lib ; \
80 for f in $(COMPONENT_DIR)/files/*.3lib ; do \
81 $(INSTALL) $$f $(PROTOUSRSHAREMANDIR)/man3lib/$$(basename $$f) ; \
82 $(GSED) -i -e 's/\$$(HUMAN_VERSION)/$(HUMAN_VERSION)/g' $(PROTOUSRSHAREMANDIR)/man3lib/$$(basename $$f) ; \
83 done ;
84 else
85 # 32-bit counterparts of these are remove unconditionally above
86 COMPONENT_POST_INSTALL_ACTION.64 += $(RM) -r $(PROTOUSRINCDIR) ;
87 COMPONENT_POST_INSTALL_ACTION.64 += $(RM) -r $(PROTOUSRSHAREDIR) ;
88 # Drop rest of dev-only files
89 COMPONENT_POST_INSTALL_ACTION += $(RM) $(PROTO_DIR)/$(CONFIGURE_BINDIR.$(BITS))/* ;
90 COMPONENT_POST_INSTALL_ACTION += $(RM) $(PROTO_DIR)/$(CONFIGURE_SBINDIR.$(BITS))/* ;
91 COMPONENT_POST_INSTALL_ACTION += $(FIND) $(PROTOUSRLIBDIR.$(BITS)) \
92 ! -name 'libicudata.so.*' \
93 ! -name 'libicui18n.so.*' \
94 ! -name 'libicuio.so.*' \
95 ! -name 'libicuuc.so.*' \
96 -exec $(RM) {} \; ;
97 endif
99 COMPONENT_TEST_TRANSFORMS += \
100 '-n ' \
101 '-e "/^All tests OK: testdata intltest iotest cintltst/p" ' \
102 '-e "/^PASS: config selfcheck OK/p" '
104 # Replace COMPONENT_VERSION_MAJOR in library symlink path
105 GENERATE_EXTRA_CMD += | \
106 $(GSED) -e 's|^\(link .*path=usr/lib/.*lib.*\.so\.\)$(COMPONENT_VERSION_MAJOR) |\1$$(COMPONENT_VERSION_MAJOR) |'
107 PKG_MACROS += COMPONENT_VERSION_MAJOR=$(COMPONENT_VERSION_MAJOR)
109 # Auto-generated dependencies
110 REQUIRED_PACKAGES += $(GCC_RUNTIME_PKG)
111 REQUIRED_PACKAGES += $(GXX_RUNTIME_PKG)
112 REQUIRED_PACKAGES += shell/ksh93
113 REQUIRED_PACKAGES += system/library
114 REQUIRED_PACKAGES += system/library/math