From 7e0b93e28617a6ac9ebf74ba88f4e805d796a918 Mon Sep 17 00:00:00 2001 From: sagitter Date: Mar 06 2017 16:20:02 +0000 Subject: Add linetypes directory (bz#1429248) --- diff --git a/qcad-qt5-unbundle_libraries.patch b/qcad-qt5-unbundle_libraries.patch new file mode 100644 index 0000000..e813757 --- /dev/null +++ b/qcad-qt5-unbundle_libraries.patch @@ -0,0 +1,72 @@ +diff -rupN shared.pri qcad-3.15.6.1-new/shared.pri +--- shared.pri 2016-12-01 10:40:01.000000000 +0100 ++++ shared.pri 2016-12-18 21:03:22.059514509 +0100 +@@ -164,10 +164,10 @@ QMAKE_TARGET_DESCRIPTION = QCAD Applicat + QMAKE_TARGET_COPYRIGHT = + QMAKE_TARGET_PRODUCT = QCAD Application Framework + +-DESTDIR = $$PWD/$$ROUTDIR ++DESTDIR = $$shadowed($$PWD)/$$ROUTDIR + UI_DIR = .ui + +-LIBS += -L$$PWD/$$ROUTDIR ++LIBS += -L$$shadowed($$PWD)/$$ROUTDIR + + CONFIG(debug, debug|release) { + !win32 { +diff -rupN src/3rdparty/3rdparty.pro qcad-3.15.6.1-new/src/3rdparty/3rdparty.pro +--- src/3rdparty/3rdparty.pro 2016-12-01 10:40:01.000000000 +0100 ++++ src/3rdparty/3rdparty.pro 2016-12-18 21:08:23.664591423 +0100 +@@ -1,9 +1,6 @@ + include (../../shared.pri) + TEMPLATE = subdirs +-SUBDIRS = \ +- spatialindexnavel \ +- stemmer \ +- quazip ++SUBDIRS = stemmer spatialindexnavel + + !r_no_opennurbs { + SUBDIRS += opennurbs +diff -rupN src/spatialindex/RSpatialIndexNavel.h qcad-3.15.6.1-new/src/spatialindex/RSpatialIndexNavel.h +--- src/spatialindex/RSpatialIndexNavel.h 2016-12-01 10:40:01.000000000 +0100 ++++ src/spatialindex/RSpatialIndexNavel.h 2016-12-18 21:04:31.387312658 +0100 +@@ -28,7 +28,7 @@ + + #include "RSpatialIndex.h" + +-#include "spatialindexnavel/include/spatialindex/SpatialIndex.h" ++#include "spatialindex/SpatialIndex.h" + + class RSiDataStream : public SpatialIndex::IDataStream + { +--- src/scripting/ecmaapi/ecmaapi.orig.pro 2016-12-01 10:40:01.000000000 +0100 ++++ src/scripting/ecmaapi/ecmaapi.pro 2016-12-19 19:03:52.081431285 +0100 +@@ -28,4 +28,4 @@ + -l$${RLIBNAME}spatialindex \ + -l$${RLIBNAME}stemmer \ + -l$${RLIBNAME}zip \ +- -lquazip ++ -lquazip5 +--- src/zip/zip.orig.pro 2016-12-01 10:40:01.000000000 +0100 ++++ src/zip/zip.pro 2016-12-19 19:05:42.959796504 +0100 +@@ -23,7 +23,7 @@ + CONFIG += plugin + } + TARGET = $${RLIBNAME}zip +-LIBS += -l$${RLIBNAME}core -lquazip ++LIBS += -l$${RLIBNAME}core -lquazip5 + OTHER_FILES += zip.dox + DEFINES += QCADZIP_LIBRARY + +--- shared_app.orig.pri 2016-12-01 10:40:01.000000000 +0100 ++++ shared_app.pri 2016-12-19 19:07:16.984258212 +0100 +@@ -13,7 +13,7 @@ + -l$${RLIBNAME}stemmer \ + -lstemmer \ + -l$${RLIBNAME}zip \ +- -lquazip ++ -lquazip5 + + !r_no_opennurbs { + LIBS += \ diff --git a/qcad.spec b/qcad.spec index a08977a..6841388 100644 --- a/qcad.spec +++ b/qcad.spec @@ -1,7 +1,3 @@ -## Still built with QT4 -## QCAD does not properly work with QT5 because of QT5 bug: -## https://bugreports.qt.io/browse/QTBUG-52988 - # Filtering of private libraries %global __provides_exclude_from ^%{_libdir}/%{name}/.*\\.so$ %global __provides_exclude_from ^%{_libdir}/%{name}/.*\\.so.*$ @@ -14,12 +10,32 @@ %global __requires_exclude %{__requires_exclude}|libqcadspatialindex.so # +## Still built with QT4 +## QCAD does not properly work with QT5 because of QT5 bug: +## https://bugreports.qt.io/browse/QTBUG-52988 + +## Qt5 builds ? +%bcond_with qt5 +# + +## Qt4 builds ? +%bcond_without qt4 +# +## + %global _QCAD_DIR %{_libdir}/%{name} + +%if %{with qt4} %global _QT_PLUGINS %{_qt4_plugindir} +%endif + +%if %{with qt5} +%global _QT_PLUGINS %{_qt5_plugindir} +%endif Name: qcad Version: 3.16.5.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Powerful 2D CAD system ## Main license: GPLv3 @@ -43,12 +59,25 @@ Source1: %{name}.desktop Source2: %{name}.appdata.xml URL: http://www.ribbonsoft.com/en/ -#BuildRequires: qt5-qtbase-devel, qt5-rpm-macros -#BuildRequires: qt5-qtwebkit-devel -#BuildRequires: qt5-quazip-devel +%if %{with qt5} +BuildRequires: qt5-qtbase-devel, qt5-rpm-macros +BuildRequires: qt5-qtwebkit-devel +BuildRequires: qt5-qttools-devel, qt5-qttools-static +BuildRequires: qt5-qtscript-devel +BuildRequires: qt5-qtsvg-devel +BuildRequires: qt5-qtxmlpatterns-devel +BuildRequires: quazip-qt5-devel +Requires: qt5-designer +Requires: quazip-qt5%{?_isa} +Provides: bundled(qtscriptgenerator) = 5.5.0 +%endif +%if %{with qt4} BuildRequires: qt-devel BuildRequires: qtwebkit-devel BuildRequires: quazip-devel +Requires: quazip%{?_isa} +Provides: bundled(qtscriptgenerator) = 4.8.7 +%endif BuildRequires: gcc-c++ BuildRequires: libX11-devel BuildRequires: libXext-devel @@ -64,12 +93,9 @@ BuildRequires: desktop-file-utils BuildRequires: libappstream-glib Requires: hicolor-icon-theme -#Requires: qt5-designer Requires: wise2 Requires: qgnomeplatform -Requires: quazip%{?_isa} -Provides: bundled(qtscriptgenerator) = 4.8.7 Provides: bundled(dxflib) = 1.0.0 Provides: bundled(opennurbs) = 201004095 Provides: bundled(stemmer) = 1.0.0 @@ -77,6 +103,9 @@ Provides: bundled(stemmer) = 1.0.0 ## Unbundle spatialindex and quazip libraries Patch0: %{name}-qt4-unbundle_libraries.patch +## Unbundle spatialindex and quazip libraries +Patch1: %{name}-qt5-unbundle_libraries.patch + %description QCAD is an application for computer aided drafting (CAD) in two dimensions (2D). With QCAD you can create technical drawings such as plans for buildings, @@ -90,16 +119,30 @@ You don't need any CAD experience to get started with QCAD immediately. %prep %setup -q +%if %{with qt4} %patch0 -p1 +%endif +%if %{with qt5} +%patch1 -p0 +%endif + rm -rf src/3rdparty/spatialindexnavel/include/spatialindex rm -f src/3rdparty/quazip/src/*.h %build +%if %{with qt4} %{_qt4_qmake} %{name}.pro \ QMAKE_CFLAGS_RELEASE="%{_qt4_optflags} -I%{_includedir}/quazip" \ QMAKE_CXXFLAGS_RELEASE="%{_qt4_optflags} -I%{_includedir}/quazip" \ QMAKE_LFLAGS="%{_qt4_ldflags} -Wl,--as-needed" -%make_build +%endif +%if %{with qt5} +%{_qt5_qmake} %{name}.pro \ + QMAKE_CFLAGS_RELEASE="%{_qt5_optflags} -I%{_includedir}/quazip5 -I%{_qt5_includedir}/QtUiTools" \ + QMAKE_CXXFLAGS_RELEASE="%{_qt5_optflags} -I%{_includedir}/quazip5 -I%{_qt5_includedir}/QtUiTools" \ + QMAKE_LFLAGS="%{_qt5_ldflags} -Wl,--as-needed" +%endif +make -j2 %install @@ -125,6 +168,7 @@ cp -a themes %{buildroot}%{_QCAD_DIR} cp -a libraries %{buildroot}%{_QCAD_DIR} cp -a scripts %{buildroot}%{_QCAD_DIR} cp -a plugins %{buildroot}%{_QCAD_DIR} +cp -a linetypes %{buildroot}%{_QCAD_DIR} install -pm 644 ts/qcad*.qm %{buildroot}%{_QCAD_DIR}/ts ln -sf %{_QT_PLUGINS}/codecs/libqcncodecs.so %{buildroot}%{_QCAD_DIR}/plugins/codecs/libqcncodecs.so @@ -163,6 +207,7 @@ for i in `find . -type f \( -name "*.so*" \)`; do done popd +%if %{with qt4} cat > %{buildroot}%{_bindir}/%{name} < %{buildroot}%{_bindir}/%{name} < - 3.16.5.0-2 +- Add linetypes directory (bz#1429248) + * Fri Feb 10 2017 Antonio Trande - 3.16.5.0-1 - Update to 3.16.5.0