-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6ffc6e2
commit 85ea466
Showing
3 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lib2geom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Patch-Source: https://gitlab.com/inkscape/lib2geom/-/commit/9b1ff56ae90db7fbbceebaac3ccf521f6ceb32f4 | ||
needed since poppler is c++20 now | ||
-- | ||
From 9b1ff56ae90db7fbbceebaac3ccf521f6ceb32f4 Mon Sep 17 00:00:00 2001 | ||
From: PBS <pbs3141@gmail.com> | ||
Date: Sun, 21 Apr 2024 11:58:04 +0900 | ||
Subject: [PATCH] Avoid std::shared_ptr<T>::unique() | ||
|
||
Replace unique() with use_count() == 1, since unique() was removed in | ||
C++20. | ||
|
||
Fixes https://gitlab.com/inkscape/lib2geom/-/issues/74 | ||
--- | ||
include/2geom/path.h | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/include/2geom/path.h b/include/2geom/path.h | ||
index f797dabf..25c8e5ce 100644 | ||
--- a/include/2geom/path.h | ||
+++ b/include/2geom/path.h | ||
@@ -843,7 +843,7 @@ private: | ||
void _unshare() { | ||
// Called before every mutation. | ||
// Ensure we have our own copy of curve data and reset cached values | ||
- if (!_data.unique()) { | ||
+ if (_data.use_count() != 1) { | ||
_data.reset(new PathData(*_data)); | ||
_closing_seg = static_cast<ClosingSegment*>(&_data->curves.back()); | ||
} | ||
-- | ||
GitLab | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
pkgname = "lib2geom" | ||
pkgver = "1.3" | ||
pkgrel = 0 | ||
build_style = "cmake" | ||
configure_args = [ | ||
"-D2GEOM_BUILD_SHARED=ON", | ||
"-D2GEOM_TESTING=ON", | ||
] | ||
make_check_args = [ | ||
"-E", | ||
"(" | ||
# tiny floating point errors | ||
+ "circle-test" | ||
+ "|ellipse-test" | ||
# ?? | ||
+ "|bezier-test" | ||
+ "|elliptical-arc-test" | ||
+ ")", | ||
] | ||
hostmakedepends = [ | ||
"cmake", | ||
"ninja", | ||
"pkgconf", | ||
"python-cython", | ||
"ragel", | ||
] | ||
makedepends = [ | ||
"boost-devel", | ||
"cairo-devel", | ||
"double-conversion-devel", | ||
"gsl-devel", | ||
"gtest-devel", | ||
"gtk+3-devel", | ||
] | ||
pkgdesc = "2D geometry library for C++" | ||
maintainer = "psykose <alice@ayaya.dev>" | ||
license = "MPL-1.1 OR LGPL-2.1-only" | ||
url = "https://gitlab.com/inkscape/lib2geom" | ||
source = f"https://gitlab.com/inkscape/lib2geom/-/archive/{pkgver}/lib2geom-{pkgver}.tar.gz" | ||
sha256 = "732a81c6564d5c388bae44f0fdd350f628375e23294941abbe928ab87ec937ab" | ||
|
||
|
||
@subpackage("lib2geom-devel") | ||
def _devel(self): | ||
return self.default_devel() |