Add patches from rallaz
OBS-URL: https://build.opensuse.org/package/show/graphics/librecad?expand=0&rev=6
This commit is contained in:
parent
0a9dabf40a
commit
0888b7cde0
@ -12,10 +12,10 @@ but it seems that is the same as was done with dxflib 2.2.
|
|||||||
src/lib/filters/rs_filterdxf.h | 1 +
|
src/lib/filters/rs_filterdxf.h | 1 +
|
||||||
2 files changed, 8 insertions(+), 7 deletions(-)
|
2 files changed, 8 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
Index: LibreCAD/src/lib/filters/rs_filterdxf.cpp
|
Index: LibreCAD-LibreCAD-a5c34b2/src/lib/filters/rs_filterdxf.cpp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- LibreCAD.orig/src/lib/filters/rs_filterdxf.cpp
|
--- LibreCAD-LibreCAD-a5c34b2.orig/src/lib/filters/rs_filterdxf.cpp
|
||||||
+++ LibreCAD/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
|
@@ -1197,7 +1197,7 @@ bool RS_FilterDXF::fileExport(RS_Graphic
|
||||||
exportVersion = DL_Codes::AC1015;
|
exportVersion = DL_Codes::AC1015;
|
||||||
}
|
}
|
||||||
@ -79,10 +79,10 @@ Index: LibreCAD/src/lib/filters/rs_filterdxf.cpp
|
|||||||
for (int i=0; i<3; ++i) {
|
for (int i=0; i<3; ++i) {
|
||||||
dxf.writeLine(
|
dxf.writeLine(
|
||||||
dw,
|
dw,
|
||||||
Index: LibreCAD/src/lib/filters/rs_filterdxf.h
|
Index: LibreCAD-LibreCAD-a5c34b2/src/lib/filters/rs_filterdxf.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- LibreCAD.orig/src/lib/filters/rs_filterdxf.h
|
--- LibreCAD-LibreCAD-a5c34b2.orig/src/lib/filters/rs_filterdxf.h
|
||||||
+++ LibreCAD/src/lib/filters/rs_filterdxf.h
|
+++ LibreCAD-LibreCAD-a5c34b2/src/lib/filters/rs_filterdxf.h
|
||||||
@@ -79,6 +79,7 @@ public:
|
@@ -79,6 +79,7 @@ public:
|
||||||
virtual bool fileImport(RS_Graphic& g, const QString& file, RS2::FormatType /*type*/);
|
virtual bool fileImport(RS_Graphic& g, const QString& file, RS2::FormatType /*type*/);
|
||||||
|
|
||||||
|
60
librecad-external-dxflib.diff
Normal file
60
librecad-external-dxflib.diff
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
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 \
|
30
librecad-install.diff
Normal file
30
librecad-install.diff
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
---
|
||||||
|
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"
|
||||||
|
|
@ -2,11 +2,11 @@
|
|||||||
src/main/qc_applicationwindow.cpp | 1 -
|
src/main/qc_applicationwindow.cpp | 1 -
|
||||||
1 file changed, 1 deletion(-)
|
1 file changed, 1 deletion(-)
|
||||||
|
|
||||||
Index: LibreCAD/src/main/qc_applicationwindow.cpp
|
Index: LibreCAD-LibreCAD-a5c34b2/src/main/qc_applicationwindow.cpp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- LibreCAD.orig/src/main/qc_applicationwindow.cpp
|
--- LibreCAD-LibreCAD-a5c34b2.orig/src/main/qc_applicationwindow.cpp
|
||||||
+++ LibreCAD/src/main/qc_applicationwindow.cpp
|
+++ LibreCAD-LibreCAD-a5c34b2/src/main/qc_applicationwindow.cpp
|
||||||
@@ -2933,7 +2933,6 @@ void QC_ApplicationWindow::slotHelpAbout
|
@@ -2966,7 +2966,6 @@ void QC_ApplicationWindow::slotHelpAbout
|
||||||
#ifdef QC_SCMREVISION
|
#ifdef QC_SCMREVISION
|
||||||
tr("SCM Revision: %1").arg(XSTR(QC_SCMREVISION)) + "<br>" +
|
tr("SCM Revision: %1").arg(XSTR(QC_SCMREVISION)) + "<br>" +
|
||||||
#endif
|
#endif
|
||||||
|
22
librecad-plugindir.diff
Normal file
22
librecad-plugindir.diff
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
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:");
|
8
librecad.mime.desktop
Normal file
8
librecad.mime.desktop
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Encoding=UTF-8
|
||||||
|
Type=MimeType
|
||||||
|
MimeType=image/vnd.dxf
|
||||||
|
Icon=librecad
|
||||||
|
Patterns=*.dxf;*.DXF;
|
||||||
|
Comment=DXF Vectorial Graphic
|
||||||
|
X-KDE-AutoEmbed=false
|
@ -27,30 +27,94 @@ Provides: qcad
|
|||||||
Obsoletes: qcad <= 2.0.5
|
Obsoletes: qcad <= 2.0.5
|
||||||
|
|
||||||
#Git-Clone: git://github.com/LibreCAD/LibreCAD
|
#Git-Clone: git://github.com/LibreCAD/LibreCAD
|
||||||
Source: librecad-%version.tar.xz
|
#Git-Web: https://github.com/LibreCAD/LibreCAD/tags
|
||||||
|
#DL-URL: https://github.com/LibreCAD/LibreCAD/tarball/v1.0.2
|
||||||
|
Source: %name-%version.tar.xz
|
||||||
Source2: %name-rpmlintrc
|
Source2: %name-rpmlintrc
|
||||||
Patch1: librecad-dxflib25.diff
|
Source3: librecad.mime.desktop
|
||||||
Patch2: librecad-no-date.diff
|
Patch1: librecad-no-date.diff
|
||||||
|
Patch2: librecad-dxflib25.diff
|
||||||
|
Patch3: librecad-external-dxflib.diff
|
||||||
|
Patch4: librecad-install.diff
|
||||||
|
Patch5: librecad-plugindir.diff
|
||||||
BuildRoot: %_tmppath/%name-%version-build
|
BuildRoot: %_tmppath/%name-%version-build
|
||||||
BuildRequires: gcc-c++, dxflib-devel, fparser-devel, libqt4-devel, xz
|
BuildRequires: bash, fdupes, gcc-c++, dxflib-devel, muparser-devel
|
||||||
|
BuildRequires: libqt4-devel, libqt4-devel-doc, update-desktop-files, xz
|
||||||
|
Requires(post): shared-mime-info
|
||||||
|
Requires(postun): shared-mime-info
|
||||||
|
Recommends: %name-parts
|
||||||
|
|
||||||
%description
|
%description
|
||||||
|
LibreCAD is a Qt4 application to design 2D CAD drawings.
|
||||||
|
|
||||||
|
%package parts
|
||||||
|
Summary: Parts collection for LibreCAD
|
||||||
|
Requires: %name
|
||||||
|
Group: Productivity/Graphics/CAD
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description parts
|
||||||
|
Collection of parts for LibreCAD, a Qt4 application to design 2D
|
||||||
|
CAD drawings.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -qn LibreCAD-LibreCAD-a5c34b2
|
%setup -qn LibreCAD-LibreCAD-a5c34b2
|
||||||
%patch -P 1 -P 2 -p1
|
%patch -P 1 -P 2 -P 3 -P 4 -P 5 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
qmake QMAKE_CFLAGS+="%optflags" QMAKE_CXXFLAGS+="%optflags";
|
# 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};
|
make %{?_smp_mflags};
|
||||||
|
pushd plugins/;
|
||||||
|
qmake CONFIG+="release" QMAKE_CFLAGS+="%optflags" QMAKE_CXXFLAGS+="%optflags";
|
||||||
|
make %{?_smp_mflags};
|
||||||
|
popd;
|
||||||
|
|
||||||
%install
|
%install
|
||||||
b="%buildroot";
|
b="%buildroot";
|
||||||
mkdir -p "$b/%_bindir";
|
# No make install :(
|
||||||
install -pm0755 unix/librecad "$b/%_bindir/";
|
export BUILDDIR="%buildroot/%_datadir/%name";
|
||||||
|
bash scripts/postprocess-unix.sh;
|
||||||
|
|
||||||
|
install -Dpm0755 "unix/%name" "$b/%_bindir/%name";
|
||||||
|
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 "%{S:3}" "$b/%_datadir/mime/image/dxf.desktop";
|
||||||
|
|
||||||
|
#find "$b/%_datadir/%name" -type f -exec chmod a-x "{}" "+";
|
||||||
|
|
||||||
|
%if 0%{?suse_version}
|
||||||
|
%suse_update_desktop_file -r %name Graphics VectorGraphics
|
||||||
|
%suse_update_desktop_file %buildroot/%_datadir/mime/image/dxf.desktop
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%post
|
||||||
|
%_bindir/update-mime-database %_datadir/mime >/dev/null || :
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%_bindir/update-mime-database %_datadir/mime >/dev/null || :
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%_bindir/librecad
|
%_bindir/librecad
|
||||||
|
%_libdir/%name
|
||||||
|
%_mandir/man1/librecad.1*
|
||||||
|
%_datadir/applications/librecad.desktop
|
||||||
|
%_datadir/mime/image/dxf.desktop
|
||||||
|
%_datadir/pixmaps/librecad.png
|
||||||
|
%dir %_datadir/%name
|
||||||
|
%_datadir/%name/fonts
|
||||||
|
%_datadir/%name/patterns
|
||||||
|
%_datadir/%name/qm
|
||||||
|
|
||||||
|
%files parts
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%dir %_datadir/%name
|
||||||
|
%_datadir/%name/library
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user