diff mbox

[v2] Update gdisk (gptfdisk) to version 0.8.5.

Message ID 1339626043-11946-1-git-send-email-jmaggard10@gmail.com
State Superseded
Headers show

Commit Message

Justin Maggard June 13, 2012, 10:20 p.m. UTC
Update GPT fdisk utility to upstream version 0.8.5.

Signed-off-by: Justin Maggard <jmaggard10@gmail.com>
---
 package/gdisk/gdisk-0.6.14-uuid.h.patch  |   22 ------------------
 package/gdisk/gdisk-0.8.5-no-utf16.patch |   43 ++++++++++++++++++++++++++++++++++++
 package/gdisk/gdisk.mk                   |    4 ++--
 3 files changed, 45 insertions(+), 24 deletions(-)
 delete mode 100644 package/gdisk/gdisk-0.6.14-uuid.h.patch
 create mode 100644 package/gdisk/gdisk-0.8.5-no-utf16.patch

Comments

Arnout Vandecappelle June 13, 2012, 11:16 p.m. UTC | #1
On 06/14/12 00:20, Justin Maggard wrote:
> Update GPT fdisk utility to upstream version 0.8.5.

  This part of the commit message is redundant, it's already in the subject line.

> Signed-off-by: Justin Maggard<jmaggard10@gmail.com>
[snip]
> --- /dev/null
> +++ b/package/gdisk/gdisk-0.8.5-no-utf16.patch

  The policy nowadays is not to include version numbers in patch names.  So
just gdisk-no-utf16.patch is fine.

> @@ -0,0 +1,43 @@
> +[PATCH] Disable UTF16 support

  It would be better if UTF16 support was included if BR2_PACKAGE_ICU is
selected.  Maybe a bit difficult to implement, so take this is optional,
but I'll give some hints below.

> +
> +libicu is quite large, and unicode partition names are uncommon.
> +
> +Signed-off-by: Justin Maggard<jmaggard10@gmail.com>
> +---
> +diff -ur gdisk-0.8.5/Makefile gptfdisk-0.8.5/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
> +@@ -1,8 +1,8 @@
> + 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 -D USE_UTF16
> ++CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64

  You can actually override the CFLAGS and CXXFLAGS on the command line, so
this part of the patch is unneeded.  Just change the build commands into

$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) $(GDISK_TARGETS_y)

> + 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 +14,16 @@
> + 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) -luuid -o gdisk
> ++#	$(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -licuio -licuuc -luuid -o gdisk

  You could make this configurable with

$(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) $(if $(USE_UTF16),-licuio -licuuc) -luuid -o gdisk

  This only works with GNU make, but buildroot anyway only works with GNU make.

  You can define USE_UTF16 by adding the following to the make flags in the BUILD_CMDS:

USE_UTF16=$(BR2_PACKAGE_ICU)

  and of course add the conditional dependency:

GDISK_DEPENDENCIES += $(if $(BR2_PACKAGE_ICU),icu)


> +
> + 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) -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
> +-#	$(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) -luuid -lpopt -o sgdisk
> ++#	$(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) -licuio -licuuc -luuid -lpopt -o sgdisk
> +
> + fixparts: $(MBR_LIB_OBJS) fixparts.o
> + 	$(CXX) $(MBR_LIB_OBJS) fixparts.o $(LDFLAGS) -o fixparts
> diff --git a/package/gdisk/gdisk.mk b/package/gdisk/gdisk.mk
> index a53ee83..619a32d 100644
> --- a/package/gdisk/gdisk.mk
> +++ b/package/gdisk/gdisk.mk
> @@ -4,9 +4,9 @@
>   #
>   #############################################################
>
> -GDISK_VERSION = 0.6.14
> +GDISK_VERSION = 0.8.5
>   GDISK_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/gptfdisk
> -GDISK_SOURCE = gdisk-$(GDISK_VERSION).tgz
> +GDISK_SOURCE = gptfdisk-$(GDISK_VERSION).tar.gz
>
>   GDISK_TARGETS_$(BR2_PACKAGE_GDISK_GDISK) += gdisk
>   GDISK_TARGETS_$(BR2_PACKAGE_GDISK_SGDISK) += sgdisk

  Since the upstream name has changed, I would change the buildroot package name
as well.  Again, it's a bit more work though.  Also it would make existing config
files that select gdisk invalid - I'm not sure if Peter allows that.


  Regards,
  Arnout
Thomas Petazzoni June 14, 2012, 7:04 a.m. UTC | #2
Le Thu, 14 Jun 2012 01:16:51 +0200,
Arnout Vandecappelle <arnout@mind.be> a écrit :

> > -GDISK_VERSION = 0.6.14
> > +GDISK_VERSION = 0.8.5
> >   GDISK_SITE =
> > http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/gptfdisk
> > -GDISK_SOURCE = gdisk-$(GDISK_VERSION).tgz +GDISK_SOURCE =
> > gptfdisk-$(GDISK_VERSION).tar.gz
> >
> >   GDISK_TARGETS_$(BR2_PACKAGE_GDISK_GDISK) += gdisk
> >   GDISK_TARGETS_$(BR2_PACKAGE_GDISK_SGDISK) += sgdisk
> 
>   Since the upstream name has changed, I would change the buildroot
> package name as well.  Again, it's a bit more work though.  Also it
> would make existing config files that select gdisk invalid - I'm not
> sure if Peter allows that.

