summaryrefslogtreecommitdiffstats
path: root/package/gptfdisk/gptfdisk-001-configurable-utf16-support.patch
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2013-03-07 10:45:28 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2013-03-10 22:25:29 +0100
commit6c83b40a1b2d1eb46de50d49572db13a4ce59f03 (patch)
treebcd58ed2262f5f2cc8e9752e384782821b0d2d7a /package/gptfdisk/gptfdisk-001-configurable-utf16-support.patch
parenta4b61bf3785283605252876825d49253434da5b9 (diff)
downloadbuildroot-6c83b40a1b2d1eb46de50d49572db13a4ce59f03.tar.gz
buildroot-6c83b40a1b2d1eb46de50d49572db13a4ce59f03.zip
gptfdisk: make utf16 support configurable
Instead of always disabling the UTF16 support, make it configurable. When ICU is available, enable UTF16 support, otherwise disable it. [Peter: wrap long line] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/gptfdisk/gptfdisk-001-configurable-utf16-support.patch')
-rw-r--r--package/gptfdisk/gptfdisk-001-configurable-utf16-support.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/package/gptfdisk/gptfdisk-001-configurable-utf16-support.patch b/package/gptfdisk/gptfdisk-001-configurable-utf16-support.patch
new file mode 100644
index 0000000000..2d51e6f7bf
--- /dev/null
+++ b/package/gptfdisk/gptfdisk-001-configurable-utf16-support.patch
@@ -0,0 +1,48 @@
+[PATCH] Make the UTF16 support configurable
+
+libicu is quite large, and unicode partition names are uncommon, so we
+may not necessarily want to have UTF16 support unconditionnally. This
+patch adds a USE_UTF16 environment variable to tell whether we want
+the UTF16 support or not.
+
+Signed-off-by: Justin Maggard <jmaggard10@gmail.com>
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+Index: b/Makefile
+===================================================================
+--- a/Makefile
++++ b/Makefile
+@@ -1,8 +1,11 @@
+ CC=gcc
+ CXX=g++
+ CFLAGS+=-D_FILE_OFFSET_BITS=64
+-CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16
+-#CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64
++CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64
++ifeq ($(USE_UTF16),y)
++CXXFLAGS+=-D USE_UTF16
++UTF16_LIBS=-licuio -licuuc
++endif
+ LDFLAGS+=
+ LIB_NAMES=crc32 support guid gptpart mbrpart basicmbr mbr gpt bsd parttypes attributes diskio diskio-unix
+ MBR_LIBS=support diskio diskio-unix basicmbr mbrpart
+@@ -14,16 +17,13 @@
+ all: cgdisk gdisk sgdisk fixparts
+
+ gdisk: $(LIB_OBJS) gdisk.o gpttext.o
+-# $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -luuid -o gdisk
+- $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -licuio -licuuc -luuid -o gdisk
++ $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) $(UTF16_LIBS) -luuid -o gdisk
+
+ cgdisk: $(LIB_OBJS) cgdisk.o gptcurses.o
+-# $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -luuid -lncurses -o cgdisk
+- $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -licuio -licuuc -luuid -lncurses -o cgdisk
++ $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) $(UTF16_LIBS) -luuid -lncurses -o cgdisk
+
+ sgdisk: $(LIB_OBJS) sgdisk.o gptcl.o
+-# $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) -luuid -lpopt -o sgdisk
+- $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) -licuio -licuuc -luuid -lpopt -o sgdisk
++ $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) $(UTF16_LIBS) -luuid -lpopt -o sgdisk
+
+ fixparts: $(MBR_LIB_OBJS) fixparts.o
+ $(CXX) $(MBR_LIB_OBJS) fixparts.o $(LDFLAGS) -o fixparts
OpenPOWER on IntegriCloud