diff --git a/srcpkgs/btfs/patches/musl.patch b/srcpkgs/btfs/patches/musl.patch new file mode 100644 index 00000000000..883c00c68ec --- /dev/null +++ b/srcpkgs/btfs/patches/musl.patch @@ -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) diff --git a/srcpkgs/btfs/template b/srcpkgs/btfs/template new file mode 100644 index 00000000000..b901ece06f3 --- /dev/null +++ b/srcpkgs/btfs/template @@ -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 " +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 +}