From 7a9ad23a9ec80a37308ab75c23c67da57287dd80 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 11 Sep 2023 15:40:02 +0300 Subject: Release version 3.2.4+1 Add support for config.libxerces_c.transcoder_icu variable Update .gitignore file --- libxerces-c/xercesc/buildfile | 40 ++++++++++++++++++++-- libxerces-c/xercesc/config.h | 22 ++++++++---- .../xercesc/util/Transcoders/MacOSUnicodeConverter | 1 + libxerces-c/xercesc/util/Transcoders/Win32 | 1 + 4 files changed, 55 insertions(+), 9 deletions(-) create mode 120000 libxerces-c/xercesc/util/Transcoders/MacOSUnicodeConverter create mode 120000 libxerces-c/xercesc/util/Transcoders/Win32 (limited to 'libxerces-c/xercesc') diff --git a/libxerces-c/xercesc/buildfile b/libxerces-c/xercesc/buildfile index c50b091..15f61b1 100644 --- a/libxerces-c/xercesc/buildfile +++ b/libxerces-c/xercesc/buildfile @@ -2,25 +2,34 @@ # license : Apache License 2.0; see accompanying LICENSE file network = $config.libxerces_c.network +transcoder_icu = $config.libxerces_c.transcoder_icu + +intf_libs = # Interface dependencies. +impl_libs = # Implementation dependencies. # Note that the installed util/NetAccessors/Curl/CurlURLInputStream.hpp # includes the libcurl headers. # if $network - import intf_libs = libcurl%lib{curl} + import intf_libs += libcurl%lib{curl} -import impl_libs = libicuuc%lib{icuuc} -import impl_libs += libicui18n%lib{icui18n} +if $transcoder_icu +{ + import impl_libs += libicuuc%lib{icuuc} + import impl_libs += libicui18n%lib{icui18n} +} lib{xerces-c}: {h }{config} \ {hxx txx cxx}{*/** -util/FileManagers/** \ -util/NetAccessors/** \ + -util/Transcoders/** \ -util/XercesVersion} \ {hxx }{ util/XercesVersion} tclass = $cxx.target.class tsys = $cxx.target.system +macos = ($tclass == 'macos') windows = ($tclass == 'windows') lib{xerces-c}: {h c}{stricmp strnicmp} \ @@ -30,6 +39,14 @@ lib{xerces-c}: util/FileManagers/{hxx cxx}{WindowsFileMgr}: include = $windows lib{xerces-c}: util/NetAccessors/Curl/{hxx cxx}{*}: include = $network +lib{xerces-c}: util/Transcoders/ICU/{hxx cxx}{*}: include = $transcoder_icu + +lib{xerces-c}: util/Transcoders/MacOSUnicodeConverter/{hxx cxx}{*}: \ +include = (!$transcoder_icu && $macos) + +lib{xerces-c}: util/Transcoders/Win32/{hxx cxx}{*}: \ +include = (!$transcoder_icu && $windows) + lib{xerces-c}: $intf_libs $impl_libs # Include the generated version header into the distribution (so that we @@ -55,6 +72,13 @@ util/hxx{XercesVersion}: util/in{XercesVersion} $src_root/manifest if $network cc.poptions += -DXERCES_USE_NETACCESSOR_CURL=1 +if $transcoder_icu + cc.poptions += -DXERCES_USE_TRANSCODER_ICU=1 +elif $macos + cc.poptions += -DXERCES_USE_TRANSCODER_MACOSUNICODECONVERTER=1 +elif $windows + cc.poptions += -DXERCES_USE_TRANSCODER_WINDOWS=1 + cc.poptions += -DXERCES_BUILDING_LIBRARY -DHAVE_CONFIG_H -D_THREAD_SAFE if $windows @@ -110,6 +134,9 @@ switch $tclass, $tsys # cxx.aoptions += /IGNORE:4221 + if! $transcoder_icu + cxx.libs += advapi32.lib + cxx.libs += ws2_32.lib } case 'linux' @@ -120,6 +147,13 @@ switch $tclass, $tsys cxx.libs += -lm -pthread } + case 'macos' + { + if! $transcoder_icu + cxx.libs += -framework CoreServices + + cxx.libs += -pthread + } default { cxx.libs += -pthread diff --git a/libxerces-c/xercesc/config.h b/libxerces-c/xercesc/config.h index ab2ea78..53ae22e 100644 --- a/libxerces-c/xercesc/config.h +++ b/libxerces-c/xercesc/config.h @@ -23,19 +23,25 @@ # include /* Requires C99. */ #endif -/* Use the ICU transcoder. +/* Transcoder. + * + * Note that depending on config.libxerces_c.transcoder_icu and + * cxx.target.class values one of the following macros is defined via the + * preprocessor option (see buildfile and root.build for details). */ +/* #define XERCES_USE_TRANSCODER_ICU 1 -#undef XERCES_USE_TRANSCODER_GNUICONV -#undef XERCES_USE_TRANSCODER_ICONV #undef XERCES_USE_TRANSCODER_MACOSUNICODECONVERTER #undef XERCES_USE_TRANSCODER_WINDOWS +*/ +#undef XERCES_USE_TRANSCODER_GNUICONV +#undef XERCES_USE_TRANSCODER_ICONV -/* Use the Curl net accessor. +/* Net accessor. * * Note that the XERCES_USE_NETACCESSOR_CURL macro is defined via the - * preprocessor option if the network support is enabled (see buildfile for - * details). + * preprocessor option if the network support is enabled (see buildfile and + * root.build for details). */ /* #define XERCES_USE_NETACCESSOR_CURL 1 @@ -91,6 +97,10 @@ # define HAVE_FTIME 1 # define HAVE_STRICMP 1 # define HAVE_STRNICMP 1 +# define HAVE_WCSICMP 1 +# define HAVE_WCSLWR 1 +# define HAVE_WCSNICMP 1 +# define HAVE_WCSUPR 1 # define XERCES_HAVE_INTRIN_H 1 # define XERCES_PATH_DELIMITER_BACKSLASH 1 # define XERCES_HAVE_CPUID_INTRINSIC 1 diff --git a/libxerces-c/xercesc/util/Transcoders/MacOSUnicodeConverter b/libxerces-c/xercesc/util/Transcoders/MacOSUnicodeConverter new file mode 120000 index 0000000..5d4612d --- /dev/null +++ b/libxerces-c/xercesc/util/Transcoders/MacOSUnicodeConverter @@ -0,0 +1 @@ +../../../../upstream/src/xercesc/util/Transcoders/MacOSUnicodeConverter \ No newline at end of file diff --git a/libxerces-c/xercesc/util/Transcoders/Win32 b/libxerces-c/xercesc/util/Transcoders/Win32 new file mode 120000 index 0000000..6ec82cb --- /dev/null +++ b/libxerces-c/xercesc/util/Transcoders/Win32 @@ -0,0 +1 @@ +../../../../upstream/src/xercesc/util/Transcoders/Win32 \ No newline at end of file -- cgit v1.1