From nobody Fri Jan 10 13:21:20 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 4YV2Nd1lb3z5kK3V; Fri, 10 Jan 2025 13:21:21 +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 4YV2Nd0VP2z4j44; Fri, 10 Jan 2025 13:21:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736515281; 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=n6XZquiToFaaBEg6SOZLYF0GH9mT/VLUvm+vC0N9HFw=; b=OxgQFYBhtvlQHLo165u9ODvVieipDKCxluwkgVH3ZfpXZJ0NZ2Q95mMUlEBoFnDADtBt6Z 5GEktBA96pgjpK1f6nFCHxqU7K3tZ4wdcALUWs6hcuu1+3x+RBrg7v1/SDJNLbflr3cY+G 6j5U8o8pFbLfaiDJGpOrnfhKta3ydSQnMANNjsZul7GqE2nfai9StVCTiOupwIpIxvLWaO /lRnaN+cCJCCCA8fRIG1vBwlpjBnI617m3fjjHVZE4D93OThKcfP0kDyrEobcwyLEQhO3T dmunksy9/G92NtZa8ugVrT+6h4EuJi3DH4m3BT+sEUCvx36q6LHAbgQ2fdfHCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736515281; 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=n6XZquiToFaaBEg6SOZLYF0GH9mT/VLUvm+vC0N9HFw=; b=XuMUFurAeEbpvz1kdWtM9ao2/9nwe6IJ5L7/CkG1+lMNiWLOyXG69r4UfjmsOcmpgGXDC5 WVENP4+f1TSjIt2KXiyyV5rhhn2mlxFIi5pB0zYyxUv7g06ntPPVjz4jMgNolQCAaZTXqP 9AwlmtMXUONjwxBFlinecLV4FqhGS0NX1PihLxzViniLLSurq168faJcLqoEDz6b223AaB /HyCKGo39mwFLFB58g5Q6TKQxCSvF5Bu3ODPUOjDwBqvfxMsG7pYf7KsK3sFNKZ9hvoZK2 EPFJoGkQxqjj0gHowr9mnqStOpawjqJRtDZctVf64E6feo+GpeOEhiVQHT1fCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736515281; a=rsa-sha256; cv=none; b=oZQqmasLVKZNdn2LpfBL1ceuY5FbVa45xVXBSYr+cgdriTjpusjfIb7PknxxhHHb5H0SPs 62lYMHtvtp1mymWE+vaAQk7HHB4PnfUVAcgDWHVQ9jnG6cB7xMPRZozPdQpC0SFN8fPBBM XDzwz/BfvQS9Ctai22oRPGIkgEyHJczngZM6R9BIG9Tq2uQ3EUUWTlVMY8YdaG0meUW0DT 7I57W6oWUWyw13i+9Nenbq2ccecnlwaI5+HFchf94vdmfnyyfiDEqtWGlHQA2dPSH8nDbB 185GUu1/KiLwW3MmXsOVgYJqBIZN0Qrob3L79ctlVDt2jsYhkXnzk34skbfBtA== 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 4YV2Nd04r9z1CGV; Fri, 10 Jan 2025 13:21:21 +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 50ADLKHh063455; Fri, 10 Jan 2025 13:21:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50ADLKPJ063452; Fri, 10 Jan 2025 13:21:20 GMT (envelope-from git) Date: Fri, 10 Jan 2025 13:21:20 GMT Message-Id: <202501101321.50ADLKPJ063452@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: 70fd76ed56d1 - main - devel/libkiwix13: New port for libkiwix 13 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: 70fd76ed56d1fa6ddb86c8dfd70c271adfea7c8b Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/ports/commit/?id=70fd76ed56d1fa6ddb86c8dfd70c271adfea7c8b commit 70fd76ed56d1fa6ddb86c8dfd70c271adfea7c8b Author: Olivier Certner AuthorDate: 2025-01-09 15:27:50 +0000 Commit: Olivier Certner CommitDate: 2025-01-10 13:02:20 +0000 devel/libkiwix13: New port for libkiwix 13 This port is assumed to be temporary, as the reason for its creation is that kiwix-tools 3.7.0, the latest released version at time of this writing, relies on libkiwix with major version 13, whereas devel/libkiwix was updated too soon to 14. An alternative would be to bump PORTEPOCH for libkiwix, but such bumps are forever and should be reserved for changes in version numbering as much as possible. Suggested by: jrtc27, jrm Reviewed by: jrm Fixes: dafb538b3fd6 ("devel/libkiwix: Update to 14.0.0") MFH: 2025Q1 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48395 --- devel/Makefile | 1 + devel/libkiwix/Makefile | 2 ++ devel/libkiwix13/Makefile | 42 ++++++++++++++++++++++++++ devel/libkiwix13/distinfo | 5 +++ devel/libkiwix13/files/patch-meson.build | 52 ++++++++++++++++++++++++++++++++ devel/libkiwix13/pkg-descr | 7 +++++ devel/libkiwix13/pkg-plist | 21 +++++++++++++ 7 files changed, 130 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index 6e64711b7d45..dc025c588a24 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -1346,6 +1346,7 @@ SUBDIR += libjodycode SUBDIR += libk8055 SUBDIR += libkiwix + SUBDIR += libkiwix13 SUBDIR += libklel SUBDIR += liblangtag SUBDIR += liblnk diff --git a/devel/libkiwix/Makefile b/devel/libkiwix/Makefile index a6a5e2a946ad..c962752a54c8 100644 --- a/devel/libkiwix/Makefile +++ b/devel/libkiwix/Makefile @@ -27,6 +27,8 @@ GH_TUPLE= kiwix:${PORTNAME}:${PORTVERSION}:DEFAULT \ kainjow:Mustache:v4.1:mustache USE_LDCONFIG= yes +CONFLICTS_INSTALL= libkiwix13 + SHEBANG_FILES= scripts/format_code.sh SHEBANG_REGEX= ./scripts/kiwix.*[^.]. diff --git a/devel/libkiwix13/Makefile b/devel/libkiwix13/Makefile new file mode 100644 index 000000000000..3620a09e76f1 --- /dev/null +++ b/devel/libkiwix13/Makefile @@ -0,0 +1,42 @@ +PORTNAME= libkiwix +DISTVERSION= 13.1.0 +CATEGORIES= devel +PKGNAMESUFFIX= 13 + +MAINTAINER= olce.freebsd.ports@certner.fr +COMMENT= Common code base for all Kiwix ports, version 13 +WWW= https://www.kiwix.org/ + +LICENSE= GPLv3+ +LICENSE_FILE= ${WRKSRC}/COPYING + +BUILD_DEPENDS= bash:shells/bash +LIB_DEPENDS= libzim.so:devel/libzim \ + libpugixml.so:textproc/pugixml \ + libaria2.so:www/aria2 \ + libicui18n.so:devel/icu \ + libicuuc.so:devel/icu \ + libxapian.so:databases/xapian-core \ + libctpp2.so:textproc/ctpp2 \ + libcurl.so:ftp/curl \ + libmicrohttpd.so:www/libmicrohttpd + +USES= compiler:c++17-lang meson pkgconfig python shebangfix +USE_GITHUB= yes +GH_ACCOUNT= kiwix +GH_TUPLE= kiwix:${PORTNAME}:${PORTVERSION}:DEFAULT \ + kainjow:Mustache:v4.1:mustache +USE_LDCONFIG= yes + +CONFLICTS_INSTALL= libkiwix + +SHEBANG_FILES= scripts/format_code.sh +SHEBANG_REGEX= ./scripts/kiwix.*[^.]. + +CPPFLAGS+= -I${WRKSRC_mustache} +CXXFLAGS+= -I${WRKSRC_mustache} +LDFLAGS+= -lz + +PLIST_SUB= PORTVERSION=${PORTVERSION} PORTMAJ=${PORTVERSION:C/\..*//} + +.include diff --git a/devel/libkiwix13/distinfo b/devel/libkiwix13/distinfo new file mode 100644 index 000000000000..7a1264477c3c --- /dev/null +++ b/devel/libkiwix13/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1716196790 +SHA256 (kiwix-libkiwix-13.1.0_GH0.tar.gz) = 04d93f66b939f937df2c941af517966128d4c9872b707f9ed192177fe51364d3 +SIZE (kiwix-libkiwix-13.1.0_GH0.tar.gz) = 1136812 +SHA256 (kainjow-Mustache-v4.1_GH0.tar.gz) = acd66359feb4318b421f9574cfc5a511133a77d916d0b13c7caa3783c0bfe167 +SIZE (kainjow-Mustache-v4.1_GH0.tar.gz) = 98905 diff --git a/devel/libkiwix13/files/patch-meson.build b/devel/libkiwix13/files/patch-meson.build new file mode 100644 index 000000000000..d8e45a01b520 --- /dev/null +++ b/devel/libkiwix13/files/patch-meson.build @@ -0,0 +1,52 @@ +Has been upstreamed via https://github.com/kiwix/libkiwix/pull/1173 and will be +included in next release (14.1.0), so remove this patch at next update. + +--- meson.build.orig 2024-10-09 17:18:52 UTC ++++ meson.build +@@ -4,14 +4,40 @@ compiler = meson.get_compiler('cpp') + default_options : ['c_std=c11', 'cpp_std=c++17', 'werror=true']) + + compiler = meson.get_compiler('cpp') +- + static_deps = get_option('static-linkage') or get_option('default_library') == 'static' ++extra_libs = [] + +-# See https://github.com/kiwix/libkiwix/issues/371 +-if ['arm', 'mips', 'm68k', 'ppc', 'sh4'].contains(host_machine.cpu_family()) +- extra_libs = ['-latomic'] +-else +- extra_libs = [] ++# Atomics as compiled by GCC or clang can lead to external references to ++# functions depending on the type size and the platform. LLVM provides them in ++# 'libcompiler_rt', which clang normally automatically links in, while GNU ++# provides them in 'libatomic', which GCC *does not* link in automatically (but ++# this is probably going to change, see ++# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81358). Regardless of the setup ++# of the compiler driver itself (GCC or clang), we can thus assume that if some ++# atomic references can't be resolved, then 'libatomic' is missing. ++atomics_program = ''' ++#include ++#include ++ ++using namespace std; ++ ++int main() { ++ volatile atomic_bool a_b = true; ++ volatile atomic_ullong a_ull = -1; ++ // Next two lines are to cover atomic from 'httplib.h'. ++ volatile atomic a_u32 = -1; ++ volatile atomic a_u64 = -1; ++ ++ return atomic_load(&a_b) == false && atomic_load(&a_ull) == 0 && ++ atomic_load(&a_u32) == 0 && atomic_load(&a_u64) == 0; ++} ++''' ++if not compiler.links(atomics_program, ++ name: 'compiler driver readily supports atomics') ++ libatomic = compiler.find_library('atomic') ++ compiler.links(atomics_program, name: 'atomics work with libatomic', ++ dependencies: libatomic, required: true) ++ extra_libs += ['-latomic'] + endif + + if (compiler.get_id() == 'gcc' and build_machine.system() == 'linux') or host_machine.system() == 'freebsd' diff --git a/devel/libkiwix13/pkg-descr b/devel/libkiwix13/pkg-descr new file mode 100644 index 000000000000..d774f60c0660 --- /dev/null +++ b/devel/libkiwix13/pkg-descr @@ -0,0 +1,7 @@ +Kiwix is an offline reader for web content archived in ZIM format. It is +particularly tailored towards Wikipedia and other wikis. + +The Kiwix library contains the code shared by Kiwix ports on all supported +platforms. + +This is version 13, which is required by kiwix-tools 3.7. diff --git a/devel/libkiwix13/pkg-plist b/devel/libkiwix13/pkg-plist new file mode 100644 index 000000000000..7b2d35d0d068 --- /dev/null +++ b/devel/libkiwix13/pkg-plist @@ -0,0 +1,21 @@ +bin/kiwix-compile-i18n +bin/kiwix-compile-resources +include/kiwix/book.h +include/kiwix/bookmark.h +include/kiwix/common.h +include/kiwix/downloader.h +include/kiwix/kiwix_config.h +include/kiwix/kiwixserve.h +include/kiwix/library.h +include/kiwix/manager.h +include/kiwix/name_mapper.h +include/kiwix/search_renderer.h +include/kiwix/server.h +include/kiwix/tools.h +include/kiwix/version.h +lib/libkiwix.so +lib/libkiwix.so.%%PORTMAJ%% +lib/libkiwix.so.%%PORTVERSION%% +libdata/pkgconfig/kiwix.pc +share/man/man1/kiwix-compile-i18n.1.gz +share/man/man1/kiwix-compile-resources.1.gz