-
Notifications
You must be signed in to change notification settings - Fork 489
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The original PKGBUILD was taken from the archlinux
- Loading branch information
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
From c3f642ad3458a293054ee4604dbc89d22af7c010 Mon Sep 17 00:00:00 2001 | ||
From: Maxim Moseychuk <[email protected]> | ||
Date: Sat, 13 Mar 2021 05:27:15 +0300 | ||
Subject: [PATCH] support windows | ||
|
||
--- | ||
src/cpu.c | 8 ++++++-- | ||
1 file changed, 6 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/src/cpu.c b/src/cpu.c | ||
index c0155ef..710732b 100644 | ||
--- a/src/cpu.c | ||
+++ b/src/cpu.c | ||
@@ -1,5 +1,9 @@ | ||
-#include <unistd.h> | ||
+#include <stdint.h> | ||
+#include <sysinfoapi.h> | ||
|
||
size_t num_threads(void) { | ||
- return sysconf(_SC_NPROCESSORS_ONLN); | ||
+ SYSTEM_INFO systemInfo; | ||
+ GetSystemInfo(&systemInfo); | ||
+ | ||
+ return systemInfo.dwNumberOfProcessors; | ||
} | ||
-- | ||
2.30.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Contributor: Maxim Moseychuk ("fshp") <[email protected]> | ||
|
||
pkgname=pixz | ||
pkgver=1.0.7 | ||
pkgrel=2 | ||
pkgdesc="Parallel, indexed xz compressor" | ||
arch=('i686' 'x86_64') | ||
url="https://github.com/vasi/pixz" | ||
license=('custom') | ||
depends=('libarchive') | ||
makedepends=('asciidoc' 'libarchive-devel') | ||
source=(https://github.com/vasi/pixz/releases/download/v$pkgver/${pkgname}-$pkgver.tar.gz | ||
0001-support-windows.patch) | ||
sha256sums=('d1b6de1c0399e54cbd18321b8091bbffef6d209ec136d4466f398689f62c3b5f' | ||
'bb8c0b7b7daaa776f84e5b2f7d5f70f283b9f434681973a4b779ffdb842a29a8') | ||
|
||
prepare() { | ||
cd ${srcdir}/${pkgname}-$pkgver | ||
|
||
patch -p1 -i ${srcdir}/0001-support-windows.patch | ||
} | ||
|
||
build() { | ||
cd ${srcdir}/${pkgname}-${pkgver} | ||
|
||
manpage=true ./configure \ | ||
--prefix=/usr \ | ||
--build=${CHOST} | ||
|
||
make | ||
} | ||
|
||
package() { | ||
cd ${srcdir}/${pkgname}-${pkgver} | ||
|
||
make DESTDIR="${pkgdir}" install | ||
|
||
install -Dm644 "${srcdir}"/${pkgname}-${pkgver}/LICENSE \ | ||
${pkgdir}/usr/share/licenses/${pkgname}/LICENSE | ||
} |