new package: btfs2
This commit is contained in:
parent
540a9675de
commit
e97ce1bb09
29
packages/btfs2/build.sh
Normal file
29
packages/btfs2/build.sh
Normal file
@ -0,0 +1,29 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://www.bittorrent.com/btfs/
|
||||
TERMUX_PKG_DESCRIPTION="Decentralized file system integrating with TRON network and Bittorrent network"
|
||||
TERMUX_PKG_LICENSE="Apache-2.0, MIT"
|
||||
TERMUX_PKG_LICENSE_FILE="LICENSE-APACHE, LICENSE-MIT"
|
||||
TERMUX_PKG_MAINTAINER="Simbad Marino <cctechmx@gmail.com>"
|
||||
TERMUX_PKG_VERSION=2.0.1
|
||||
TERMUX_PKG_SRCURL=https://github.com/bittorrent/go-btfs/archive/refs/tags/btfs-v${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=85a12f42339b41de4b0cd3096df93f654053836b164a4f92f482d315a4a353b2
|
||||
TERMUX_PKG_AUTO_UPDATE=true
|
||||
TERMUX_PKG_AUTO_UPDATE_TAG_REGEXP="\d+\.\d+\.\d+"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
||||
termux_step_make() {
|
||||
termux_setup_golang
|
||||
make build || :
|
||||
local _GOPATH=$(go env GOPATH)
|
||||
pushd $_GOPATH/pkg/mod/github.com/karalabe/usb@*
|
||||
local target=hidapi/libusb/hid.c
|
||||
chmod 0755 $(dirname $target)
|
||||
chmod 0644 $target
|
||||
patch -p1 < $TERMUX_PKG_BUILDER_DIR/karalabe-usb-pthread_barrier.patch.diff
|
||||
popd
|
||||
make build
|
||||
mv $TERMUX_PKG_SRCDIR/cmd/btfs/btfs $TERMUX_PKG_SRCDIR/cmd/btfs/btfs2
|
||||
}
|
||||
|
||||
termux_step_make_install() {
|
||||
install -Dm700 -t $TERMUX_PREFIX/bin $TERMUX_PKG_SRCDIR/cmd/btfs/btfs2
|
||||
}
|
24
packages/btfs2/karalabe-usb-pthread_barrier.patch.diff
Normal file
24
packages/btfs2/karalabe-usb-pthread_barrier.patch.diff
Normal file
@ -0,0 +1,24 @@
|
||||
From e188e2d7eefa1a057a20921236f22a6008b29c93 Mon Sep 17 00:00:00 2001
|
||||
From: Fredrik Fornwall <fredrik@fornwall.net>
|
||||
Date: Thu, 12 Dec 2019 01:07:20 +0100
|
||||
Subject: [PATCH] Fix build when targetting Android 7 or later
|
||||
|
||||
Support for pthread_barrier was introduced in Android 7, so trying to
|
||||
build a custom implementation of that clashes with the system headers.
|
||||
---
|
||||
hidapi/libusb/hid.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hidapi/libusb/hid.c b/hidapi/libusb/hid.c
|
||||
index 474dff4..dd6fd8c 100644
|
||||
--- a/hidapi/libusb/hid.c
|
||||
+++ b/hidapi/libusb/hid.c
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
#include "hidapi.h"
|
||||
|
||||
-#ifdef __ANDROID__
|
||||
+#if defined(__ANDROID__) && __ANDROID_API__ < __ANDROID_API_N__
|
||||
|
||||
/* Barrier implementation because Android/Bionic don't have pthread_barrier.
|
||||
This implementation came from Brent Priddy and was posted on
|
Loading…
Reference in New Issue
Block a user