From nobody Wed Jul 24 19:06:42 2024 X-Original-To: dev-commits-ports-main@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 4WTk5b0p1Cz5QFgZ; Wed, 24 Jul 2024 19:06:43 +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 4WTk5b07X3z4NFy; Wed, 24 Jul 2024 19:06:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721848003; 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=W/v4/W3uGVcygvI6zOaLdwJOXrRo66z4Y9qXYWHmyrQ=; b=S9ZR+JFMOBlNHYMWlivn4MplgoDXCSUMEiTikn/EhNnOsVxeCCd3zW2eVIs8YUUz96BQDl zK1qZeorZ1+77th6J4boj0DmMU0I4CqAEk72Ads1TkqoKbzR2obKyP+KAaD7iLvT2XmfPx P0XhTDfMXIVhVoCIpI5357MqkICiPZOI5GUwfWjknUUuISYNfRYMoMQg0QsJCvE8sdIUf1 6hzjGX3ijDbQZ80fy/AAQN6Y0v5pCTws3A5lvETzz12U56b+wQjoWrEiTt4ccUJeIQmbKY c4cFP/mYbgxchTRlK6+CLwp9EnvGytRB2y3hWU3msnzBQKmsnW307Au9ALj8lw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721848003; a=rsa-sha256; cv=none; b=tdCw5rLDjRUniOq5RKBHFNVmq2oWqE+ZwbY6f7kbhcX5B6dpVnjVGCafHjsEWprBFAl/lc ZPQKs2sV4jMxCZEf/jX9hNL9maT/9u0r6dG8PQcU9lDOzLhhHDEaWVT2i4532V2Y+8jlC/ o3MDuUoA0E2W3gyFLS+v8WU/GWtWzhypWuVMiPV+0drEyKEACLFN9KWR185ThwtrFokE/W 3B1nW+PNmPG4Nvi/E1FfhL75D3p/2oBYyWjSVthDocGU3ucGDzg7kZp7Q9P/YBbWcEbo6c 2KWs2EBsmh+50w1nKzC1QddgTRmOgFQb+EaVuYZTAAamOp52TvK5r6fzmVFf5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721848003; 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=W/v4/W3uGVcygvI6zOaLdwJOXrRo66z4Y9qXYWHmyrQ=; b=J/z5inrQRFKsubtZyZ7MRAjHUPPULPPyktL3NqQcwZyzzkokmZ7shesG+jt5ax9JOlPix/ ER2wsluYXClVwU8dQhjKXK45DX16MDX3y8eBdb9xGmj6yoHrV35/m5/CLQvjZoNdBwCyQT y8oWiRGSHLnsV5jHL4+QMJ05RkLth9vN2Yz5ag2yUTfw7dRvkA/2miQG1uze4YCXSQAlFm 3ODTkHvDUr2qzAqa0manhbXEqucvij2e7UR7QjPgKUhL9KRA/1uafVFRiN27w+7dfZXF40 sqeeRzCQjpFIfE5Q4cbnwchnqborlr8WrquL6nSNA3Wy2lC1nr8iquuY1HMbIA== 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 4WTk5Z5mClzNRH; Wed, 24 Jul 2024 19:06:42 +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 46OJ6gLd044302; Wed, 24 Jul 2024 19:06:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46OJ6g7C044299; Wed, 24 Jul 2024 19:06:42 GMT (envelope-from git) Date: Wed, 24 Jul 2024 19:06:42 GMT Message-Id: <202407241906.46OJ6g7C044299@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Daniel Engberg Subject: git: 7bd1a94b2b90 - main - graphics/inkscape: Fix build with libxml2 2.13 and import backports in tree List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: diizzy X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7bd1a94b2b908f465d83f6b7660ba86e1ce34b47 Auto-Submitted: auto-generated The branch main has been updated by diizzy: URL: https://cgit.FreeBSD.org/ports/commit/?id=7bd1a94b2b908f465d83f6b7660ba86e1ce34b47 commit 7bd1a94b2b908f465d83f6b7660ba86e1ce34b47 Author: Daniel Engberg AuthorDate: 2024-07-21 09:22:17 +0000 Commit: Daniel Engberg CommitDate: 2024-07-24 19:06:37 +0000 graphics/inkscape: Fix build with libxml2 2.13 and import backports in tree Backport upstream patch: 6bbd3647c4d6aab425e53cb4b7d3f33a98e45e6f While at it also keep previous backport locally in tree to avoid metadata changes Reference: https://gitlab.com/inkscape/inkscape/-/commit/6bbd3647c4d6aab425e53cb4b7d3f33a98e45e6f PR: 280162 Approved by: portmgr (maintainer timeout, 2+ weeks) --- graphics/inkscape/Makefile | 3 - graphics/inkscape/distinfo | 4 +- ...01-git-6bbd3647c4d6aab425e53cb4b7d3f33a98e45e6f | 36 +++++ ...02-git-f0355a6341aceee93ce4d4d70cd9ec3a44081c38 | 167 +++++++++++++++++++++ 4 files changed, 204 insertions(+), 6 deletions(-) diff --git a/graphics/inkscape/Makefile b/graphics/inkscape/Makefile index d255c8256e78..2b827fd36aeb 100644 --- a/graphics/inkscape/Makefile +++ b/graphics/inkscape/Makefile @@ -4,9 +4,6 @@ PORTREVISION= 2 CATEGORIES= graphics gnome MASTER_SITES= https://media.inkscape.org/dl/resources/file/ -PATCH_SITES= https://gitlab.com/${PORTNAME}/${PORTNAME}/-/commit/ -PATCHFILES+= f0355a6341aceee93ce4d4d70cd9ec3a44081c38.patch:-p1 # https://gitlab.com/inkscape/inkscape/-/merge_requests/5650 - MAINTAINER= gnome@FreeBSD.org COMMENT= Full featured open source SVG editor WWW= https://inkscape.org diff --git a/graphics/inkscape/distinfo b/graphics/inkscape/distinfo index 33bd1644878e..213e14184834 100644 --- a/graphics/inkscape/distinfo +++ b/graphics/inkscape/distinfo @@ -1,5 +1,3 @@ -TIMESTAMP = 1704200700 +TIMESTAMP = 1720270922 SHA256 (inkscape-1.3.2.tar.xz) = dbd1844dc443fe5e10d3e9a887144e5fb7223852fff191cfb5ef7adeab0e086b SIZE (inkscape-1.3.2.tar.xz) = 44720944 -SHA256 (f0355a6341aceee93ce4d4d70cd9ec3a44081c38.patch) = 880bc73dfa8989e743d26c600b9e27a2df961823021c4637639da1083626c0e8 -SIZE (f0355a6341aceee93ce4d4d70cd9ec3a44081c38.patch) = 7700 diff --git a/graphics/inkscape/files/patch-01-git-6bbd3647c4d6aab425e53cb4b7d3f33a98e45e6f b/graphics/inkscape/files/patch-01-git-6bbd3647c4d6aab425e53cb4b7d3f33a98e45e6f new file mode 100644 index 000000000000..aa377cc28e57 --- /dev/null +++ b/graphics/inkscape/files/patch-01-git-6bbd3647c4d6aab425e53cb4b7d3f33a98e45e6f @@ -0,0 +1,36 @@ +From 6bbd3647c4d6aab425e53cb4b7d3f33a98e45e6f Mon Sep 17 00:00:00 2001 +From: Christian Hesse +Date: Fri, 17 Nov 2023 22:30:42 +0100 +Subject: [PATCH] include missing header file +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This fixes build error: +``` +/build/inkscape/src/inkscape/src/object/uri.cpp: In constructor ‘Inkscape::URI::URI(const gchar*, const char*)’: +/build/inkscape/src/inkscape/src/object/uri.cpp:86:9: error: ‘xmlFree’ was not declared in this scope; did you mean ‘xmlFreeURI’? + 86 | xmlFree(full); +``` + + +(cherry picked from commit 694d8ae43d06efff21adebf377ce614d660b24cd) +--- + src/object/uri.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/object/uri.h b/src/object/uri.h +index 381adec58cf..d5b211fe2b2 100644 +--- src/object/uri.h ++++ src/object/uri.h +@@ -13,6 +13,7 @@ + #define INKSCAPE_URI_H + + #include ++#include + #include + #include + +-- +GitLab + diff --git a/graphics/inkscape/files/patch-02-git-f0355a6341aceee93ce4d4d70cd9ec3a44081c38 b/graphics/inkscape/files/patch-02-git-f0355a6341aceee93ce4d4d70cd9ec3a44081c38 new file mode 100644 index 000000000000..c525686bc3be --- /dev/null +++ b/graphics/inkscape/files/patch-02-git-f0355a6341aceee93ce4d4d70cd9ec3a44081c38 @@ -0,0 +1,167 @@ +From f0355a6341aceee93ce4d4d70cd9ec3a44081c38 Mon Sep 17 00:00:00 2001 +From: Rafael Siejakowski +Date: Sun, 20 Aug 2023 18:15:19 +0200 +Subject: [PATCH] Fix build on FreeBSD: rename two helper functions + +The functions roundup() and rounddown() are renamed to round_up() and +round_down(), respectively. This prevents a name clash with the macros +roundup and rounddown defined in sys/param.h which for some reason gets +pulled in on FreeBSD. + +Fixes https://gitlab.com/inkscape/inbox/-/issues/9062 +--- + src/display/drawing-pattern.cpp | 14 +++++++------- + src/helper/geom.h | 4 ++-- + src/helper/mathfns.h | 6 +++--- + src/ui/widget/canvas/pixelstreamer.cpp | 2 +- + src/util/pool.cpp | 6 +++--- + 5 files changed, 16 insertions(+), 16 deletions(-) + +diff --git a/src/display/drawing-pattern.cpp b/src/display/drawing-pattern.cpp +index 6b30c968ded..34df2f873b1 100644 +--- src/display/drawing-pattern.cpp ++++ src/display/drawing-pattern.cpp +@@ -89,7 +89,7 @@ cairo_pattern_t *DrawingPattern::renderPattern(RenderContext &rc, Geom::IntRect + if (rect.dimensions()[i] >= _pattern_resolution[i]) { + rect[i] = {0, _pattern_resolution[i]}; + } else { +- rect[i] -= Util::rounddown(rect[i].min(), _pattern_resolution[i]); ++ rect[i] -= Util::round_down(rect[i].min(), _pattern_resolution[i]); + } + } + return rect; +@@ -101,7 +101,7 @@ cairo_pattern_t *DrawingPattern::renderPattern(RenderContext &rc, Geom::IntRect + int const period = _pattern_resolution[i]; + if (a[i].extent() >= period) return true; + if (b[i].extent() > a[i].extent()) return false; +- return Util::rounddown(b[i].min() - a[i].min(), period) >= b[i].max() - a[i].max(); ++ return Util::round_down(b[i].min() - a[i].min(), period) >= b[i].max() - a[i].max(); + }; + return check(0) && check(1); + }; +@@ -112,7 +112,7 @@ cairo_pattern_t *DrawingPattern::renderPattern(RenderContext &rc, Geom::IntRect + int const period = _pattern_resolution[i]; + if (a[i].extent() >= period) return true; + if (b[i].extent() >= period) return true; +- return Util::rounddown(b[i].max() - a[i].min(), period) >= b[i].min() - a[i].max(); ++ return Util::round_down(b[i].max() - a[i].min(), period) >= b[i].min() - a[i].max(); + }; + return check(0) && check(1); + }; +@@ -121,8 +121,8 @@ cairo_pattern_t *DrawingPattern::renderPattern(RenderContext &rc, Geom::IntRect + auto overlapping_translates = [&, this] (Geom::IntRect const &a, Geom::IntRect const &b) { + Geom::IntPoint min, max; + for (int i = 0; i < 2; i++) { +- min[i] = Util::roundup (b[i].min() - a[i].max() + 1, _pattern_resolution[i]); +- max[i] = Util::rounddown(b[i].max() - a[i].min() - 1, _pattern_resolution[i]); ++ min[i] = Util::round_up (b[i].min() - a[i].max() + 1, _pattern_resolution[i]); ++ max[i] = Util::round_down(b[i].max() - a[i].min() - 1, _pattern_resolution[i]); + } + return std::make_pair(min, max); + }; +@@ -165,7 +165,7 @@ cairo_pattern_t *DrawingPattern::renderPattern(RenderContext &rc, Geom::IntRect + + for (auto it = surfaces.begin(); it != surfaces.end(); ) { + if (wrapped_touches(expanded, it->rect)) { +- expanded.unionWith(it->rect + rounddown(expanded.max() - it->rect.min(), _pattern_resolution)); ++ expanded.unionWith(it->rect + round_down(expanded.max() - it->rect.min(), _pattern_resolution)); + merged.emplace_back(std::move(*it)); + *it = std::move(surfaces.back()); + surfaces.pop_back(); +@@ -259,7 +259,7 @@ cairo_pattern_t *DrawingPattern::renderPattern(RenderContext &rc, Geom::IntRect + + // Create and return pattern. + auto cp = cairo_pattern_create_for_surface(surface->surface->cobj()); +- auto const shift = surface->rect.min() + rounddown(area_orig.min() - surface->rect.min(), _pattern_resolution); ++ auto const shift = surface->rect.min() + round_down(area_orig.min() - surface->rect.min(), _pattern_resolution); + ink_cairo_pattern_set_matrix(cp, pattern_to_tile * Geom::Translate(-shift)); + cairo_pattern_set_extend(cp, CAIRO_EXTEND_REPEAT); + if (rc.antialiasing_override && rc.antialiasing_override.value() == Antialiasing::None) { +diff --git a/src/helper/geom.h b/src/helper/geom.h +index 59542e7d44f..e8b1d1f46ee 100644 +--- src/helper/geom.h ++++ src/helper/geom.h +@@ -54,10 +54,10 @@ inline Geom::Coord triangle_area(Geom::Point const &p1, Geom::Point const &p2, G + return p1[X] * p2[Y] + p1[Y] * p3[X] + p2[X] * p3[Y] - p2[Y] * p3[X] - p1[Y] * p2[X] - p1[X] * p3[Y]; + } + +-inline auto rounddown(Geom::IntPoint const &a, Geom::IntPoint const &b) ++inline auto round_down(Geom::IntPoint const &a, Geom::IntPoint const &b) + { + using namespace Inkscape::Util; +- return Geom::IntPoint(rounddown(a.x(), b.x()), rounddown(a.y(), b.y())); ++ return Geom::IntPoint(round_down(a.x(), b.x()), round_down(a.y(), b.y())); + } + + inline auto expandedBy(Geom::IntRect rect, int amount) +diff --git a/src/helper/mathfns.h b/src/helper/mathfns.h +index 6f466fb2c33..730b6ba2153 100644 +--- src/helper/mathfns.h ++++ src/helper/mathfns.h +@@ -79,16 +79,16 @@ T constexpr safemod(T a, T b) + + /// Returns \a a rounded down to the nearest multiple of \a b, assuming b >= 1. + template ::value, bool>::type = true> +-T constexpr rounddown(T a, T b) ++T constexpr round_down(T a, T b) + { + return a - safemod(a, b); + } + + /// Returns \a a rounded up to the nearest multiple of \a b, assuming b >= 1. + template ::value, bool>::type = true> +-T constexpr roundup(T a, T b) ++T constexpr round_up(T a, T b) + { +- return rounddown(a - 1, b) + b; ++ return round_down(a - 1, b) + b; + } + + /** +diff --git a/src/ui/widget/canvas/pixelstreamer.cpp b/src/ui/widget/canvas/pixelstreamer.cpp +index 74d557b37b1..ddafee96bac 100644 +--- src/ui/widget/canvas/pixelstreamer.cpp ++++ src/ui/widget/canvas/pixelstreamer.cpp +@@ -99,7 +99,7 @@ public: + // Calculate image properties required by cairo. + int stride = cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, dimensions.x()); + int size = stride * dimensions.y(); +- int sizeup = Util::roundup(size, 64); ++ int sizeup = Util::round_up(size, 64); + assert(sizeup < bufsize); + + // Attempt to advance buffers in states 3 or 4 towards 5, if allowed. +diff --git a/src/util/pool.cpp b/src/util/pool.cpp +index 455366b9f1b..89fe77ae023 100644 +--- src/util/pool.cpp ++++ src/util/pool.cpp +@@ -8,7 +8,7 @@ + namespace Inkscape::Util { + + // Round up x to the next multiple of m. +-static std::byte *roundup(std::byte *x, std::size_t m) ++static std::byte *round_up(std::byte *x, std::size_t m) + { + auto y = reinterpret_cast(x); + y = ((y - 1) / m + 1) * m; +@@ -17,7 +17,7 @@ static std::byte *roundup(std::byte *x, std::size_t m) + + std::byte *Pool::allocate(std::size_t size, std::size_t alignment) + { +- auto a = roundup(cur, alignment); ++ auto a = round_up(cur, alignment); + auto b = a + size; + + if (b <= end) { +@@ -33,7 +33,7 @@ std::byte *Pool::allocate(std::size_t size, std::size_t alignment) + resetblock(); + nextsize = cursize * 3 / 2; + +- a = roundup(cur, alignment); ++ a = round_up(cur, alignment); + b = a + size; + + assert(b <= end); +-- +GitLab +