mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
New package: httpdirfs-1.2.0
Signed-off-by: Nathan Owens <ndowens04@gmail.com>
This commit is contained in:
parent
a8297effd4
commit
c07db08999
3 changed files with 86 additions and 0 deletions
30
srcpkgs/httpdirfs/patches/fix-coding.patch
Normal file
30
srcpkgs/httpdirfs/patches/fix-coding.patch
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
diff --git src/main.c src/main.c
|
||||||
|
index 154f052..b44463c 100644
|
||||||
|
--- src/main.c
|
||||||
|
+++ src/main.c
|
||||||
|
@@ -290,10 +290,10 @@ static void print_help(char *program_name, int long_help)
|
||||||
|
|
||||||
|
static void print_version()
|
||||||
|
{
|
||||||
|
- fprintf(stderr, "HTTPDirFS version " VERSION "\n");
|
||||||
|
+ fprintf(stderr, "HTTPDirFS version: VERSION");
|
||||||
|
/* --------- Print off SSL engine version --------- */
|
||||||
|
curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
|
||||||
|
- fprintf(stderr, "libcurl SSL engine: %s\n", data->ssl_version);
|
||||||
|
+ fprintf(stderr, "\nlibcurl SSL engine: %s\n", data->ssl_version);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void print_long_help()
|
||||||
|
diff --git src/util.h src/util.h
|
||||||
|
index d7c7c15..4ae9ce8 100644
|
||||||
|
--- src/util.h
|
||||||
|
+++ src/util.h
|
||||||
|
@@ -24,7 +24,7 @@
|
||||||
|
/**
|
||||||
|
* \brief the default user agent string
|
||||||
|
*/
|
||||||
|
-#define DEFAULT_USER_AGENT "HTTPDirFS-" VERSION
|
||||||
|
+#define DEFAULT_USER_AGENT "HTTPDirFS-VERSION"
|
||||||
|
|
||||||
|
|
||||||
|
|
33
srcpkgs/httpdirfs/patches/musl.patch
Normal file
33
srcpkgs/httpdirfs/patches/musl.patch
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
diff --git src/util.c src/util.c
|
||||||
|
index f2141bd..10e1549 100644
|
||||||
|
--- src/util.c
|
||||||
|
+++ src/util.c
|
||||||
|
@@ -2,8 +2,9 @@
|
||||||
|
|
||||||
|
#include <openssl/md5.h>
|
||||||
|
#include <uuid/uuid.h>
|
||||||
|
-
|
||||||
|
+#ifdef __GLIBC__
|
||||||
|
#include <execinfo.h>
|
||||||
|
+#endif
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
@@ -147,13 +148,15 @@ void exit_failure(void)
|
||||||
|
{
|
||||||
|
int nptrs;
|
||||||
|
void *buffer[BT_BUF_SIZE];
|
||||||
|
-
|
||||||
|
+#ifdef __GLIBC__
|
||||||
|
nptrs = backtrace(buffer, BT_BUF_SIZE);
|
||||||
|
+#endif
|
||||||
|
fprintf(stderr, "\nOops! HTTPDirFS crashed! :(\n");
|
||||||
|
+#ifdef __GLIBC__
|
||||||
|
fprintf(stderr, "backtrace() returned the following %d addresses:\n",
|
||||||
|
nptrs);
|
||||||
|
backtrace_symbols_fd(buffer, nptrs, STDERR_FILENO);
|
||||||
|
-
|
||||||
|
+#endif
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
23
srcpkgs/httpdirfs/template
Normal file
23
srcpkgs/httpdirfs/template
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
# Template file for 'httpdirfs'
|
||||||
|
pkgname=httpdirfs
|
||||||
|
version=1.2.0
|
||||||
|
revision=1
|
||||||
|
build_style=gnu-makefile
|
||||||
|
make_install_args="prefix=/usr"
|
||||||
|
makedepends="libcurl-devel fuse-devel gumbo-parser-devel
|
||||||
|
libuuid-devel expat-devel"
|
||||||
|
depends="libcurl fuse gumbo-parser"
|
||||||
|
short_desc="Mount HTTP directory listings, with a permanent cache"
|
||||||
|
maintainer="Nathan Owens <ndowens04@gmail.com>"
|
||||||
|
license="GPL-3.0-only"
|
||||||
|
homepage="https://github.com/fangfufu/httpdirfs"
|
||||||
|
distfiles="https://github.com/fangfufu/httpdirfs/archive/${version}.tar.gz"
|
||||||
|
checksum=05be4d83434eaea002f550b77aed6c05ff135927662d53a6e2b224e766a50a9a
|
||||||
|
|
||||||
|
CFLAGS="-D_FILE_OFFSET_BITS=64"
|
||||||
|
|
||||||
|
# Hack to output version
|
||||||
|
pre_build() {
|
||||||
|
vsed -e "/HTTPDirFS/s|VERSION|${version}|" -i src/main.c
|
||||||
|
vsed -e "s|VERSION|${version}|" -i src/util.h
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue