-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
icu: Added icu_69.1.bb, required for NodeJS 18
Receipe copied from this commit point in openembedded-core https://github.com/openembedded/openembedded-core/tree/6b22fce3a8a3567c794d0d701ffd14b61ea859c8/meta/recipes-support/icu
- Loading branch information
Showing
5 changed files
with
264 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
meta-alternatives/recipes-support/icu/icu/0001-Disable-LDFLAGSICUDT-for-Linux.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
From 0c82d6aa02c08e41b13c83b14782bd7024e25d59 Mon Sep 17 00:00:00 2001 | ||
From: Khem Raj <raj.khem@gmail.com> | ||
Date: Sat, 15 Feb 2014 21:06:42 +0000 | ||
Subject: [PATCH] Disable LDFLAGSICUDT for Linux | ||
|
||
Upstream-Status: Inappropriate [ OE Configuration ] | ||
|
||
Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
--- | ||
source/config/mh-linux | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/config/mh-linux b/config/mh-linux | ||
index 366f0cc..2689aab 100644 | ||
--- a/config/mh-linux | ||
+++ b/config/mh-linux | ||
@@ -21,7 +21,7 @@ LD_RPATH= -Wl,-zorigin,-rpath,'$$'ORIGIN | ||
LD_RPATH_PRE = -Wl,-rpath, | ||
|
||
## These are the library specific LDFLAGS | ||
-LDFLAGSICUDT=-nodefaultlibs -nostdlib | ||
+# LDFLAGSICUDT=-nodefaultlibs -nostdlib | ||
|
||
## Compiler switch to embed a library name | ||
# The initial tab in the next line is to prevent icu-config from reading it. | ||
-- | ||
1.7.10.4 | ||
|
30 changes: 30 additions & 0 deletions
30
meta-alternatives/recipes-support/icu/icu/0001-icu-Added-armeb-support.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
From 500321387ceca48934bb0f323779117cd518bab6 Mon Sep 17 00:00:00 2001 | ||
From: Lei Maohui <leimaohui@cn.fujitsu.com> | ||
Date: Wed, 8 May 2019 14:42:30 +0900 | ||
Subject: [PATCH] icu: Added armeb support. | ||
|
||
Make icu support arm32 BE. | ||
|
||
Upstream-Status: Pending | ||
|
||
Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com> | ||
--- | ||
i18n/double-conversion-utils.h | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/i18n/double-conversion-utils.h b/i18n/double-conversion-utils.h | ||
index c937463..feaad0f 100644 | ||
--- a/i18n/double-conversion-utils.h | ||
+++ b/i18n/double-conversion-utils.h | ||
@@ -115,7 +115,7 @@ int main(int argc, char** argv) { | ||
// | ||
// If it prints "correct" then the architecture should be here, in the "correct" section. | ||
#if defined(_M_X64) || defined(__x86_64__) || \ | ||
- defined(__ARMEL__) || defined(__avr32__) || defined(_M_ARM) || defined(_M_ARM64) || \ | ||
+ defined(__arm__) || defined(__avr32__) || defined(_M_ARM) || defined(_M_ARM64) || \ | ||
defined(__hppa__) || defined(__ia64__) || \ | ||
defined(__mips__) || \ | ||
defined(__nios2__) || defined(__ghs) || \ | ||
-- | ||
2.25.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
} |
54 changes: 54 additions & 0 deletions
54
meta-alternatives/recipes-support/icu/icu/fix-install-manx.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
From a6ddabc8cadb76bfe2d2e374a6702442cfe51cce Mon Sep 17 00:00:00 2001 | ||
From: Ross Burton <ross.burton@intel.com> | ||
Date: Fri, 9 Oct 2015 17:50:41 +0100 | ||
Subject: [PATCH] icu: fix install race | ||
|
||
The generic recursive target calls target-local so also adding it to the | ||
dependency list results in races due to install-local being executed twice in | ||
parallel. For example, install-manx can fail if the two install processes race | ||
and one process tries to chown a file that the other process has just deleted. | ||
|
||
Also install-manx should be a phony target, and for clarity use $^ instead of $? | ||
in the install command. | ||
|
||
Upstream-Status: Pending | ||
Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
|
||
--- | ||
source/Makefile.in | 8 ++++---- | ||
1 file changed, 4 insertions(+), 4 deletions(-) | ||
|
||
diff --git a/Makefile.in b/Makefile.in | ||
index be9435b..ada20d7 100644 | ||
--- a/Makefile.in | ||
+++ b/Makefile.in | ||
@@ -77,7 +77,7 @@ EXTRA_DATA = | ||
|
||
## List of phony targets | ||
.PHONY : all all-local all-recursive install install-local install-udata install-udata-files install-udata-dlls \ | ||
-install-recursive clean clean-local clean-recursive distclean \ | ||
+install-recursive install-manx clean clean-local clean-recursive distclean \ | ||
distclean-local distclean-recursive doc dist dist-local dist-recursive \ | ||
check check-local check-recursive clean-recursive-with-twist install-icu \ | ||
doc install-doc tests icu4j-data icu4j-data-install update-windows-makefiles xcheck-local xcheck-recursive xperf xcheck xperf-recursive \ | ||
@@ -88,9 +88,9 @@ check-exhaustive check-exhaustive-local check-exhaustive-recursive releaseDist | ||
|
||
## List of standard targets | ||
all: all-local all-recursive | ||
-install: install-recursive install-local | ||
+install: install-recursive | ||
clean: clean-recursive-with-twist clean-local | ||
-distclean : distclean-recursive distclean-local | ||
+distclean : distclean-recursive | ||
dist: dist-recursive | ||
check: all check-recursive | ||
check-recursive: all | ||
@@ -357,7 +357,7 @@ config.status: $(srcdir)/configure $(srcdir)/common/unicode/uvernum.h | ||
install-manx: $(MANX_FILES) | ||
$(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man$(SECTION) | ||
ifneq ($(MANX_FILES),) | ||
- $(INSTALL_DATA) $? $(DESTDIR)$(mandir)/man$(SECTION) | ||
+ $(INSTALL_DATA) $^ $(DESTDIR)$(mandir)/man$(SECTION) | ||
endif | ||
|
||
config/%.$(SECTION): $(srcdir)/config/%.$(SECTION).in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
SUMMARY = "International Component for Unicode libraries" | ||
DESCRIPTION = "The International Component for Unicode (ICU) is a mature, \ | ||
portable set of C/C++ and Java libraries for Unicode support, software \ | ||
internationalization (I18N) and globalization (G11N), giving applications the \ | ||
same results on all platforms." | ||
HOMEPAGE = "http://site.icu-project.org/" | ||
|
||
LICENSE = "ICU" | ||
DEPENDS = "icu-native" | ||
DEPENDS_class-native = "" | ||
|
||
CVE_PRODUCT = "international_components_for_unicode" | ||
|
||
S = "${WORKDIR}/icu/source" | ||
SPDX_S = "${WORKDIR}/icu" | ||
STAGING_ICU_DIR_NATIVE = "${STAGING_DATADIR_NATIVE}/${BPN}/${PV}" | ||
|
||
BINCONFIG = "${bindir}/icu-config" | ||
|
||
ICU_MAJOR_VER = "${@d.getVar('PV').split('.')[0]}" | ||
|
||
inherit autotools pkgconfig binconfig multilib_script | ||
|
||
MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/icu-config" | ||
|
||
# ICU needs the native build directory as an argument to its --with-cross-build option when | ||
# cross-compiling. Taken the situation that different builds may share a common sstate-cache | ||
# into consideration, the native build directory needs to be staged. | ||
EXTRA_OECONF = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}" | ||
EXTRA_OECONF_class-native = "" | ||
EXTRA_OECONF_class-nativesdk = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}" | ||
|
||
EXTRA_OECONF_append_class-target = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'be', ' --with-data-packaging=archive', '', d)}" | ||
TARGET_CXXFLAGS_append = "${@oe.utils.conditional('SITEINFO_ENDIANNESS', 'be', ' -DICU_DATA_DIR=\\""${datadir}/${BPN}/${PV}\\""', '', d)}" | ||
|
||
ASNEEDED = "" | ||
|
||
do_compile_prepend_class-target () { | ||
# Make sure certain build host references do not end up being compiled | ||
# in the image. This only affects libicutu and icu-dbg | ||
sed \ | ||
-e 's,DU_BUILD=,DU_BUILD_unused=,g' \ | ||
-e '/^CPPFLAGS.*/ s,--sysroot=${STAGING_DIR_TARGET},,g' \ | ||
-i ${B}/tools/toolutil/Makefile | ||
} | ||
|
||
PREPROCESS_RELOCATE_DIRS = "${datadir}/${BPN}/${PV}" | ||
do_install_append_class-native() { | ||
mkdir -p ${D}/${STAGING_ICU_DIR_NATIVE}/config | ||
cp -r ${B}/config/icucross.mk ${D}/${STAGING_ICU_DIR_NATIVE}/config | ||
cp -r ${B}/config/icucross.inc ${D}/${STAGING_ICU_DIR_NATIVE}/config | ||
cp -r ${B}/lib ${D}/${STAGING_ICU_DIR_NATIVE} | ||
cp -r ${B}/bin ${D}/${STAGING_ICU_DIR_NATIVE} | ||
cp -r ${B}/tools ${D}/${STAGING_ICU_DIR_NATIVE} | ||
} | ||
|
||
do_install_append_class-target() { | ||
# The native pkgdata can not generate the correct data file. | ||
# Use icupkg to re-generate it. | ||
if [ "${SITEINFO_ENDIANNESS}" = "be" ] ; then | ||
rm -f ${D}/${datadir}/${BPN}/${PV}/icudt${ICU_MAJOR_VER}b.dat | ||
icupkg -tb ${S}/data/in/icudt${ICU_MAJOR_VER}l.dat ${D}/${datadir}/${BPN}/${PV}/icudt${ICU_MAJOR_VER}b.dat | ||
fi | ||
|
||
# Remove build host references... | ||
sed -i \ | ||
-e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ | ||
-e 's|${DEBUG_PREFIX_MAP}||g' \ | ||
-e 's:${HOSTTOOLS_DIR}/::g' \ | ||
${D}/${bindir}/icu-config ${D}/${libdir}/${BPN}/${PV}/Makefile.inc \ | ||
${D}/${libdir}/${BPN}/${PV}/pkgdata.inc | ||
} | ||
|
||
PACKAGES =+ "libicudata libicuuc libicui18n libicutu libicuio" | ||
|
||
FILES_${PN}-dev += "${libdir}/${BPN}/" | ||
|
||
FILES_libicudata = "${libdir}/libicudata.so.*" | ||
FILES_libicuuc = "${libdir}/libicuuc.so.*" | ||
FILES_libicui18n = "${libdir}/libicui18n.so.*" | ||
FILES_libicutu = "${libdir}/libicutu.so.*" | ||
FILES_libicuio = "${libdir}/libicuio.so.*" | ||
|
||
BBCLASSEXTEND = "native nativesdk" | ||
|
||
LIC_FILES_CHKSUM = "file://../LICENSE;md5=002d2fdc32d17f0ec06e9a47f2c0c8d0" | ||
|
||
def icu_download_version(d): | ||
pvsplit = d.getVar('PV').split('.') | ||
return pvsplit[0] + "_" + pvsplit[1] | ||
|
||
def icu_download_folder(d): | ||
pvsplit = d.getVar('PV').split('.') | ||
return pvsplit[0] + "-" + pvsplit[1] | ||
|
||
ICU_PV = "${@icu_download_version(d)}" | ||
ICU_FOLDER = "${@icu_download_folder(d)}" | ||
|
||
# http://errors.yoctoproject.org/Errors/Details/20486/ | ||
ARM_INSTRUCTION_SET_armv4 = "arm" | ||
ARM_INSTRUCTION_SET_armv5 = "arm" | ||
|
||
BASE_SRC_URI = "https://github.com/unicode-org/icu/releases/download/release-${ICU_FOLDER}/icu4c-${ICU_PV}-src.tgz" | ||
DATA_SRC_URI = "https://github.com/unicode-org/icu/releases/download/release-${ICU_FOLDER}/icu4c-${ICU_PV}-data.zip" | ||
SRC_URI = "${BASE_SRC_URI};name=code \ | ||
${DATA_SRC_URI};name=data \ | ||
file://filter.json \ | ||
file://fix-install-manx.patch \ | ||
file://0001-icu-Added-armeb-support.patch \ | ||
" | ||
|
||
SRC_URI_append_class-target = "\ | ||
file://0001-Disable-LDFLAGSICUDT-for-Linux.patch \ | ||
" | ||
SRC_URI[code.sha256sum] = "4cba7b7acd1d3c42c44bb0c14be6637098c7faf2b330ce876bc5f3b915d09745" | ||
SRC_URI[data.sha256sum] = "4fc2d8cfc3343673123586fca3967404abd4e346fba5515829204533b3bae4bf" | ||
|
||
UPSTREAM_CHECK_REGEX = "icu4c-(?P<pver>\d+(_\d+)+)-src" | ||
UPSTREAM_CHECK_URI = "https://github.com/unicode-org/icu/releases" | ||
|
||
EXTRA_OECONF_append_libc-musl = " ac_cv_func_strtod_l=no" | ||
|
||
PACKAGECONFIG ?= "" | ||
PACKAGECONFIG[make-icudata] = ",,," | ||
|
||
do_make_icudata_class-target () { | ||
${@bb.utils.contains('PACKAGECONFIG', 'make-icudata', '', 'exit 0', d)} | ||
cd ${S} | ||
rm -rf data | ||
cp -a ${WORKDIR}/data . | ||
AR='${BUILD_AR}' \ | ||
CC='${BUILD_CC}' \ | ||
CPP='${BUILD_CPP}' \ | ||
CXX='${BUILD_CXX}' \ | ||
RANLIB='${BUILD_RANLIB}' \ | ||
CFLAGS='${BUILD_CFLAGS}' \ | ||
CPPFLAGS='${BUILD_CPPFLAGS}' \ | ||
CXXFLAGS='${BUILD_CXXFLAGS}' \ | ||
LDFLAGS='${BUILD_LDFLAGS}' \ | ||
ICU_DATA_FILTER_FILE=${WORKDIR}/filter.json \ | ||
./runConfigureICU Linux --with-data-packaging=archive | ||
oe_runmake | ||
install -Dm644 ${S}/data/out/icudt${ICU_MAJOR_VER}l.dat ${S}/data/in/icudt${ICU_MAJOR_VER}l.dat | ||
} | ||
|
||
do_make_icudata() { | ||
: | ||
} | ||
|
||
addtask make_icudata before do_configure after do_patch |