From dffc93dfa8f596fdad572fa94421a5de8cec548b Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Wed, 22 Oct 2014 21:49:13 +0200 Subject: [PATCH] recipe for gptfdisk (broken) * Needs Haiku-compatible ioctls to access the disks. --- sys-apps/gptfdisk/gptfdisk-0.8.10.recipe | 42 +++++++++++++++++ .../gptfdisk/patches/gptfdisk-0.8.10.patchset | 47 +++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 sys-apps/gptfdisk/gptfdisk-0.8.10.recipe create mode 100644 sys-apps/gptfdisk/patches/gptfdisk-0.8.10.patchset diff --git a/sys-apps/gptfdisk/gptfdisk-0.8.10.recipe b/sys-apps/gptfdisk/gptfdisk-0.8.10.recipe new file mode 100644 index 000000000..c2b8b7cb5 --- /dev/null +++ b/sys-apps/gptfdisk/gptfdisk-0.8.10.recipe @@ -0,0 +1,42 @@ +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/" +LICENSE="GNU GPL v2" +COPYRIGHT="2013 Rod Smith" + +SRC_URI="http://sourceforge.net/projects/gptfdisk/files/gptfdisk/0.8.10/gptfdisk-0.8.10.tar.gz" +PATCHES="gptfdisk-0.8.10.recipe" + +PROVIDES=" + gptfdisk = $portVersion +" + +BUILD_REQUIRES=" + devel:libuuid + devel:libncurses +" + +BUILD_PREREQUIRES=" + haiku_devel >= $haikuVersion + cmd:gcc + cmd:make +" + +BUILD() +{ + make $jobArgs +} + +INSTALL() +{ + make install +} + +TEST() +{ + make check +} diff --git a/sys-apps/gptfdisk/patches/gptfdisk-0.8.10.patchset b/sys-apps/gptfdisk/patches/gptfdisk-0.8.10.patchset new file mode 100644 index 000000000..c6dcf73bf --- /dev/null +++ b/sys-apps/gptfdisk/patches/gptfdisk-0.8.10.patchset @@ -0,0 +1,47 @@ +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 +