Accepting request 941610 from home:jirislaby:branches:graphics

- update to 2.2.0-rc3
  * major release
  * DWG imports are more reliable now
  * and a lot more of bugfixes and improvements
- remove (they are in upstream now)
  * 0001-fix-build-with-gcc-9.patch
  * add-boost-tuple-include-to-fix-build.patch
  * ensured-all-objects-are-shown-when-a-layer-is-toggle.patch
  * fix-build-with-Qt-5.11.patch
  * fix-build-with-Qt-5.15.patch
- remove qcad provides/obsoletes -- it's an ancient history

OBS-URL: https://build.opensuse.org/request/show/941610
OBS-URL: https://build.opensuse.org/package/show/graphics/librecad?expand=0&rev=61
This commit is contained in:
Jan Engelhardt 2021-12-20 10:28:58 +00:00 committed by Git OBS Bridge
parent 1417fff3bb
commit 44893268d4
11 changed files with 32 additions and 276 deletions

View File

@ -1,113 +0,0 @@
From: Jiri Slaby <jslaby@suse.cz>
Date: Tue, 28 May 2019 10:57:15 +0200
Subject: fix build with gcc 9
Patch-mainline: submitted
References: build fix
These symbols were reported as multiply defined with gcc9 and LTO.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
librecad/src/actions/rs_actiondrawcircletan1_2p.cpp | 2 +-
librecad/src/actions/rs_actiondrawcircletan2.cpp | 2 +-
librecad/src/actions/rs_actiondrawcircletan2_1p.cpp | 2 +-
librecad/src/actions/rs_actiondrawcircletan3.cpp | 2 +-
librecad/src/actions/rs_actiondrawlinerelangle.cpp | 2 +-
librecad/src/actions/rs_actiondrawlinetangent1.cpp | 2 +-
librecad/src/actions/rs_actiondrawlinetangent2.cpp | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/librecad/src/actions/rs_actiondrawcircletan1_2p.cpp b/librecad/src/actions/rs_actiondrawcircletan1_2p.cpp
index c14da00e4897..c1a0e23d0fac 100644
--- a/librecad/src/actions/rs_actiondrawcircletan1_2p.cpp
+++ b/librecad/src/actions/rs_actiondrawcircletan1_2p.cpp
@@ -38,7 +38,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
namespace{
//list of entity types supported by current action
-auto enTypeList={RS2::EntityLine, RS2::EntityArc, RS2::EntityCircle};
+static auto enTypeList={RS2::EntityLine, RS2::EntityArc, RS2::EntityCircle};
}
struct RS_ActionDrawCircleTan1_2P::Points {
diff --git a/librecad/src/actions/rs_actiondrawcircletan2.cpp b/librecad/src/actions/rs_actiondrawcircletan2.cpp
index d0558f05b746..0446003ea443 100644
--- a/librecad/src/actions/rs_actiondrawcircletan2.cpp
+++ b/librecad/src/actions/rs_actiondrawcircletan2.cpp
@@ -34,7 +34,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "rs_debug.h"
namespace {
-auto enTypeList={RS2::EntityLine, RS2::EntityArc, RS2::EntityCircle};
+static auto enTypeList={RS2::EntityLine, RS2::EntityArc, RS2::EntityCircle};
}
struct RS_ActionDrawCircleTan2::Points {
diff --git a/librecad/src/actions/rs_actiondrawcircletan2_1p.cpp b/librecad/src/actions/rs_actiondrawcircletan2_1p.cpp
index 324c166862d4..2ece493490d7 100644
--- a/librecad/src/actions/rs_actiondrawcircletan2_1p.cpp
+++ b/librecad/src/actions/rs_actiondrawcircletan2_1p.cpp
@@ -36,7 +36,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "rs_debug.h"
namespace {
-auto enTypeList={RS2::EntityLine, RS2::EntityArc, RS2::EntityCircle};
+static auto enTypeList={RS2::EntityLine, RS2::EntityArc, RS2::EntityCircle};
}
struct RS_ActionDrawCircleTan2_1P::Points {
diff --git a/librecad/src/actions/rs_actiondrawcircletan3.cpp b/librecad/src/actions/rs_actiondrawcircletan3.cpp
index 026ed30e5c20..92679c75f5bf 100644
--- a/librecad/src/actions/rs_actiondrawcircletan3.cpp
+++ b/librecad/src/actions/rs_actiondrawcircletan3.cpp
@@ -36,7 +36,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "rs_debug.h"
namespace {
-auto enTypeList={RS2::EntityArc, RS2::EntityCircle, RS2::EntityLine, RS2::EntityPoint};
+static auto enTypeList={RS2::EntityArc, RS2::EntityCircle, RS2::EntityLine, RS2::EntityPoint};
}
struct RS_ActionDrawCircleTan3::Points {
diff --git a/librecad/src/actions/rs_actiondrawlinerelangle.cpp b/librecad/src/actions/rs_actiondrawlinerelangle.cpp
index 8415dd604d5a..dfc6660aa6c2 100644
--- a/librecad/src/actions/rs_actiondrawlinerelangle.cpp
+++ b/librecad/src/actions/rs_actiondrawlinerelangle.cpp
@@ -39,7 +39,7 @@
#include "rs_debug.h"
namespace {
-auto enTypeList={RS2::EntityLine, RS2::EntityArc, RS2::EntityCircle,
+static auto enTypeList={RS2::EntityLine, RS2::EntityArc, RS2::EntityCircle,
RS2::EntityEllipse};
}
diff --git a/librecad/src/actions/rs_actiondrawlinetangent1.cpp b/librecad/src/actions/rs_actiondrawlinetangent1.cpp
index 197b0cb6c849..335e0d03ba55 100644
--- a/librecad/src/actions/rs_actiondrawlinetangent1.cpp
+++ b/librecad/src/actions/rs_actiondrawlinetangent1.cpp
@@ -37,7 +37,7 @@
#include "rs_debug.h"
namespace{
-auto circleType={RS2::EntityArc, RS2::EntityCircle,
+static auto circleType={RS2::EntityArc, RS2::EntityCircle,
RS2::EntityEllipse, RS2::EntitySplinePoints
};
}
diff --git a/librecad/src/actions/rs_actiondrawlinetangent2.cpp b/librecad/src/actions/rs_actiondrawlinetangent2.cpp
index fed3545e0d14..3c4f6019c00e 100644
--- a/librecad/src/actions/rs_actiondrawlinetangent2.cpp
+++ b/librecad/src/actions/rs_actiondrawlinetangent2.cpp
@@ -36,7 +36,7 @@
#include "rs_debug.h"
namespace{
-auto circleType={RS2::EntityArc, RS2::EntityCircle, RS2::EntityEllipse};
+static auto circleType={RS2::EntityArc, RS2::EntityCircle, RS2::EntityEllipse};
}
RS_ActionDrawLineTangent2::RS_ActionDrawLineTangent2(
--
2.21.0

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:74c4ede409b13d0365c65c0cd52dba04f1049530f6df706dc905443d5e60db06
size 22415288

View File

@ -1,35 +0,0 @@
From: Jiri Slaby <jslaby@suse.cz>
Date: Tue, 4 May 2021 09:25:03 +0200
Subject: add boost tuple include to fix build
Patch-mainline: Submitted pr#1345
References: boost 1.76 build failure
With boost 1.76, we see:
lib/engine/rs_ellipse.cpp:70:15: error: 'tuple' in namespace 'boost::math' does not name a template type
70 | boost::math::tuple<double, double, double> operator()(double const& z) const {
| ^~~~~
Fix this by including the proper boost header.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
librecad/src/lib/engine/rs_ellipse.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/librecad/src/lib/engine/rs_ellipse.cpp b/librecad/src/lib/engine/rs_ellipse.cpp
index 291f734ea6b1..d47bf6ca4a12 100644
--- a/librecad/src/lib/engine/rs_ellipse.cpp
+++ b/librecad/src/lib/engine/rs_ellipse.cpp
@@ -48,6 +48,9 @@
#include <boost/version.hpp>
#include <boost/math/tools/roots.hpp>
#include <boost/math/special_functions/ellint_2.hpp>
+#if BOOST_VERSION > 104500
+#include <boost/math/tools/tuple.hpp>
+#endif
#endif
namespace{
--
2.31.1

View File

@ -1,26 +0,0 @@
From: ravas <ravas@outlook.com>
Date: Mon, 27 Jun 2016 11:04:49 -0700
Subject: ensured all objects are shown when a layer is toggled; #784
Patch-mainline: yes
Git-commit: b4a6c15236f7b3b1e0f9b9f54f29e8b2ea873f0b
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
librecad/src/actions/rs_actionlayerstoggleview.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/librecad/src/actions/rs_actionlayerstoggleview.cpp b/librecad/src/actions/rs_actionlayerstoggleview.cpp
index 2d0effa23d4b..4c09672a075b 100644
--- a/librecad/src/actions/rs_actionlayerstoggleview.cpp
+++ b/librecad/src/actions/rs_actionlayerstoggleview.cpp
@@ -43,6 +43,7 @@ void RS_ActionLayersToggleView::trigger() {
RS_DEBUG->print("toggle layer");
if (graphic) {
graphic->toggleLayer(a_layer);
+ graphic->updateInserts();
}
finish(false);
}
--
2.10.1

View File

@ -1,35 +0,0 @@
From 6c392e903e162b9283e88f53006e929663f2e883 Mon Sep 17 00:00:00 2001
From: Jiri Slaby <jslaby@suse.cz>
Date: Mon, 11 Jun 2018 10:44:00 +0200
Subject: [PATCH] fix build with Qt 5.11
The new Qt removed some implicit inclusions of headers. To avoid build
errors, add explicit includes of those we use in the sources.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
librecad/src/ui/forms/qg_commandwidget.cpp | 1 +
librecad/src/ui/generic/widgetcreator.cpp | 2 ++
2 files changed, 3 insertions(+)
--- a/librecad/src/ui/forms/qg_commandwidget.cpp
+++ b/librecad/src/ui/forms/qg_commandwidget.cpp
@@ -24,6 +24,7 @@
**
**********************************************************************/
#include "qg_commandwidget.h"
+#include <QAction>
#include <QKeyEvent>
#include <algorithm>
--- a/librecad/src/ui/generic/widgetcreator.cpp
+++ b/librecad/src/ui/generic/widgetcreator.cpp
@@ -27,6 +27,8 @@
#include "widgetcreator.h"
#include "ui_widgetcreator.h"
+#include <QAction>
+#include <QActionGroup>
#include <QSettings>
#include <QLineEdit>
#include <QPushButton>

View File

@ -1,42 +0,0 @@
---
librecad/src/lib/engine/lc_splinepoints.cpp | 1 +
librecad/src/lib/gui/rs_painterqt.cpp | 1 +
librecad/src/lib/gui/rs_painterqt.h | 1 +
3 files changed, 3 insertions(+)
Index: LibreCAD-2.1.3/librecad/src/lib/engine/lc_splinepoints.cpp
===================================================================
--- LibreCAD-2.1.3.orig/librecad/src/lib/engine/lc_splinepoints.cpp
+++ LibreCAD-2.1.3/librecad/src/lib/engine/lc_splinepoints.cpp
@@ -22,6 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fi
**********************************************************************/
#include <QPolygonF>
+#include <QPainterPath>
#include "lc_splinepoints.h"
#include "rs_circle.h"
Index: LibreCAD-2.1.3/librecad/src/lib/gui/rs_painterqt.cpp
===================================================================
--- LibreCAD-2.1.3.orig/librecad/src/lib/gui/rs_painterqt.cpp
+++ LibreCAD-2.1.3/librecad/src/lib/gui/rs_painterqt.cpp
@@ -25,6 +25,7 @@
**********************************************************************/
#include<cmath>
+#include <QPainterPath>
#include "rs_painterqt.h"
#include "rs_math.h"
#include "rs_debug.h"
Index: LibreCAD-2.1.3/librecad/src/lib/gui/rs_painterqt.h
===================================================================
--- LibreCAD-2.1.3.orig/librecad/src/lib/gui/rs_painterqt.h
+++ LibreCAD-2.1.3/librecad/src/lib/gui/rs_painterqt.h
@@ -29,6 +29,7 @@
#define RS_PAINTERQT_H
#include <QPainter>
+#include <QPainterPath>
#include "rs_painter.h"
#include "rs_pen.h"

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0c279e3f688c2e7e11c2268bae3aee3422370a318264d0a7a21d31742ea46257
size 13563099

View File

@ -1,2 +1,2 @@
# We are not a library, dammit
addFilter("libre.* shlib-policy-")
addFilter("explicit-lib-dependency librecad")

View File

@ -5,10 +5,8 @@ build: avoid using bundled shapelib
plugins/importshp/importshp.pro | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
Index: LibreCAD-2.0.8/plugins/importshp/importshp.pro
===================================================================
--- LibreCAD-2.0.8.orig/plugins/importshp/importshp.pro
+++ LibreCAD-2.0.8/plugins/importshp/importshp.pro
--- a/plugins/importshp/importshp.pro
+++ b/plugins/importshp/importshp.pro
@@ -17,12 +17,9 @@ include(../../common.pri)
# For plugins
INCLUDEPATH += ../../librecad/src/plugins
@ -23,10 +21,10 @@ Index: LibreCAD-2.0.8/plugins/importshp/importshp.pro
+HEADERS += importshp.h
+LIBS += -lshp
# Installation Directory
win32 {
DLLDESTDIR = ../../windows/resources/plugins
@@ -36,5 +33,3 @@ unix {
TARGET = ../../unix/resources/plugins/$$PLUGIN_NAME
DESTDIR = ../../unix/resources/plugins
}
}
-

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Mon Dec 20 09:15:40 UTC 2021 - Jiri Slaby <jslaby@suse.cz>
- update to 2.2.0-rc3
* major release
* DWG imports are more reliable now
* and a lot more of bugfixes and improvements
- remove (they are in upstream now)
* 0001-fix-build-with-gcc-9.patch
* add-boost-tuple-include-to-fix-build.patch
* ensured-all-objects-are-shown-when-a-layer-is-toggle.patch
* fix-build-with-Qt-5.11.patch
* fix-build-with-Qt-5.15.patch
- remove qcad provides/obsoletes -- it's an ancient history
-------------------------------------------------------------------
Tue May 4 07:30:44 UTC 2021 - Jiri Slaby <jslaby@suse.cz>

View File

@ -16,8 +16,10 @@
#
%define tar_version 2.2.0-rc3
Name: librecad
Version: 2.1.3
Version: 2.2.0~rc3
Release: 0
Summary: Computer-aided design (CAD) software package for 2D design and drafting
License: (Apache-2.0 OR SUSE-GPL-3.0+-with-font-exception) AND GPL-2.0-only
@ -25,7 +27,7 @@ Group: Productivity/Graphics/CAD
URL: http://librecad.org/
#Git-Web: https://github.com/LibreCAD/LibreCAD
Source: https://github.com/LibreCAD/LibreCAD/archive/%version.tar.gz
Source: https://github.com/LibreCAD/LibreCAD/archive/%{tar_version}.tar.gz#/librecad-%{tar_version}.tar.gz
# Version is actually 8, not 3 (it is 3 in the filename due to how MediaWiki
# works -- see http://wiki.librecad.org/index.php/File:Architect3-LCAD.zip)
Source2: http://wiki.librecad.org/images/d/d9/Architect3-LCAD.zip
@ -33,16 +35,11 @@ Source3: http://wiki.librecad.org/images/7/70/Electronics3-LCAD.zip
Source4: http://wiki.librecad.org/images/9/9d/Electrical1-LCAD.zip
Source10: ttf2lff.1
Source20: %name-rpmlintrc
Patch1: ensured-all-objects-are-shown-when-a-layer-is-toggle.patch
Patch2: fix-build-with-Qt-5.11.patch
Patch3: fix-build-with-Qt-5.15.patch
Patch4: librecad-no-date.diff
Patch5: librecad-use-system-libdxfrw.patch
Patch6: librecad-install.diff
Patch7: librecad-plugindir.diff
Patch8: librecad-use-system-shapelib.patch
Patch9: 0001-fix-build-with-gcc-9.patch
Patch10: add-boost-tuple-include-to-fix-build.patch
BuildRequires: fdupes
BuildRequires: freetype2-devel
BuildRequires: gcc-c++ >= 4.7
@ -52,21 +49,18 @@ BuildRequires: muparser-devel
BuildRequires: unzip
BuildRequires: update-desktop-files
BuildRequires: wqy-microhei-fonts
BuildRequires: (pkgconfig(libdxfrw) or pkgconfig(libdxfrw0))
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Help)
BuildRequires: pkgconfig(Qt5PrintSupport)
BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(libdxfrw) >= 1
Requires(post): desktop-file-utils
Requires(post): shared-mime-info
Requires(postun):desktop-file-utils
Requires(postun):shared-mime-info
Recommends: %name-parts
# old qcad had a newer version, so we provide all versions here.
Provides: qcad
Obsoletes: qcad <= 2.0.5
%description
LibreCAD is a Qt4 Computer-aided design (CAD) software package for 2D design
@ -83,7 +77,7 @@ Collection of parts for LibreCAD, a Qt4 application to design 2D
CAD drawings.
%prep
%setup -qn LibreCAD-%version -a 2 -a 3 -a 4
%setup -qn LibreCAD-%{tar_version} -a2 -a3 -a4
%autopatch -p1
pc="libdxfrw"
@ -102,7 +96,7 @@ rm -rf libraries/libdxfrw
rm -rf plugins/importshp/shapelib
# Fix "wrong-file-end-of-line-encoding" rpmlint warning
sed -i 's/\r$//' LICENSE-MIT.txt LICENSE_KST32B_v2.txt license-lc_opengost-fonts.txt
sed -i 's/\r$//' licenses/{MIT,KST32B_v2,lc_opengost-fonts}.txt
%build
echo 'DISABLE_POSTSCRIPT = true' > librecad/src/custom.pri
@ -134,7 +128,7 @@ install -Dpm0644 "librecad/res/main/%name.png" "$b/%_datadir/pixmaps/%name.png"
install -Dpm0644 "desktop/%name.sharedmimeinfo" "$b/%_datadir/mime/packages/%name.xml"
install -Dpm0644 "%_sourcedir/ttf2lff.1" "$b/%_mandir/man1/"
mkdir -p "$b/%_datadir/%name/library/architecture" \
install -d "$b/%_datadir/%name/library/architecture" \
"$b/%_datadir/%name/library/electronics" \
"$b/%_datadir/%name/library/electrical"
cp -a Architect8-LCAD "$b/%_datadir/%name/library/architecture/"
@ -159,7 +153,7 @@ perl -pi -e "s|image/vnd.dxf|image/vnd.dxf;|" %buildroot%_datadir/applications/l
%files
%doc README.md
%license LICENSE* gpl-2.0* license-lc_opengost-fonts.txt
%license LICENSE licenses/*txt
%_bindir/librecad
%_bindir/ttf2lff
%_libdir/%name