Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified)) by mollari.NetBSD.org (Postfix) with ESMTPS id 137EA1A921F for ; Tue, 17 Nov 2020 01:55:07 +0000 (UTC) Received: by mail.netbsd.org (Postfix, from userid 605) id 68D9684DE2; Tue, 17 Nov 2020 01:55:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id A466984DE1 for ; Tue, 17 Nov 2020 01:55:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id Mxxs0HcAQOuz for ; Tue, 17 Nov 2020 01:55:04 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id DD28E84D22 for ; Tue, 17 Nov 2020 01:55:04 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id D6412FA9D; Tue, 17 Nov 2020 01:55:04 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_160557810441790" MIME-Version: 1.0 Date: Tue, 17 Nov 2020 01:55:04 +0000 From: "David H. Gutteridge" Subject: CVS commit: pkgsrc/misc/calibre To: pkgsrc-changes@NetBSD.org Reply-To: gutteridge@netbsd.org X-Mailer: log_accum Message-Id: <20201117015504.D6412FA9D@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_160557810441790 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: gutteridge Date: Tue Nov 17 01:55:04 UTC 2020 Modified Files: pkgsrc/misc/calibre: Makefile distinfo Added Files: pkgsrc/misc/calibre/patches: patch-src_calibre_utils_icu.c patch-src_calibre_utils_matcher.c Log Message: calibre: fix build with ICU 68 This package depends on ICU headers that now unconditionally expect C99 features, so it requires C99 just as ICU does. Patch around ICU API changes that caused related breakages. To generate a diff of this commit: cvs rdiff -u -r1.243 -r1.244 pkgsrc/misc/calibre/Makefile cvs rdiff -u -r1.105 -r1.106 pkgsrc/misc/calibre/distinfo cvs rdiff -u -r0 -r1.1 \ pkgsrc/misc/calibre/patches/patch-src_calibre_utils_icu.c \ pkgsrc/misc/calibre/patches/patch-src_calibre_utils_matcher.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_160557810441790 Content-Disposition: inline Content-Length: 6336 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/misc/calibre/Makefile diff -u pkgsrc/misc/calibre/Makefile:1.243 pkgsrc/misc/calibre/Makefile:1.244 --- pkgsrc/misc/calibre/Makefile:1.243 Thu Nov 5 09:08:39 2020 +++ pkgsrc/misc/calibre/Makefile Tue Nov 17 01:55:04 2020 @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.243 2020/11/05 09:08:39 ryoon Exp $ +# $NetBSD: Makefile,v 1.244 2020/11/17 01:55:04 gutteridge Exp $ DISTNAME= calibre-3.40.1 -PKGREVISION= 20 +PKGREVISION= 21 CATEGORIES= misc #MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=calibre/} MASTER_SITES= http://download.calibre-ebook.com/${PKGVERSION_NOREV}/ @@ -42,7 +42,7 @@ EXTRACT_USING= bsdtar PYTHON_VERSIONS_ACCEPTED= 27 # as of 3.16.0 -USE_LANGUAGES= c c++ +USE_LANGUAGES= c99 c++ USE_LIBTOOL= yes USE_TOOLS+= pkg-config pax PYSETUPOPTARGS= # empty @@ -128,7 +128,6 @@ _PYSETUPTOOLSINSTALLARGS= # empty # Get rid of --root=${DESTDIR}, use our own version from above instead. # because the setup.py is not the standard one and behaves differently. _PYSETUPINSTALLARGS= ${PYSETUPINSTALLARGS} ${PYSETUPOPTARGS} ${_PYSETUPTOOLSINSTALLARGS} -BUILDLINK_API_DEPENDS.podofo+= podofo>=0.8.2 .include "../../print/podofo/buildlink3.mk" BUILDLINK_API_DEPENDS.poppler+= poppler>=0.20.2 .include "../../print/poppler-includes/buildlink3.mk" Index: pkgsrc/misc/calibre/distinfo diff -u pkgsrc/misc/calibre/distinfo:1.105 pkgsrc/misc/calibre/distinfo:1.106 --- pkgsrc/misc/calibre/distinfo:1.105 Sun Jul 5 12:09:08 2020 +++ pkgsrc/misc/calibre/distinfo Tue Nov 17 01:55:04 2020 @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.105 2020/07/05 12:09:08 rhialto Exp $ +$NetBSD: distinfo,v 1.106 2020/11/17 01:55:04 gutteridge Exp $ SHA1 (calibre-3.40.1.tar.xz) = 12cea0bed963dde2b58c9cdd4c3c25c735d6d15a RMD160 (calibre-3.40.1.tar.xz) = 72bf801e4164dcebec22ba36162fe034c9edad54 @@ -9,3 +9,5 @@ SHA1 (patch-setup_build__environment.py) SHA1 (patch-src_calibre_headless_fontconfig_database.cpp) = d794a9f1c94c85d3406384bf25ade4be8d2f8a1c SHA1 (patch-src_calibre_headless_headless__integration.cpp) = 62ab6f5aaf6bd8bcbb875ab56eac1a474d8b446b SHA1 (patch-src_calibre_linux.py) = 16c3122a612ec9996f774c5c2c9d40a475723662 +SHA1 (patch-src_calibre_utils_icu.c) = fd0172000b9ab5d52730f9e4a5c8cc6c2253d69b +SHA1 (patch-src_calibre_utils_matcher.c) = 1041dc748cec86c18f2438d284608f42f66fc282 Added files: Index: pkgsrc/misc/calibre/patches/patch-src_calibre_utils_icu.c diff -u /dev/null pkgsrc/misc/calibre/patches/patch-src_calibre_utils_icu.c:1.1 --- /dev/null Tue Nov 17 01:55:04 2020 +++ pkgsrc/misc/calibre/patches/patch-src_calibre_utils_icu.c Tue Nov 17 01:55:04 2020 @@ -0,0 +1,23 @@ +$NetBSD: patch-src_calibre_utils_icu.c,v 1.1 2020/11/17 01:55:04 gutteridge Exp $ + +Fix build with ICU 68. + +--- src/calibre/utils/icu.c.orig 2019-03-08 06:09:34.000000000 +0000 ++++ src/calibre/utils/icu.c +@@ -243,14 +243,14 @@ icu_Collator_contains(icu_Collator *self + + a = python_to_icu(a_, &asz); + if (a == NULL) goto end; +- if (asz == 0) { found = TRUE; goto end; } ++ if (asz == 0) { found = true; goto end; } + b = python_to_icu(b_, &bsz); + if (b == NULL) goto end; + + search = usearch_openFromCollator(a, asz, b, bsz, self->collator, NULL, &status); + if (U_SUCCESS(status)) { + pos = usearch_first(search, &status); +- if (pos != USEARCH_DONE) found = TRUE; ++ if (pos != USEARCH_DONE) found = true; + } + end: + if (search != NULL) usearch_close(search); Index: pkgsrc/misc/calibre/patches/patch-src_calibre_utils_matcher.c diff -u /dev/null pkgsrc/misc/calibre/patches/patch-src_calibre_utils_matcher.c:1.1 --- /dev/null Tue Nov 17 01:55:04 2020 +++ pkgsrc/misc/calibre/patches/patch-src_calibre_utils_matcher.c Tue Nov 17 01:55:04 2020 @@ -0,0 +1,73 @@ +$NetBSD: patch-src_calibre_utils_matcher.c,v 1.1 2020/11/17 01:55:04 gutteridge Exp $ + +Fix build with ICU 68. + +--- src/calibre/utils/matcher.c.orig 2019-03-08 06:09:34.000000000 +0000 ++++ src/calibre/utils/matcher.c +@@ -15,9 +15,6 @@ + #define inline + #endif + +-typedef unsigned char bool; +-#define TRUE 1 +-#define FALSE 0 + #define MAX(x, y) ((x > y) ? x : y) + #define nullfree(x) if(x != NULL) free(x); x = NULL; + +@@ -240,10 +237,10 @@ static bool create_searches(UStringSearc + U16_FWD_1(needle, i, needle_len); + if (pos == i) break; + searches[pos] = usearch_openFromCollator(needle + pos, i - pos, haystack, haystack_len, collator, NULL, &status); +- if (U_FAILURE(status)) { PyErr_SetString(PyExc_ValueError, u_errorName(status)); searches[pos] = NULL; return FALSE; } ++ if (U_FAILURE(status)) { PyErr_SetString(PyExc_ValueError, u_errorName(status)); searches[pos] = NULL; return false; } + } + +- return TRUE; ++ return true; + } + + static void free_searches(UStringSearch **searches, int32_t count) { +@@ -259,14 +256,14 @@ static bool match(UChar **items, int32_t + int32_t i = 0, maxhl = 0; + int32_t r = 0, *positions = NULL; + MatchInfo *matches = NULL; +- bool ok = FALSE; ++ bool ok = false; + MemoryItem ***memo = NULL; + int32_t needle_len = u_strlen(needle); + UStringSearch **searches = NULL; + + if (needle_len <= 0 || item_count <= 0) { + for (i = 0; i < (int32_t)item_count; i++) match_results[i].score = 0.0; +- ok = TRUE; ++ ok = true; + goto end; + } + +@@ -289,7 +286,7 @@ static bool match(UChar **items, int32_t + + if (maxhl <= 0) { + for (i = 0; i < (int32_t)item_count; i++) match_results[i].score = 0.0; +- ok = TRUE; ++ ok = true; + goto end; + } + +@@ -308,7 +305,7 @@ static bool match(UChar **items, int32_t + convert_positions(positions, final_positions + i * needle_char_len, matches[i].haystack, needle_char_len, needle_len, match_results[i].score); + } + +- ok = TRUE; ++ ok = true; + end: + nullfree(positions); + nullfree(stack.items); +@@ -401,7 +398,7 @@ static PyObject * + Matcher_calculate_scores(Matcher *self, PyObject *args) { + int32_t *final_positions = NULL, *p; + Match *matches = NULL; +- bool ok = FALSE; ++ bool ok = false; + uint32_t i = 0, needle_char_len = 0, j = 0; + PyObject *items = NULL, *score = NULL, *positions = NULL, *pneedle = NULL; + UChar *needle = NULL; --_----------=_160557810441790--