wip/mount-zip: import mount-zip-1.0.3
authorThomas Klausner <tk@giga.or.at>
Thu, 2 Dec 2021 07:47:09 +0000 (08:47 +0100)
committerThomas Klausner <tk@giga.or.at>
Thu, 2 Dec 2021 07:47:09 +0000 (08:47 +0100)
mount-zip is a tool allowing to open, explore and extract ZIP
archives.

mount-zip mounts a ZIP archive as a read-only.

mount-zip/DESCR [new file with mode: 0644]
mount-zip/Makefile [new file with mode: 0644]
mount-zip/PLIST [new file with mode: 0644]
mount-zip/TODO [new file with mode: 0644]
mount-zip/distinfo [new file with mode: 0644]
mount-zip/patches/patch-lib_extra__field.cc [new file with mode: 0644]
mount-zip/patches/patch-main.cc [new file with mode: 0644]

diff --git a/mount-zip/DESCR b/mount-zip/DESCR
new file mode 100644 (file)
index 0000000..1c3f14c
--- /dev/null
@@ -0,0 +1,4 @@
+mount-zip is a tool allowing to open, explore and extract ZIP
+archives.
+
+mount-zip mounts a ZIP archive as a read-only.
diff --git a/mount-zip/Makefile b/mount-zip/Makefile
new file mode 100644 (file)
index 0000000..2622f6f
--- /dev/null
@@ -0,0 +1,20 @@
+# $NetBSD$
+
+DISTNAME=      mount-zip-1.0.3
+CATEGORIES=    filesystems
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=google/}
+GITHUB_TAG=    v${PKGVERSION_NOREV}
+
+MAINTAINER=    pkgsrc-users@NetBSD.org
+HOMEPAGE=      https://github.com/google/mount-zip/
+COMMENT=       Read-only FUSE file system for ZIP archives
+LICENSE=       gnu-gpl-v3
+
+USE_LANGUAGES= c++
+USE_TOOLS+=    gmake pkg-config
+
+.include "../../archivers/libzip/buildlink3.mk"
+.include "../../devel/boost-headers/buildlink3.mk"
+.include "../../textproc/icu/buildlink3.mk"
+.include "../../mk/fuse.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/mount-zip/PLIST b/mount-zip/PLIST
new file mode 100644 (file)
index 0000000..92ba51a
--- /dev/null
@@ -0,0 +1,4 @@
+@comment $NetBSD$
+@comment TODO: to fill this file with the file listing:
+@comment TODO: 1. run "/usr/bin/make package"
+@comment TODO: 2. run "/usr/bin/make print-PLIST"
diff --git a/mount-zip/TODO b/mount-zip/TODO
new file mode 100644 (file)
index 0000000..7c957dd
--- /dev/null
@@ -0,0 +1,42 @@
+Does not build on NetBSD:
+
+In file included from /usr/include/puffs.h:44,
+                 from /usr/include/fuse.h:41,
+                 from main.cc:30:
+/usr/include/fs/puffs/puffs_msgif.h:708:2: error: 'register_t' does not name a type; did you mean 'register'?
+  708 |  register_t  pvnr_retval;  /* IN */
+      |  ^~~~~~~~~~
+      |  register
+In file included from /usr/include/fuse.h:41,
+                 from main.cc:30:
+/usr/include/puffs.h:226:27: error: 'register_t' has not been declared
+  226 |      puffs_cookie_t, int, register_t *);
+      |                           ^~~~~~~~~~
+/usr/include/puffs.h:437:1: error: 'register_t' has not been declared
+  437 | PUFFSOP_PROTOS(puffs_null) /* XXX */
+      | ^~~~~~~~~~~~~~
+/usr/include/puffs.h:506:20: error: 'vsize_t' has not been declared
+  506 |        enum vtype, vsize_t, dev_t);
+      |                    ^~~~~~~
+main.cc: In function 'int main(int, char**)':
+main.cc:384:43: error: narrowing conversion of '4294967295' from 'unsigned int' to 'int32_t' {aka 'int'} [-Wnarrowing]
+  384 |                            {nullptr, 0, 0}};
+      |                                           ^
+main.cc:384:43: error: narrowing conversion of '4294967295' from 'unsigned int' to 'int32_t' {aka 'int'} [-Wnarrowing]
+main.cc:384:43: error: narrowing conversion of '4294967295' from 'unsigned int' to 'int32_t' {aka 'int'} [-Wnarrowing]
+main.cc:384:43: error: narrowing conversion of '4294967295' from 'unsigned int' to 'int32_t' {aka 'int'} [-Wnarrowing]
+main.cc:384:43: error: narrowing conversion of '4294967295' from 'unsigned int' to 'int32_t' {aka 'int'} [-Wnarrowing]
+main.cc:384:43: error: narrowing conversion of '4294967295' from 'unsigned int' to 'int32_t' {aka 'int'} [-Wnarrowing]
+main.cc:384:43: error: narrowing conversion of '4294967295' from 'unsigned int' to 'int32_t' {aka 'int'} [-Wnarrowing]
+main.cc:384:43: error: narrowing conversion of '4294967295' from 'unsigned int' to 'int32_t' {aka 'int'} [-Wnarrowing]
+main.cc:384:43: error: narrowing conversion of '4294967295' from 'unsigned int' to 'int32_t' {aka 'int'} [-Wnarrowing]
+main.cc:384:43: error: narrowing conversion of '4294967295' from 'unsigned int' to 'int32_t' {aka 'int'} [-Wnarrowing]
+main.cc:384:43: error: narrowing conversion of '4294967295' from 'unsigned int' to 'int32_t' {aka 'int'} [-Wnarrowing]
+main.cc:384:43: error: narrowing conversion of '4294967295' from 'unsigned int' to 'int32_t' {aka 'int'} [-Wnarrowing]
+main.cc:451:7: error: 'fuse_setup' was not declared in this scope; did you mean 'fuse_opt'?
+  451 |       fuse_setup(args.argc, args.argv, &operations, sizeof(operations),
+      |       ^~~~~~~~~~
+      |       fuse_opt
+main.cc:469:3: error: 'fuse_teardown' was not declared in this scope
+  469 |   fuse_teardown(fuse, absolute_mount_point);
+      |   ^~~~~~~~~~~~~
diff --git a/mount-zip/distinfo b/mount-zip/distinfo
new file mode 100644 (file)
index 0000000..0aeda45
--- /dev/null
@@ -0,0 +1,7 @@
+$NetBSD$
+
+BLAKE2s (mount-zip-1.0.3.tar.gz) = d34c89835de46fa6761ba7869d27e1a6b837b91a413d3b23a179a7822378ca68
+SHA512 (mount-zip-1.0.3.tar.gz) = f18c24cedfb09edcf3b97d86e85fe8c3cd5d37fd024cfdff4c90fc7948e79fe719b6463c7bc35b8e1d582405c73f20ef6f6f4e05a67b5f07681a369a17ff6fa3
+Size (mount-zip-1.0.3.tar.gz) = 714641 bytes
+SHA1 (patch-lib_extra__field.cc) = 21158541a3d0521bae799a6cd61b508f596355f3
+SHA1 (patch-main.cc) = 8afd48d9dda938b8f8755dfea314b05bf674e0f6
diff --git a/mount-zip/patches/patch-lib_extra__field.cc b/mount-zip/patches/patch-lib_extra__field.cc
new file mode 100644 (file)
index 0000000..191e9f8
--- /dev/null
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Header does not exist on NetBSD.
+
+--- lib/extra_field.cc.orig    2021-11-28 04:14:07.000000000 +0000
++++ lib/extra_field.cc
+@@ -18,7 +18,9 @@
+ #include "extra_field.h"
+ #include <sys/stat.h>
++#ifdef __Linux__
+ #include <sys/sysmacros.h>
++#endif
+ #include <cassert>
+ #include <cstring>
diff --git a/mount-zip/patches/patch-main.cc b/mount-zip/patches/patch-main.cc
new file mode 100644 (file)
index 0000000..ea115d8
--- /dev/null
@@ -0,0 +1,17 @@
+$NetBSD$
+
+O_PATH does not exist on NetBSD.
+
+--- main.cc.orig       2021-11-28 04:14:07.000000000 +0000
++++ main.cc
+@@ -46,6 +46,10 @@
+ #error "libzip >= 1.0 is required!"
+ #endif
++#ifndef O_PATH
++#define O_PATH 0
++#endif
++
+ // Prints usage information.
+ void print_usage() {
+   fprintf(