From nobody Mon Jan 13 18:04:52 2025 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YX0XN6fR3z5kcM7; Mon, 13 Jan 2025 18:04:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YX0XN5NwQz3Jvc; Mon, 13 Jan 2025 18:04:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736791492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mWIqVnef2Tm9x5cDsKP0pS6Uufl9OODzQvE6HxkPDcg=; b=wEGYTYVcD+sHk2JgI3K8NL5prIsOO11+dhnsHGggB2z8Xxvo5LG8BQJkH2FcvXZrGlglDg jqIYz1zxjjv5kgYwmkuFEDD7R9IzkaPhRh4VEfueYbYw86tS16zRyrOWz0nNsaexawEE/3 IVFeahfruXHJ2EQfGXpEfpKf3WX7HnD5Vu4AaGO0pfNrqif3WnZAVBgUtmIV50/ZMg8+Sx gXYpCOUB+q87bhs2F0E/4eVbVpgxnO1zVsTMwySGOa29KUhUqVPdRwe1fyCSiH6quQeVvU XyyXTaHAjwuT6JZAWe6qHZ1tJK5qMpjvTJX2CMWl1Qa6KaFZM+BQDs+eS/jrFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736791492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mWIqVnef2Tm9x5cDsKP0pS6Uufl9OODzQvE6HxkPDcg=; b=QdIQHa9BcapTybVpiNawx/PkIJf1lrogZdCUs/PHqmhptLKup8WMGmeA7WnLcIeFFg8WVn eqXtN8nUGh4AQ3X17bWCEdzTtL7PHtwVOm6h5fbRcS/IebVM80310uu1h5qcAyXc34g/6m BeaoDLgy3h3LwQFRC51KLQHN3rhx2YYQ1bJb63L3qhJ9/+hUKK+UOs/cW1A2Wv3hdgui/X OlHTHm3A7nJn+ukQtpuMw6D8iCxUpCsuFl+kXwzcRJJaTeWVrn6YktS1gn/cD/sywKpOU5 cUcW6VXO+Sq4i21OIS9rah5znzFDrFlLR4nedlsO77vxubBmWifMO4hIQ4x1dQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736791492; a=rsa-sha256; cv=none; b=Hnia///hQHMgW3sMW6tH+zpiGWEwd5Jg7NIzeVaYPPDftUm8YYh6dVSi8UuwSBSL4UHxr1 5LTbcokxbthKbV9Lj+SGN+LHPKuwAvmW9RqNBag6+O5sM0KjiyDlREJ99RicZ5nGMr3MN9 IHthWLmEdnABr5j/EqlGtSlypsVKptIzTHHxjIlTp32tFx4Ma9WpiGLRJr8EWoP2TDha4P NSnKRfOFtN9ZnCrolzD+03DqfYhcZP//9Iq1ecYDfOyCgrMDShWhbrCjJIt/GN/G5ql+S6 SzWyaWIKw5Nn8eB6ThT3Qbqxuyz2QbuNg99XBIqyD6adHUgv8ELSU0suo5eENw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YX0XN50CfzhSw; Mon, 13 Jan 2025 18:04:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50DI4qEd088875; Mon, 13 Jan 2025 18:04:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50DI4qLo088872; Mon, 13 Jan 2025 18:04:52 GMT (envelope-from git) Date: Mon, 13 Jan 2025 18:04:52 GMT Message-Id: <202501131804.50DI4qLo088872@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Olivier Certner Subject: git: d761d9fdd64e - main - archivers/zim-tools: New port: Command-line tools for ZIM files List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d761d9fdd64e2e0ea9ce21c474febcf193a8e5da Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/ports/commit/?id=d761d9fdd64e2e0ea9ce21c474febcf193a8e5da commit d761d9fdd64e2e0ea9ce21c474febcf193a8e5da Author: Olivier Certner AuthorDate: 2025-01-13 16:03:51 +0000 Commit: Olivier Certner CommitDate: 2025-01-13 18:04:23 +0000 archivers/zim-tools: New port: Command-line tools for ZIM files Sponsored by: The FreeBSD Foundation --- archivers/zim-tools/Makefile | 27 +++++++++++++++++++ archivers/zim-tools/distinfo | 3 +++ archivers/zim-tools/files/patch-meson.build | 16 ++++++++++++ .../zim-tools/files/patch-src_zimcheck_meson.build | 30 ++++++++++++++++++++++ archivers/zim-tools/pkg-descr | 14 ++++++++++ archivers/zim-tools/pkg-plist | 9 +++++++ 6 files changed, 99 insertions(+) diff --git a/archivers/zim-tools/Makefile b/archivers/zim-tools/Makefile new file mode 100644 index 000000000000..fa4f735ec98c --- /dev/null +++ b/archivers/zim-tools/Makefile @@ -0,0 +1,27 @@ +PORTNAME= zim-tools +DISTVERSION= 3.5.0 +CATEGORIES= archivers +MASTER_SITES= https://download.openzim.org/release/zim-tools/ + +MAINTAINER= olce.freebsd.ports@certner.fr +COMMENT= Tools for handling ZIM files +WWW= https://github.com/openzim/zim-tools + +LICENSE= GPLv3+ +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${LOCALBASE}/include/kainjow/mustache.hpp:devel/mustache \ + googletest>0:devel/googletest +LIB_DEPENDS= libdocopt.so:devel/docopt.cpp \ + libgumbo.so:devel/gumbo \ + libicui18n.so:devel/icu \ + libzim.so:devel/libzim + +USES= compiler:c++17-lang meson pkgconfig tar:xz + +CPPFLAGS+= -I${LOCALBASE}/include/kainjow +CXXFLAGS+= -I${LOCALBASE}/include/kainjow + +PLIST_SUB= DISTVERSION=${DISTVERSION} DISTMAJ=${DISTVERSION:C/\..*//} + +.include diff --git a/archivers/zim-tools/distinfo b/archivers/zim-tools/distinfo new file mode 100644 index 000000000000..ed595cf30b04 --- /dev/null +++ b/archivers/zim-tools/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1736766185 +SHA256 (zim-tools-3.5.0.tar.xz) = cdf5ab5ca0c58150c7f3069462e09d49c1588e985ff1be817ef2a2888cbf83d0 +SIZE (zim-tools-3.5.0.tar.xz) = 230416 diff --git a/archivers/zim-tools/files/patch-meson.build b/archivers/zim-tools/files/patch-meson.build new file mode 100644 index 000000000000..b913095ecb3b --- /dev/null +++ b/archivers/zim-tools/files/patch-meson.build @@ -0,0 +1,16 @@ +--- meson.build.orig 2024-09-08 18:40:36 UTC ++++ meson.build +@@ -17,10 +17,10 @@ endif + endif + endif + +-libzim_dep = dependency('libzim', version:'>=9.2.0', static:static_linkage) +-libzim_dep = dependency('libzim', version:'<10.0.0', static:static_linkage) ++libzim_dep = dependency('libzim', version:['>=9.2.0', '<10.0.0'], static:static_linkage) + +-with_xapian_support = compiler.has_header_symbol('zim/zim.h', 'LIBZIM_WITH_XAPIAN') ++with_xapian_support = compiler.has_header_symbol( ++ 'zim/zim.h', 'LIBZIM_WITH_XAPIAN', dependencies: libzim_dep) + + find_library_in_compiler = meson.version().version_compare('>=0.31.0') + rt_dep = dependency('rt', required:false) diff --git a/archivers/zim-tools/files/patch-src_zimcheck_meson.build b/archivers/zim-tools/files/patch-src_zimcheck_meson.build new file mode 100644 index 000000000000..e458ce1b224f --- /dev/null +++ b/archivers/zim-tools/files/patch-src_zimcheck_meson.build @@ -0,0 +1,30 @@ +--- src/zimcheck/meson.build.orig 2024-09-08 18:40:36 UTC ++++ src/zimcheck/meson.build +@@ -8,11 +8,13 @@ inc = include_directories(extra_include) + + inc = include_directories(extra_include) + +-if compiler.get_id() == 'gcc' and host_machine.system() == 'linux' +- # C++ std::thread is implemented using pthread on linux by gcc +- thread_dep = dependency('threads') +-else +- thread_dep = dependency('', required:false) ++zimcheck_deps = [libzim_dep, icu_dep, docopt_dep] ++ ++# C++ std::thread is implemented using pthread on Linux by GCC, and on FreeBSD ++# for both GCC and LLVM. ++if (host_machine.system() == 'linux' and compiler.get_id() == 'gcc') or \ ++ host_machine.system() == 'freebsd' ++ zimcheck_deps += dependency('threads') + endif + + executable('zimcheck', +@@ -23,7 +25,5 @@ executable('zimcheck', + '../tools.cpp', + '../metadata.cpp', + include_directories : inc, +- dependencies: [libzim_dep, icu_dep, thread_dep, docopt_dep], ++ dependencies: zimcheck_deps, + install: true) +- +- diff --git a/archivers/zim-tools/pkg-descr b/archivers/zim-tools/pkg-descr new file mode 100644 index 000000000000..212253ff31d1 --- /dev/null +++ b/archivers/zim-tools/pkg-descr @@ -0,0 +1,14 @@ +Various command line tools for handling ZIM files (see devel/libzim). + +Notable tools are: +- 'zimcheck' verifies that a given ZIM file is not corrupted. It provides many + features to secure that ZIM entries are proper and properly linked. +- 'zimdump' inspects or dumps (part of) a ZIM file. +- 'zimsplit' splits smartly a ZIM file in smaller chunks. +- 'zimwriterfs' creates ZIM files from a locally-stored directory containing + "self-sufficient" HTML content (with pictures, javascript and stylesheets). + The result will contain all the files of the local directory compressed and + merged in the ZIM file. The generated file can be opened with a ZIM reader; + Kiwix is one example, but there are others. + +A few other tools are provided as well. diff --git a/archivers/zim-tools/pkg-plist b/archivers/zim-tools/pkg-plist new file mode 100644 index 000000000000..72bed9935d5e --- /dev/null +++ b/archivers/zim-tools/pkg-plist @@ -0,0 +1,9 @@ +bin/zimbench +bin/zimcheck +bin/zimdiff +bin/zimdump +bin/zimpatch +bin/zimrecreate +bin/zimsearch +bin/zimsplit +bin/zimwriterfs