pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

qcad: fix the Qt plugins issue



Module Name:	pkgsrc-wip
Committed By:	Iain Hibbert <plunky%netbsd.org@localhost>
Pushed By:	plunky
Date:		Wed Aug 3 08:31:55 2016 +0100
Changeset:	c94b652b08a887f19e66ab1955df0a68a0ba5a21

Modified Files:
	qcad/PLIST
	qcad/distinfo
	qcad/patches/patch-src_run_run.pri
Removed Files:
	qcad/TODO

Log Message:
qcad: fix the Qt plugins issue

For now, use soft links to the Qt plugins from the QCad plugins
directory. In fact, make the build system do that for us.

(NB this may break when the default Qt version is updated)

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=c94b652b08a887f19e66ab1955df0a68a0ba5a21

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 qcad/PLIST                         | 11 +++++++++++
 qcad/TODO                          | 25 -------------------------
 qcad/distinfo                      |  2 +-
 qcad/patches/patch-src_run_run.pri | 37 ++++++++++++++++---------------------
 4 files changed, 28 insertions(+), 47 deletions(-)

diffs:
diff --git a/qcad/PLIST b/qcad/PLIST
index b9d2f0f..4ce1006 100644
--- a/qcad/PLIST
+++ b/qcad/PLIST
@@ -205,9 +205,19 @@ lib/qcad/patterns/metric/swamp.pat
 lib/qcad/patterns/metric/trans.pat
 lib/qcad/patterns/metric/triang.pat
 lib/qcad/patterns/metric/zigzag.pat
+lib/qcad/plugins/codecs/libqcncodecs.so
+lib/qcad/plugins/codecs/libqjpcodecs.so
+lib/qcad/plugins/codecs/libqkrcodecs.so
+lib/qcad/plugins/codecs/libqtwcodecs.so
 lib/qcad/plugins/codecs/readme.txt
 lib/qcad/plugins/designer/libqcadcustomwidgets.la
 lib/qcad/plugins/designer/readme.txt
+lib/qcad/plugins/imageformats/libqgif.so
+lib/qcad/plugins/imageformats/libqico.so
+lib/qcad/plugins/imageformats/libqjpeg.so
+lib/qcad/plugins/imageformats/libqsvg.so
+lib/qcad/plugins/imageformats/libqtga.so
+lib/qcad/plugins/imageformats/libqtiff.so
 lib/qcad/plugins/imageformats/readme.txt
 lib/qcad/plugins/libqcaddxf.la
 lib/qcad/plugins/libqcadexample.la
@@ -223,6 +233,7 @@ lib/qcad/plugins/script/libqcadqtscript_uitools.la
 lib/qcad/plugins/script/libqcadqtscript_webkit.la
 lib/qcad/plugins/script/libqcadqtscript_xml.la
 lib/qcad/plugins/script/libqcadqtscript_xmlpatterns.la
+lib/qcad/plugins/sqldrivers/libqsqlite.so
 lib/qcad/plugins/sqldrivers/readme.txt
 lib/qcad/scripts/.gitignore
 lib/qcad/scripts/AddOn.js
