1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-23 07:31:31 +00:00

locales: prepare CLDR update to v39.0 and Unicode to 13.0.0

Note that rebuilding the cldr tool is not necessary anymore, also note
that the sources are not anymore provided along with the other distfiles
This commit is contained in:
Baptiste Daroussin 2021-07-23 16:24:51 +02:00
parent fb25fdcaa3
commit 74e9e0e0b0

View File

@ -21,7 +21,6 @@ PATCHDIR= ${BASEDIR}/patch
UNIDIR= ${.OBJDIR:tA}/unicode UNIDIR= ${.OBJDIR:tA}/unicode
PKGS= openjdk8 \ PKGS= openjdk8 \
apache-ant \
p5-XML-Parser \ p5-XML-Parser \
p5-Tie-IxHash \ p5-Tie-IxHash \
p5-Text-Iconv p5-Text-Iconv
@ -124,9 +123,10 @@ ENCODINGS= UTF-8 \
UTF-32 UTF-32
# CLDR files # CLDR files
CLDRFILES_CORE= https://unicode.org/Public/cldr/35/core.zip CLDRVERSION= 39.0
CLDRFILES_KEY= https://unicode.org/Public/cldr/35/keyboards.zip CLDRFILES_CORE= https://unicode.org/Public/cldr/${CLDRVERSION:R}/core.zip
CLDRFILES_TOOLS=https://unicode.org/Public/cldr/35/tools.zip CLDRFILES_KEY= https://unicode.org/Public/cldr/${CLDRVERSION:R}/cldr-keyboards-${CLDRVERSION}.zip
CLDRFILES_TOOLS=https://unicode.org/Public/cldr/${CLDRVERSION:R}/cldr-tools-${CLDRVERSION}.jar
CLDRFILES_UCD= http://www.unicode.org/Public/zipped/13.0.0/UCD.zip CLDRFILES_UCD= http://www.unicode.org/Public/zipped/13.0.0/UCD.zip
# fetch and extract targets # fetch and extract targets
@ -140,27 +140,17 @@ extract-${CLDRFILES_${N}:T}:: ${CLDRFILES_${N}:T} ${UNIDIR}
cd ${UNIDIR} && unzip -o ../${CLDRFILES_${N}:T} cd ${UNIDIR} && unzip -o ../${CLDRFILES_${N}:T}
extract: extract-${CLDRFILES_${N}:T} extract: extract-${CLDRFILES_${N}:T}
.endfor .endfor
grep 'name="version"' ${UNIDIR}/tools/build.xml | \ echo ${CLDRVERSION} > ${UNIDIR}/cldr-version
sed 's/.* value="//;s/".*//' > ${UNIDIR}/cldr-version
patch:: patch::
.if exists(${PATCHDIR}) .if exists(${PATCHDIR})
cd ${UNIDIR} && cat ${PATCHDIR}/patch-* | patch cd ${UNIDIR} && cat ${PATCHDIR}/patch-* | patch
.endif .endif
.if !exists(${UNIDIR}/tools/java/cldr.jar) JAVA_CLDR= java -DCLDR_DIR=${UNIDIR:Q} -jar ${.OBJDIR:tA}//${CLDRFILES_TOOLS:T}
.ORDER: extract patch
build-tools: extract patch tools-test ${UNIDIR}
cd ${UNIDIR}/tools/java && ${SETENV} ant all jar
.else
build-tools:
@echo cldr.jar is ready.
.endif
JAVA_CLDR= java -DCLDR_DIR=${UNIDIR:Q} -jar ${UNIDIR}/tools/java/cldr.jar
posix: posixcm post-posixcm posixsrc posix: posixcm post-posixcm posixsrc
.ORDER: posixcm post-posixcm posixsrc .ORDER: posixcm post-posixcm posixsrc
${UNIDIR}/posix: ${UNIDIR}/posix: ${UNIDIR}
ln -s -f ../posix ${.TARGET} ln -s -f ../posix ${.TARGET}
clean-posix: clean-posix:
rm -rf posix ${UNIDIR}/posix rm -rf posix ${UNIDIR}/posix
@ -169,16 +159,16 @@ ${UNIDIR}/posix/xx_Comm_C.UTF-8.src: ${UNIDIR}/posix
--unidir=${UNIDIR} --unidir=${UNIDIR}
post-posixcm: ${UNIDIR}/posix/xx_Comm_C.UTF-8.src post-posixcm: ${UNIDIR}/posix/xx_Comm_C.UTF-8.src
.for enc in ${ENCODINGS} .for enc in ${ENCODINGS}
posixcm: build-tools posix/${enc}.cm posixcm: posix/${enc}.cm
.ORDER: build-tools posix/${enc}.cm .ORDER: posix/${enc}.cm
posix/${enc}.cm: posix/${enc}.cm:
mkdir -p posix && \ mkdir -p posix && \
${JAVA_CLDR} org.unicode.cldr.posix.GenerateCharmap \ ${JAVA_CLDR} org.unicode.cldr.posix.GenerateCharmap \
-d posix -c ${enc} -d posix -c ${enc}
.endfor .endfor
.for area in ${BASE_LOCALES_OF_INTEREST} .for area in ${BASE_LOCALES_OF_INTEREST}
posixsrc: build-tools posix/${area}.UTF-8.src posixsrc: posix/${area}.UTF-8.src
.ORDER: build-tools posix/${area}.UTF-8.src .ORDER: posix/${area}.UTF-8.src
posix/${area}.UTF-8.src: posix/${area}.UTF-8.src:
mkdir -p posix && \ mkdir -p posix && \
${JAVA_CLDR} org.unicode.cldr.posix.GeneratePOSIX \ ${JAVA_CLDR} org.unicode.cldr.posix.GeneratePOSIX \