From d0c930ea8bcac008bbd0ade1811133a625caea54 Mon Sep 17 00:00:00 2001 From: Chris Kobayashi Date: Wed, 22 Jun 2022 21:44:45 +0900 Subject: [PATCH] Make this compile again, bump pkgver. --- .SRCINFO | 6 ++-- PKGBUILD | 9 ++++-- linux_strerror.patch | 68 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 78 insertions(+), 5 deletions(-) create mode 100644 linux_strerror.patch diff --git a/.SRCINFO b/.SRCINFO index cf869ab..4062e03 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,19 +1,21 @@ pkgbase = pdisk pkgdesc = A low-level Apple partition table editor for Linux. pkgver = 0.9 - pkgrel = 1 + pkgrel = 2 arch = x86_64 + arch = aarch64 license = custom source = https://opensource.apple.com/tarballs/pdisk/pdisk-9.tar.gz source = LICENSE source = makefile.patch source = file_media.c.patch source = cvt_pt.c.patch + source = linux_strerror.patch sha256sums = 5d080d8ff80744b9740b18030c59d7cea216f718c2bc2878434338b1d090a4ba sha256sums = 54ae88ac1448451ebe3c7298bc000a19ef35a562107fed48ce2c41b9b22d9bab sha256sums = a1cdfa2d3d3d4a74f75d4906de5d411eef8a7b9d9f4300b4722277e25290ab9a sha256sums = e455106da2572150b5178d564814c33ee29bf39ec31f7f787e2d6fcc3a32fa68 sha256sums = 2dca3b77f193563299f5ba3388521712f9ad0da5d4aad6334025e1eadb191a0e + sha256sums = b515aea26be1e91232dc22fd19abae2e8a6538fadb349c0c23a3687df2fe048a pkgname = pdisk - diff --git a/PKGBUILD b/PKGBUILD index 44c5ba7..bd33887 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,10 +1,10 @@ -# Maintainer: Kevin Cotugno +# Maintainer: Chris Kobayashi pkgname=pdisk pkgver=0.9 -pkgrel=1 +pkgrel=2 pkgdesc="A low-level Apple partition table editor for Linux." -arch=(x86_64) +arch=('x86_64' 'aarch64') license=(custom) source=( "https://opensource.apple.com/tarballs/pdisk/pdisk-${pkgver//0./}.tar.gz" @@ -12,6 +12,7 @@ source=( 'makefile.patch' 'file_media.c.patch' 'cvt_pt.c.patch' + 'linux_strerror.patch' ) sha256sums=( '5d080d8ff80744b9740b18030c59d7cea216f718c2bc2878434338b1d090a4ba' @@ -19,6 +20,7 @@ sha256sums=( 'a1cdfa2d3d3d4a74f75d4906de5d411eef8a7b9d9f4300b4722277e25290ab9a' 'e455106da2572150b5178d564814c33ee29bf39ec31f7f787e2d6fcc3a32fa68' '2dca3b77f193563299f5ba3388521712f9ad0da5d4aad6334025e1eadb191a0e' + 'b515aea26be1e91232dc22fd19abae2e8a6538fadb349c0c23a3687df2fe048a' ) prepare() { @@ -27,6 +29,7 @@ prepare() { patch -p1 -i "${srcdir}/makefile.patch" patch -p1 -i "${srcdir}/file_media.c.patch" patch -p1 -i "${srcdir}/cvt_pt.c.patch" + patch -p1 -i "${srcdir}/linux_strerror.patch" } build() { diff --git a/linux_strerror.patch b/linux_strerror.patch new file mode 100644 index 0000000..2ced385 --- /dev/null +++ b/linux_strerror.patch @@ -0,0 +1,68 @@ +Binary files pdisk-9-orig/cvt_pt and pdisk-9/cvt_pt differ +Binary files pdisk-9-orig/cvt_pt.o and pdisk-9/cvt_pt.o differ +diff -urNbB pdisk-9-orig/errors.c pdisk-9/errors.c +--- pdisk-9-orig/errors.c 2010-03-06 08:09:50.000000000 +0900 ++++ pdisk-9/errors.c 2022-06-22 21:39:55.959385243 +0900 +@@ -30,9 +30,7 @@ + #include + + // for exit() +-#ifndef __linux__ + #include +-#endif + // for strrchr + #include + +@@ -142,16 +140,17 @@ + vfprintf(stderr, fmt, ap); + va_end(ap); + +-#if defined(__linux__) || defined(NeXT) || defined(__unix__) ++#if defined(__linux__) ++ if (value > 0) { ++ fprintf(stderr, " (%s)", strerror(value)); ++ } ++#elif defined(NeXT) || defined(__unix__) + if (value > 0 && value < sys_nerr) { +- fprintf(stderr, " (%s)\n", sys_errlist[value]); +- } else { +- fprintf(stderr, "\n"); ++ fprintf(stderr, " (%s)", sys_errlist[value]); + } +-#else ++#endif + fprintf(stderr, "\n"); + printf("Processing stopped: Choose 'Quit' from the file menu to quit.\n\n"); +-#endif + exit(value); + } + +@@ -171,13 +170,14 @@ + vfprintf(stderr, fmt, ap); + va_end(ap); + +-#if defined(__linux__) || defined(NeXT) || defined(__unix__) ++#if defined(__linux__) ++ if (value > 0) { ++ fprintf(stderr, " (%s)", strerror(value)); ++ } ++#elif defined(NeXT) || defined(__unix__) + if (value > 0 && value < sys_nerr) { +- fprintf(stderr, " (%s)\n", sys_errlist[value]); +- } else { +- fprintf(stderr, "\n"); ++ fprintf(stderr, " (%s)", sys_errlist[value]); + } +-#else +- fprintf(stderr, "\n"); + #endif ++ fprintf(stderr, "\n"); + } +Binary files pdisk-9-orig/errors.o and pdisk-9/errors.o differ +Binary files pdisk-9-orig/hfs_misc.o and pdisk-9/hfs_misc.o differ +Binary files pdisk-9-orig/io.o and pdisk-9/io.o differ +Binary files pdisk-9-orig/media.o and pdisk-9/media.o differ +Binary files pdisk-9-orig/pathname.o and pdisk-9/pathname.o differ +Binary files pdisk-9-orig/pdisk and pdisk-9/pdisk differ +Binary files pdisk-9-orig/util.o and pdisk-9/util.o differ +Binary files pdisk-9-orig/validate.o and pdisk-9/validate.o differ