cad/librecad: Fix orthogonal and rel angle tools

When using Tools > Line > Orthogonal or Tools > Line > Relative angle,
it is not possible to select the base entity.

Apparently, the code works with GCC, but Clang warns:
In file included from actions/rs_actiondrawlinerelangle.cpp:27:
actions/rs_actiondrawlinerelangle.h:116:53: warning: array backing local initializer list 'enTypeList' will be destroyed at the end of the full-expression [-Wdangling]
    const EntityTypeList enTypeList = EntityTypeList{RS2::EntityLine, RS2::EntityArc, RS2::EntityCircle,RS2::EntityEllipse};

actions/rs_actiondrawlinerelangle.cpp:41:28: warning: backing array for 'std::initializer_list' member 'enTypeList' is a temporary object whose lifetime is shorter than the lifetime of the constructed object [-Wdangling-field]
RS_ActionDrawLineRelAngle::RS_ActionDrawLineRelAngle(

Patch reverts upstream commits eb2e146 [1] and d0a0ef2 [2] which were
intended to fix the build with the now unsupported GCC 9.

[1] eb2e1465bb
[2] d0a0ef284b

Reported by:	slovkam u sebi <slovkamusebi@protonmail.com> (via private mail)
This commit is contained in:
Jason E. Hale 2022-10-27 21:37:21 -04:00
parent 376c30a320
commit 9fe9575a92
2 changed files with 7 additions and 1 deletions

View file

@ -1,7 +1,11 @@
PORTNAME= librecad
DISTVERSION= 2.2.0-rc4
PORTREVISION= 1
CATEGORIES= cad
PATCH_SITES= https://github.com/BSDKaffee/LibreCAD/commit/
PATCHFILES= d81cd49db2421bb4ca9a283638500ebf1c7d02e5.patch:-p1 # Fix ortho tool with Clang
MAINTAINER= jhale@FreeBSD.org
COMMENT= 2D CAD system
WWW= https://librecad.org/

View file

@ -1,3 +1,5 @@
TIMESTAMP = 1663002361
TIMESTAMP = 1666920763
SHA256 (LibreCAD-LibreCAD-2.2.0-rc4_GH0.tar.gz) = f34c295cdb22bb4fca021a7cb95a648365e52b97b651a645ae5f78cd7a53e4d4
SIZE (LibreCAD-LibreCAD-2.2.0-rc4_GH0.tar.gz) = 13833398
SHA256 (d81cd49db2421bb4ca9a283638500ebf1c7d02e5.patch) = 55ec8409b6dfd83364655afae0f44f4aa8beb1f449d03c55505628f9111d94da
SIZE (d81cd49db2421bb4ca9a283638500ebf1c7d02e5.patch) = 9814