From e28d01ebb8d7ff4e63f77eb3655cebb792baa607 Mon Sep 17 00:00:00 2001 From: Mehdi Chinoune Date: Mon, 6 Nov 2023 16:54:08 +0000 Subject: [PATCH] icu: update to 74.1 --- mingw-w64-icu/PKGBUILD | 89 ++++++++++++------------------------------ 1 file changed, 26 insertions(+), 63 deletions(-) diff --git a/mingw-w64-icu/PKGBUILD b/mingw-w64-icu/PKGBUILD index 1ec5ba0a46..0f257e9cd0 100644 --- a/mingw-w64-icu/PKGBUILD +++ b/mingw-w64-icu/PKGBUILD @@ -4,8 +4,8 @@ _realname=icu pkgbase=mingw-w64-${_realname} -pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}" "${MINGW_PACKAGE_PREFIX}-${_realname}-debug-libs") -pkgver=73.2 +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=74.1 pkgrel=1 arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64') @@ -16,9 +16,6 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") makedepends=("${MINGW_PACKAGE_PREFIX}-cc" "${MINGW_PACKAGE_PREFIX}-autotools" "autoconf-archive") -# There's no point adding 'debug' to options as both -# debug and release packages are built regardless. -options=('!buildflags' 'staticlibs' 'strip') source=(https://github.com/unicode-org/icu/releases/download/release-${pkgver//./-}/icu4c-${pkgver//./_}-src.tgz 0011-sbin-dir.mingw.patch 0012-libprefix.mingw.patch @@ -27,7 +24,7 @@ source=(https://github.com/unicode-org/icu/releases/download/release-${pkgver//. 0016-icu-pkgconfig.patch 0021-mingw-static-libraries-without-s.patch 0023-fix-twice-include-platform_make_fragment.patch) -sha256sums=('818a80712ed3caacd9b652305e01afc7fa167e6f2e94996da44b90c2ab604ce1' +sha256sums=('86ce8e60681972e60e4dcb2490c697463fcec60dd400a5f9bffba26d0b52b8d0' '4f4787caeccf70607cf0cbde0c005f05f5c6de1543265a927839122405b4054f' 'e7ecdafe85e18a4a4b5f29bbfde38776521a848e5b65089a2379b90e59f1592d' 'd9f5f756443d7d14175aca06f4f1bb33237b58907e5db7a6ff7e38d2c4ea7957' @@ -59,70 +56,36 @@ prepare() { } build() { - local -a extra_config - cd "${srcdir}/icu/" + mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}" - for _variant in debug release; do - [[ -d build-${MSYSTEM}-${_variant} ]] && rm -rf build-${MSYSTEM}-${_variant} - if [ "${_variant}" = "debug" ]; then - extra_config=( --enable-debug ) - else - extra_config=( --enable-release ) - fi - cp -rf source build-${MSYSTEM}-${_variant} - pushd build-${MSYSTEM}-${_variant} - ./configure \ - --prefix=${MINGW_PREFIX} \ - --build=${MINGW_CHOST} \ - --host=${MINGW_CHOST} \ - --target=${MINGW_CHOST} \ - --disable-rpath \ - --enable-shared \ - --enable-static \ - --with-data-packaging=dll \ - "${extra_config[@]}" - make - popd - done + declare -a _extra_config + if check_option "debug" "n"; then + _extra_config+=("--enable-release") + else + _extra_config+=("--enable-debug") + fi + + ../icu/source/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --disable-rpath \ + --enable-shared \ + --enable-static \ + --with-data-packaging=dll \ + "${_extra_config[@]}" + + make } check() { - for _variant in debug release; do - pushd "${srcdir}/icu/build-${MSYSTEM}-${_variant}" - PATH=${srcdir}/icu/build-${MSYSTEM}/bin:${srcdir}/icu/build-${MSYSTEM}/lib:$PATH \ - make V=1 -k check || true - popd - done + cd "${srcdir}/build-${MSYSTEM}" + PATH=${srcdir}/icu/build-${MSYSTEM}/bin:${srcdir}/icu/build-${MSYSTEM}/lib:$PATH \ + make V=1 -k check || true } -package_icu() { - pushd "${srcdir}/icu/build-${MSYSTEM}-release" +package() { + cd "${srcdir}/build-${MSYSTEM}" make install DESTDIR="${pkgdir}" RM="rm -rf" mv "${pkgdir}${MINGW_PREFIX}"/bin/*.a "${pkgdir}${MINGW_PREFIX}"/lib/ } - -package_icu-debug-libs() { - options=('debug' '!strip') - pushd "${srcdir}/icu/build-${MSYSTEM}-debug" - make install DESTDIR="${pkgdir}" RM="rm -rf" - - mv "${pkgdir}${MINGW_PREFIX}"/bin/*.a "${pkgdir}${MINGW_PREFIX}"/lib/ - - # Remove bits that are also in the main package. - # TODO :: Maybe move the pkg-config files to 'd' suffixed variants? - rm -rf "${pkgdir}${MINGW_PREFIX}"/{include,sbin,share,lib/pkgconfig} - rm -rf "${pkgdir}${MINGW_PREFIX}"/bin/*.exe - rm -rf "${pkgdir}${MINGW_PREFIX}"/bin/icu-config -} - -# template start; name=mingw-w64-splitpkg-wrappers; version=1.0; -# vim: set ft=bash : - -# generate wrappers -for _name in "${pkgname[@]}"; do - _short="package_${_name#${MINGW_PACKAGE_PREFIX}-}" - _func="$(declare -f "${_short}")" - eval "${_func/#${_short}/package_${_name}}" -done -# template end;