Accepting request 1056283 from home:ithod:updated
- Update to version 1.2.2 * Remove assertions in the intersection routine for EllipticalArc * fix-floating-point-epsilon-in-tests-i586.patch fixed upstream OBS-URL: https://build.opensuse.org/request/show/1056283 OBS-URL: https://build.opensuse.org/package/show/graphics/lib2geom?expand=0&rev=3
This commit is contained in:
parent
defa8ac7d6
commit
a029f739cf
@ -1,36 +0,0 @@
|
|||||||
From: Antonio Larrosa <alarrosa@suse.com>
|
|
||||||
Subject: Fix floating point error on i586 by using epsilon
|
|
||||||
|
|
||||||
Submitted to upstream at
|
|
||||||
https://gitlab.com/inkscape/lib2geom/-/merge_requests/52
|
|
||||||
|
|
||||||
Index: lib2geom-1.1/tests/bezier-test.cpp
|
|
||||||
===================================================================
|
|
||||||
--- lib2geom-1.1.orig/tests/bezier-test.cpp
|
|
||||||
+++ lib2geom-1.1/tests/bezier-test.cpp
|
|
||||||
@@ -134,12 +134,13 @@ TEST_F(BezierTest, Casteljau) {
|
|
||||||
unsigned N = wiggle.order() + 1;
|
|
||||||
std::vector<Coord> left(N), right(N);
|
|
||||||
std::vector<Coord> left2(N), right2(N);
|
|
||||||
+ double eps = 1e-15;
|
|
||||||
|
|
||||||
for (unsigned i = 0; i < 10000; ++i) {
|
|
||||||
double t = g_random_double_range(0, 1);
|
|
||||||
double vok = bernstein_value_at(t, &wiggle[0], wiggle.order());
|
|
||||||
double v = casteljau_subdivision<double>(t, &wiggle[0], &left[0], &right[0], wiggle.order());
|
|
||||||
- EXPECT_EQ(v, vok);
|
|
||||||
+ EXPECT_near(v, vok, eps);
|
|
||||||
EXPECT_EQ(left[0], wiggle.at0());
|
|
||||||
EXPECT_EQ(left[wiggle.order()], right[0]);
|
|
||||||
EXPECT_EQ(right[wiggle.order()], wiggle.at1());
|
|
||||||
@@ -147,8 +148,8 @@ TEST_F(BezierTest, Casteljau) {
|
|
||||||
double vl = casteljau_subdivision<double>(t, &wiggle[0], &left2[0], NULL, wiggle.order());
|
|
||||||
double vr = casteljau_subdivision<double>(t, &wiggle[0], NULL, &right2[0], wiggle.order());
|
|
||||||
EXPECT_EQ(vl, vok);
|
|
||||||
- EXPECT_EQ(vr, vok);
|
|
||||||
- EXPECT_vector_equal(left2, left);
|
|
||||||
+ EXPECT_near(vr, vok, eps);
|
|
||||||
+ EXPECT_vector_near(left2, left, eps);
|
|
||||||
EXPECT_vector_equal(right2, right);
|
|
||||||
|
|
||||||
double vnone = casteljau_subdivision<double>(t, &wiggle[0], NULL, NULL, wiggle.order());
|
|
@ -1,7 +1,7 @@
|
|||||||
Index: lib2geom-1.1/2geom.pc.in
|
Index: lib2geom-1.2.2/2geom.pc.in
|
||||||
===================================================================
|
===================================================================
|
||||||
--- lib2geom-1.1.orig/2geom.pc.in
|
--- lib2geom-1.2.2.orig/2geom.pc.in
|
||||||
+++ lib2geom-1.1/2geom.pc.in
|
+++ lib2geom-1.2.2/2geom.pc.in
|
||||||
@@ -1,6 +1,6 @@
|
@@ -1,6 +1,6 @@
|
||||||
prefix=@CMAKE_INSTALL_PREFIX@
|
prefix=@CMAKE_INSTALL_PREFIX@
|
||||||
exec_prefix=${prefix}
|
exec_prefix=${prefix}
|
||||||
@ -10,13 +10,3 @@ Index: lib2geom-1.1/2geom.pc.in
|
|||||||
includedir=${prefix}/include
|
includedir=${prefix}/include
|
||||||
|
|
||||||
Name: 2geom
|
Name: 2geom
|
||||||
Index: lib2geom-1.1/CMakeLists.txt
|
|
||||||
===================================================================
|
|
||||||
--- lib2geom-1.1.orig/CMakeLists.txt
|
|
||||||
+++ lib2geom-1.1/CMakeLists.txt
|
|
||||||
@@ -147,4 +147,4 @@ install(DIRECTORY "${CMAKE_CURRENT_SOURC
|
|
||||||
|
|
||||||
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/2geom.pc.in
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/2geom.pc @ONLY IMMEDIATE )
|
|
||||||
-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/2geom.pc" DESTINATION lib/pkgconfig)
|
|
||||||
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/2geom.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:8bc63348ac7cb1343b0500d4b4506e30aaa7477e80ebd7ac89a8c382f4d788c4
|
|
||||||
size 1446383
|
|
3
lib2geom-1.2.2.tar.gz
Normal file
3
lib2geom-1.2.2.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:e4097f842f2428c4d6ad51c8385bfb71d9d491e4a6bdcdbc35c5efdf5a2e51f8
|
||||||
|
size 1397356
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Dec 18 14:52:12 UTC 2022 - thod_@gmx.de
|
||||||
|
|
||||||
|
- Update to version 1.2.2
|
||||||
|
* Remove assertions in the intersection routine for EllipticalArc
|
||||||
|
* fix-floating-point-epsilon-in-tests-i586.patch fixed upstream
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jun 28 10:16:01 UTC 2021 - Antonio Larrosa <alarrosa@suse.com>
|
Mon Jun 28 10:16:01 UTC 2021 - Antonio Larrosa <alarrosa@suse.com>
|
||||||
|
|
||||||
|
@ -17,20 +17,19 @@
|
|||||||
|
|
||||||
|
|
||||||
%define __builder ninja
|
%define __builder ninja
|
||||||
%define sonum 1_1_0
|
%define sonum 1_2_0
|
||||||
|
%define sover 1.2.0
|
||||||
%define libname lib2geom%{sonum}
|
%define libname lib2geom%{sonum}
|
||||||
%define develname 2geom
|
%define develname 2geom
|
||||||
%define short_version 1.1
|
%define short_version 1.2.2
|
||||||
Name: lib2geom
|
Name: lib2geom
|
||||||
Version: 1.1.0
|
Version: 1.2.2
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Easy to use 2D geometry library in C++
|
Summary: Easy to use 2D geometry library in C++
|
||||||
License: LGPL-2.1-only AND MPL-1.1
|
License: LGPL-2.1-only AND MPL-1.1
|
||||||
URL: https://gitlab.com/inkscape/%{name}
|
URL: https://gitlab.com/inkscape/%{name}
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
Source0: %{url}/-/archive/%{short_version}/%{name}-%{short_version}.tar.gz
|
Source0: %{url}/-/archive/%{short_version}/%{name}-%{short_version}.tar.gz
|
||||||
# PATCH-FIX-UPSTREAM
|
|
||||||
Patch0: fix-floating-point-epsilon-in-tests-i586.patch
|
|
||||||
# PATCH-FIX-OPENSUSE
|
# PATCH-FIX-OPENSUSE
|
||||||
Patch1: fix-pkgconfig-libdir-path.patch
|
Patch1: fix-pkgconfig-libdir-path.patch
|
||||||
BuildRequires: libboost_headers-devel
|
BuildRequires: libboost_headers-devel
|
||||||
@ -91,7 +90,7 @@ needed to develop applications that require %{name}.
|
|||||||
%files -n %{libname}
|
%files -n %{libname}
|
||||||
%license COPYING-LGPL-2.1 COPYING-MPL-1.1
|
%license COPYING-LGPL-2.1 COPYING-MPL-1.1
|
||||||
%doc NEWS.md README.md
|
%doc NEWS.md README.md
|
||||||
%{_libdir}/%{name}.so.%{version}
|
%{_libdir}/%{name}.so.%{sover}
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%dir %{_includedir}/%{develname}-%{version}/
|
%dir %{_includedir}/%{develname}-%{version}/
|
||||||
|
Loading…
Reference in New Issue
Block a user