From 8a3f00b721fdf317700ec7396c8cd8bd61ed76dc Mon Sep 17 00:00:00 2001 From: Takuji Tanaka Date: Sat, 16 Dec 2023 06:51:56 +0000 Subject: bibtex-x: ver 4.02, support Unicode 15.1 git-svn-id: svn://tug.org/texlive/trunk@69145 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/bibtex-x/ChangeLog | 11 +++++ Build/source/texk/bibtex-x/Makefile.am | 13 +++-- Build/source/texk/bibtex-x/Makefile.in | 3 +- Build/source/texk/bibtex-x/bibtex-4.c | 15 ++++-- Build/source/texk/bibtex-x/configure | 22 ++++----- Build/source/texk/bibtex-x/configure.ac | 2 +- Build/source/texk/bibtex-x/tests/bibtexu-char.test | 18 +------ .../source/texk/bibtex-x/tests/bibtexu-iscjk.test | 57 ++++++++++++++++++++++ Build/source/texk/bibtex-x/tests/iscjku.bbl | 1 + Build/source/texk/bibtex-x/tests/testiscjku.bib | 1 + Build/source/texk/bibtex-x/version.h | 2 +- 11 files changed, 105 insertions(+), 40 deletions(-) create mode 100755 Build/source/texk/bibtex-x/tests/bibtexu-iscjk.test diff --git a/Build/source/texk/bibtex-x/ChangeLog b/Build/source/texk/bibtex-x/ChangeLog index d9e4e352ca5..d2822854d2b 100644 --- a/Build/source/texk/bibtex-x/ChangeLog +++ b/Build/source/texk/bibtex-x/ChangeLog @@ -1,3 +1,14 @@ +2023-12-16 TANAKA Takuji + + * configure.ac, version.h: + Bump version to 4.02 (16 dec 2023). + * bibtex-4.c: + Support characters defined by Unicode 15.1. + It works with ICU 74.1 or later. + * tests/bibtexu-{char,iscjk}.test, + tests/iscjku.bbl, tests/testiscjku.bib, Makefile.am: + Update tests. + 2023-08-30 TANAKA Takuji * tests/{bibtex8u-mem,bibtexu-char}.test: diff --git a/Build/source/texk/bibtex-x/Makefile.am b/Build/source/texk/bibtex-x/Makefile.am index 7b634646f61..d53d4a49671 100644 --- a/Build/source/texk/bibtex-x/Makefile.am +++ b/Build/source/texk/bibtex-x/Makefile.am @@ -94,7 +94,8 @@ bibtex8_tests = tests/bibtex8.test tests/bibtex8u-mem.test \ tests/bibtex8-sort.test tests/bibtex8-char.test bibtexu_tests = tests/bibtexu.test tests/bibtexu-basic.test \ tests/bibtexu-range.test tests/bibtexu-yannis.test \ - tests/bibtexu-sort.test tests/bibtexu-char.test + tests/bibtexu-sort.test tests/bibtexu-char.test \ + tests/bibtexu-iscjk.test TESTS = if BIBTEX8 @@ -166,15 +167,17 @@ EXTRA_DIST += tests/periodu.aux tests/periodu.bbl tests/testperiodu.bib \ tests/txtprfxu.aux tests/txtprfxu.bbl \ tests/widthu.aux tests/widthu.bbl tests/testwidthu.bib \ tests/charu.aux tests/charu.bbl tests/testcharu.bib \ - tests/nameu.aux tests/nameu.bbl tests/mlgbib.bib \ - tests/iscjku.aux tests/iscjku.bbl tests/testiscjku.bib tests/testiscjk.bst + tests/nameu.aux tests/nameu.bbl tests/mlgbib.bib DISTCLEANFILES += tests/xperiodu.aux tests/xperiodu.bbl tests/xperiodu.blg \ tests/xsubstru.aux tests/xsubstru.bbl tests/xsubstru.blg \ tests/xtxtprfxu.aux tests/txtprfxu.bbl tests/xtxtprfxu.blg \ tests/xwidthu.aux tests/widthu.bbl tests/xwidthu.blg \ tests/xcharu.aux tests/xcharu.bbl tests/xcharu.blg \ - tests/xnameu.aux tests/xnameu.bbl tests/xnameu.blg \ - tests/xiscjku.aux tests/xiscjku.bbl tests/xiscjku.blg + tests/xnameu.aux tests/xnameu.bbl tests/xnameu.blg +## +## tests/bibtexu-iscjk.test +EXTRA_DIST += tests/iscjku.aux tests/iscjku.bbl tests/testiscjku.bib tests/testiscjk.bst +DISTCLEANFILES += tests/xiscjku.aux tests/xiscjku.bbl tests/xiscjku.blg ## Not used ## diff --git a/Build/source/texk/bibtex-x/Makefile.in b/Build/source/texk/bibtex-x/Makefile.in index f988fbaccfb..2066f50e0f2 100644 --- a/Build/source/texk/bibtex-x/Makefile.in +++ b/Build/source/texk/bibtex-x/Makefile.in @@ -676,7 +676,8 @@ bibtex8_tests = tests/bibtex8.test tests/bibtex8u-mem.test \ bibtexu_tests = tests/bibtexu.test tests/bibtexu-basic.test \ tests/bibtexu-range.test tests/bibtexu-yannis.test \ - tests/bibtexu-sort.test tests/bibtexu-char.test + tests/bibtexu-sort.test tests/bibtexu-char.test \ + tests/bibtexu-iscjk.test TESTS = $(am__append_3) $(am__append_4) EXTRA_DIST = $(bibtex8_tests) $(bibtexu_tests) tests/exampl.bbl \ diff --git a/Build/source/texk/bibtex-x/bibtex-4.c b/Build/source/texk/bibtex-x/bibtex-4.c index 0a9b09b9a4d..c72c38dde49 100644 --- a/Build/source/texk/bibtex-x/bibtex-4.c +++ b/Build/source/texk/bibtex-x/bibtex-4.c @@ -2818,11 +2818,16 @@ BEGIN case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D: case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E: case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_F: -#if defined(U_ICU_VERSION_MAJOR_NUM) && (U_ICU_VERSION_MAJOR_NUM > 65) +#if defined(U_ICU_VERSION_MAJOR_NUM) +#if U_ICU_VERSION_MAJOR_NUM > 65 case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_G: #endif -#if defined(U_ICU_VERSION_MAJOR_NUM) && (U_ICU_VERSION_MAJOR_NUM > 71) +#if U_ICU_VERSION_MAJOR_NUM > 71 case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_H: +#endif +#if U_ICU_VERSION_MAJOR_NUM > 73 + case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_I: +#endif #endif string_width |= 0x001; break; @@ -2831,11 +2836,13 @@ BEGIN case UBLOCK_KATAKANA: case UBLOCK_KATAKANA_PHONETIC_EXTENSIONS: case UBLOCK_KANA_EXTENDED_A: -#if defined(U_ICU_VERSION_MAJOR_NUM) && (U_ICU_VERSION_MAJOR_NUM > 69) +#if defined(U_ICU_VERSION_MAJOR_NUM) +#if U_ICU_VERSION_MAJOR_NUM > 69 case UBLOCK_KANA_EXTENDED_B: #endif -#if defined(U_ICU_VERSION_MAJOR_NUM) && (U_ICU_VERSION_MAJOR_NUM > 63) +#if U_ICU_VERSION_MAJOR_NUM > 63 case UBLOCK_SMALL_KANA_EXTENSION: +#endif #endif string_width |= 0x002; break; diff --git a/Build/source/texk/bibtex-x/configure b/Build/source/texk/bibtex-x/configure index a7695c4ef84..8b550da0fa0 100755 --- a/Build/source/texk/bibtex-x/configure +++ b/Build/source/texk/bibtex-x/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for extended BibTeX (TeX Live) 4.01. +# Generated by GNU Autoconf 2.71 for extended BibTeX (TeX Live) 4.02. # # Report bugs to . # @@ -629,8 +629,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='extended BibTeX (TeX Live)' PACKAGE_TARNAME='extended-bibtex--tex-live-' -PACKAGE_VERSION='4.01' -PACKAGE_STRING='extended BibTeX (TeX Live) 4.01' +PACKAGE_VERSION='4.02' +PACKAGE_STRING='extended BibTeX (TeX Live) 4.02' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' @@ -1400,7 +1400,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures extended BibTeX (TeX Live) 4.01 to adapt to many kinds of systems. +\`configure' configures extended BibTeX (TeX Live) 4.02 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1472,7 +1472,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of extended BibTeX (TeX Live) 4.01:";; + short | recursive ) echo "Configuration of extended BibTeX (TeX Live) 4.02:";; esac cat <<\_ACEOF @@ -1599,7 +1599,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -extended BibTeX (TeX Live) configure 4.01 +extended BibTeX (TeX Live) configure 4.02 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2280,7 +2280,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by extended BibTeX (TeX Live) $as_me 4.01, which was +It was created by extended BibTeX (TeX Live) $as_me 4.02, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -8937,7 +8937,7 @@ fi # Define the identity of the package. PACKAGE='extended-bibtex--tex-live-' - VERSION='4.01' + VERSION='4.02' # Some tools Automake needs. @@ -19329,7 +19329,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -extended BibTeX (TeX Live) config.lt 4.01 +extended BibTeX (TeX Live) config.lt 4.02 configured by $0, generated by GNU Autoconf 2.71. Copyright (C) 2011 Free Software Foundation, Inc. @@ -21537,7 +21537,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by extended BibTeX (TeX Live) $as_me 4.01, which was +This file was extended by extended BibTeX (TeX Live) $as_me 4.02, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -21605,7 +21605,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -extended BibTeX (TeX Live) config.status 4.01 +extended BibTeX (TeX Live) config.status 4.02 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/Build/source/texk/bibtex-x/configure.ac b/Build/source/texk/bibtex-x/configure.ac index 749b11c14ef..797b56e2f45 100644 --- a/Build/source/texk/bibtex-x/configure.ac +++ b/Build/source/texk/bibtex-x/configure.ac @@ -8,7 +8,7 @@ dnl This file is free software; the copyright holder dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl -AC_INIT([extended BibTeX (TeX Live)], [4.01], [tex-k@tug.org]) +AC_INIT([extended BibTeX (TeX Live)], [4.02], [tex-k@tug.org]) AC_PREREQ([2.65]) AC_CONFIG_SRCDIR([bibtex-1.c]) AC_CONFIG_AUX_DIR([../../build-aux]) diff --git a/Build/source/texk/bibtex-x/tests/bibtexu-char.test b/Build/source/texk/bibtex-x/tests/bibtexu-char.test index a23e6a81869..88693014cf1 100755 --- a/Build/source/texk/bibtex-x/tests/bibtexu-char.test +++ b/Build/source/texk/bibtex-x/tests/bibtexu-char.test @@ -7,8 +7,7 @@ BinDir=${BinDir:-.} ExeExt=${ExeExt:-} _bibtexu=$BinDir/bibtexu$ExeExt -test -d tests || mkdir tests -test -d tests || exit 1 +test -d tests || mkdir -p tests LC_ALL=C; export LC_ALL; LANGUAGE=C; export LANGUAGE # @@ -55,19 +54,4 @@ cp $srcdir/tests/nameu.aux tests/xnameu.aux max_print_line=119 $_bibtexu tests/xnameu || rc=13 diff $srcdir/tests/nameu.bbl tests/xnameu.bbl || rc=14 -## test for is.knj.str$ - -DIFF="diff"; icuver=0 -$_bibtexu --version | grep "ICU version 70" && icuver=70 -if [ $icuver -eq 70 ]; then - # skip CJK Ideograph Extension H - # U+31350 -> \360\261\215\220 - uchr='\360\261\215\220' - DIFF="diff --ignore-matching-lines="`printf "${uchr}"` - echo "*** skip checking CJK Ideograph Extension H" -fi -cp $srcdir/tests/iscjku.aux tests/xiscjku.aux -$_bibtexu tests/xiscjku || rc=15 -$DIFF $srcdir/tests/iscjku.bbl tests/xiscjku.bbl || rc=16 - exit $rc diff --git a/Build/source/texk/bibtex-x/tests/bibtexu-iscjk.test b/Build/source/texk/bibtex-x/tests/bibtexu-iscjk.test new file mode 100755 index 00000000000..f422dd3dc70 --- /dev/null +++ b/Build/source/texk/bibtex-x/tests/bibtexu-iscjk.test @@ -0,0 +1,57 @@ +#! /bin/sh -vx +# $Id$ +# Copyright 2022-2023 TANAKA Takuji +# You may freely use, modify and/or distribute this file. + +BinDir=${BinDir:-.} +ExeExt=${ExeExt:-} +_bibtexu=$BinDir/bibtexu$ExeExt + +test -d tests || mkdir -p tests + +LC_ALL=C; export LC_ALL; LANGUAGE=C; export LANGUAGE +# +TEXMFCNF=$srcdir/../kpathsea; export TEXMFCNF +BSTINPUTS=$srcdir/tests; export BSTINPUTS +BIBINPUTS=$srcdir/tests; export BIBINPUTS + + +rc=0 + +## test for is.knj.str$ + +icuver=1000 +$_bibtexu --version | grep 'ICU version' | sed -E 's/.*ICU version ([1-9][0-9])\..*/\1/' > tests/icuver.txt +icuver=`cat tests/icuver.txt` +echo "*** icuver="$icuver +if [ $icuver -lt 74 ]; then + # skip CJK Ideograph Extension I + # ex. U+2EBF0 + uchr='\x{2EBF0}' +fi +if [ $icuver -lt 72 ]; then + # skip CJK Ideograph Extension H + # ex. U+31350 + uchr=${uchr}'|\x{31350}' +fi +if [ $icuver -lt 70 ]; then + # skip Kana Extended B + # ex. U+1AFF0 + uchr=${uchr}'|\x{1AFF0}' +fi +if [ $icuver -lt 66 ]; then + # skip CJK Ideograph Extension G, Small Kana Extension + # ex. U+30000, U+1B150 + uchr=${uchr}'|\x{30000}|\x{1B150}' +fi +cp $srcdir/tests/iscjku.aux tests/xiscjku.aux +$_bibtexu tests/xiscjku || rc=1 +cp $srcdir/tests/iscjku.bbl tests/oiscjku.bbl +if [ $icuver -le 73 ]; then + echo "*** skip checking CJK Ideograph Extension G, H or I" + perl -i".bak" -CD -ne "print unless /${uchr}/" tests/oiscjku.bbl + perl -i".bak" -CD -ne "print unless /${uchr}/" tests/xiscjku.bbl +fi +diff tests/oiscjku.bbl tests/xiscjku.bbl || rc=2 + +exit $rc diff --git a/Build/source/texk/bibtex-x/tests/iscjku.bbl b/Build/source/texk/bibtex-x/tests/iscjku.bbl index 1cf81b781bd..4bef9f3f231 100644 --- a/Build/source/texk/bibtex-x/tests/iscjku.bbl +++ b/Build/source/texk/bibtex-x/tests/iscjku.bbl @@ -54,6 +54,7 @@ \item 一二三四漆捌玖拾: 1 1 hz:1 kn:0 hg:0 bp:0 misc:0 \item 𰀀𰀁𰀂𰀃𰀄𰀅𰀆𰀇: 1 1 hz:1 kn:0 hg:0 bp:0 misc:0 \item 𪜀𪜁𪜂𪜃𪜄𪜅𪜆𪜇: 1 1 hz:1 kn:0 hg:0 bp:0 misc:0 +\item 𮯰𮯱𮯲𮯳𮯴𮯵𮯶𮯷: 1 1 hz:1 kn:0 hg:0 bp:0 misc:0 \item 𱍐𱍑𱍒𱍓𱍔𱍕𱍖𱍗: 1 1 hz:1 kn:0 hg:0 bp:0 misc:0 \item 㐂㒵㓛㞍㟢㐆㐬㐮㔫㚑㐧: 1 1 hz:1 kn:0 hg:0 bp:0 misc:0 \item ⺐⺒⺓⺔⺖⺗⺘⺙⻭⻯⻲: 2048 2048 hz:0 kn:0 hg:0 bp:0 diff --git a/Build/source/texk/bibtex-x/tests/testiscjku.bib b/Build/source/texk/bibtex-x/tests/testiscjku.bib index 34c9df07a26..a0c47dd9902 100644 --- a/Build/source/texk/bibtex-x/tests/testiscjku.bib +++ b/Build/source/texk/bibtex-x/tests/testiscjku.bib @@ -23,6 +23,7 @@ @Type{cjk-ideograph-ExtC-1000, field = {𪜀𪜁𪜂𪜃𪜄𪜅𪜆𪜇}, } @Type{cjk-ideograph-ExtG-1000, field = {𰀀𰀁𰀂𰀃𰀄𰀅𰀆𰀇}, } @Type{cjk-ideograph-ExtH-1000, field = {𱍐𱍑𱍒𱍓𱍔𱍕𱍖𱍗}, } +@Type{cjk-ideograph-ExtI-1000, field = {𮯰𮯱𮯲𮯳𮯴𮯵𮯶𮯷}, } @Type{hangul-1000, field = {가나다라마한글텍}, } diff --git a/Build/source/texk/bibtex-x/version.h b/Build/source/texk/bibtex-x/version.h index 17084ce89bb..47ab4b4e933 100644 --- a/Build/source/texk/bibtex-x/version.h +++ b/Build/source/texk/bibtex-x/version.h @@ -89,7 +89,7 @@ */ #ifndef __VERSION_H__ # define __VERSION_H__ 1 -# define PACKAGE_DATE "(15 jul 2023)" +# define PACKAGE_DATE "(16 dec 2023)" # define EXT_VERSION PACKAGE_VERSION # define VERSION PACKAGE_VERSION " " PACKAGE_DATE #endif /* __VERSION_H__ */ -- cgit v1.2.3