summaryrefslogtreecommitdiff
path: root/user/mac-fdisk
diff options
context:
space:
mode:
Diffstat (limited to 'user/mac-fdisk')
-rw-r--r--user/mac-fdisk/APKBUILD8
-rw-r--r--user/mac-fdisk/mac-fdisk-0.1-debian.patch15
-rw-r--r--user/mac-fdisk/mac-fdisk-0.1-more-arches.patch67
-rw-r--r--user/mac-fdisk/mac-fdisk-amd64.patch29
4 files changed, 72 insertions, 47 deletions
diff --git a/user/mac-fdisk/APKBUILD b/user/mac-fdisk/APKBUILD
index 24d668c07..471279968 100644
--- a/user/mac-fdisk/APKBUILD
+++ b/user/mac-fdisk/APKBUILD
@@ -3,7 +3,7 @@
pkgname=mac-fdisk
pkgver=0.1.16
_pkgver=0.1
-pkgrel=1
+pkgrel=2
pkgdesc="68K and PowerPC fixed disk partitioning utility"
url="https://adelielinux.org/"
arch="all"
@@ -15,6 +15,7 @@ subpackages="$pkgname-doc"
source="https://distfiles.adelielinux.org/source/mac-fdisk_0.1.orig.tar.gz
mac-fdisk-0.1-debian.patch
mac-fdisk-0.1-headers.patch
+ mac-fdisk-0.1-more-arches.patch
mac-fdisk-0.1_p16-ppc64.patch
mac-fdisk-0.1_p16-proper-inline.patch
mac-fdisk-amd64.patch
@@ -42,11 +43,12 @@ package() {
}
sha512sums="1263e60a18111162f5ef439b5f9615cef9de94e7836cb998782a6e6d3bcf92a69e49566b33c7330bdea05de5e6ca83f7920c6707f342ce515440160695f07120 mac-fdisk_0.1.orig.tar.gz
-64261af8f98ccae559d070545ad2bd1e09dd4538e6646913ffa9030a4594667498bf430896971a9de8116e445c698368eecaa9be77e44d539f1935af45eb461a mac-fdisk-0.1-debian.patch
+1d1073c4bbb6ff403130254d1ff8e1b045933c9b09e032a278bba47c50ccf1806d3c3280a818937e36942392da7b03091f00063d2bcf9f4f33cb57a8bb1166f0 mac-fdisk-0.1-debian.patch
7d16300c02b293de87101e3ef83a8b7778d15123c261d562f0129704b74d0c3d7ca18730c52d37b599ff57c0b70dacd41aeefe99cf235aea4abd4b569e3d601e mac-fdisk-0.1-headers.patch
+ddee905f118d4ffa2bae0c849470f45d31baa955ae344241496863f742f7b5e00a2d458e20542138be53472f4b396461ffbcd724e98c10ca155ef38c2d39f94b mac-fdisk-0.1-more-arches.patch
e521009d628934fe3925085c941d2bb3fba9c3322ccaaa6dd650ecbc6b990056f9bf186adb3a645dc8593efdb44611b69a7b6bf4e87d262870bbb515581e0ef3 mac-fdisk-0.1_p16-ppc64.patch
73b28195539a3e71b37e955f5f1e5cdc566ecf1c43a235b7689df235d84dec9d3807d3b5b49a506f758d7a1ff528388052bebfea58916381f2f0045eee350bac mac-fdisk-0.1_p16-proper-inline.patch
-241576f64dd334f98e8c9cb9e0b17b6366e208f2d0af47ddb4659cf2d8e25ca8f44a84d1f7fa2e5f6215f4be42668f43f034074ac981a0d87ca8483505a3623c mac-fdisk-amd64.patch
+162c5036e404519e57b63e1aee440bec4edca7fb7348efe985feeb37df9221d6829eaa601c8feb52c1ffd99cb8daf037dc93e161bb23c96927a65dd5e8b186d4 mac-fdisk-amd64.patch
d558d66fb91d845e09cca7c3832d2ec078581ed09574fb38d9476f0417901794ae70e4a284379977a5c50599ce9570da8359e321de91f9f77263601c090e501d mac-fdisk-fdisk-header-musl.patch
c9abc952f1ce618b085a134145fa99efa9c10b55f3fa773fb6b74a66468537bc3567ec632fe6e464c5158383135c858c171d8d94d7142d38beff39a17e31187a mac-fdisk-large-disk-support.patch
b5988eb6aa64324421398461396b0fdd0b55d7643094c042bea7264ec0f9913e8a793f3f550c15928419e697a14f2932f483c4b98a54618af99b35aa7ceae757 mac-fdisk-largerthan2gb.patch
diff --git a/user/mac-fdisk/mac-fdisk-0.1-debian.patch b/user/mac-fdisk/mac-fdisk-0.1-debian.patch
index 73a31354b..617dd8e70 100644
--- a/user/mac-fdisk/mac-fdisk-0.1-debian.patch
+++ b/user/mac-fdisk/mac-fdisk-0.1-debian.patch
@@ -403,21 +403,6 @@
+.\" Jakub Jelinek (jj@sunsite.mff.cuni.cz)
+.\" Andreas Neuper (ANeuper@GUUG.de)
+.\" and many others.
---- mac-fdisk-0.1.orig/fdisklabel.h
-+++ mac-fdisk-0.1/fdisklabel.h
-@@ -52,6 +52,12 @@
- #define BSD_LABELOFFSET 0
- #define BSD_BBSIZE 0
- #define BSD_SBSIZE 0
-+#elif defined (__mc68000__)
-+/* LABELSECTOR, LABELOFFSET, BBSIZE & SBSIZE are undefined for __powerpc__ */
-+#define BSD_LABELSECTOR 0
-+#define BSD_LABELOFFSET 0
-+#define BSD_BBSIZE 0
-+#define BSD_SBSIZE 0
- #else
- #error unknown architecture
- #endif
--- mac-fdisk-0.1.orig/fdisk.c
+++ mac-fdisk-0.1/fdisk.c
@@ -62,7 +62,6 @@
diff --git a/user/mac-fdisk/mac-fdisk-0.1-more-arches.patch b/user/mac-fdisk/mac-fdisk-0.1-more-arches.patch
new file mode 100644
index 000000000..086362844
--- /dev/null
+++ b/user/mac-fdisk/mac-fdisk-0.1-more-arches.patch
@@ -0,0 +1,67 @@
+--- mac-fdisk-0.1.orig/fdisklabel.h.old 1997-01-14 20:34:13.000000000 +0000
++++ mac-fdisk-0.1.orig/fdisklabel.h 2018-06-01 06:13:09.065722112 +0000
+@@ -35,27 +35,23 @@
+ #define BSD_MAXPARTITIONS 8
+ #define BSD_LINUX_BOOTDIR "/usr/ucb/mdec"
+
+-#if defined (i386)
++/* Thanks, util-linux! */
++#if defined (i386) || defined (__sparc__) || defined (__arm__) || defined (__mips__) || defined (__s390__) || defined (__sh__) || defined(__x86_64__)
+ #define BSD_LABELSECTOR 1
+ #define BSD_LABELOFFSET 0
+-#define BSD_BBSIZE 8192 /* size of boot area, with label */
+-#define BSD_SBSIZE 8192 /* max size of fs superblock */
+-#elif defined (__alpha__)
+-#error LABELSECTOR, LABELOFFSET, BBSIZE & SBSIZE are undefined for __alpha__
+-#define BSD_LABELSECTOR 0
+-#define BSD_LABELOFFSET 0
+-#define BSD_BBSIZE 0
+-#define BSD_SBSIZE 0
+-#elif defined (__powerpc__)
+-/* LABELSECTOR, LABELOFFSET, BBSIZE & SBSIZE are undefined for __powerpc__ */
++#elif defined (__alpha__) || defined (__powerpc__) || defined (__ia64__) || defined (__hppa__)
+ #define BSD_LABELSECTOR 0
++#define BSD_LABELOFFSET 64
++#elif defined (__s390__) || defined (__s390x__)
++#define BSD_LABELSECTOR 1
+ #define BSD_LABELOFFSET 0
+-#define BSD_BBSIZE 0
+-#define BSD_SBSIZE 0
+ #else
+ #error unknown architecture
+ #endif
+
++#define BSD_BBSIZE 8192 /* size of boot area, with label */
++#define BSD_SBSIZE 8192 /* max size of fs superblock */
++
+ struct disklabel {
+ u_long d_magic; /* the magic number */
+ short d_type; /* drive type */
+--- mac-fdisk-0.1.orig/fdisklabel.c.old 2018-06-01 06:19:35.113347714 +0000
++++ mac-fdisk-0.1.orig/fdisklabel.c 2018-06-01 06:20:36.734576024 +0000
+@@ -82,10 +82,8 @@
+
+ static struct disklabel bsd_dlabel;
+ static char buffer[BSD_BBSIZE];
+-#if defined (i386)
+ static struct partition *bsd_part;
+ static int bsd_part_index;
+-#endif
+
+ void
+ bmenu (void)
+@@ -373,10 +371,11 @@
+ while (1)
+ if ((c = tolower (read_char ("Do you want to create a disklabel? (y/n) "))) == 'y')
+ {
+-#if defined (i386)
+- if (bsd_initlabel (bsd_part, &bsd_dlabel, bsd_part_index) == 1)
+-#elif defined (__alpha__) || defined (__powerpc__) || defined (__mc68000__)
++#if defined (__alpha__) || defined (__powerpc__) || defined (__hppa__) || \
++ defined (__s390__) || defined (__s390x__) || defined(__mc68000__)
+ if (bsd_initlabel (NULL, &bsd_dlabel, 0) == 1)
++#else
++ if (bsd_initlabel (bsd_part, &bsd_dlabel, bsd_part_index) == 1)
+ #endif
+ {
+ bsd_print_disklabel (1);
diff --git a/user/mac-fdisk/mac-fdisk-amd64.patch b/user/mac-fdisk/mac-fdisk-amd64.patch
index 8658ba9a6..236b037d9 100644
--- a/user/mac-fdisk/mac-fdisk-amd64.patch
+++ b/user/mac-fdisk/mac-fdisk-amd64.patch
@@ -9,15 +9,6 @@
static int bsd_translate_fstype (int linux_type);
static void bsd_link_part (void);
#endif
-@@ -82,7 +82,7 @@
-
- static struct disklabel bsd_dlabel;
- static char buffer[BSD_BBSIZE];
--#if defined (i386)
-+#if defined (i386) || defined (__amd64)
- static struct partition *bsd_part;
- static int bsd_part_index;
- #endif
@@ -99,13 +99,13 @@
" n add a new BSD partition\n"
" p print BSD partition table\n"
@@ -88,15 +79,6 @@
fprintf (stderr, "%s%d contains no disklabel.\n",
disk_device, bsd_part_index+1);
#elif defined (__alpha__) || defined (__powerpc__)
-@@ -376,7 +376,7 @@
- while (1)
- if ((c = tolower (read_char ("Do you want to create a disklabel? (y/n) "))) == 'y')
- {
--#if defined (i386)
-+#if defined (i386) || defined(__amd64)
- if (bsd_initlabel (bsd_part, &bsd_dlabel, bsd_part_index) == 1)
- #elif defined (__alpha__) || defined (__powerpc__) || defined (__mc68000__)
- if (bsd_initlabel (NULL, &bsd_dlabel, 0) == 1)
@@ -507,7 +507,7 @@
bcopy (&dl, d, sizeof (struct disklabel));
@@ -160,17 +142,6 @@
static int
bsd_translate_fstype (int linux_type)
{
---- a/fdisklabel.h
-+++ b/fdisklabel.h
-@@ -35,7 +35,7 @@
- #define BSD_MAXPARTITIONS 8
- #define BSD_LINUX_BOOTDIR "/usr/ucb/mdec"
-
--#if defined (i386)
-+#if defined (i386) || defined(__amd64)
- #define BSD_LABELSECTOR 1
- #define BSD_LABELOFFSET 0
- #define BSD_BBSIZE 8192 /* size of boot area, with label */
--- a/kernel-defs.h
+++ b/kernel-defs.h
@@ -15,8 +15,14 @@