icu: update to 74.1

This commit is contained in:
Mehdi Chinoune
2023-11-06 16:54:08 +00:00
committed by مهدي شينون (Mehdi Chinoune)
parent eda26bd575
commit e28d01ebb8

View File

@@ -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;