You can rename the package, and do something like:

config BR2_PACKAGE_NEW_NAME
	bool "new-name"
	help
	  Blabla

# This is a transitional option kept for compatibility 
# reasons with the old name of this package. It can be removed
# in 2013.05
config BR2_PACKAGE_OLD_NAME
	bool
	select BR2_PACKAGE_NEW_NAME

So that existing configurations continue to work for one year.

Thomas
Arnout Vandecappelle June 14, 2012, 7:22 a.m. UTC | #3
On 06/14/12 09:04, Thomas Petazzoni wrote:
> Le Thu, 14 Jun 2012 01:16:51 +0200,
> Arnout Vandecappelle<arnout@mind.be>  a écrit :
>
> >> >  >  -GDISK_VERSION = 0.6.14
> >> >  >  +GDISK_VERSION = 0.8.5
> >> >  >     GDISK_SITE =
> >> >  >  http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/gptfdisk
> >> >  >  -GDISK_SOURCE = gdisk-$(GDISK_VERSION).tgz +GDISK_SOURCE =
> >> >  >  gptfdisk-$(GDISK_VERSION).tar.gz
> >> >  >
> >> >  >     GDISK_TARGETS_$(BR2_PACKAGE_GDISK_GDISK) += gdisk
> >> >  >     GDISK_TARGETS_$(BR2_PACKAGE_GDISK_SGDISK) += sgdisk
> > >
> > >     Since the upstream name has changed, I would change the buildroot
> > >  package name as well.  Again, it's a bit more work though.  Also it
> > >  would make existing config files that select gdisk invalid - I'm not
> > >  sure if Peter allows that.
> You can rename the package, and do something like:
>
> config BR2_PACKAGE_NEW_NAME
>     bool "new-name"
>     help
>       Blabla
>
> # This is a transitional option kept for compatibility
> # reasons with the old name of this package. It can be removed
> # in 2013.05
> config BR2_PACKAGE_OLD_NAME
>     bool
>     select BR2_PACKAGE_NEW_NAME
>
> So that existing configurations continue to work for one year.

  I thought so too, but I tried it yesterday and it didn't seem to work...

  Regards,
  Arnout
diff mbox

Patch

diff --git a/package/gdisk/gdisk-0.6.14-uuid.h.patch b/package/gdisk/gdisk-0.6.14-uuid.h.patch
deleted file mode 100644
index ba447a1..0000000
--- a/package/gdisk/gdisk-0.6.14-uuid.h.patch
+++ /dev/null
@@ -1,22 +0,0 @@ 
-[PATCH] Don't hardcode uuid.h location
-
-Breaks cross compilation.
-
-Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
----
- 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
- 
diff --git a/package/gdisk/gdisk-0.8.5-no-utf16.patch b/package/gdisk/gdisk-0.8.5-no-utf16.patch
new file mode 100644
index 0000000..54e55f6
--- /dev/null
+++ b/package/gdisk/gdisk-0.8.5-no-utf16.patch
@@ -0,0 +1,43 @@ 
+[PATCH] Disable UTF16 support
+
+libicu is quite large, and unicode partition names are uncommon.
+
+Signed-off-by: Justin Maggard <jmaggard10@gmail.com>
+---
+diff -ur gdisk-0.8.5/Makefile gptfdisk-0.8.5/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
+@@ -1,8 +1,8 @@
+ 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 -D USE_UTF16
++CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64
+ 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 +14,16 @@
+ 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) -luuid -o gdisk
++#	$(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -licuio -licuuc -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) -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
+-#	$(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) -luuid -lpopt -o sgdisk
++#	$(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) -licuio -licuuc -luuid -lpopt -o sgdisk
+ 
+ fixparts: $(MBR_LIB_OBJS) fixparts.o
+ 	$(CXX) $(MBR_LIB_OBJS) fixparts.o $(LDFLAGS) -o fixparts
diff --git a/package/gdisk/gdisk.mk b/package/gdisk/gdisk.mk
index a53ee83..619a32d 100644
--- a/package/gdisk/gdisk.mk
+++ b/package/gdisk/gdisk.mk
@@ -4,9 +4,9 @@ 
 #
 #############################################################
 
-GDISK_VERSION = 0.6.14
+GDISK_VERSION = 0.8.5
 GDISK_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/gptfdisk
-GDISK_SOURCE = gdisk-$(GDISK_VERSION).tgz
+GDISK_SOURCE = gptfdisk-$(GDISK_VERSION).tar.gz
 
 GDISK_TARGETS_$(BR2_PACKAGE_GDISK_GDISK) += gdisk
 GDISK_TARGETS_$(BR2_PACKAGE_GDISK_SGDISK) += sgdisk