Bump and improve gdisk/gptfdisk packaging
v2 cover Bump and improve gdisk/gptfdisk packaging
Hello,
The starting point of this patch set was the patch from Justin Maggard visible at http://patchwork.ozlabs.org/patch/164770/. I took Justin patch, and did a number of followup improvements to the package.
Changes since v1:
* Rebased on top of master, fixed Config.in.legacy code since 2013.02 has been released.
Best regards,
Thomas
Justin Maggard (1):
gdisk: Update gdisk (gptfdisk) to version 0.8.6
Thomas Petazzoni (7):
gdisk: rename to gptfdisk
gptfdisk: ensure that the package always builds/installs something
gptfdisk: use TARGET_CONFIGURE_OPTS properly, use TARGET_MAKE_ENV
gptfdisk: fix installation step
gptfdisk: make utf16 support configurable
gptfdisk: add support for building and install cgdisk
gptfdisk: factorize the BR2_PACKAGE_GPTFDISK dependency
Config.in.legacy | 26 +++++++++++ package/Config.in | 2 +- package/gdisk/Config.in | 36 --------------- package/gdisk/gdisk-0.6.14-unistd.patch | 19 -------- package/gdisk/gdisk-0.6.14-uuid.h.patch | 22 --------- package/gdisk/gdisk.mk | 39 ---------------- package/gptfdisk/Config.in | 44 ++++++++++++++++++ .../gptfdisk-001-configurable-utf16-support.patch | 48 ++++++++++++++++++++ package/gptfdisk/gptfdisk.mk | 42 +++++++++++++++++ 9 files changed, 161 insertions(+), 117 deletions(-) delete mode 100644 package/gdisk/Config.in delete mode 100644 package/gdisk/gdisk-0.6.14-unistd.patch delete mode 100644 package/gdisk/gdisk-0.6.14-uuid.h.patch delete mode 100644 package/gdisk/gdisk.mk create mode 100644 package/gptfdisk/Config.in create mode 100644 package/gptfdisk/gptfdisk-001-configurable-utf16-support.patch create mode 100644 package/gptfdisk/gptfdisk.mk
Signature · 1 line
1.7.9.5
PATCH v2 1/8 gdisk: Update gdisk (gptfdisk) to version 0.8.6
From: Justin Maggard <[email protected]>
[Thomas Petazzoni: bump to 0.8.6 and not 0.8.5]
--- package/gdisk/gdisk-0.6.14-unistd.patch | 19 -------------- package/gdisk/gdisk-0.6.14-uuid.h.patch | 22 ---------------- package/gdisk/gdisk-001-no-utf16.patch | 43 +++++++++++++++++++++++++++++++ package/gdisk/gdisk.mk | 6 ++--- 4 files changed, 46 insertions(+), 44 deletions(-) delete mode 100644 package/gdisk/gdisk-0.6.14-unistd.patch delete mode 100644 package/gdisk/gdisk-0.6.14-uuid.h.patch create mode 100644 package/gdisk/gdisk-001-no-utf16.patch
package/gdisk/gdisk-0.6.14-unistd.patch deleted +0 -19
@@ -1,19 +0,0 @@ -[PATCH] close(2) needs unistd.h - -Signed-off-by: Peter Korsgaard <[email protected]> ---- - diskio-unix.cc | 1 + - 1 file changed, 1 insertion(+) - -Index: gdisk-0.6.14/diskio-unix.cc -=================================================================== ---- gdisk-0.6.14.orig/diskio-unix.cc -+++ gdisk-0.6.14/diskio-unix.cc -@@ -22,6 +22,7 @@ - #include <errno.h> - #include <fcntl.h> - #include <sys/stat.h> -+#include <unistd.h> - #include <iostream> - - #include "diskio.h"
package/gdisk/gdisk-0.6.14-uuid.h.patch deleted +0 -22
@@ -1,22 +0,0 @@ -[PATCH] Don't hardcode uuid.h location - -Breaks cross compilation. - -Signed-off-by: Peter Korsgaard <[email protected]> ---- - guid.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: gdisk-0.6.14/guid.h -=================================================================== ---- gdisk-0.6.14.orig/guid.h -+++ gdisk-0.6.14/guid.h -@@ -22,7 +22,7 @@ - #ifdef _WIN32 - typedef unsigned char my_uuid_t[16]; - #else --#include </usr/include/uuid/uuid.h> -+#include <uuid/uuid.h> - typedef uuid_t my_uuid_t; - #endif -
package/gdisk/gdisk-001-no-utf16.patch new file +43 -0
43 lines not on this page · raw message
package/gdisk/gdisk.mk +3 -3
@@ -4,9 +4,9 @@ # ############################################################# -GDISK_VERSION = 0.6.14 -GDISK_SITE = http://downloads.sourceforge.net/project/gptfdisk/gptfdisk/$(GDISK_VERSION) -GDISK_SOURCE = gdisk-$(GDISK_VERSION).tgz +GDISK_VERSION = 0.8.6 +GDISK_SITE = http://downloads.sourceforge.net/sourceforge/gptfdisk +GDISK_SOURCE = gptfdisk-$(GDISK_VERSION).tar.gz GDISK_TARGETS_$(BR2_PACKAGE_GDISK_GDISK) += gdisk GDISK_TARGETS_$(BR2_PACKAGE_GDISK_SGDISK) += sgdisk
Signature · 1 line
1.7.9.5
PATCH v2 1/8 gdisk: Update gdisk (gptfdisk) to version 0.8.6
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Thomas> From: Justin Maggard <[email protected]> Thomas> [Thomas Petazzoni: bump to 0.8.6 and not 0.8.5]
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 2/8 gdisk: rename to gptfdisk
In reply to Thomas PetazzoniIn order to match the new upstream name, rename the gdisk package to gptfdisk. We add the relevant legacy configuration options to ensure a smooth transition for users.
--- Config.in.legacy | 26 ++++++++++++++++ package/Config.in | 2 +- package/gdisk/Config.in | 36 --------------------- package/gdisk/gdisk-001-no-utf16.patch | 43 -------------------------- package/gdisk/gdisk.mk | 39 ----------------------- package/gptfdisk/Config.in | 36 +++++++++++++++++++++ package/gptfdisk/gptfdisk-001-no-utf16.patch | 43 ++++++++++++++++++++++++++ package/gptfdisk/gptfdisk.mk | 38 +++++++++++++++++++++++ 8 files changed, 144 insertions(+), 119 deletions(-) delete mode 100644 package/gdisk/Config.in delete mode 100644 package/gdisk/gdisk-001-no-utf16.patch delete mode 100644 package/gdisk/gdisk.mk create mode 100644 package/gptfdisk/Config.in create mode 100644 package/gptfdisk/gptfdisk-001-no-utf16.patch create mode 100644 package/gptfdisk/gptfdisk.mk
Config.in.legacy +26 -0
@@ -40,6 +40,32 @@ comment "As long as these options stay selected, the build " comment "will fail. " endif +# +# Legacy options since 2013.02 +# + +config BR2_PACKAGE_GDISK + bool "gdisk has been replaced by gptfdisk" + select BR2_LEGACY + select BR2_PACKAGE_GPTFDISK + help + The option has been renamed BR2_PACKAGE_GPTFDISK. + +config BR2_PACKAGE_GDISK_GDISK + bool "gdisk tool from gdisk has been replaced by gdisk in gptfdisk" + select BR2_LEGACY + select BR2_PACKAGE_GPTFDISK + select BR2_PACKAGE_GPTFDISK_GDISK + help + The option has been renamed BR2_PACKAGE_GPTFDISK_GDISK. + +config BR2_PACKAGE_GDISK_SGDISK + bool "sgdisk tool from gdisk has been replaced by sgdisk in gptfdisk" + select BR2_LEGACY + select BR2_PACKAGE_GPTFDISK + select BR2_PACKAGE_GPTFDISK_SGDISK + help + The option has been renamed BR2_PACKAGE_GPTFDISK_SGDISK. # # Legacy options since 2012.11
package/Config.in +1 -1
@@ -235,8 +235,8 @@ source "package/fis/Config.in" source "package/fmtools/Config.in" source "package/fxload/Config.in" source "package/gadgetfs-test/Config.in" -source "package/gdisk/Config.in" source "package/gpsd/Config.in" +source "package/gptfdisk/Config.in" source "package/gvfs/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/hdparm/Config.in"
package/gdisk/Config.in deleted +0 -36
@@ -1,36 +0,0 @@ -config BR2_PACKAGE_GDISK - bool "gdisk" - depends on BR2_LARGEFILE - depends on BR2_INSTALL_LIBSTDCPP - depends on BR2_USE_WCHAR # util-linux - help - GPT fdisk (consisting of the gdisk and sgdisk programs) is a - text-mode partitioning tool that works on Globally Unique Identifier - (GUID) Partition Table (GPT) disks, rather than on the more common - (through 2010) Master Boot Record (MBR) partition tables. - - http://www.rodsbooks.com/gdisk/ - -config BR2_PACKAGE_GDISK_GDISK - bool "interactive gdisk" - depends on BR2_PACKAGE_GDISK - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBUUID - help - Install the interactive GUID partition table (GPT) manipulator - /usr/sbin/gdisk which is modelled after and quite similar in use - to the traditional MBR based fdisk tool. - -config BR2_PACKAGE_GDISK_SGDISK - bool "command line sgdisk" - depends on BR2_PACKAGE_GDISK - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBUUID - select BR2_PACKAGE_POPT - help - Install the command-line GUID partition table (GPT) manipulator - /usr/sbin/sgdisk which is named after the traditional MBR based - sfdisk tool albeit with an entirely different option syntax. - -comment "gdisk requires a toolchain with LARGEFILE/WCHAR/C++ support enabled" - depends on !(BR2_LARGEFILE && BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR)
package/gdisk/gdisk-001-no-utf16.patch deleted +0 -43
43 lines not on this page · raw message
package/gdisk/gdisk.mk deleted +0 -39
@@ -1,39 +0,0 @@ -############################################################# -# -# gdisk -# -############################################################# - -GDISK_VERSION = 0.8.6 -GDISK_SITE = http://downloads.sourceforge.net/sourceforge/gptfdisk -GDISK_SOURCE = gptfdisk-$(GDISK_VERSION).tar.gz - -GDISK_TARGETS_$(BR2_PACKAGE_GDISK_GDISK) += gdisk -GDISK_TARGETS_$(BR2_PACKAGE_GDISK_SGDISK) += sgdisk - -ifneq ($(GDISK_TARGETS_y),) - -GDISK_DEPENDENCIES += util-linux -ifeq ($(BR2_PACKAGE_GDISK_SGDISK),y) - GDISK_DEPENDENCIES += popt -endif - - -define GDISK_BUILD_CMDS - $(TARGET_CONFIGURE_OPTS) $(MAKE) CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" \ - -C $(@D) $(GDISK_TARGETS_y) -endef - -define GDISK_INSTALL_TARGET_CMDS - for i in $(GDISK_TARGETS_y); do \ - $(INSTALL) -D $(@D)/$$i $(TARGET_DIR)/usr/sbin/; \ - done -endef - -define GDISK_UNINSTALL_TARGET_CMDS - rm -f $(addprefix $(TARGET_DIR)/usr/sbin/,$(GDISK_TARGETS_y)) -endef - -endif - -$(eval $(generic-package))
package/gptfdisk/Config.in new file +36 -0
@@ -0,0 +1,36 @@ +config BR2_PACKAGE_GPTFDISK + bool "gptfdisk" + depends on BR2_LARGEFILE + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR # util-linux + help + GPT fdisk (consisting of the gdisk and sgdisk programs) is a + text-mode partitioning tool that works on Globally Unique Identifier + (GUID) Partition Table (GPT) disks, rather than on the more common + (through 2010) Master Boot Record (MBR) partition tables. + + http://www.rodsbooks.com/gdisk/ + +config BR2_PACKAGE_GPTFDISK_GDISK + bool "interactive gdisk" + depends on BR2_PACKAGE_GPTFDISK + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + help + Install the interactive GUID partition table (GPT) manipulator + /usr/sbin/gdisk which is modelled after and quite similar in use + to the traditional MBR based fdisk tool. + +config BR2_PACKAGE_GPTFDISK_SGDISK + bool "command line sgdisk" + depends on BR2_PACKAGE_GPTFDISK + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_POPT + help + Install the command-line GUID partition table (GPT) manipulator + /usr/sbin/sgdisk which is named after the traditional MBR based + sfdisk tool albeit with an entirely different option syntax. + +comment "gptfdisk requires a toolchain with LARGEFILE/WCHAR/C++ support enabled" + depends on !(BR2_LARGEFILE && BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR)
package/gptfdisk/gptfdisk-001-no-utf16.patch new file +43 -0
43 lines not on this page · raw message
package/gptfdisk/gptfdisk.mk new file +38 -0
@@ -0,0 +1,38 @@ +############################################################# +# +# gptfdisk +# +############################################################# + +GPTFDISK_VERSION = 0.8.6 +GPTFDISK_SITE = http://downloads.sourceforge.net/sourceforge/gptfdisk + +GPTFDISK_TARGETS_$(BR2_PACKAGE_GPTFDISK_GDISK) += gdisk +GPTFDISK_TARGETS_$(BR2_PACKAGE_GPTFDISK_SGDISK) += sgdisk + +ifneq ($(GPTFDISK_TARGETS_y),) + +GPTFDISK_DEPENDENCIES += util-linux +ifeq ($(BR2_PACKAGE_GPTFDISK_SGDISK),y) + GPTFDISK_DEPENDENCIES += popt +endif + + +define GPTFDISK_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" \ + -C $(@D) $(GPTFDISK_TARGETS_y) +endef + +define GPTFDISK_INSTALL_TARGET_CMDS + for i in $(GPTFDISK_TARGETS_y); do \ + $(INSTALL) -D $(@D)/$$i $(TARGET_DIR)/usr/sbin/; \ + done +endef + +define GPTFDISK_UNINSTALL_TARGET_CMDS + rm -f $(addprefix $(TARGET_DIR)/usr/sbin/,$(GPTFDISK_TARGETS_y)) +endef + +endif + +$(eval $(generic-package))
Signature · 1 line
1.7.9.5
PATCH v2 2/8 gdisk: rename to gptfdisk
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Thomas> In order to match the new upstream name, rename the gdisk package to Thomas> gptfdisk. We add the relevant legacy configuration options to ensure a Thomas> smooth transition for users.
Thomas> Signed-off-by: Thomas Petazzoni <[email protected]>
Thomas> +#
Thomas> +# Legacy options since 2013.02
Thomas> +#
Thomas> +
Thomas> +config BR2_PACKAGE_GDISK
Thomas> + bool "gdisk has been replaced by gptfdisk"
Thomas> + select BR2_LEGACY
Thomas> + select BR2_PACKAGE_GPTFDISK
Thomas> + help
Thomas> + The option has been renamed BR2_PACKAGE_GPTFDISK.
Thomas> +
Thomas> +config BR2_PACKAGE_GDISK_GDISK
Thomas> + bool "gdisk tool from gdisk has been replaced by gdisk in gptfdisk"
Thomas> + select BR2_LEGACY
Thomas> + select BR2_PACKAGE_GPTFDISK
Thomas> + select BR2_PACKAGE_GPTFDISK_GDISK
Thomas> + help
Thomas> + The option has been renamed BR2_PACKAGE_GPTFDISK_GDISK.
Thomas> +
Thomas> +config BR2_PACKAGE_GDISK_SGDISK
Thomas> + bool "sgdisk tool from gdisk has been replaced by sgdisk in gptfdisk"
Thomas> + select BR2_LEGACY
Thomas> + select BR2_PACKAGE_GPTFDISK
Thomas> + select BR2_PACKAGE_GPTFDISK_SGDISK
Thomas> + help
Thomas> + The option has been renamed BR2_PACKAGE_GPTFDISK_SGDISK.
The indentation of the 'bool' lines is wrong (spaces vs tabs). Committed with that fixed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 3/8 gptfdisk: ensure that the package always builds/installs something
In reply to Thomas PetazzoniUntil now, selecting just the gptfdisk package would do something. If wouldn't build anything at all, and wouldn't install anything. This is rather odd.
So now, we ensure that at least one of the two tools that gptfdisk can build and install is selected. This allows use to factorize a bit the select of util-linux in Config.in, and remove the if condition in the makefile that was preventing the package from being built if no tools was selected.
--- package/gptfdisk/Config.in | 7 +++---- package/gptfdisk/gptfdisk.mk | 4 ---- 2 files changed, 3 insertions(+), 8 deletions(-)
package/gptfdisk/Config.in +3 -4
@@ -3,6 +3,9 @@ config BR2_PACKAGE_GPTFDISK depends on BR2_LARGEFILE depends on BR2_INSTALL_LIBSTDCPP depends on BR2_USE_WCHAR # util-linux + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_GPTFDISK_GDISK if !BR2_PACKAGE_GPTFDISK_SGDISK help GPT fdisk (consisting of the gdisk and sgdisk programs) is a text-mode partitioning tool that works on Globally Unique Identifier
@@ -14,8 +17,6 @@ config BR2_PACKAGE_GPTFDISK config BR2_PACKAGE_GPTFDISK_GDISK bool "interactive gdisk" depends on BR2_PACKAGE_GPTFDISK - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBUUID help Install the interactive GUID partition table (GPT) manipulator /usr/sbin/gdisk which is modelled after and quite similar in use
@@ -24,8 +25,6 @@ config BR2_PACKAGE_GPTFDISK_GDISK config BR2_PACKAGE_GPTFDISK_SGDISK bool "command line sgdisk" depends on BR2_PACKAGE_GPTFDISK - select BR2_PACKAGE_UTIL_LINUX - select BR2_PACKAGE_UTIL_LINUX_LIBUUID select BR2_PACKAGE_POPT help Install the command-line GUID partition table (GPT) manipulator
package/gptfdisk/gptfdisk.mk +0 -4
@@ -10,8 +10,6 @@ GPTFDISK_SITE = http://downloads.sourceforge.net/sourceforge/gptfdisk GPTFDISK_TARGETS_$(BR2_PACKAGE_GPTFDISK_GDISK) += gdisk GPTFDISK_TARGETS_$(BR2_PACKAGE_GPTFDISK_SGDISK) += sgdisk -ifneq ($(GPTFDISK_TARGETS_y),) - GPTFDISK_DEPENDENCIES += util-linux ifeq ($(BR2_PACKAGE_GPTFDISK_SGDISK),y) GPTFDISK_DEPENDENCIES += popt
@@ -33,6 +31,4 @@ define GPTFDISK_UNINSTALL_TARGET_CMDS rm -f $(addprefix $(TARGET_DIR)/usr/sbin/,$(GPTFDISK_TARGETS_y)) endef -endif - $(eval $(generic-package))
Signature · 1 line
1.7.9.5
PATCH v2 3/8 gptfdisk: ensure that the package always builds/installs something
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Thomas> Until now, selecting just the gptfdisk package would do Thomas> something. If wouldn't build anything at all, and wouldn't Thomas> install anything. This is rather odd.
This sounds odd to me. You meant to say that it didn't do anything if none of the sub options were selected, right?
Committed with some tweaks to the commit message, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 4/8 gptfdisk: use TARGET_CONFIGURE_OPTS properly, use TARGET_MAKE_ENV
In reply to Thomas Petazzoni$(TARGET_CONFIGURE_OPTS) should be passed as $(MAKE) argument, not in the environment. We can then remove the redefined CC and LD variables that were useless. We also take this opportunity to pass $(TARGET_MAKE_ENV) in the environment of make.
--- package/gptfdisk/gptfdisk.mk | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
package/gptfdisk/gptfdisk.mk +2 -3
@@ -15,10 +15,9 @@ ifeq ($(BR2_PACKAGE_GPTFDISK_SGDISK),y) GPTFDISK_DEPENDENCIES += popt endif - define GPTFDISK_BUILD_CMDS - $(TARGET_CONFIGURE_OPTS) $(MAKE) CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" \ - -C $(@D) $(GPTFDISK_TARGETS_y) + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ + $(GPTFDISK_TARGETS_y) endef define GPTFDISK_INSTALL_TARGET_CMDS
Signature · 1 line
1.7.9.5
PATCH v2 4/8 gptfdisk: use TARGET_CONFIGURE_OPTS properly, use TARGET_MAKE_ENV
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Thomas> $(TARGET_CONFIGURE_OPTS) should be passed as $(MAKE) argument, not in Thomas> the environment. We can then remove the redefined CC and LD variables Thomas> that were useless. We also take this opportunity to pass Thomas> $(TARGET_MAKE_ENV) in the environment of make.
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 5/8 gptfdisk: fix installation step
In reply to Thomas PetazzoniThe installation step was not giving the full destination path even though it was using -D, and it was forgetting to explicitly specify the permissions of the file to install. This commit fixes both of these minor issues.
--- package/gptfdisk/gptfdisk.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/gptfdisk/gptfdisk.mk +1 -1
@@ -22,7 +22,7 @@ endef define GPTFDISK_INSTALL_TARGET_CMDS for i in $(GPTFDISK_TARGETS_y); do \ - $(INSTALL) -D $(@D)/$$i $(TARGET_DIR)/usr/sbin/; \ + $(INSTALL) -D -m 0755 $(@D)/$$i $(TARGET_DIR)/usr/sbin/$$i; \ done endef
Signature · 1 line
1.7.9.5
PATCH v2 5/8 gptfdisk: fix installation step
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Thomas> The installation step was not giving the full destination path even Thomas> though it was using -D, and it was forgetting to explicitly specify Thomas> the permissions of the file to install. This commit fixes both of Thomas> these minor issues.
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 6/8 gptfdisk: make utf16 support configurable
In reply to Thomas PetazzoniInstead of always disabling the UTF16 support, make it configurable. When ICU is available, enable UTF16 support, otherwise disable it.
--- .../gptfdisk-001-configurable-utf16-support.patch | 48 ++++++++++++++++++++ package/gptfdisk/gptfdisk-001-no-utf16.patch | 43 ------------------ package/gptfdisk/gptfdisk.mk | 9 +++- 3 files changed, 55 insertions(+), 45 deletions(-) create mode 100644 package/gptfdisk/gptfdisk-001-configurable-utf16-support.patch delete mode 100644 package/gptfdisk/gptfdisk-001-no-utf16.patch
package/gptfdisk/gptfdisk-001-configurable-utf16-support.patch new file +48 -0
@@ -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 <[email protected]> +Signed-off-by: Thomas Petazzoni <[email protected]> +--- +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
package/gptfdisk/gptfdisk-001-no-utf16.patch deleted +0 -43
43 lines not on this page · raw message
package/gptfdisk/gptfdisk.mk +7 -2
@@ -15,9 +15,14 @@ ifeq ($(BR2_PACKAGE_GPTFDISK_SGDISK),y) GPTFDISK_DEPENDENCIES += popt endif +ifeq ($(BR2_PACKAGE_ICU),y) + GPTFDISK_DEPENDENCIES += icu + GPTFDISK_MAKE_OPTS += USE_UTF16=y +endif + define GPTFDISK_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ - $(GPTFDISK_TARGETS_y) + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) $(GPTFDISK_MAKE_OPTS) \ + -C $(@D) $(GPTFDISK_TARGETS_y) endef define GPTFDISK_INSTALL_TARGET_CMDS
Signature · 1 line
1.7.9.5
PATCH v2 6/8 gptfdisk: make utf16 support configurable
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Thomas> Instead of always disabling the UTF16 support, make it Thomas> configurable. When ICU is available, enable UTF16 support, otherwise Thomas> disable it.
Thomas> diff --git a/package/gptfdisk/gptfdisk-001-configurable-utf16-support.patch b/package/gptfdisk/gptfdisk-001-configurable-utf16-support.patch Thomas> new file mode 100644
Thomas> index 0000000..2d51e6f
Thomas> --- /dev/null
Thomas> +++ b/package/gptfdisk/gptfdisk-001-configurable-utf16-support.patch
Thomas> @@ -0,0 +1,48 @@
Thomas> +[PATCH] Make the UTF16 support configurable
Thomas> +
Thomas> +libicu is quite large, and unicode partition names are uncommon, so we
Thomas> +may not necessarily want to have UTF16 support unconditionnally. This
Thomas> +patch adds a USE_UTF16 environment variable to tell whether we want
Thomas> +the UTF16 support or not.
Thomas> +
Thomas> +Signed-off-by: Justin Maggard <[email protected]>
Thomas> +Signed-off-by: Thomas Petazzoni <[email protected]>
Please consider sending this upstream.
Thomas> define GPTFDISK_BUILD_CMDS
Thomas> - $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \
Thomas> - $(GPTFDISK_TARGETS_y)
Thomas> + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) $(GPTFDISK_MAKE_OPTS) \
Thomas> + -C $(@D) $(GPTFDISK_TARGETS_y)
Thomas> endef
Instead of this long line I moved the _MAKE_OPTS into the 2nd line.
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 7/8 gptfdisk: add support for building and install cgdisk
In reply to Thomas PetazzoniIn addition to the command-line tool gdisk and the interactive tool sgdisk, gptfdisk also provides a ncurses based tool, cgdisk. This commit adds support for building and installing this tool.
--- package/gptfdisk/Config.in | 8 ++++++++ package/gptfdisk/gptfdisk.mk | 4 ++++ 2 files changed, 12 insertions(+)
package/gptfdisk/Config.in +8 -0
@@ -31,5 +31,13 @@ config BR2_PACKAGE_GPTFDISK_SGDISK /usr/sbin/sgdisk which is named after the traditional MBR based sfdisk tool albeit with an entirely different option syntax. +config BR2_PACKAGE_GPTFDISK_CGDISK + bool "ncurses cgdisk" + depends on BR2_PACKAGE_GPTFDISK + select BR2_PACKAGE_NCURSES + help + Install the ncurses-based GUID partition table (GPT) + manipulator /usr/sbin/cgdisk. + comment "gptfdisk requires a toolchain with LARGEFILE/WCHAR/C++ support enabled" depends on !(BR2_LARGEFILE && BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR)
package/gptfdisk/gptfdisk.mk +4 -0
@@ -9,11 +9,15 @@ GPTFDISK_SITE = http://downloads.sourceforge.net/sourceforge/gptfdisk GPTFDISK_TARGETS_$(BR2_PACKAGE_GPTFDISK_GDISK) += gdisk GPTFDISK_TARGETS_$(BR2_PACKAGE_GPTFDISK_SGDISK) += sgdisk +GPTFDISK_TARGETS_$(BR2_PACKAGE_GPTFDISK_CGDISK) += cgdisk GPTFDISK_DEPENDENCIES += util-linux ifeq ($(BR2_PACKAGE_GPTFDISK_SGDISK),y) GPTFDISK_DEPENDENCIES += popt endif +ifeq ($(BR2_PACKAGE_GPTFDISK_CGDISK),y) + GPTFDISK_DEPENDENCIES += ncurses +endif ifeq ($(BR2_PACKAGE_ICU),y) GPTFDISK_DEPENDENCIES += icu
Signature · 1 line
1.7.9.5
PATCH v2 7/8 gptfdisk: add support for building and install cgdisk
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Thomas> In addition to the command-line tool gdisk and the interactive tool Thomas> sgdisk, gptfdisk also provides a ncurses based tool, cgdisk. This Thomas> commit adds support for building and installing this tool.
Thomas> Signed-off-by: Thomas Petazzoni <[email protected]> Thomas> ---
Thomas> package/gptfdisk/Config.in | 8 ++++++++ Thomas> package/gptfdisk/gptfdisk.mk | 4 ++++
Thomas> 2 files changed, 12 insertions(+)
Thomas> diff --git a/package/gptfdisk/Config.in b/package/gptfdisk/Config.in Thomas> index 0d7e358..1cdd8eb 100644
Thomas> --- a/package/gptfdisk/Config.in
Thomas> +++ b/package/gptfdisk/Config.in
Thomas> @@ -31,5 +31,13 @@ config BR2_PACKAGE_GPTFDISK_SGDISK
Thomas> /usr/sbin/sgdisk which is named after the traditional MBR based Thomas> sfdisk tool albeit with an entirely different option syntax.
Thomas> +config BR2_PACKAGE_GPTFDISK_CGDISK
Thomas> + bool "ncurses cgdisk"
Thomas> + depends on BR2_PACKAGE_GPTFDISK
Thomas> + select BR2_PACKAGE_NCURSES
Thomas> + help
Thomas> + Install the ncurses-based GUID partition table (GPT)
Thomas> + manipulator /usr/sbin/cgdisk.
You forgot to update the select-gdisk-if-nothing-else-is-enabled logic, so I've fixed that and committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 8/8 gptfdisk: factorize the BR2_PACKAGE_GPTFDISK dependency
In reply to Thomas Petazzoni--- package/gptfdisk/Config.in | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
package/gptfdisk/Config.in +6 -5
@@ -1,3 +1,6 @@ +comment "gptfdisk requires a toolchain with LARGEFILE/WCHAR/C++ support enabled" + depends on !(BR2_LARGEFILE && BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR) + config BR2_PACKAGE_GPTFDISK bool "gptfdisk" depends on BR2_LARGEFILE
@@ -14,9 +17,10 @@ config BR2_PACKAGE_GPTFDISK http://www.rodsbooks.com/gdisk/ +if BR2_PACKAGE_GPTFDISK + config BR2_PACKAGE_GPTFDISK_GDISK bool "interactive gdisk" - depends on BR2_PACKAGE_GPTFDISK help Install the interactive GUID partition table (GPT) manipulator /usr/sbin/gdisk which is modelled after and quite similar in use
@@ -24,7 +28,6 @@ config BR2_PACKAGE_GPTFDISK_GDISK config BR2_PACKAGE_GPTFDISK_SGDISK bool "command line sgdisk" - depends on BR2_PACKAGE_GPTFDISK select BR2_PACKAGE_POPT help Install the command-line GUID partition table (GPT) manipulator
@@ -33,11 +36,9 @@ config BR2_PACKAGE_GPTFDISK_SGDISK config BR2_PACKAGE_GPTFDISK_CGDISK bool "ncurses cgdisk" - depends on BR2_PACKAGE_GPTFDISK select BR2_PACKAGE_NCURSES help Install the ncurses-based GUID partition table (GPT) manipulator /usr/sbin/cgdisk. -comment "gptfdisk requires a toolchain with LARGEFILE/WCHAR/C++ support enabled" - depends on !(BR2_LARGEFILE && BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR) +endif
Signature · 1 line
1.7.9.5
PATCH v2 8/8 gptfdisk: factorize the BR2_PACKAGE_GPTFDISK dependency
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Thomas> Signed-off-by: Thomas Petazzoni <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard