mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-27 21:26:36 +00:00
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>
This commit is contained in:
parent
a4b61bf378
commit
6c83b40a1b
@ -1,43 +1,48 @@
|
|||||||
[PATCH] Disable UTF16 support
|
[PATCH] Make the UTF16 support configurable
|
||||||
|
|
||||||
libicu is quite large, and unicode partition names are uncommon.
|
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: Justin Maggard <jmaggard10@gmail.com>
|
||||||
|
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||||
---
|
---
|
||||||
diff -ur gdisk-0.8.5/Makefile gptfdisk-0.8.5/Makefile
|
Index: b/Makefile
|
||||||
--- gdisk-0.8.5/Makefile 2012-05-30 08:38:43.000000000 -0700
|
===================================================================
|
||||||
+++ gptfdisk-0.8.5/Makefile 2012-06-05 11:38:23.710597974 -0700
|
--- a/Makefile
|
||||||
@@ -1,8 +1,8 @@
|
+++ b/Makefile
|
||||||
|
@@ -1,8 +1,11 @@
|
||||||
CC=gcc
|
CC=gcc
|
||||||
CXX=g++
|
CXX=g++
|
||||||
CFLAGS+=-D_FILE_OFFSET_BITS=64
|
CFLAGS+=-D_FILE_OFFSET_BITS=64
|
||||||
-CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16
|
-CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16
|
||||||
-#CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64
|
-#CXXFLAGS+=-Wall -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+=
|
LDFLAGS+=
|
||||||
LIB_NAMES=crc32 support guid gptpart mbrpart basicmbr mbr gpt bsd parttypes attributes diskio diskio-unix
|
LIB_NAMES=crc32 support guid gptpart mbrpart basicmbr mbr gpt bsd parttypes attributes diskio diskio-unix
|
||||||
MBR_LIBS=support diskio diskio-unix basicmbr mbrpart
|
MBR_LIBS=support diskio diskio-unix basicmbr mbrpart
|
||||||
@@ -14,16 +14,16 @@
|
@@ -14,16 +17,13 @@
|
||||||
all: cgdisk gdisk sgdisk fixparts
|
all: cgdisk gdisk sgdisk fixparts
|
||||||
|
|
||||||
gdisk: $(LIB_OBJS) gdisk.o gpttext.o
|
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) -luuid -o gdisk
|
||||||
- $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -licuio -licuuc -luuid -o gdisk
|
- $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -licuio -licuuc -luuid -o gdisk
|
||||||
+ $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -luuid -o gdisk
|
+ $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) $(UTF16_LIBS) -luuid -o gdisk
|
||||||
+# $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -licuio -licuuc -luuid -o gdisk
|
|
||||||
|
|
||||||
cgdisk: $(LIB_OBJS) cgdisk.o gptcurses.o
|
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) -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) -licuio -licuuc -luuid -lncurses -o cgdisk
|
||||||
+ $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -luuid -lncurses -o cgdisk
|
+ $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) $(UTF16_LIBS) -luuid -lncurses -o cgdisk
|
||||||
+# $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -licuio -licuuc -luuid -lncurses -o cgdisk
|
|
||||||
|
|
||||||
sgdisk: $(LIB_OBJS) sgdisk.o gptcl.o
|
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) -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) -licuio -licuuc -luuid -lpopt -o sgdisk
|
||||||
+ $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) -luuid -lpopt -o sgdisk
|
+ $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) $(UTF16_LIBS) -luuid -lpopt -o sgdisk
|
||||||
+# $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) -licuio -licuuc -luuid -lpopt -o sgdisk
|
|
||||||
|
|
||||||
fixparts: $(MBR_LIB_OBJS) fixparts.o
|
fixparts: $(MBR_LIB_OBJS) fixparts.o
|
||||||
$(CXX) $(MBR_LIB_OBJS) fixparts.o $(LDFLAGS) -o fixparts
|
$(CXX) $(MBR_LIB_OBJS) fixparts.o $(LDFLAGS) -o fixparts
|
@ -15,9 +15,14 @@ ifeq ($(BR2_PACKAGE_GPTFDISK_SGDISK),y)
|
|||||||
GPTFDISK_DEPENDENCIES += popt
|
GPTFDISK_DEPENDENCIES += popt
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(BR2_PACKAGE_ICU),y)
|
||||||
|
GPTFDISK_DEPENDENCIES += icu
|
||||||
|
GPTFDISK_MAKE_OPTS += USE_UTF16=y
|
||||||
|
endif
|
||||||
|
|
||||||
define GPTFDISK_BUILD_CMDS
|
define GPTFDISK_BUILD_CMDS
|
||||||
$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \
|
$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \
|
||||||
$(GPTFDISK_TARGETS_y)
|
$(GPTFDISK_MAKE_OPTS) $(GPTFDISK_TARGETS_y)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define GPTFDISK_INSTALL_TARGET_CMDS
|
define GPTFDISK_INSTALL_TARGET_CMDS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user