From ec0cdc4acbc827462fd295e8ab4bd86bd21a4143 Mon Sep 17 00:00:00 2001 From: tobtoht Date: Thu, 25 May 2023 23:10:04 +0200 Subject: [PATCH] depends: remove icu4c --- CMakeLists.txt | 2 +- contrib/depends/packages/icu4c.mk | 27 -------------- contrib/depends/packages/packages.mk | 2 +- ...-001-dont-build-static-dynamic-twice.patch | 37 ------------------- 4 files changed, 2 insertions(+), 66 deletions(-) delete mode 100644 contrib/depends/packages/icu4c.mk delete mode 100644 contrib/depends/patches/icu4c/icu-001-dont-build-static-dynamic-twice.patch diff --git a/CMakeLists.txt b/CMakeLists.txt index d036f7456..954f35e34 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1098,7 +1098,7 @@ if(MINGW) set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wa,-mbig-obj") set(EXTRA_LIBRARIES mswsock;ws2_32;iphlpapi;crypt32;bcrypt) if(DEPENDS) - set(ICU_LIBRARIES icuio icui18n icuuc icudata icutu iconv) + set(ICU_LIBRARIES iconv) else() set(ICU_LIBRARIES icuio icuin icuuc icudt icutu iconv) endif() diff --git a/contrib/depends/packages/icu4c.mk b/contrib/depends/packages/icu4c.mk deleted file mode 100644 index 58ae637b0..000000000 --- a/contrib/depends/packages/icu4c.mk +++ /dev/null @@ -1,27 +0,0 @@ -package=icu4c -$(package)_version=55.2 -$(package)_download_path=https://github.com/unicode-org/icu/releases/download/release-55-2/ -$(package)_file_name=$(package)-55_2-src.tgz -$(package)_sha256_hash=eda2aa9f9c787748a2e2d310590720ca8bcc6252adf6b4cfb03b65bef9d66759 -$(package)_patches=icu-001-dont-build-static-dynamic-twice.patch - -define $(package)_set_vars - $(package)_build_opts=CFLAGS="$($(package)_cflags) $($(package)_cppflags) -DU_USING_ICU_NAMESPACE=0 -DU_STATIC_IMPLEMENTATION -DU_COMBINED_IMPLEMENTATION -fPIC -DENABLE_STATIC=YES -DPGKDATA_MODE=static" -endef - -define $(package)_config_cmds - patch -p1 < $($(package)_patch_dir)/icu-001-dont-build-static-dynamic-twice.patch &&\ - mkdir builda &&\ - mkdir buildb &&\ - cd builda &&\ - sh ../source/runConfigureICU Linux &&\ - make &&\ - cd ../buildb &&\ - sh ../source/runConfigureICU MinGW --enable-static=yes --disable-shared --disable-layout --disable-layoutex --disable-tests --disable-samples --prefix=$(host_prefix) --with-cross-build=`pwd`/../builda &&\ - $(MAKE) $($(package)_build_opts) -endef - -define $(package)_stage_cmds - cd buildb &&\ - $(MAKE) $($(package)_build_opts) DESTDIR=$($(package)_staging_dir) install lib/* -endef diff --git a/contrib/depends/packages/packages.mk b/contrib/depends/packages/packages.mk index d2d1eca85..ea4a0effd 100644 --- a/contrib/depends/packages/packages.mk +++ b/contrib/depends/packages/packages.mk @@ -29,7 +29,7 @@ ifneq ($(host_arch),riscv64) linux_packages += unwind endif -mingw32_packages = icu4c sodium $(hardware_packages) +mingw32_packages = sodium $(hardware_packages) mingw32_native_packages = $(hardware_native_packages) ifneq ($(build_os),darwin) diff --git a/contrib/depends/patches/icu4c/icu-001-dont-build-static-dynamic-twice.patch b/contrib/depends/patches/icu4c/icu-001-dont-build-static-dynamic-twice.patch deleted file mode 100644 index bbd4e99e7..000000000 --- a/contrib/depends/patches/icu4c/icu-001-dont-build-static-dynamic-twice.patch +++ /dev/null @@ -1,37 +0,0 @@ -Don't build object files twice - -When passed --enable-static and --enable-shared, icu will generate -both a shared and a static version of its libraries. - -However, in order to do so, it builds each and every object file -twice: once with -fPIC (for the shared library), and once without --fPIC (for the static library). While admittedly building -fPIC for a -static library generates a slightly suboptimal code, this is what all -the autotools-based project are doing. They build each object file -once, and they use it for both the static and shared libraries. - -icu builds the object files for the shared library as .o files, and -the object files for static library as .ao files. By simply changing -the suffix of object files used for static libraries to ".o", we tell -icu to use the ones built for the shared library (i.e, with -fPIC), -and avoid the double build of icu. - -On a fast build server, this brings the target icu build from -3m41.302s down to 1m43.926s (approximate numbers: some other builds -are running on the system at the same time). - -Signed-off-by: Thomas Petazzoni - -Index: b/source/config/mh-linux -=================================================================== ---- a/source/config/mh-linux -+++ b/source/config/mh-linux -@@ -38,7 +38,7 @@ - ## Shared object suffix - SO = so - ## Non-shared intermediate object suffix --STATIC_O = ao -+STATIC_O = o - - ## Compilation rules - %.$(STATIC_O): $(srcdir)/%.c