Compare commits

1 Commits

Author SHA1 Message Date
1563509ed6 needed these fixes to get pdisk to build 2024-06-04 14:50:41 -07:00
3 changed files with 26 additions and 7 deletions

View File

@@ -1,7 +1,7 @@
pkgbase = pdisk
pkgdesc = A low-level Apple partition table editor for Linux.
pkgver = 0.9
pkgrel = 2
pkgrel = 3
arch = x86_64
arch = aarch64
license = custom
@@ -11,11 +11,13 @@ pkgbase = pdisk
source = file_media.c.patch
source = cvt_pt.c.patch
source = linux_strerror.patch
sha256sums = 5d080d8ff80744b9740b18030c59d7cea216f718c2bc2878434338b1d090a4ba
source = cmdline.patch
sha256sums = c07955131f0eb9628300824d172f5351d1db0eb5ee3bc0c90d8ec81194913725
sha256sums = 54ae88ac1448451ebe3c7298bc000a19ef35a562107fed48ce2c41b9b22d9bab
sha256sums = a1cdfa2d3d3d4a74f75d4906de5d411eef8a7b9d9f4300b4722277e25290ab9a
sha256sums = e455106da2572150b5178d564814c33ee29bf39ec31f7f787e2d6fcc3a32fa68
sha256sums = 2dca3b77f193563299f5ba3388521712f9ad0da5d4aad6334025e1eadb191a0e
sha256sums = b515aea26be1e91232dc22fd19abae2e8a6538fadb349c0c23a3687df2fe048a
sha256sums = b4ed72e9ecc0c43415eb8fafd1dc95aff9ca700867491dcf82d46dbaa9c6af54
pkgname = pdisk

View File

@@ -1,8 +1,9 @@
# Maintainer: Chris Kobayashi <software+aur@disavowed.jp>
# Contributor: Scott Alfter <scott@alfter.us>
pkgname=pdisk
pkgver=0.9
pkgrel=2
pkgrel=3
pkgdesc="A low-level Apple partition table editor for Linux."
arch=('x86_64' 'aarch64')
license=(custom)
@@ -13,34 +14,37 @@ source=(
'file_media.c.patch'
'cvt_pt.c.patch'
'linux_strerror.patch'
'cmdline.patch'
)
sha256sums=(
'5d080d8ff80744b9740b18030c59d7cea216f718c2bc2878434338b1d090a4ba'
'c07955131f0eb9628300824d172f5351d1db0eb5ee3bc0c90d8ec81194913725'
'54ae88ac1448451ebe3c7298bc000a19ef35a562107fed48ce2c41b9b22d9bab'
'a1cdfa2d3d3d4a74f75d4906de5d411eef8a7b9d9f4300b4722277e25290ab9a'
'e455106da2572150b5178d564814c33ee29bf39ec31f7f787e2d6fcc3a32fa68'
'2dca3b77f193563299f5ba3388521712f9ad0da5d4aad6334025e1eadb191a0e'
'b515aea26be1e91232dc22fd19abae2e8a6538fadb349c0c23a3687df2fe048a'
'b4ed72e9ecc0c43415eb8fafd1dc95aff9ca700867491dcf82d46dbaa9c6af54'
)
prepare() {
cd "pdisk-${pkgver//0./}"
cd "pdisk-pdisk-${pkgver//0./}"
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"
patch -p1 -i "${srcdir}/cmdline.patch"
}
build() {
cd "pdisk-${pkgver//0./}"
cd "pdisk-pdisk-${pkgver//0./}"
make
}
package() {
install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
cd "pdisk-${pkgver//0./}"
cd "pdisk-pdisk-${pkgver//0./}"
install -Dm 755 pdisk "${pkgdir}/usr/bin/pdisk"
install -Dm 755 cvt_pt "${pkgdir}/usr/bin/cvt_pt"

13
cmdline.patch Normal file
View File

@@ -0,0 +1,13 @@
--- a/cmdline.c 2021-10-05 22:29:41.000000000 -0700
+++ a/cmdline.c 2024-05-30 12:05:29.146787602 -0700
@@ -22,10 +22,8 @@
* @APPLE_LICENSE_HEADER_END@
*/
#include <stdio.h>
-#ifndef __linux__
#include <stdlib.h>
#include <unistd.h>
-#endif
#include <string.h>
#include <errno.h>
#include <fcntl.h>