commit 495439ce39528b97ba6e4e204d0bf549264f6e88b047f73b6ca1216226a918fa Author: Jan Engelhardt Date: Fri Feb 28 10:34:17 2025 +0000 - Update to release 2.2.1.1: See: https://github.com/LibreCAD/LibreCAD/compare/2.2.0.2...v2.2.1.1 - Drop librecad-use-system-libdxfrw.patch libdxfrw is abondoned. Use the internal one instead. OBS-URL: https://build.opensuse.org/package/show/graphics/librecad?expand=0&rev=79 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/2.2.0.2.tar.gz b/2.2.0.2.tar.gz new file mode 100644 index 0000000..ab2a68f --- /dev/null +++ b/2.2.0.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fcb888a550f1f515ef6a2f7af2dd02605dd5c6da8a23f6c3a52479f8532ac109 +size 13645528 diff --git a/Architect3-LCAD.zip b/Architect3-LCAD.zip new file mode 100644 index 0000000..00533e7 --- /dev/null +++ b/Architect3-LCAD.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87217b373f84f73820245fd5e69679a4eba334097fbfef56ae647d2d857863d4 +size 78791 diff --git a/Electrical1-LCAD.zip b/Electrical1-LCAD.zip new file mode 100644 index 0000000..37c3d0a --- /dev/null +++ b/Electrical1-LCAD.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f32dd639bfd65b76e0868f954404df88f8f281e2951fd3ff1317c9ca306060a2 +size 58636 diff --git a/Electronics3-LCAD.zip b/Electronics3-LCAD.zip new file mode 100644 index 0000000..75104ad --- /dev/null +++ b/Electronics3-LCAD.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:559938ae9a29d9224b22268a6bfa0046298a9738cbd9bec6ab556f585feeb3a4 +size 414708 diff --git a/librecad-install.diff b/librecad-install.diff new file mode 100644 index 0000000..72e0b6f --- /dev/null +++ b/librecad-install.diff @@ -0,0 +1,19 @@ +From: Jan Engelhardt +Date: 2012-05-11 08:34:41 +0200 +Subject: postprocess-unix.sh: use correct path + +--- + scripts/postprocess-unix.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/scripts/postprocess-unix.sh ++++ b/scripts/postprocess-unix.sh +@@ -3,7 +3,7 @@ + THISDIR="`pwd`" + LCDIR="${THISDIR}/librecad" + PIDIR="${THISDIR}/plugins" +-RESOURCEDIR="${THISDIR}/unix/resources" ++RESOURCEDIR=$BUILDDIR + APPDATADIR="${THISDIR}/unix/appdata" + TSDIRLC="${LCDIR}/ts" + TSDIRPI="${PIDIR}/ts" diff --git a/librecad-no-date.diff b/librecad-no-date.diff new file mode 100644 index 0000000..cff6357 --- /dev/null +++ b/librecad-no-date.diff @@ -0,0 +1,20 @@ +From: Jan Engelhardt +Date: 2012-05-11 08:34:41 +0200 + +Remove build time references so build-compare can do its work. +--- + librecad/src/main/qc_applicationwindow.cpp | 1 - + 1 file changed, 1 deletion(-) + +Index: LibreCAD-2.2.0.2/librecad/src/main/qc_applicationwindow.cpp +=================================================================== +--- LibreCAD-2.2.0.2.orig/librecad/src/main/qc_applicationwindow.cpp ++++ LibreCAD-2.2.0.2/librecad/src/main/qc_applicationwindow.cpp +@@ -2883,7 +2883,6 @@ void QC_ApplicationWindow::showAboutWind + #elif defined(Q_CC_MSVC) + tr("Compiler: Microsoft Visual C++") + "\n" + + #endif +- tr("Compiled on: %1").arg(__DATE__) + "\n" + + tr("Qt Version: %1").arg(qVersion()) + "\n" + + tr("Boost Version: %1.%2.%3").arg(BOOST_VERSION / 100000).arg(BOOST_VERSION / 100 % 1000).arg(BOOST_VERSION % 100) + ); diff --git a/librecad-plugindir.diff b/librecad-plugindir.diff new file mode 100644 index 0000000..dcdab07 --- /dev/null +++ b/librecad-plugindir.diff @@ -0,0 +1,25 @@ +From: Jan Engelhardt +Date: 2012-05-11 08:16:47.544680812 +0200 +Upstream: depending on whether it is considered an upstream bug or + not, it should be sent + +Look in the right spot for plugins. + +--- + librecad/src/lib/engine/rs_system.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +Index: LibreCAD-2.2.0.2/librecad/src/lib/engine/rs_system.cpp +=================================================================== +--- LibreCAD-2.2.0.2.orig/librecad/src/lib/engine/rs_system.cpp ++++ LibreCAD-2.2.0.2/librecad/src/lib/engine/rs_system.cpp +@@ -635,6 +635,9 @@ QStringList RS_System::getDirectoryList( + } + RS_SETTINGS->endGroup(); + ++ if (subDirectory == "plugins") ++ dirList.append("##LIBDIR##" + appDirName + "/" + subDirectory); ++ + QStringList ret; + + RS_DEBUG->print("RS_System::getDirectoryList: Paths:"); diff --git a/librecad-rpmlintrc b/librecad-rpmlintrc new file mode 100644 index 0000000..a862147 --- /dev/null +++ b/librecad-rpmlintrc @@ -0,0 +1,2 @@ +# We are not a library, dammit +addFilter("explicit-lib-dependency librecad") diff --git a/librecad-use-system-libdxfrw.patch b/librecad-use-system-libdxfrw.patch new file mode 100644 index 0000000..5b4be41 --- /dev/null +++ b/librecad-use-system-libdxfrw.patch @@ -0,0 +1,44 @@ +build: avoid using bundled libdxfrw +[asterios.dramis@gmail.com: imported the patch from Fedora into openSUSE's librecad] +[jslaby@suse.com: rebase/rework on top of 2.1.0] + +--- + libraries/libraries.pro | 1 - + librecad/src/src.pro | 5 ++--- + 2 files changed, 2 insertions(+), 4 deletions(-) + +Index: LibreCAD-2.2.0.2/libraries/libraries.pro +=================================================================== +--- LibreCAD-2.2.0.2.orig/libraries/libraries.pro ++++ LibreCAD-2.2.0.2/libraries/libraries.pro +@@ -9,7 +9,6 @@ TEMPLATE = subdirs + TARGET = libraries + + SUBDIRS = \ +- libdxfrw \ + jwwlib + + macx|win32|equals(build_muparser, "true")|!packagesExist(muparser){ +Index: LibreCAD-2.2.0.2/librecad/src/src.pro +=================================================================== +--- LibreCAD-2.2.0.2.orig/librecad/src/src.pro ++++ LibreCAD-2.2.0.2/librecad/src/src.pro +@@ -33,8 +33,7 @@ CONFIG += c++11 + } + + GEN_LIB_DIR = ../../generated/lib +-PRE_TARGETDEPS += $$GEN_LIB_DIR/libdxfrw.a \ +- $$GEN_LIB_DIR/libjwwlib.a ++PRE_TARGETDEPS += $$GEN_LIB_DIR/libjwwlib.a + + DESTDIR = $${INSTALLDIR} + +@@ -85,7 +84,7 @@ LIBS += -L../../generated/lib \ + -ljwwlib + + INCLUDEPATH += \ +- ../../libraries/libdxfrw/src \ ++ $${DXFRW_INCLUDEDIR} \ + ../../libraries/jwwlib/src \ + cmd \ + lib/actions \ diff --git a/librecad.changes b/librecad.changes new file mode 100644 index 0000000..01091e4 --- /dev/null +++ b/librecad.changes @@ -0,0 +1,394 @@ +------------------------------------------------------------------- +Fri Feb 28 08:39:22 UTC 2025 - Jiri Slaby + +- Update to release 2.2.1.1: + See: https://github.com/LibreCAD/LibreCAD/compare/2.2.0.2...v2.2.1.1 +- Drop librecad-use-system-libdxfrw.patch + libdxfrw is abondoned. Use the internal one instead. + +------------------------------------------------------------------- +Mon Sep 4 07:00:05 UTC 2023 - Paolo Stivanin + +- Update to release 2.2.0.2: + * fixes an undetected vulnerability when opening malformed LFF + font files that caused a crash + * fixes format issues in bundled fonts + * fixes regression, finding nearest points on ellipses caused a crash + * plugin Importshp has been removed +- Drop librecad-use-system-shapelib.patch since the plugin has been + removed. +- Rebase patches. + +------------------------------------------------------------------- +Sun Feb 19 12:10:12 UTC 2023 - Jan Engelhardt + +- Update to release 2.2.0 [boo#1208447] + * many causes of crashes have been eliminated + * eliminated DWG issues in libdxfrw, which caused several crashes + * the performance of panning and zooming in large files has + been significantly improved + * the undo/redo engine has been completely revised due to + several problems + * adjustments for new compiler and Qt versions were required + * extension of the command line, multi-line commands, paste and + open command files + * improvement of the print preview, with tiled printing and + line widths adjustment + * multiple selection and bulk actions in block and layer lists + +------------------------------------------------------------------- +Mon Jul 11 18:48:45 UTC 2022 - Dirk Müller + +- update to 2.2.0 rc4: + * symbols to unicode.lff + * new error code from libdxfrw update + * build Windows, MacOS and Linux packages in one action + * added tool tips to Categories tool widget (#1519) + * added @ symbol to relative coordinates in status bar (#1452) + * changed misleading unit label in curent drawing preferences (#1453) + * changed tab order in text dialog (#1432) + * maximum size of status bar for hidpi displays + * sync libdxfrw (072aecd) + * copy/rename media files in desktop folder to remove whitespaces + * fixed renaming of nested blocks (#1527) + * preserve list position in block and layer list (#1515) + * fixed polyline issue when line type was changed (#1496) + * add minutes label to auto save time in application preferences (#1412) + * add files saved as with new name to recent files (#1364) + * snap on middle point failed for spline through points (#1395) + * spline issue with tolerance on ascii to double conversion + * DXF viewport reading issue by updating libdxfrw + * status bar height toggling on auto save + * solid fill hatch issues + * Ukrainian and symbol characters in unicode.lff + * possible out of bounds read with MText entities + * AppImage was broken by fix for (#1488) + * wrong translations folder for additionals paths from settings + * getDirectoryList() failed on Linux when librecad is in $PATH (#1488) + * bounds check in LWPolyline + * NULL check for hatch code 93 + * vulnerabilities in JWW parser + +- drop 0001-Added-bounds-checking-to-CDataMoji-in-jww-parser.patch, + 0001-Added-bounds-check-to-CDataList-in-JWW-parser.patch + 0001-fixed-1488-getDirectoryList-failed-on-Linux-when-lib.patch: upstream + +------------------------------------------------------------------- +Mon May 16 20:31:43 UTC 2022 - Jan Engelhardt + +- Add 0001-Added-bounds-checking-to-CDataMoji-in-jww-parser.patch + [boo#1195105] [CVE-2021-45341] +- Add 0001-Added-bounds-check-to-CDataList-in-JWW-parser.patch + [boo#1195122] [CVE-2021-45342] + +------------------------------------------------------------------- +Wed May 4 09:21:59 UTC 2022 - Marcus Meissner + +- switch source urls to https + +------------------------------------------------------------------- +Wed Mar 30 11:38:49 UTC 2022 - Jan Engelhardt + +- Strip excess blank fields from librecad.desktop:MimeType + [boo#1197664] + +------------------------------------------------------------------- +Sun Jan 23 22:41:25 UTC 2022 - Jan Engelhardt + +- Replace "qt4" in description, the build does not use Qt4 anymore. + +------------------------------------------------------------------- +Thu Jan 6 11:44:32 UTC 2022 - Jiri Slaby + +- replace the revert by an upstream fix + * add 0001-fixed-1488-getDirectoryList-failed-on-Linux-when-lib.patch + * remove + 0001-Revert-AppImage-build-on-GitHub-Actions-with-go-appi.patch + 0002-Revert-RS_System-getDirectoryList-add-plugins-folder.patch + 0003-Revert-fix-RS_System-getDirectoryList-use-relative-p.patch + +------------------------------------------------------------------- +Sat Jan 1 16:38:27 UTC 2022 - Jiri Slaby + +- fix paths creation (e.g. fonts loading) by: + * 0001-Revert-AppImage-build-on-GitHub-Actions-with-go-appi.patch + * 0002-Revert-RS_System-getDirectoryList-add-plugins-folder.patch + * 0003-Revert-fix-RS_System-getDirectoryList-use-relative-p.patch +(did the revert and waiting for the upstream fix) + +------------------------------------------------------------------- +Mon Dec 20 09:15:40 UTC 2021 - Jiri Slaby + +- 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 + +- add add-boost-tuple-include-to-fix-build.patch + +------------------------------------------------------------------- +Sun Jun 7 22:55:24 UTC 2020 - Jan Engelhardt + +- Add fix-build-with-Qt-5.15.patch. Set CFLAGS+=-fcommon. + +------------------------------------------------------------------- +Tue May 28 09:05:54 UTC 2019 - Jiri Slaby + +- add 0001-fix-build-with-gcc-9.patch + +------------------------------------------------------------------- +Mon Jun 11 09:02:23 UTC 2018 - jslaby@suse.com + +- add fix-build-with-Qt-5.11.patch + +------------------------------------------------------------------- +Wed Feb 1 13:09:28 UTC 2017 - adam.majer@suse.de + +- use individual libboost-*-devel packages instead of boost-devel + +------------------------------------------------------------------- +Sat Oct 8 13:24:33 UTC 2016 - jslaby@suse.com + +- add: ensured-all-objects-are-shown-when-a-layer-is-toggle.patch + (from upstream) + +------------------------------------------------------------------- +Tue Sep 27 07:41:18 UTC 2016 - jengelh@inai.de + +- Update to new upstream release 2.1.3 +* The Shift key had no effect and would not activate the + command line. + +------------------------------------------------------------------- +Mon Sep 19 12:47:21 UTC 2016 - jslaby@suse.com + +- Update to new upstream release 2.1.2 + * wouldn't build with gcc 5.4 and 6 + * mouse cursor was missing for 'Arc Tangential' + * right-click with plugins could cause a crash + * construction lines were not drawn when the line segment was out of view + * DXF files with comments were not properly loaded + * drawings were not marked as modified after an 'undo' + * the command line didn't accept numpad input + * the command widget didn't activate properly when floating +- librecad-gcc6.patch: Remove (unneeded now) + +------------------------------------------------------------------- +Tue Jun 28 11:54:10 UTC 2016 - jengelh@inai.de + +- Update to new upstream release 2.1.1 +* Bugfixes: +* draft mode was not set for new/opened drawings +* performance did not improve when zooming into an area +* certain polylines were not rendered properly +* opening a file didn't restore the layer's construction state +* the cursor was hidden for 'polyline from existing' +* closing an inactive tab cleared the layer list + +------------------------------------------------------------------- +Fri Jun 17 10:21:20 UTC 2016 - jslaby@suse.com + +- add librecad-gcc6.patch + +------------------------------------------------------------------- +Tue Jun 7 07:51:47 UTC 2016 - jslaby@suse.com + +- Update to new upstream release 2.1.0 + * new features + * lot of bug fixes + * other changes + * see full changelog at: + https://github.com/LibreCAD/ChangeLogs/blob/master/developers/r-a-v-a-s/2-1/2-1-0/2-1-0.md + +------------------------------------------------------------------- +Tue May 24 10:32:20 UTC 2016 - jengelh@inai.de + +- Update to new upstream release 2.0.11 +* Updated translations. Added non-uniform knots support. +* Added Edit - Device Options. +* Eliminated crash on save when auto backup is off. +* Eliminated invalid bounding boxes from auto zoom. + +------------------------------------------------------------------- +Mon May 16 13:04:14 UTC 2016 - jslaby@suse.com + +- Update to new upstream release 2.0.10: + * the Arch paper sizes were not properly supported + * the pen toolbar was wider than necessary on super HD displays + * various memory leaks + * build error when using boost version greater than 1.53 + * auto-save could not really be turned off + * file dialog always opened with DXF, instead of the last chosen file type + * the statusbar and statusbar font were not allowed to autosize + * the fixed extension line length option was not working for dimensions + * the program would crash after: modify action -> undo -> repeat modify + action + +------------------------------------------------------------------- +Mon Jan 18 07:43:39 UTC 2016 - jslaby@suse.com + +- Update to new upstream release 2.0.9: + * Mostly a bug fixing release + * Fixed a few crashes due to undo and deleted entities + * More at: + http://forum.librecad.org/2-0-9-released-td5712809.html + +------------------------------------------------------------------- +Wed Sep 9 21:03:17 UTC 2015 - asterios.dramis@gmail.com + +- Update to new upstream release 2.0.8: + * DWG read support. + * SVG export support. + * Arabic Language GUI support. More work is needed for: + Right-to-left support for Text entities. + Arabic fonts for Text. + * More user configurable settings in App Preferences. + * Many fixes and enhancements, see: + http://forum.librecad.org/2-0-8-released-td5712049.html + for details. +- Added new Part Library: + Electrical1-LCAD.zip +- Rebased librecad-install.diff, librecad-no-date.diff and + librecad-use-system-libdxfrw.patch to apply cleanly. +- Added a patch "librecad-use-system-shapelib.patch" to use the + system shapelib instead of the bundled one and new build + requirement libshp-devel (for openSUSE > 13.2). +- Update includes the fix for boo#937874. + +------------------------------------------------------------------- +Thu Apr 30 01:00:13 UTC 2015 - crrodriguez@opensuse.org + +- Switch to QT5 for Factory builds. + +------------------------------------------------------------------- +Sat Jan 31 22:21:05 UTC 2015 - asterios.dramis@gmail.com + +- Update to new upstream release 2.0.7: + * A serious command line regression since 2.0.6 was fixed: + keyboard Enter/Esc support, command line widget in a second + screen, etc. Also fixed are some crashes for tangential circle + drawing and polyline addition. + * Improved LFF font support + * The command line can be used as a calculator by typing math + expression after command “cal”. For example, command "cal 1+1" + to get output "2" + * Many fixes and enhancements, see: + http://blog.librecad.org/ + for details + From version 2.0.5: + * Interpolation spline. Draw->Spline->Spline Points. + * File -> Export as PDF. + * Korean language support. + * Smooth scrolling/zooming + * Work-in-progress, finding enclosed area within a contour. + * “Modify->Round” renamed to “Modify->Fillet”. + * Command line aliases can be made for both regular commands and + short commands. +- Added new Part Libraries: + Architect8-LCAD.zip and Electronics8-LCAD.zip. +- Added new build requirement unzip. +- Rebased librecad-install.diff and + librecad-use-system-libdxfrw.patch to apply cleanly. + +------------------------------------------------------------------- +Wed Aug 13 18:36:35 UTC 2014 - asterios.dramis@gmail.com + +- Update to new upstream release 2.0.4: + * Windows and OS/X printer dialog fails to appear when running Qt5; + * A patched version of muparser is used by default for OS/X and win32; + * Update layer for selected entities when a layer is selected + * Plotting/drawing mathematical equations by smallfix + * Draw circle by 2 points and radius + * PIC file importer by cgrzemba + * Update layer for selected entities when a layer is selected by ajisaacs + * Lots of shortcut fixes by thomas + * Arc angle updates for negative z-axis by coryjc190 + * Drawing order regression in 2.0.3 +- Rebased librecad-use-system-libdxfrw.patch to apply cleanly. + +------------------------------------------------------------------- +Sun May 4 19:21:39 UTC 2014 - asterios.dramis@gmail.com + +- Update to new upstream release 2.0.2: + * Some notable changes visible to users: + + Reworked snapping system to allow simultaneous multiple snapping options; + snapping of equidistant middle points; + + Helping/scratch layer support. Straight lines are kept infinite and + entities are skipped in printout; + + Isometric grids; + + Architectural tick; + + Support of new ellipse features missing in version 1.0, such as, + intersection, middle point, arc length, and tangential direction; + + Several new drawing features for line, circle, and ellipse; + + Improved localization, translation for plugins and standard dialogs; + + Support for a general factor for drawing size dimensions to help scaled + drawings; + + Revert entities direction, developed by effad; + + Some UI tweaking; + + Windows setup registration to add LC in Windows Control Panel ‘Programs + and Features’. + * LibreCAD-2.0 is using a new dxfrw library to handle the DXF file format, + and some advantage of the dxfrw library brings are: + + New dxf library supporting ascii and binary files, more versions and + fully compatible with the specification; + + Support of templates; + + Dimensions: support for aligned / horizontal text; + + Dimensions: added general scale property; + + Added support for single line text. + * Some internal changes since LibreCAD-1.0 series: + + Removed Qt3 dependency; + + Reworked methods to calculate intersections to simplify support for new + entity types; + + Improved many drawing algorithms for performance; + + Added scripts to allow automatic building on OS/X and Windows; + + Added boost and C++11 support ; + + Various code review and bug fixes. + * See http://blog.librecad.org/ for more details. +- Updated License to GPL-2.0 and (Apache-2.0 or + SUSE-GPL-3.0+-with-font-exception). +- Added a man page (ttf2lff.1) for the ttf2lff program. +- Removed bash, dxflib-devel and libqt4-devel-doc build requirements (not + needed anymore). +- Added new build requirements boost-devel, libdxfrw-devel and + wqy-microhei-fonts. +- Added mime_database_post/mime_database_postun entries sice the package + installs a mime file. +- Rebased librecad-no-date.diff to apply cleanly. +- Removed the following patches (not needed anymore): + * librecad-dxflib25.diff + * librecad-external-dxflib.diff +- Added the following patches (taken from Fedora): + * librecad-use-system-libdxfrw.patch (Use system libdxfrw) + +------------------------------------------------------------------- +Sun Jun 23 18:46:58 UTC 2013 - asterios.dramis@gmail.com + +- Update to new upstream release 1.0.3: + * Bugfix release. +- Removed librecad.mime.desktop file (not needed since dxf is part + of the shared-mime-info database). Removed also the respective + update-mime-database post/postun entries. +- Added desktop_database_post/desktop_database_postun entries + since the package defines a MIME handler. + +------------------------------------------------------------------- +Sat May 5 22:10:23 UTC 2012 - jengelh@medozas.de + +- Update to new upstream release 1.0.2 +* replaces dependency on fparser library by + license-compatible muparser + +------------------------------------------------------------------- +Tue Oct 18 01:26:37 UTC 2011 - jengelh@medozas.de + +- Initial package for build.opensuse.org diff --git a/librecad.spec b/librecad.spec new file mode 100644 index 0000000..6d551e9 --- /dev/null +++ b/librecad.spec @@ -0,0 +1,155 @@ +# +# spec file for package librecad +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: librecad +Version: 2.2.1.1 +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 +Group: Productivity/Graphics/CAD +URL: http://librecad.org/ + +#Git-Web: https://github.com/LibreCAD/LibreCAD +Source: https://github.com/LibreCAD/LibreCAD/archive/v%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: https://wiki.librecad.org/images/d/d9/Architect3-LCAD.zip +Source3: https://wiki.librecad.org/images/7/70/Electronics3-LCAD.zip +Source4: https://wiki.librecad.org/images/9/9d/Electrical1-LCAD.zip +Source10: ttf2lff.1 +Source20: %name-rpmlintrc +Patch4: librecad-no-date.diff +Patch6: librecad-install.diff +Patch7: librecad-plugindir.diff +BuildRequires: fdupes +BuildRequires: freetype2-devel +BuildRequires: gcc-c++ >= 4.7 +BuildRequires: libboost_headers-devel +BuildRequires: muparser-devel +BuildRequires: unzip +BuildRequires: update-desktop-files +BuildRequires: wqy-microhei-fonts +BuildRequires: pkgconfig(Qt5Core) +BuildRequires: pkgconfig(Qt5Gui) +BuildRequires: pkgconfig(Qt5Help) +BuildRequires: pkgconfig(Qt5PrintSupport) +BuildRequires: pkgconfig(Qt5Svg) +BuildRequires: pkgconfig(Qt5Widgets) +Requires(post): desktop-file-utils +Requires(post): shared-mime-info +Requires(postun): desktop-file-utils +Requires(postun): shared-mime-info +Recommends: %name-parts + +%description +LibreCAD is a Qt Computer-aided design (CAD) software package for 2D design +and drafting. + +%package parts +Summary: Parts collection for LibreCAD +Group: Productivity/Graphics/CAD +Requires: %name +BuildArch: noarch + +%description parts +Collection of parts for LibreCAD, a Qt application to design 2D +CAD drawings. + +%prep +%setup -qn LibreCAD-%version -a2 -a3 -a4 +%autopatch -p1 + +# Fix "wrong-file-end-of-line-encoding" rpmlint warning +sed -i 's/\r$//' licenses/{MIT,KST32B_v2,lc_opengost-fonts}.txt + +%build +echo 'DISABLE_POSTSCRIPT = true' > librecad/src/custom.pri +qmake-qt5 \ +librecad.pro CONFIG+="release" \ + QMAKE_CFLAGS+="%optflags" QMAKE_CXXFLAGS+="%optflags" +make %{?_smp_mflags} +rm -f unix/resources/fonts/wqy-unicode.lff +mkdir -p unix/resources/fonts +./unix/ttf2lff -L "Apache-2.0 or SUSE-GPL-3.0+-with-font-exception" \ + "%_datadir/fonts/truetype/wqy-microhei.ttc" \ + unix/resources/fonts/wqy-unicode.lff + +%install +b="%buildroot" +# No make install :( +export BUILDDIR="$b/%_datadir/%name" +sh scripts/postprocess-unix.sh + +install -Dpm0755 "unix/%name" "$b/%_bindir/%name" +install -Dpm0755 "unix/ttf2lff" "$b/%_bindir/ttf2lff" +install -Dpm0644 "desktop/%name.1" "$b/%_mandir/man1/%name.1" +p="$b/%_libdir/%name/plugins" +mkdir -p "$p" +install -Dpm0755 unix/resources/plugins/* "$p/" +cat desktop/librecad.desktop +perl -i -lpe 's{(MimeType=.*?);+$}{$1}' desktop/librecad.desktop +cat desktop/librecad.desktop +install -Dpm0644 "desktop/%name.desktop" "$b/%_datadir/applications/%name.desktop" +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/" + +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/" +cp -a Electronic8-LCAD "$b/%_datadir/%name/library/electronics/" +cp -a Electrical1-LCAD "$b/%_datadir/%name/library/electrical/" + +%suse_update_desktop_file -G "CAD Program" -r %name Graphics 2DGraphics VectorGraphics +# Fix rpmlint warning "invalid-desktopfile" +perl -pi -e "s|image/vnd.dxf|image/vnd.dxf;|" %buildroot%_datadir/applications/librecad.desktop + +%fdupes -s %buildroot/%_prefix + +%if 0%{?suse_version} && 0%{?suse_version} < 1550 +%post +%mime_database_post +%desktop_database_post + +%postun +%mime_database_postun +%desktop_database_postun +%endif + +%files +%doc README.md +%license LICENSE licenses/*txt +%_bindir/librecad +%_bindir/ttf2lff +%_libdir/%name +%_mandir/man1/librecad.1* +%_mandir/man1/ttf2lff.1* +%_datadir/applications/librecad.desktop +%_datadir/mime/packages/%name.xml +%_datadir/pixmaps/librecad.png +%dir %_datadir/%name +%_datadir/%name/fonts +%_datadir/%name/patterns +%_datadir/%name/qm + +%files parts +%dir %_datadir/%name +%_datadir/%name/library + +%changelog diff --git a/ttf2lff.1 b/ttf2lff.1 new file mode 100644 index 0000000..9a2e8e3 --- /dev/null +++ b/ttf2lff.1 @@ -0,0 +1,8 @@ +.TH TTF2LFF 1 "July 2012" "Debian GNU/Linux" +.SH NAME +ttf2lff \- ttf to lff converter. +.SH DESCRIPTION +ttf2lff is a font converter. It convert fonts in ttf format to lff format usseful +to use with LibreCAD or another app that uses this format. + +ttf2lff invocation parameters are printed to the console if ttf2lff is called without parameters. diff --git a/v2.2.1.1.tar.gz b/v2.2.1.1.tar.gz new file mode 100644 index 0000000..f4086dd --- /dev/null +++ b/v2.2.1.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:29c2f6fca4e0018f1e99fe324a8e9177780c1b01c435c2950a2c52627a47fdbf +size 18597136