name=icu
version=74.1
revision=1
tarball_url="https://github.com/unicode-org/icu/releases/download/release-74-1/icu4c-74_1-src.tgz"
tarball_blake2b="cf8277cd513bd99c85104669e617683e4a91280c4c15a396021289fe0093d64682466550a44a0115bcc9e7abf30e3108dbadfb46e85e832e4cfd689618968507"
source_hostdeps="autoconf automake libtool pkg-config"
source_deps="autoconf-archive"
imagedeps="gcc"
hostdeps="gcc autoconf automake libtool pkg-config"
deps="core-libs"

regenerate() {
    autotools_recursive_regen
    cp source/config/{mh-linux,mh-unknown}
}

build() {
    mkdir cross-build
    cd cross-build
    ${source_dir}/source/configure \
        --prefix=/usr/local
    make -j${parallelism}
    cd ..

        configure_script_path=${source_dir}/source/configure \
    autotools_configure \
        --with-cross-build=$(realpath cross-build)

    make -j${parallelism}
}

package() {
    DESTDIR="${dest_dir}" make install

    post_package_strip
}
