| From 999090f0f75818a7775c05e30dfaf3d5e73758aa Mon Sep 17 00:00:00 2001 |
| From: =?UTF-8?q?Fran=C3=A7ois=20Degros?= <fdegros@chromium.org> |
| Date: Mon, 22 Nov 2021 17:00:06 +1100 |
| Subject: [PATCH] Use chrome-icu |
| |
| Link and initialize the ChromeOS-specific version of ICU (chrome-icu). |
| Don't build man page. |
| --- |
| Makefile | 7 +++---- |
| lib/Makefile | 4 +++- |
| lib/tree.cc | 3 +++ |
| 3 files changed, 9 insertions(+), 5 deletions(-) |
| |
| diff --git a/Makefile b/Makefile |
| index f56dd6c..c09dba4 100644 |
| --- a/Makefile |
| +++ b/Makefile |
| @@ -20,9 +20,9 @@ prefix = /usr |
| exec_prefix = $(prefix) |
| bindir = $(exec_prefix)/bin |
| PKG_CONFIG ?= pkg-config |
| -DEPS = fuse libzip icu-uc icu-i18n |
| +DEPS = fuse libzip |
| LIBS := -Llib -lfusezip $(shell $(PKG_CONFIG) --libs $(DEPS)) |
| -LIBS += -Llib -lfusezip |
| +LIBS += -Llib -lfusezip -licui18n-chrome -licuuc-chrome |
| CXXFLAGS := $(shell $(PKG_CONFIG) --cflags $(DEPS)) |
| CXXFLAGS += -Wall -Wextra -Wno-sign-compare -Wno-missing-field-initializers -pedantic -std=c++20 |
| ifeq ($(DEBUG), 1) |
| @@ -64,9 +64,8 @@ all-clean: |
| $(MAN): README.md |
| pandoc $< -s -t man -o $@ |
| |
| -install: all doc |
| +install: all |
| $(INSTALL_PROGRAM) "$(DEST)" "$(DESTDIR)$(bindir)/$(DEST)" |
| - $(INSTALL_DATA) $(MAN) "$(DESTDIR)$(MANDIR)/$(MAN)" |
| |
| install-strip: |
| $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install |
| diff --git a/lib/Makefile b/lib/Makefile |
| index cf26430..0a11b60 100644 |
| --- a/lib/Makefile |
| +++ b/lib/Makefile |
| @@ -17,8 +17,10 @@ |
| |
| DEST = libfusezip.a |
| PKG_CONFIG ?= pkg-config |
| -DEPS = fuse libzip icu-uc icu-i18n |
| +DEPS = fuse libzip |
| CXXFLAGS := $(shell $(PKG_CONFIG) --cflags $(DEPS)) |
| +CXXFLAGS += -I"$(SYSROOT)/usr/include/icu-chrome/common" |
| +CXXFLAGS += -I"$(SYSROOT)/usr/include/icu-chrome/i18n" |
| CXXFLAGS += -Wall -Wextra -Wno-sign-compare -Wno-missing-field-initializers -pedantic -std=c++20 |
| ifeq ($(DEBUG), 1) |
| CXXFLAGS += -O0 -g |
| diff --git a/lib/tree.cc b/lib/tree.cc |
| index 1006348..0babe90 100644 |
| --- a/lib/tree.cc |
| +++ b/lib/tree.cc |
| @@ -296,6 +296,9 @@ void Tree::BuildTree() { |
| need_prefix_ = name.starts_with('/') || name.starts_with("../"); |
| } |
| |
| + // Initialize ICU library and ensure it will be cleaned up. |
| + const IcuGuard guard("/opt/google/chrome/icudtl.dat"); |
| + |
| // Detect filename encoding. |
| std::string encoding; |
| if (opts_.encoding) |
| -- |
| 2.34.0.rc2.393.gf8c9666880-goog |
| |