diff --git a/sys-apps/gptfdisk/gptfdisk-0.8.10.recipe b/sys-apps/gptfdisk/gptfdisk-0.8.10.recipe deleted file mode 100644 index 2a54b893b..000000000 --- a/sys-apps/gptfdisk/gptfdisk-0.8.10.recipe +++ /dev/null @@ -1,40 +0,0 @@ -SUMMARY="GPT partition table manipulator" -DESCRIPTION="GPT fdisk is a disk partitioning tool loosely modeled on Linux \ -fdisk, but used for modifying GUID Partition Table (GPT) disks. The related \ -FixParts utility fixes some common problems on Master Boot Record (MBR) disks." -REVISION="1" -ARCHITECTURES="!x86_gcc2" -HOMEPAGE="http://www.rodsbooks.com/gdisk/" -SOURCE_URI="http://sourceforge.net/projects/gptfdisk/files/gptfdisk/0.8.10/gptfdisk-0.8.10.tar.gz" -CHECKSUM_SHA256="73e64151203ae0c347c488358e71ca582bb7fb7f0d66df86b71c42050390eb9b" -PATCHES="gptfdisk-0.8.10.patchset" -LICENSE="GNU GPL v2" -COPYRIGHT="2013 Rod Smith" - -PROVIDES=" - gptfdisk = $portVersion - " -BUILD_REQUIRES=" - devel:libuuid - devel:libncurses - " -BUILD_PREREQUIRES=" - haiku_devel - cmd:gcc - cmd:make - " - -BUILD() -{ - make $jobArgs -} - -INSTALL() -{ - make install -} - -TEST() -{ - make check -} diff --git a/sys-apps/gptfdisk/gptfdisk-1.0.1.recipe b/sys-apps/gptfdisk/gptfdisk-1.0.1.recipe new file mode 100644 index 000000000..b8dd94db7 --- /dev/null +++ b/sys-apps/gptfdisk/gptfdisk-1.0.1.recipe @@ -0,0 +1,61 @@ +SUMMARY="Text-mode tools for GUID Partition Table (GPT) disks" +DESCRIPTION="GPT fdisk (consisting of the gdisk, cgdisk, sgdisk, and fixparts \ +programs) is a set of text-mode partitioning tools loosely modeled on Linux \ +fdisk. The gdisk, cgdisk and sgdisk programs work on Globally Unique \ +Identifier (GUID) Partition Table (GPT) disks, rather than on Master Boot \ +Record (MBR) partition tables, but may also be used on MBR disks to convert \ +them to GPT. The fixparts program repairs certain types of damage to MBR disks \ +and enables changing partition types from primary to logical and vice-versa." +HOMEPAGE="http://www.rodsbooks.com/gdisk/" +COPYRIGHT="2013-2015 Rod Smith" +LICENSE="GNU GPL v2" +REVISION="1" +SOURCE_URI="https://downloads.sf.net/gptfdisk/gptfdisk-$portVersion.tar.gz" +CHECKSUM_SHA256="864c8aee2efdda50346804d7e6230407d5f42a8ae754df70404dd8b2fdfaeac7" +PATCHES="gptfdisk-$portVersion.patchset" + +ARCHITECTURES="x86_gcc2 x86 x86_64" + +PROVIDES=" + gptfdisk = $portVersion + cmd:cgdisk + cmd:fixparts + cmd:gdisk + cmd:sgdisk + " +REQUIRES=" + haiku + lib:libuuid + lib:libncurses + lib:libpopt + " + +BUILD_REQUIRES=" + haiku_devel + devel:libuuid + devel:libncurses + devel:libpopt + " +BUILD_PREREQUIRES=" + cmd:g++ + cmd:install + cmd:make + " + +BUILD() +{ + make $jobArgs +} + +INSTALL() +{ + install -d -m 755 $sbinDir $docDir $manDir/man8 + install -t $sbinDir -c -m 555 -s cgdisk gdisk sgdisk fixparts + install -t $docDir -c -m 444 README COPYING + install -t $manDir/man8 -c -m 444 *.8 +} + +TEST() +{ + make test +} diff --git a/sys-apps/gptfdisk/patches/gptfdisk-0.8.10.patchset b/sys-apps/gptfdisk/patches/gptfdisk-0.8.10.patchset deleted file mode 100644 index c6dcf73bf..000000000 --- a/sys-apps/gptfdisk/patches/gptfdisk-0.8.10.patchset +++ /dev/null @@ -1,47 +0,0 @@ -From 67b231749b7fdd10bfb4cd7ff6244e4848bfb6a1 Mon Sep 17 00:00:00 2001 -From: Adrien Destugues -Date: Wed, 22 Oct 2014 21:47:40 +0200 -Subject: Preliminary Haiku support. - - -diff --git a/diskio.h b/diskio.h -index 631a43a..e343cb9 100644 ---- a/diskio.h -+++ b/diskio.h -@@ -29,7 +29,7 @@ - #include - #endif - --#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__) -+#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__) || defined(__HAIKU__) - #define fstat64 fstat - #define stat64 stat - #endif -diff --git a/gptcurses.cc b/gptcurses.cc -index 6002077..4eb8aee 100644 ---- a/gptcurses.cc -+++ b/gptcurses.cc -@@ -22,6 +22,7 @@ - #include - #include - #include -+#include - #include - #include "gptcurses.h" - #include "support.h" -diff --git a/support.h b/support.h -index 7f691c3..b64cb16 100644 ---- a/support.h -+++ b/support.h -@@ -10,7 +10,7 @@ - - #define GPTFDISK_VERSION "0.8.10" - --#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__) -+#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__) || defined(__HAIKU__) - // Darwin (Mac OS) & FreeBSD: disk IOCTLs are different, and there is no lseek64 - #include - #define lseek64 lseek --- -1.8.3.4 - diff --git a/sys-apps/gptfdisk/patches/gptfdisk-1.0.1.patchset b/sys-apps/gptfdisk/patches/gptfdisk-1.0.1.patchset new file mode 100644 index 000000000..308238cfa --- /dev/null +++ b/sys-apps/gptfdisk/patches/gptfdisk-1.0.1.patchset @@ -0,0 +1,111 @@ +From 67b231749b7fdd10bfb4cd7ff6244e4848bfb6a1 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Wed, 22 Oct 2014 21:47:40 +0200 +Subject: Preliminary Haiku support. + + +diff --git a/diskio.h b/diskio.h +index 631a43a..e343cb9 100644 +--- a/diskio.h ++++ b/diskio.h +@@ -29,7 +29,7 @@ + #include + #endif + +-#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__) ++#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__) || defined(__HAIKU__) + #define fstat64 fstat + #define stat64 stat + #endif +diff --git a/gptcurses.cc b/gptcurses.cc +index 6002077..4eb8aee 100644 +--- a/gptcurses.cc ++++ b/gptcurses.cc +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + #include + #include "gptcurses.h" + #include "support.h" +diff --git a/support.h b/support.h +index 7f691c3..b64cb16 100644 +--- a/support.h ++++ b/support.h +@@ -16,6 +16,10 @@ + #define lseek64 lseek + #endif + ++#if defined(__HAIKU__) ++#define lseek64 lseek ++#endif ++ + #if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) + #define DEFAULT_GPT_TYPE 0xA503 + #endif +-- +1.8.3.4 + + +From 43151ba0e882e40163086578d5b6fbda1ec543f5 Mon Sep 17 00:00:00 2001 +From: fbrosson +Date: Fri, 8 Apr 2016 21:24:56 +0000 +Subject: Accept character devices on Haiku. + + +diff --git a/diskio-unix.cc b/diskio-unix.cc +index af71cdb..38568ed 100644 +--- a/diskio-unix.cc ++++ b/diskio-unix.cc +@@ -75,6 +75,7 @@ int DiskIO::OpenForRead(void) { + if (S_ISDIR(st.st_mode)) + cerr << "The specified path is a directory!\n"; + #if !(defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) \ ++ && !defined(__HAIKU__) \ + && !defined(__APPLE__) + else if (S_ISCHR(st.st_mode)) + cerr << "The specified path is a character device!\n"; +-- +2.7.0 + + +From ce3cdab4d24c693a97912c2550a6ace6a068836f Mon Sep 17 00:00:00 2001 +From: fbrosson +Date: Fri, 8 Apr 2016 21:24:56 +0000 +Subject: Use the correct CRC32 polynom on big-endian architectures. + + +diff --git a/crc32.cc b/crc32.cc +index d253dd9..8da42ed 100644 +--- a/crc32.cc ++++ b/crc32.cc +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + #include "crc32.h" + + /* crc_tab[] -- this crcTable is being build by chksum_crc32GenTab(). +@@ -52,7 +53,17 @@ void chksum_crc32gentab () + unsigned long crc, poly; + int i, j; + ++#if defined( BYTE_ORDER ) ++# if defined( LITTLE_ENDIAN ) && (BYTE_ORDER == LITTLE_ENDIAN) + poly = 0xEDB88320L; ++# elif defined( BIG_ENDIAN ) && (BYTE_ORDER == BIG_ENDIAN) ++ poly = 0x04C11DB7L; ++# else ++# error Unknown byte-order ++# endif ++#else ++#error Undefined byte-order ++#endif + for (i = 0; i < 256; i++) + { + crc = i; +-- +2.7.0 +