New package: btfs-2.5

This commit is contained in:
Juan RP 2016-01-17 08:50:46 +01:00
parent 7c4ec09a2c
commit 198edfb1cf
2 changed files with 43 additions and 0 deletions

View file

@ -0,0 +1,26 @@
Detect pthread_setname_np() availability correctly... do not assume !apple
has this. Fixes build on musl and probably others.
--xtraeme
--- src/btfs.cc.orig 2016-01-17 08:36:07.655244984 +0100
+++ src/btfs.cc 2016-01-17 08:37:05.383786560 +0100
@@ -502,7 +502,7 @@ btfs_init(struct fuse_conn_info *conn) {
pthread_create(&alert_thread, NULL, alert_queue_loop,
new Log(p->save_path + "/../log.txt"));
-#ifndef __APPLE__
+#ifdef HAVE_PTHREAD_SETNAME_NP
pthread_setname_np(alert_thread, "alert");
#endif
--- configure.ac.orig 2016-01-17 08:38:51.015777545 +0100
+++ configure.ac 2016-01-17 08:40:40.383803576 +0100
@@ -19,4 +19,7 @@ AC_TYPE_SIZE_T
# Checks for library functions.
AC_CHECK_FUNCS([memset mkdir realpath strdup])
+# Check for unportable pthread_setname_np()
+AC_CHECK_LIB(pthread, pthread_setname_np)
+
AC_OUTPUT(Makefile src/Makefile scripts/Makefile)

17
srcpkgs/btfs/template Normal file
View file

@ -0,0 +1,17 @@
# Template file for 'btfs'
pkgname=btfs
version=2.5
revision=1
build_style=gnu-configure
hostmakedepends="automake pkg-config"
makedepends="boost-devel libcurl-devel libtorrent-rasterbar-devel fuse-devel"
short_desc="A bittorrent filesystem based on FUSE"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="GPL-2"
homepage="https://github.com/johang/btfs"
distfiles="https://github.com/johang/btfs/archive/v${version}.tar.gz"
checksum=8d970d3c0e921ffee77d04aad758a3ff93123690cb1e372b7efdaeab310c687e
pre_configure() {
autoreconf -fi
}