Accepting request 88791 from home:jengelh:dev

fate#312880

OBS-URL: https://build.opensuse.org/request/show/88791
OBS-URL: https://build.opensuse.org/package/show/graphics/librecad?expand=0&rev=1
This commit is contained in:
2011-10-19 21:15:23 +00:00
committed by Git OBS Bridge
commit 8087c2a89d
9 changed files with 252 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -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

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

View File

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

93
librecad-dxflib25.diff Normal file
View File

@@ -0,0 +1,93 @@
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/src/lib/filters/rs_filterdxf.cpp
===================================================================
--- LibreCAD.orig/src/lib/filters/rs_filterdxf.cpp
+++ LibreCAD/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/src/lib/filters/rs_filterdxf.h
===================================================================
--- LibreCAD.orig/src/lib/filters/rs_filterdxf.h
+++ LibreCAD/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();

16
librecad-no-date.diff Normal file
View File

@@ -0,0 +1,16 @@
---
src/main/qc_applicationwindow.cpp | 1 -
1 file changed, 1 deletion(-)
Index: LibreCAD/src/main/qc_applicationwindow.cpp
===================================================================
--- LibreCAD.orig/src/main/qc_applicationwindow.cpp
+++ LibreCAD/src/main/qc_applicationwindow.cpp
@@ -2933,7 +2933,6 @@ void QC_ApplicationWindow::slotHelpAbout
#ifdef QC_SCMREVISION
tr("SCM Revision: %1").arg(XSTR(QC_SCMREVISION)) + "<br>" +
#endif
- tr("Compiled on: %1").arg(__DATE__) + "<br>" +
"Portions (c) 2011 by R. van Twisk" + "<br>" +
tr("Program Icons Supplied by") +"<br>&nbsp;&nbsp;&nbsp;Pablo: LibreCAD Argentine<br/>" +
tr("Splash and Logo supplied by") + "<br>&nbsp;&nbsp;&nbsp;Diego " + "<a href=\"http://daltom.2082studio.com/\">Daltom Designer</a>" + "<br/>" +

2
librecad-rpmlintrc Normal file
View File

@@ -0,0 +1,2 @@
# We are not a library, dammit
addFilter("shlib-policy-missing-lib")

58
librecad-use-fparser.diff Normal file
View File

@@ -0,0 +1,58 @@
Description: use debian packaged fparser
Author: Scott Howard <showard@debian.org>
Author: Lisandro Damián Nicanor Pérez Meyer
Last-Update: 2011-08-05
--- a/librecad.pro
+++ b/librecad.pro
@@ -61,8 +61,9 @@
# Additional libraries to load
-# LIBS += \
-# -Ldxflib/lib -ldxf \
+LIBS += \
+ -lfparser \
+ -ldxflib
# Store intermedia stuff somewhere else
OBJECTS_DIR = intermediate/obj
MOC_DIR = intermediate/moc
@@ -74,8 +75,7 @@
RESOURCES += res/extui/extui.qrc
INCLUDEPATH += \
- dxflib/src \
- fparser \
+ /usr/include/dxflib \
src/cmd \
src/lib/actions \
src/lib/creation \
@@ -98,17 +98,6 @@
# ################################################################################
# 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 \
- fparser/fparser.hh \
src/lib/actions/rs_actioninterface.h \
src/lib/actions/rs_preview.h \
src/lib/actions/rs_previewactioninterface.h \
@@ -205,9 +194,6 @@
src/plugins/intern/qc_actiongetent.h
SOURCES = \
- dxflib/src/dl_dxf.cpp \
- dxflib/src/dl_writer_ascii.cpp \
- fparser/fparser.cc \
src/lib/actions/rs_actioninterface.cpp \
src/lib/actions/rs_preview.cpp \
src/lib/actions/rs_previewactioninterface.cpp \

4
librecad.changes Normal file
View File

@@ -0,0 +1,4 @@
-------------------------------------------------------------------
Tue Oct 18 01:26:37 UTC 2011 - jengelh@medozas.de
- Initial package for build.opensuse.org

52
librecad.spec Normal file
View File

@@ -0,0 +1,52 @@
#
# spec file for package librecad
#
# Copyright (c) 2011 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
# 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 http://bugs.opensuse.org/
#
Name: librecad
Summary: Computer-aided design (CAD) software package for 2D design and drafting
Version: 1.0.0.rc3
Release: 0
URL: http://librecad.org/
License: GPL-2.0
Group: Productivity/Graphics/CAD
#Git-Clone: git://github.com/LibreCAD/LibreCAD
Source: %name-1.0.0~rc3-gac2797b.tar.xz
Source2: %name-rpmlintrc
Patch1: librecad-dxflib25.diff
Patch2: librecad-use-fparser.diff
Patch3: librecad-no-date.diff
BuildRoot: %_tmppath/%name-%version-build
BuildRequires: dxflib-devel, fparser-devel, libqt4-devel, xz
%description
%prep
%setup -qn LibreCAD
%patch -P 1 -P 2 -P 3 -p1
%build
qmake QMAKE_CFLAGS+="%optflags" QMAKE_CXXFLAGS+="%optflags";
make %{?_smp_mflags};
%install
b="%buildroot";
mkdir -p "$b/%_bindir";
install -pm0755 unix/librecad "$b/%_bindir/";
%files
%defattr(-,root,root)
%_bindir/librecad