Skip to content

Commit

Permalink
icu: remove compiler references
Browse files Browse the repository at this point in the history
  • Loading branch information
tie committed Aug 26, 2024
1 parent 380f165 commit d6d72d1
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions pkgs/development/libraries/icu/make-icu.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,17 @@ let
'';

# https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27
postPatch = if (stdenv.hostPlatform.libc == "glibc" || stdenv.hostPlatform.libc == "musl") && lib.versionOlder version "62.1"
then "substituteInPlace i18n/digitlst.cpp --replace '<xlocale.h>' '<locale.h>'"
else null; # won't find locale_t on darwin
postPatch = lib.optionalString ((stdenv.hostPlatform.libc == "glibc" || stdenv.hostPlatform.libc == "musl") && lib.versionOlder version "62.1") ''
substituteInPlace i18n/digitlst.cpp --replace '<xlocale.h>' '<locale.h>'
''
# Remove CC/CXX references from tools/toolutil/udbgutil.cpp and do not
# embed build platform alias in the output for reproducibility.
+ ''
substituteInPlace tools/toolutil/Makefile.in \
--replace-fail \
'CPPFLAGS+= "-DU_BUILD=\"@build@\"" "-DU_HOST=\"@host@\"" "-DU_CC=\"@CC@\"" "-DU_CXX=\"@CXX@\""' \
'CPPFLAGS += "-DU_HOST=\"@host@\"" "-DU_CC=\"''${NIX_CC_BASENAME}\"" "-DU_CXX=\"''${NIX_CXX_BASENAME}\""'
'';

inherit patchFlags patches;

Expand Down

0 comments on commit d6d72d1

Please sign in to comment.