gptfdisk: add support for building and install cgdisk
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 7 Mar 2013 10:45:29 +0000 (10:45 +0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sun, 10 Mar 2013 21:31:17 +0000 (22:31 +0100)
In 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.

[Peter: Update gdisk autoselection logic to consider cgdisk as well]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/gptfdisk/Config.in
package/gptfdisk/gptfdisk.mk

index 0d7e35836e9a8bd7ce817da5c5f938fe8bef0d12..28b20df048ac92f4690e80adf126edd59c8ce87a 100644 (file)
@@ -5,7 +5,8 @@ config BR2_PACKAGE_GPTFDISK
        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
+       select BR2_PACKAGE_GPTFDISK_GDISK if \
+              !(BR2_PACKAGE_GPTFDISK_SGDISK || BR2_PACKAGE_GPTFDISK_CGDISK)
        help
          GPT fdisk (consisting of the gdisk and sgdisk programs) is a
          text-mode partitioning tool that works on Globally Unique Identifier
@@ -31,5 +32,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)
index 0478041d9afd31ae1500bb7f647d779be6d35805..15ec842de6ef285c604f740768a72f8ed30411fe 100644 (file)
@@ -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