diff --git a/qcad/TODO b/qcad/TODO
deleted file mode 100644
index d6a6eab..0000000
--- a/qcad/TODO
+++ /dev/null
@@ -1,25 +0,0 @@
-The application starts and seems to be fully working, except that because it
-expects to be in an application bundle, it expects to find the Qt plugins in
-its own plugins folder which the build system would copy there.
-
-The symptom of that is that library doesn't work as the Qt SQL plugin is not
-there, and some button images are missing because the Qt imageformat plugins
-are not loaded.  Perhaps other issues too, I don't know.
-
-A short term solution would be to copy the files from /usr/pkg/qt4/plugins/*
-to /usr/pkg/lib/qcad/plugins/*. The files needed (as of Qt 4.8.7) are
-
-	imageformats/libqgif.so
-	imageformats/libqico.so
-	imageformats/libqjpeg.so
-	imageformats/libqsvg.so
-	imageformats/libqtiff.so
-	imageformats/libqtga.so
-	sqldrivers/libqsqlite.so
-	codecs/libqcncodecs.so
-	codecs/libqjpcodecs.so
-	codecs/libqkrcodecs.so
-	codecs/libqtwcodecs.so
-
-The proper fix would to make QCad load the plugins from the Qt directory but
-I'm not sure how to go about that and have no time at present.
diff --git a/qcad/distinfo b/qcad/distinfo
index 6803faa..3e1a03c 100644
--- a/qcad/distinfo
+++ b/qcad/distinfo
@@ -24,7 +24,7 @@ SHA1 (patch-src_grid_grid.pro) = 65f5f47cce612b31181a0ac3e153214d29f08767
 SHA1 (patch-src_gui_gui.pro) = 77142df264b5bca8170392f3ff797edc50fe4b95
 SHA1 (patch-src_io_dxf_dxf.pro) = 2d9318d88c44ed6024b286c48dc5f15b842cdfa3
 SHA1 (patch-src_operations_operations.pro) = b7c549e45dfa84141dbf8bedceac992b4b1ca7ca
-SHA1 (patch-src_run_run.pri) = 2a06e216d2bf68aeaeca779f99c1dd69263c315a
+SHA1 (patch-src_run_run.pri) = 9ff1f467fabda5d3a4c892677f22960ee9d32ab1
 SHA1 (patch-src_scripting_ecmaapi_ecmaapi.pro) = 028cd35f1676bbee6edde4e4d644d8ae1f6a7d88
 SHA1 (patch-src_snap_snap.pro) = fc538a3fcd7f4782016d8221d8758cb8de1594dd
 SHA1 (patch-src_spatialindex_spatialindex.pro) = f7c528feef7f5e1c6171c6b538fa5cf0b8db6dec
diff --git a/qcad/patches/patch-src_run_run.pri b/qcad/patches/patch-src_run_run.pri
index dfb834a..20d650e 100644
--- a/qcad/patches/patch-src_run_run.pri
+++ b/qcad/patches/patch-src_run_run.pri
@@ -3,31 +3,26 @@ $NetBSD$
 fix build for pkgsrc, by allowing qmake to link binaries in situ
 and create an install target
 
+only link to the Qt plugins, no need to copy them over
+
 --- src/run/run.pri.orig	2016-07-01 07:13:14.000000000 +0000
 +++ src/run/run.pri
-@@ -27,21 +27,12 @@ SOURCES += $$PWD/main.cpp
- TEMPLATE = app
- OTHER_FILES += $$PWD/run.dox
- 
--win32 {
--    TARGET = $${RLIBNAME}
--}
--
--macx {
--    TARGET = QCAD
--} 
--else {
--    unix {
--        TARGET = $${RLIBNAME}-bin
--    }
--}
+@@ -39,6 +39,9 @@ else {
+         TARGET = $${RLIBNAME}-bin
+     }
+ }
 +TARGET = $${RLIBNAME}
 +INSTALLS += target
 +target.path = $${PREFIX}/bin
  
  # copy Qt plugins to QCAD plugin folder:
--!build_pass {
-+DISABLE_THIS {
-     macx {
-         FILES = \
-             imageformats/libqgif.dylib \
+ !build_pass {
+@@ -102,7 +105,7 @@ else {
+ 
+         for(FILE,FILES) {
+             !exists("$${DESTDIR}/../plugins/$${FILE}") {
+-                system(cp "$$[QT_INSTALL_PLUGINS]/$${FILE}" "$${DESTDIR}/../plugins/$${FILE}")
++                system(ln -sf "$$[QT_INSTALL_PLUGINS]/$${FILE}" "../../plugins/$${FILE}")
+             }
+         }
+     }


Home | Main Index | Thread Index | Old Index