devel/libzim: update to 6.1.8

PR:		248055
This commit is contained in:
Steve Wills 2020-08-10 17:59:11 +00:00
parent 7e39765456
commit acaebbf9d7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=544638
8 changed files with 39 additions and 52 deletions

View file

@ -1,8 +1,7 @@
# $FreeBSD$
PORTNAME= libzim
PORTVERSION= 5.0.0
PORTREVISION= 4
PORTVERSION= 6.1.8
CATEGORIES= devel
MAINTAINER= swills@FreeBSD.org
@ -12,7 +11,8 @@ LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libicui18n.so:devel/icu \
libxapian.so:databases/xapian-core
libxapian.so:databases/xapian-core \
libzstd.so:archivers/zstd
USES= compiler:c++11-lang meson pkgconfig python:3.4+
USE_LDCONFIG= yes
@ -20,6 +20,6 @@ USE_GITHUB= yes
GH_ACCOUNT= openzim
BINARY_ALIAS= python3=python${PYTHON_VER} python3-config=python${PYTHON_VER}-config
PLIST_SUB= PORTVERSION=${PORTVERSION}
PLIST_SUB= PORTVERSION=${PORTVERSION} PORTMAJ=${PORTVERSION:C/\..*//}
.include <bsd.port.mk>

View file

@ -1,3 +1,3 @@
TIMESTAMP = 1559136305
SHA256 (openzim-libzim-5.0.0_GH0.tar.gz) = dbec0a36155315037a6496a9be5c7ede17171fcde47063c97ce937057b437fdb
SIZE (openzim-libzim-5.0.0_GH0.tar.gz) = 1655189
TIMESTAMP = 1595027958
SHA256 (openzim-libzim-6.1.8_GH0.tar.gz) = 1be605b1d22a0a7c225e80eab2cb1a249bf0f1b500ec8ed42e1091fc96c49fb3
SIZE (openzim-libzim-6.1.8_GH0.tar.gz) = 28589142

View file

@ -1,26 +1,23 @@
--- meson.build.orig 2019-04-15 13:10:25 UTC
--- meson.build.orig 2020-07-15 14:24:54 UTC
+++ meson.build
@@ -1,7 +1,7 @@
project('libzim', ['c', 'cpp'],
version : '4.0.7',
license : 'GPL2',
- default_options : ['c_std=c11', 'cpp_std=c++11', 'werror=true'])
+ default_options : ['c_std=c11', 'cpp_std=c++11'])
if build_machine.system() != 'windows'
@@ -7,7 +7,8 @@ if build_machine.system() != 'windows'
add_project_arguments('-D_LARGEFILE64_SOURCE=1', '-D_FILE_OFFSET_BITS=64', language: 'cpp')
@@ -22,6 +22,9 @@ else
endif
conf.set('ENABLE_USE_BUFFER_HEADER', get_option('USE_BUFFER_HEADER'))
+cc = meson.get_compiler('c')
+execinfo_dep = cc.find_library('execinfo', required : false)
+
static_linkage = get_option('static-linkage')
static_linkage = static_linkage or get_option('default_library')=='static'
-sizeof_off_t = meson.get_compiler('cpp').sizeof('off_t')
+cpp = meson.get_compiler('cpp')
+sizeof_off_t = cpp.sizeof('off_t')
@@ -73,3 +76,4 @@ pkg_mod.generate(libraries : libzim,
filebase : 'libzim',
description : 'A Library to zim.',
requires : pkg_requires)
conf = configuration_data()
conf.set('VERSION', '"@0@"'.format(meson.project_version()))
@@ -32,6 +33,10 @@ lzma_dep = dependency('liblzma', static:static_linkage
zstd_dep = dependency('libzstd', required:false, static:static_linkage)
conf.set('ENABLE_ZSTD', zstd_dep.found())
+
+if target_machine.system() == 'freebsd'
+ execinfo_dep = cpp.find_library('execinfo')
+endif
xapian_dep = dependency('xapian-core',
required:false,

View file

@ -1,11 +1,11 @@
--- src/buffer.cpp.orig 2018-09-04 16:23:32 UTC
--- src/buffer.cpp.orig 2020-07-15 14:24:54 UTC
+++ src/buffer.cpp
@@ -49,7 +49,7 @@ MMapBuffer::MMapBuffer(int fd, offset_t offset, zsize_
#if defined(__APPLE__)
@@ -48,6 +48,8 @@ MMapBuffer::MMapBuffer(int fd, offset_t offset, zsize_
_offset = offset-pa_offset;
#if defined(__APPLE__) || defined(__OpenBSD__)
#define MAP_FLAGS MAP_PRIVATE
#else
- #define MAP_FLAGS MAP_PRIVATE|MAP_POPULATE
+#elif defined(__FreeBSD__)
+ #define MAP_FLAGS MAP_PRIVATE|MAP_PREFAULT_READ
#else
#define MAP_FLAGS MAP_PRIVATE|MAP_POPULATE
#endif
#if !MMAP_SUPPORT_64
if(pa_offset.v >= INT32_MAX) {

View file

@ -1,10 +0,0 @@
--- src/file_compound.h.orig 2018-07-11 01:26:16.144860000 +0000
+++ src/file_compound.h 2018-07-11 01:26:30.132058000 +0000
@@ -25,6 +25,7 @@
#include <map>
#include <memory>
#include <cstdio>
+#include <time.h>
namespace zim {

View file

@ -1,11 +1,11 @@
--- src/fs_unix.cpp.orig 2018-12-04 23:56:33 UTC
--- src/fs_unix.cpp.orig 2020-07-15 14:24:54 UTC
+++ src/fs_unix.cpp
@@ -34,7 +34,7 @@ namespace unix {
zsize_t FD::readAt(char* dest, zsize_t size, offset_t offset) const
{
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(__FreeBSD__)
-#if defined(__APPLE__) || defined(__OpenBSD__)
+#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__)
# define PREAD pread
#else
# define PREAD pread64

View file

@ -1,10 +1,10 @@
--- src/meson.build.orig 2018-09-04 16:23:32 UTC
--- src/meson.build.orig 2020-07-15 14:24:54 UTC
+++ src/meson.build
@@ -58,6 +58,10 @@ if zlib_dep.found()
deps += [zlib_dep]
@@ -56,6 +56,10 @@ if zstd_dep.found()
deps += [zstd_dep]
endif
+if execinfo_dep.found()
+if target_machine.system() == 'freebsd'
+ deps += [execinfo_dep]
+endif
+

View file

@ -12,6 +12,6 @@ include/zim/writer/creator.h
include/zim/writer/url.h
include/zim/zim.h
lib/libzim.so
lib/libzim.so.5
lib/libzim.so.%%PORTMAJ%%
lib/libzim.so.%%PORTVERSION%%
libdata/pkgconfig/libzim.pc