sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (551f1f00ee396c4ab825393c89e5746de43bd239)
- From: Ismael Luceno <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org, sm-commit AT lists.sourcemage.org
- Subject: [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (551f1f00ee396c4ab825393c89e5746de43bd239)
- Date: Sat, 25 Jan 2025 18:44:49 +0000
GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:
cad/librecad/DEPENDS | 5
-
cad/librecad/DETAILS | 1
cad/librecad/HISTORY | 7
+
cad/librecad/PRE_BUILD | 3
cad/librecad/patches/0001-Fix-version.patch | 26
+++++
cad/librecad/patches/0001-Issue-2023-fixed-a-null-pointer-issue.patch | 46
++++++++++
6 files changed, 87 insertions(+), 1 deletion(-)
New commits:
commit 551f1f00ee396c4ab825393c89e5746de43bd239
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>
librecad: Fix null pointer dereferences & version
diff --git a/cad/librecad/DEPENDS b/cad/librecad/DEPENDS
index aaf7e80..f3e63a9 100755
--- a/cad/librecad/DEPENDS
+++ b/cad/librecad/DEPENDS
@@ -1 +1,4 @@
-depends qtbase
+. "$GRIMOIRE"/VDEPENDS &&
+vdepends << !
+ qtbase >= 5.15.0
+!
diff --git a/cad/librecad/DETAILS b/cad/librecad/DETAILS
index 5566011..457cafc 100755
--- a/cad/librecad/DETAILS
+++ b/cad/librecad/DETAILS
@@ -1,5 +1,6 @@
SPELL=librecad
VERSION=2.2.1
+ PATCHLEVEL=1
SOURCE="${SPELL}-${VERSION}.tar.gz"
SOURCE_URL[0]=https://github.com/LibreCAD/LibreCAD/archive/refs/tags/v${VERSION}.tar.gz
SOURCE_HASH=sha512:c8c65f2e0405f8193c37ce0a5a395320635138967d4f948b516453f48d286fe9f4afee6ac9edd93690a5c9977b4c072c7319b5a95b81bca82ad055f332a7f064
diff --git a/cad/librecad/HISTORY b/cad/librecad/HISTORY
index 5a19f5e..d79d614 100644
--- a/cad/librecad/HISTORY
+++ b/cad/librecad/HISTORY
@@ -1,2 +1,9 @@
+2025-01-25 Ismael Luceno <ismael AT sourcemage.org>
+ * DEPENDS: added version requirement for qtbase
+ * PRE_BUILD, patches/0001-Fix-version.patch: fixed version number
+ * patches/0001-Issue-2023-fixed-a-null-pointer-issue.patch:
+ fixed null pointer dereferences
+ * DETAILS: PATCHLEVEL++
+
2025-01-17 Ismael Luceno <ismael AT sourcemage.org>
* BUILD, DEPENDS, DETAILS, INSTALL: spell created
diff --git a/cad/librecad/PRE_BUILD b/cad/librecad/PRE_BUILD
new file mode 100755
index 0000000..c230ad1
--- /dev/null
+++ b/cad/librecad/PRE_BUILD
@@ -0,0 +1,3 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+apply_patch_dir patches
diff --git a/cad/librecad/patches/0001-Fix-version.patch
b/cad/librecad/patches/0001-Fix-version.patch
new file mode 100644
index 0000000..35c524c
--- /dev/null
+++ b/cad/librecad/patches/0001-Fix-version.patch
@@ -0,0 +1,26 @@
+From 2665d9d08968d8e23fc9c8dc3f1ca7f354fcc0c6 Mon Sep 17 00:00:00 2001
+From: Ismael Luceno <ismael AT iodev.co.uk>
+Date: Sat, 25 Jan 2025 18:03:19 +0100
+Subject: [PATCH] Fix version
+
+Signed-off-by: Ismael Luceno <ismael AT iodev.co.uk>
+---
+ librecad/src/src.pro | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/librecad/src/src.pro b/librecad/src/src.pro
+index 4d3fd44088e7..f67f105d77b1 100644
+--- a/librecad/src/src.pro
++++ b/librecad/src/src.pro
+@@ -10,7 +10,7 @@ DISABLE_POSTSCRIPT = false
+ DEFINES += DWGSUPPORT
+ DEFINES -= JWW_WRITE_SUPPORT
+
+-LC_VERSION="2.2.1_rc4"
++LC_VERSION="2.2.1"
+ VERSION=$${LC_VERSION}
+
+ # Store intermedia stuff somewhere else
+--
+2.48.1
+
diff --git
a/cad/librecad/patches/0001-Issue-2023-fixed-a-null-pointer-issue.patch
b/cad/librecad/patches/0001-Issue-2023-fixed-a-null-pointer-issue.patch
new file mode 100644
index 0000000..d638a55
--- /dev/null
+++ b/cad/librecad/patches/0001-Issue-2023-fixed-a-null-pointer-issue.patch
@@ -0,0 +1,46 @@
+From 05fb8451f07a95e22b470b6c1875f0072288ac91 Mon Sep 17 00:00:00 2001
+From: Dongxu Li <dongxuli2011 AT gmail.com>
+Date: Sat, 25 Jan 2025 08:00:11 -0500
+Subject: [PATCH] Issue #2023: fixed a null pointer issue
+
+(cherry picked from commit 2c3a939c254915468d2e57fa1d345338bda79a5b)
+(cherry picked from commit c0e77247b39236a68cdbd396043482cd7afda513)
+Signed-off-by: Ismael Luceno <ismael AT iodev.co.uk>
+---
+ librecad/src/lib/engine/rs_entitycontainer.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/librecad/src/lib/engine/rs_entitycontainer.cpp
b/librecad/src/lib/engine/rs_entitycontainer.cpp
+index dd36fc448d41..0cccf685734e 100644
+--- a/librecad/src/lib/engine/rs_entitycontainer.cpp
++++ b/librecad/src/lib/engine/rs_entitycontainer.cpp
+@@ -50,7 +50,7 @@
+ namespace {
+
+ // the tolerance used to check topology of contours in hatching
+-constexpr double contourTolerance = 1e-8;
++constexpr double contourTolerance = 5e-7;
+
+ // For validate hatch contours, whether an entity in the contour is a closed
+ // loop itself
+@@ -1188,7 +1188,7 @@ RS_Vector RS_EntityContainer::getNearestEndpoint(const
RS_Vector& coord,
+ for (RS_Entity* en: entities){
+
+ if (en->isVisible()
+- && !en->getParent()->ignoredOnModification()
++ && (en->getParent()==nullptr ||
!en->getParent()->ignoredOnModification())
+ ){//no end point for Insert, text, Dim
+ point = en->getNearestEndpoint(coord, &curDist);
+ if (point.valid && curDist<minDist) {
+@@ -1223,7 +1223,7 @@ RS_Vector RS_EntityContainer::getNearestEndpoint(const
RS_Vector& coord,
+ // ++it;
+
+ for(auto en: entities){
+- if (!en->getParent()->ignoredOnModification() ){//no end point for
Insert, text, Dim
++ if (en->getParent() == nullptr ||
!en->getParent()->ignoredOnModification()) {//no end point for Insert, text,
Dim
+ // std::cout<<"find nearest for entity
"<<i0<<std::endl;
+ point = en->getNearestEndpoint(coord, &curDist);
+ if (point.valid && curDist<minDist) {
+--
+2.48.1
+
- [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (551f1f00ee396c4ab825393c89e5746de43bd239), Ismael Luceno, 01/25/2025
Archive powered by MHonArc 2.6.24.