Accepting request 233287 from home:adra:branches:graphics
Update to new upstream release 2.0.2, Updated License, Updated build requirements, Rebased/Removed/Replaced/Added some patches OBS-URL: https://build.opensuse.org/request/show/233287 OBS-URL: https://build.opensuse.org/package/show/graphics/librecad?expand=0&rev=12
This commit is contained in:
3
LibreCAD-2.0.2.tar.gz
Normal file
3
LibreCAD-2.0.2.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ada0e085c7fa89e9021096812abb0e0bd91eb1677cba65c45ace207ce31c1c8d
|
||||
size 15429871
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8c2f5a7e55a4ae41a9bd47e2e7981577c740edd526e1f305cd6cbf581d053f30
|
||||
size 4578450
|
@@ -1,93 +0,0 @@
|
||||
From: Jan Engelhardt <jengelh@medozas.de>
|
||||
Date: 2011-10-18 03:35:40.929010289 +0200
|
||||
Upstream: tbd subject-to-review
|
||||
|
||||
Make librecad work with RibbonSoft dxflib-2.5.x.
|
||||
|
||||
Review notes: not sure if processCodeValuePair() {} is right,
|
||||
but it seems that is the same as was done with dxflib 2.2.
|
||||
|
||||
---
|
||||
src/lib/filters/rs_filterdxf.cpp | 14 +++++++-------
|
||||
src/lib/filters/rs_filterdxf.h | 1 +
|
||||
2 files changed, 8 insertions(+), 7 deletions(-)
|
||||
|
||||
Index: LibreCAD-LibreCAD-a5c34b2/src/lib/filters/rs_filterdxf.cpp
|
||||
===================================================================
|
||||
--- LibreCAD-LibreCAD-a5c34b2.orig/src/lib/filters/rs_filterdxf.cpp
|
||||
+++ LibreCAD-LibreCAD-a5c34b2/src/lib/filters/rs_filterdxf.cpp
|
||||
@@ -1197,7 +1197,7 @@ bool RS_FilterDXF::fileExport(RS_Graphic
|
||||
exportVersion = DL_Codes::AC1015;
|
||||
}
|
||||
|
||||
- //DL_WriterA* dw = dxf.out(file, VER_R12);
|
||||
+ //DL_WriterA* dw = dxf.out(file, DL_VERSION_R12);
|
||||
DL_WriterA* dw = dxf.out((const char*)QFile::encodeName(file), exportVersion);
|
||||
|
||||
if (dw==NULL) {
|
||||
@@ -1687,7 +1687,7 @@ void RS_FilterDXF::writePolyline(DL_Writ
|
||||
first = false;
|
||||
}
|
||||
|
||||
- //if (dxf.getVersion()==VER_R12) {
|
||||
+ //if (dxf.getVersion() == DL_VERSION_R12) {
|
||||
if (nextEntity!=NULL) {
|
||||
if (nextEntity->rtti()==RS2::EntityArc) {
|
||||
bulge = ((RS_Arc*)nextEntity)->getBulge();
|
||||
@@ -1724,7 +1724,7 @@ void RS_FilterDXF::writeSpline(DL_Writer
|
||||
const DL_Attributes& attrib) {
|
||||
|
||||
// split spline into atomic entities for DXF R12:
|
||||
- if (dxf.getVersion()==VER_R12) {
|
||||
+ if (dxf.getVersion() == DL_VERSION_R12) {
|
||||
writeAtomicEntities(dw, s, attrib, RS2::ResolveNone);
|
||||
return;
|
||||
}
|
||||
@@ -1879,7 +1879,7 @@ void RS_FilterDXF::writeInsert(DL_Writer
|
||||
void RS_FilterDXF::writeText(DL_WriterA& dw, RS_Text* t,
|
||||
const DL_Attributes& attrib) {
|
||||
|
||||
- if (dxf.getVersion()==VER_R12) {
|
||||
+ if (dxf.getVersion() == DL_VERSION_R12) {
|
||||
int hJust=0;
|
||||
int vJust=0;
|
||||
if (t->getHAlign()==RS2::HAlignLeft) {
|
||||
@@ -1956,7 +1956,7 @@ void RS_FilterDXF::writeDimension(DL_Wri
|
||||
const DL_Attributes& attrib) {
|
||||
|
||||
// split hatch into atomic entities:
|
||||
- if (dxf.getVersion()==VER_R12) {
|
||||
+ if (dxf.getVersion() == DL_VERSION_R12) {
|
||||
writeAtomicEntities(dw, d, attrib, RS2::ResolveNone);
|
||||
return;
|
||||
}
|
||||
@@ -2123,7 +2123,7 @@ void RS_FilterDXF::writeHatch(DL_WriterA
|
||||
const DL_Attributes& attrib) {
|
||||
|
||||
// split hatch into atomic entities:
|
||||
- if (dxf.getVersion()==VER_R12) {
|
||||
+ if (dxf.getVersion() == DL_VERSION_R12) {
|
||||
writeAtomicEntities(dw, h, attrib, RS2::ResolveAll);
|
||||
return;
|
||||
}
|
||||
@@ -2226,7 +2226,7 @@ void RS_FilterDXF::writeSolid(DL_WriterA
|
||||
const DL_Attributes& attrib) {
|
||||
|
||||
// split solid into line entities:
|
||||
- //if (dxf.getVersion()==VER_R12) {
|
||||
+ //if (dxf.getVersion() == DL_VERSION_R12) {
|
||||
for (int i=0; i<3; ++i) {
|
||||
dxf.writeLine(
|
||||
dw,
|
||||
Index: LibreCAD-LibreCAD-a5c34b2/src/lib/filters/rs_filterdxf.h
|
||||
===================================================================
|
||||
--- LibreCAD-LibreCAD-a5c34b2.orig/src/lib/filters/rs_filterdxf.h
|
||||
+++ LibreCAD-LibreCAD-a5c34b2/src/lib/filters/rs_filterdxf.h
|
||||
@@ -79,6 +79,7 @@ public:
|
||||
virtual bool fileImport(RS_Graphic& g, const QString& file, RS2::FormatType /*type*/);
|
||||
|
||||
// Methods from DL_CreationInterface:
|
||||
+ virtual void processCodeValuePair(unsigned int, char *) {};
|
||||
virtual void addLayer(const DL_LayerData& data);
|
||||
virtual void addBlock(const DL_BlockData& data);
|
||||
virtual void endBlock();
|
@@ -1,60 +0,0 @@
|
||||
Description: use debian packaged fparser
|
||||
Author: Scott Howard <showard@debian.org>
|
||||
Author: Lisandro Damián Nicanor Pérez Meyer
|
||||
Last-Update: 2011-08-05
|
||||
|
||||
|
||||
---
|
||||
librecad.pro | 18 +++---------------
|
||||
1 file changed, 3 insertions(+), 15 deletions(-)
|
||||
|
||||
Index: LibreCAD-LibreCAD-a5c34b2/librecad.pro
|
||||
===================================================================
|
||||
--- LibreCAD-LibreCAD-a5c34b2.orig/librecad.pro
|
||||
+++ LibreCAD-LibreCAD-a5c34b2/librecad.pro
|
||||
@@ -69,8 +69,8 @@ win32 {
|
||||
|
||||
|
||||
# Additional libraries to load
|
||||
-# LIBS += \
|
||||
-# -Ldxflib/lib -ldxf \
|
||||
+LIBS += \
|
||||
+ -ldxflib
|
||||
# Store intermedia stuff somewhere else
|
||||
OBJECTS_DIR = intermediate/obj
|
||||
MOC_DIR = intermediate/moc
|
||||
@@ -84,7 +84,7 @@ RESOURCES += res/extui/extui.qrc
|
||||
LIBS += -lmuparser
|
||||
|
||||
INCLUDEPATH += \
|
||||
- dxflib/src \
|
||||
+ /usr/include/dxflib \
|
||||
src/cmd \
|
||||
src/lib/actions \
|
||||
src/lib/creation \
|
||||
@@ -109,16 +109,6 @@ DEPENDPATH = $$INCLUDEPATH
|
||||
# ################################################################################
|
||||
# Library
|
||||
HEADERS = \
|
||||
- dxflib/src/dl_attributes.h \
|
||||
- dxflib/src/dl_codes.h \
|
||||
- dxflib/src/dl_creationadapter.h \
|
||||
- dxflib/src/dl_creationinterface.h \
|
||||
- dxflib/src/dl_dxf.h \
|
||||
- dxflib/src/dl_entities.h \
|
||||
- dxflib/src/dl_exception.h \
|
||||
- dxflib/src/dl_extrusion.h \
|
||||
- dxflib/src/dl_writer.h \
|
||||
- dxflib/src/dl_writer_ascii.h \
|
||||
src/lib/actions/rs_actioninterface.h \
|
||||
src/lib/actions/rs_preview.h \
|
||||
src/lib/actions/rs_previewactioninterface.h \
|
||||
@@ -216,8 +206,6 @@ HEADERS = \
|
||||
src/plugins/intern/qc_actiongetent.h
|
||||
|
||||
SOURCES = \
|
||||
- dxflib/src/dl_dxf.cpp \
|
||||
- dxflib/src/dl_writer_ascii.cpp \
|
||||
src/lib/actions/rs_actioninterface.cpp \
|
||||
src/lib/actions/rs_preview.cpp \
|
||||
src/lib/actions/rs_previewactioninterface.cpp \
|
@@ -1,30 +0,0 @@
|
||||
---
|
||||
librecad.pro | 1 -
|
||||
scripts/postprocess-unix.sh | 2 +-
|
||||
2 files changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
Index: LibreCAD-LibreCAD-a5c34b2/librecad.pro
|
||||
===================================================================
|
||||
--- LibreCAD-LibreCAD-a5c34b2.orig/librecad.pro
|
||||
+++ LibreCAD-LibreCAD-a5c34b2/librecad.pro
|
||||
@@ -49,7 +49,6 @@ unix {
|
||||
INCLUDEPATH += "/usr/include/muParser"
|
||||
}
|
||||
|
||||
- QMAKE_POST_LINK = scripts/postprocess-unix.sh
|
||||
}
|
||||
}
|
||||
win32 {
|
||||
Index: LibreCAD-LibreCAD-a5c34b2/scripts/postprocess-unix.sh
|
||||
===================================================================
|
||||
--- LibreCAD-LibreCAD-a5c34b2.orig/scripts/postprocess-unix.sh
|
||||
+++ LibreCAD-LibreCAD-a5c34b2/scripts/postprocess-unix.sh
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
THISDIR="`pwd`"
|
||||
-RESOURCEDIR="${THISDIR}/unix/resources"
|
||||
+RESOURCEDIR=$BUILDDIR
|
||||
TSDIR="${THISDIR}/ts"
|
||||
DOCDIR="${THISDIR}/support/doc"
|
||||
|
23
librecad-install.patch
Normal file
23
librecad-install.patch
Normal file
@@ -0,0 +1,23 @@
|
||||
diff -up LibreCAD-f87828ec55def73aaa8c3c3e158fc1abc8171b63/librecad/src/src.pro.install LibreCAD-f87828ec55def73aaa8c3c3e158fc1abc8171b63/librecad/src/src.pro
|
||||
--- LibreCAD-f87828ec55def73aaa8c3c3e158fc1abc8171b63/librecad/src/src.pro.install 2013-10-18 01:06:00.805457502 +0100
|
||||
+++ LibreCAD-f87828ec55def73aaa8c3c3e158fc1abc8171b63/librecad/src/src.pro 2013-10-18 01:06:00.807457490 +0100
|
||||
@@ -57,7 +57,6 @@ unix {
|
||||
DEFINES += QC_APPDIR="\"librecad\""
|
||||
DEFINES += QINITIMAGES_LIBRECAD="qInitImages_librecad"
|
||||
RC_FILE = ../res/main/librecad.icns
|
||||
- QMAKE_POST_LINK = cd $$_PRO_FILE_PWD_/../.. && scripts/postprocess-unix.sh
|
||||
}
|
||||
}
|
||||
win32 {
|
||||
diff -up LibreCAD-f87828ec55def73aaa8c3c3e158fc1abc8171b63/scripts/postprocess-unix.sh.install LibreCAD-f87828ec55def73aaa8c3c3e158fc1abc8171b63/scripts/postprocess-unix.sh
|
||||
--- LibreCAD-f87828ec55def73aaa8c3c3e158fc1abc8171b63/scripts/postprocess-unix.sh.install 2013-10-18 01:06:00.807457490 +0100
|
||||
+++ LibreCAD-f87828ec55def73aaa8c3c3e158fc1abc8171b63/scripts/postprocess-unix.sh 2013-10-18 01:06:38.471238579 +0100
|
||||
@@ -3,7 +3,7 @@
|
||||
THISDIR="`pwd`"
|
||||
LCDIR="${THISDIR}/librecad"
|
||||
PIDIR="${THISDIR}/plugins"
|
||||
-RESOURCEDIR="${THISDIR}/unix/resources"
|
||||
+RESOURCEDIR=$BUILDDIR
|
||||
TSDIRLC="${LCDIR}/ts"
|
||||
TSDIRPI="${PIDIR}/ts"
|
||||
SPTDIR="${LCDIR}/support"
|
@@ -1,15 +1,9 @@
|
||||
---
|
||||
src/main/qc_applicationwindow.cpp | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
Index: LibreCAD-LibreCAD-a5c34b2/src/main/qc_applicationwindow.cpp
|
||||
===================================================================
|
||||
--- LibreCAD-LibreCAD-a5c34b2.orig/src/main/qc_applicationwindow.cpp
|
||||
+++ LibreCAD-LibreCAD-a5c34b2/src/main/qc_applicationwindow.cpp
|
||||
@@ -2966,7 +2966,6 @@ void QC_ApplicationWindow::slotHelpAbout
|
||||
#ifdef QC_SCMREVISION
|
||||
tr("SCM Revision: %1").arg(XSTR(QC_SCMREVISION)) + "<br>" +
|
||||
--- LibreCAD-2.0.2/librecad/src/main/qc_applicationwindow.cpp.orig 2014-01-09 20:31:10.000000000 +0200
|
||||
+++ LibreCAD-2.0.2/librecad/src/main/qc_applicationwindow.cpp 2014-04-20 20:09:25.808375807 +0300
|
||||
@@ -3851,7 +3851,6 @@
|
||||
tr("Compiler: Microsoft Visual C++<br>") +
|
||||
#endif
|
||||
tr("Qt Version: %1").arg(qVersion()) + "<br>" +
|
||||
- tr("Compiled on: %1").arg(__DATE__) + "<br>" +
|
||||
"Portions (c) 2011 by R. van Twisk" + "<br>" +
|
||||
tr("Program Icons Supplied by") +"<br> Pablo: LibreCAD Argentine<br/>" +
|
||||
|
@@ -1,22 +0,0 @@
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
Date: 2012-05-11 08:16:47.544680812 +0200
|
||||
|
||||
Look in the right spot for plugins.
|
||||
|
||||
---
|
||||
src/lib/engine/rs_system.cpp | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
Index: LibreCAD-LibreCAD-a5c34b2/src/lib/engine/rs_system.cpp
|
||||
===================================================================
|
||||
--- LibreCAD-LibreCAD-a5c34b2.orig/src/lib/engine/rs_system.cpp
|
||||
+++ LibreCAD-LibreCAD-a5c34b2/src/lib/engine/rs_system.cpp
|
||||
@@ -548,6 +548,8 @@ QStringList RS_System::getDirectoryList(
|
||||
}
|
||||
RS_SETTINGS->endGroup();
|
||||
|
||||
+ dirList.append(CONFIG_LIBDIR "/" + appDirName + "/" + subDirectory);
|
||||
+
|
||||
QStringList ret;
|
||||
|
||||
RS_DEBUG->print("RS_System::getDirectoryList: Paths:");
|
14
librecad-plugindir.patch
Normal file
14
librecad-plugindir.patch
Normal file
@@ -0,0 +1,14 @@
|
||||
diff -U 3 -H -d -r -N -- a/src/lib/engine/rs_system.cpp b/src/lib/engine/rs_system.cpp
|
||||
--- a/librecad/src/lib/engine/rs_system.cpp 2011-08-14 07:28:00.000000000 +0200
|
||||
+++ b/librecad/src/lib/engine/rs_system.cpp 2011-08-15 11:47:16.000000000 +0200
|
||||
@@ -530,6 +530,10 @@
|
||||
}
|
||||
RS_SETTINGS->endGroup();
|
||||
|
||||
+ if (subDirectory=="plugins") {
|
||||
+ dirList.append("##LIBDIR##" + appDirName + "/" + subDirectory);
|
||||
+ }
|
||||
+
|
||||
QStringList ret;
|
||||
|
||||
RS_DEBUG->print("RS_System::getDirectoryList: Paths:");
|
31
librecad-use-system-libdxfrw.patch
Normal file
31
librecad-use-system-libdxfrw.patch
Normal file
@@ -0,0 +1,31 @@
|
||||
diff -up LibreCAD-f87828ec55def73aaa8c3c3e158fc1abc8171b63/libraries/libraries.pro.system LibreCAD-f87828ec55def73aaa8c3c3e158fc1abc8171b63/libraries/libraries.pro
|
||||
--- LibreCAD-f87828ec55def73aaa8c3c3e158fc1abc8171b63/libraries/libraries.pro.system 2013-08-31 02:29:18.000000000 +0100
|
||||
+++ LibreCAD-f87828ec55def73aaa8c3c3e158fc1abc8171b63/libraries/libraries.pro 2013-10-18 01:04:14.278115312 +0100
|
||||
@@ -9,7 +9,6 @@ TEMPLATE = subdirs
|
||||
TARGET = libraries
|
||||
|
||||
SUBDIRS = \
|
||||
- libdxfrw \
|
||||
jwwlib
|
||||
|
||||
|
||||
diff -up LibreCAD-f87828ec55def73aaa8c3c3e158fc1abc8171b63/librecad/src/src.pro.system LibreCAD-f87828ec55def73aaa8c3c3e158fc1abc8171b63/librecad/src/src.pro
|
||||
--- LibreCAD-f87828ec55def73aaa8c3c3e158fc1abc8171b63/librecad/src/src.pro.system 2013-08-31 02:29:18.000000000 +0100
|
||||
+++ LibreCAD-f87828ec55def73aaa8c3c3e158fc1abc8171b63/librecad/src/src.pro 2013-10-18 01:05:25.853666886 +0100
|
||||
@@ -36,7 +36,6 @@ greaterThan( QT_MAJOR_VERSION, 4 ) {
|
||||
CONFIG += help
|
||||
}
|
||||
|
||||
-PRE_TARGETDEPS += ../../generated/lib/libdxfrw.a
|
||||
PRE_TARGETDEPS += ../../generated/lib/libjwwlib.a
|
||||
|
||||
DESTDIR = $${INSTALLDIR}
|
||||
@@ -76,7 +75,7 @@ LIBS += -L../../generated/lib \
|
||||
-ljwwlib
|
||||
|
||||
DEPENDPATH += \
|
||||
- ../../libraries/libdxfrw/src \
|
||||
+ $${DXFRW_INCLUDEDIR} \
|
||||
../../libraries/jwwlib/src \
|
||||
cmd \
|
||||
lib/actions \
|
@@ -1,3 +1,60 @@
|
||||
-------------------------------------------------------------------
|
||||
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
|
||||
- Replaced the following patches (with ones taken from Fedora):
|
||||
* librecad-install.diff with librecad-install.patch
|
||||
* librecad-plugindir.diff with librecad-plugindir.patch
|
||||
- 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
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package librecad
|
||||
#
|
||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -16,34 +16,42 @@
|
||||
#
|
||||
|
||||
|
||||
%global dxfrw_includedir %(pkg-config --cflags-only-I libdxfrw0 | sed 's|-I||g')
|
||||
|
||||
Name: librecad
|
||||
Version: 1.0.3
|
||||
Version: 2.0.2
|
||||
Release: 0
|
||||
Summary: Computer-aided design (CAD) software package for 2D design and drafting
|
||||
License: GPL-2.0
|
||||
License: GPL-2.0 and (Apache-2.0 or SUSE-GPL-3.0+-with-font-exception)
|
||||
Group: Productivity/Graphics/CAD
|
||||
Url: http://librecad.org/
|
||||
|
||||
#Git-Clone: git://github.com/LibreCAD/LibreCAD
|
||||
#Git-Web: http://github.com/LibreCAD/LibreCAD/tags
|
||||
#DL-URL: http://github.com/LibreCAD/LibreCAD/archive/v1.0.3/librecad-1.0.3.tar.gz
|
||||
Source: %name-%version.tar.gz
|
||||
#DL-URL: https://github.com/LibreCAD/LibreCAD/archive/2.0.3.tar.gz
|
||||
Source0: LibreCAD-%version.tar.gz
|
||||
Source1: ttf2lff.1
|
||||
Source2: %name-rpmlintrc
|
||||
Patch1: librecad-no-date.diff
|
||||
Patch2: librecad-dxflib25.diff
|
||||
Patch3: librecad-external-dxflib.diff
|
||||
Patch4: librecad-install.diff
|
||||
Patch5: librecad-plugindir.diff
|
||||
BuildRequires: bash
|
||||
BuildRequires: dxflib-devel
|
||||
# PATCH-FIX-OPENSUSE librecad-no-date.diff -- Remove build time references so build-compare can do its work
|
||||
Patch0: librecad-no-date.diff
|
||||
# PATCH-FIX-UPSTREAM librecad-use-system-libdxfrw.patch asterios.dramis@gmail.com -- Use system libdxfrw (patch taken from Fedora)
|
||||
Patch1: librecad-use-system-libdxfrw.patch
|
||||
# PATCH-FIX-OPENSUSE librecad-install.patch -- Fix install (patch taken from Fedora)
|
||||
Patch2: librecad-install.patch
|
||||
# PATCH-FIX-OPENSUSE librecad-plugindir.patch -- Look in the right spot for plugins (patch taken from Fedora)
|
||||
Patch3: librecad-plugindir.patch
|
||||
BuildRequires: boost-devel
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libdxfrw-devel
|
||||
BuildRequires: libqt4-devel
|
||||
BuildRequires: libqt4-devel-doc
|
||||
BuildRequires: muparser-devel
|
||||
BuildRequires: update-desktop-files
|
||||
BuildRequires: wqy-microhei-fonts
|
||||
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
|
||||
@@ -66,31 +74,41 @@ CAD drawings.
|
||||
|
||||
%prep
|
||||
%setup -qn LibreCAD-%version
|
||||
%patch -P 1 -P 2 -P 3 -P 4 -P 5 -p1
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
# Fix paths
|
||||
sed -i 's|##LIBDIR##|%{_libdir}|g' librecad/src/lib/engine/rs_system.cpp
|
||||
sed -i 's|$${DXFRW_INCLUDEDIR}|%{dxfrw_includedir}|g' librecad/src/src.pro
|
||||
|
||||
# Make sure bundled libraries are not used
|
||||
rm -rf libraries/libdxfrw
|
||||
|
||||
%build
|
||||
# qmake seems to have an extra expansion step, so we need one more escape step.
|
||||
f="%optflags -DCONFIG_LIBDIR=\\\\\\\"%_libdir\\\\\\\"";
|
||||
qmake CONFIG+="release" QMAKE_CFLAGS+="$f" QMAKE_CXXFLAGS+="$f";
|
||||
make %{?_smp_mflags};
|
||||
pushd plugins/;
|
||||
qmake CONFIG+="release" QMAKE_CFLAGS+="%optflags" QMAKE_CXXFLAGS+="%optflags";
|
||||
make %{?_smp_mflags};
|
||||
popd;
|
||||
qmake 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" /usr/share/fonts/truetype/wqy-microhei.ttc unix/resources/fonts/wqy-unicode.lff
|
||||
|
||||
%install
|
||||
b="%buildroot";
|
||||
# No make install :(
|
||||
export BUILDDIR="%buildroot/%_datadir/%name";
|
||||
bash scripts/postprocess-unix.sh;
|
||||
sh scripts/postprocess-unix.sh;
|
||||
|
||||
install -Dpm0755 "unix/%name" "$b/%_bindir/%name";
|
||||
install -Dpm0644 desktop/%name.1 "$b/%_mandir/man1/%name.1";
|
||||
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/";
|
||||
install -Dpm0644 "desktop/%name.desktop" "$b/%_datadir/applications/%name.desktop";
|
||||
install -Dpm0644 "res/main/%name.png" "$b/%_datadir/pixmaps/%name.png";
|
||||
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 %SOURCE1 "$b/%_mandir/man1/ttf2lff.1"
|
||||
|
||||
%if 0%{?suse_version}
|
||||
%suse_update_desktop_file -G "CAD Program" -r %name Graphics 2DGraphics VectorGraphics
|
||||
@@ -101,18 +119,23 @@ perl -pi -e "s|image/vnd.dxf|image/vnd.dxf;|" %buildroot%_datadir/applications/l
|
||||
%fdupes -s %buildroot
|
||||
|
||||
%post
|
||||
%mime_database_post
|
||||
%desktop_database_post
|
||||
|
||||
%postun
|
||||
%mime_database_postun
|
||||
%desktop_database_postun
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc gpl-2.0.txt
|
||||
%doc LICENSE* README.md gpl-2.0*
|
||||
%_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
|
||||
|
8
ttf2lff.1
Normal file
8
ttf2lff.1
Normal file
@@ -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.
|
Reference in New Issue
Block a user