pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
qcad: fix path searching
Module Name: pkgsrc-wip
Committed By: Iain Hibbert <plunky%netbsd.org@localhost>
Pushed By: plunky
Date: Sun Jul 31 20:03:25 2016 +0100
Changeset: eef4a3c04db853185279a3ed72d65c20508ffd98
Modified Files:
qcad/Makefile
qcad/TODO
qcad/distinfo
qcad/patches/patch-src_core_RS.cpp
qcad/patches/patch-src_core_RSettings.cpp
Log Message:
qcad: fix path searching
use @PKGBASE@ as the app name to allow the directories to be found
(it was using "QCAD" before whereas we installed to "qcad")
update TODO with status
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=eef4a3c04db853185279a3ed72d65c20508ffd98
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
qcad/Makefile | 12 +++----
qcad/TODO | 24 ++++++++++++--
qcad/distinfo | 4 +--
qcad/patches/patch-src_core_RS.cpp | 55 +++++++++++++++++++++++++------
qcad/patches/patch-src_core_RSettings.cpp | 6 ++--
5 files changed, 77 insertions(+), 24 deletions(-)
diffs:
diff --git a/qcad/Makefile b/qcad/Makefile
index 2f9f5ee..34d6e50 100644
--- a/qcad/Makefile
+++ b/qcad/Makefile
@@ -25,7 +25,7 @@ SUBST_CLASSES+= paths
SUBST_STAGE.paths= post-patch
SUBST_MESSAGE.paths= Attending to hard-coded paths.
SUBST_FILES.paths+= src/core/RS.cpp src/core/RSettings.cpp
-SUBST_SED.paths= -e 's,@PREFIX@,${PREFIX},g'
+SUBST_SED.paths= -e 's,@PREFIX@,${PREFIX},g' -e 's,@PKGBASE@,${PKGBASE},g'
# Note: Using pax to install the data files duplicates the lax permissions
# from the zip archive. We use 'umask 133' to prevent this, but we must
@@ -35,8 +35,8 @@ SUBST_SED.paths= -e 's,@PREFIX@,${PREFIX},g'
#
# XXX Or use the .tar.gz archive available from git but it won't extract properly for me
#
-#INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 share/applications share/qcad \
-# lib/qcad/plugins/designer lib/qcad/plugins/script
+#INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 share/applications share/${PKGBASE} \
+# lib/${PKGBASE}/plugins/designer lib/${PKGBASE}/plugins/script
AUTO_MKDIRS= yes
QCADLIBS= libqcadcore.la \
@@ -87,11 +87,11 @@ do-install:
.endfor
.for x in ${QCADPLUGINS}
${LIBTOOL} --mode=install ${INSTALL_LIB} \
- ${WRKSRC}/${x} ${DESTDIR}${PREFIX}/lib/qcad/${x:ts/:H}
+ ${WRKSRC}/${x} ${DESTDIR}${PREFIX}/lib/${PKGBASE}/${x:ts/:H}
.endfor
cd ${WRKSRC} && umask 133 && ${PAX} -rw fonts libraries linetypes \
- patterns scripts themes ts ${DESTDIR}${PREFIX}/lib/qcad
- cd ${WRKSRC} && umask 133 && ${PAX} -rw examples ${DESTDIR}${PREFIX}/share/qcad
+ patterns scripts themes ts ${DESTDIR}${PREFIX}/lib/${PKGBASE}
+ cd ${WRKSRC} && umask 133 && ${PAX} -rw examples ${DESTDIR}${PREFIX}/share/${PKGBASE}
.include "../../sysutils/desktop-file-utils/desktopdb.mk"
.include "../../devel/libexecinfo/buildlink3.mk"
diff --git a/qcad/TODO b/qcad/TODO
index 7adbd38..e1fd7a9 100644
--- a/qcad/TODO
+++ b/qcad/TODO
@@ -1,10 +1,28 @@
The application starts and seems to find the libraries/plugins ok now
- -- some button images are missing, eg the back button
- -- parts library not working
+ -- some button images are missing, eg the back button (press the Line tool, the top button should be a < arrow)
- -- eventually crashed with an undefined symbol?
+ the back button is scripts/Widgets/CadToolBar/Back.svg and it should be loaded by CadToolBarPanel.js
+
+ -- themes -> yes
+ -- languages -> yes
+ -- linetypes -> yes
+ -- patterns -> yes
+ -- fonts -> no?
+ -- library -> no
+ complains that database not loading
+ should library be in /usr/pkg/share/qcad/library?
+
+
+NB when changing preferences I get a warning
+ Warning: AppPreferences.js: Exception: Error: include: cannot read file 'scripts/Pro/Layer/AddLayerPro/AddLayerPro.js'
+
+I guess this is because we are not Pro version and do not have these scripts -- quit and restart to change language etc
+
+
+
+loading a .dxf file crashes with an error
/usr/pkg/lib/qcad/plugins/libqcaddxf.so: Undefined PLT symbol "_ZN6DL_DxfC1Ev" (symnum = 1293)
diff --git a/qcad/distinfo b/qcad/distinfo
index 11b54bb..85cda2a 100644
--- a/qcad/distinfo
+++ b/qcad/distinfo
@@ -12,8 +12,8 @@ SHA1 (patch-src_3rdparty_dxflib_src_dl__writer.h) = 21e99b53bcb964c9dc010a6013a5
SHA1 (patch-src_3rdparty_opennurbs_opennurbs_opennurbs.pro) = cc93b45f2fc65b79e438f97c0d5b49a29ad4b387
SHA1 (patch-src_3rdparty_opennurbs_zlib_zlib.pro) = 01e8de5ea2fd070d4c66c5398d90c05de98e0243
SHA1 (patch-src_3rdparty_stemmer_stemmer.pro) = de5e3ffbe2e2ac047d62cf4b59a70052a6172030
-SHA1 (patch-src_core_RS.cpp) = 04677e154aff2906b20911b1e8c7a6e15546748a
-SHA1 (patch-src_core_RSettings.cpp) = a8f1d9c16c30c605f73239da1121c4d997625032
+SHA1 (patch-src_core_RS.cpp) = 0fba84910ecbddec103aa32232b38b3ca8d7d6df
+SHA1 (patch-src_core_RSettings.cpp) = 6044cc8496e24f31439c31b073f37812a9282f03
SHA1 (patch-src_core_core.pro) = ee7c14a1e1ed4d8ad609ef8b348395a8392f8631
SHA1 (patch-src_customwidgets_customwidgets.pro) = c27f13b9a2f8a34524d00c1aabc4e15a9238956d
SHA1 (patch-src_entity_entity.pro) = 6ca9d8a80622b3546cc1daff2247b414b4742644
diff --git a/qcad/patches/patch-src_core_RS.cpp b/qcad/patches/patch-src_core_RS.cpp
index d31d9ea..576a3c6 100644
--- a/qcad/patches/patch-src_core_RS.cpp
+++ b/qcad/patches/patch-src_core_RS.cpp
@@ -2,15 +2,36 @@ $NetBSD$
fix hardcoded paths
---- src/core/RS.cpp.orig 2016-06-30 12:42:57.000000000 +0000
-+++ src/core/RS.cpp
-@@ -101,15 +101,9 @@ QStringList RS::getDirectoryList(const Q
- //local (application) directory has priority over other dirs:
- dirList.append(appDir + QDir::separator() + subDirectory);
+--- RS.cpp.orig 2016-07-01 07:13:14.000000000 +0000
++++ RS.cpp
+@@ -79,48 +79,9 @@ bool RS::compare(const QPair<QVariant, R
+ QStringList RS::getDirectoryList(const QString& subDirectory) {
+ QStringList dirList;
+- QString appDir = QCoreApplication::applicationDirPath();
+- QFileInfo fi(appDir);
+- if (fi.fileName() == "debug" || fi.fileName() == "release") {
+- appDir = fi.absolutePath();
+- }
+-
+-#ifdef Q_OS_MAC
+- // Mac OS X app bundle:
+- dirList.append(appDir + "/../Resources/" + subDirectory);
+- dirList.append(appDir + "/../../../" + subDirectory);
+- dirList.append(QDir::currentPath() + "/" + subDirectory);
+-#else
+- dirList.append(appDir + "/" + subDirectory);
+-#endif
+-
+- /*
+-#ifdef Q_OS_MAC
+- if (subDirectory!="library") {
+-#endif
+- //local (application) directory has priority over other dirs:
+- dirList.append(appDir + QDir::separator() + subDirectory);
+-
- #ifdef Q_OS_LINUX
-+#if defined(Q_OS_LINUX) || defined(Q_OS_NETBSD) || defined(Q_OS_FREEBSD)
- QString appDirName = QSettings.applicationName();
+- QString appDirName = QSettings.applicationName();
- // Redhat style:
- dirList.append("/usr/share/" + appDirName + "/" + subDirectory);
-
@@ -18,6 +39,20 @@ fix hardcoded paths
- dirList.append("/usr/X11R6/" + appDirName + "/" + subDirectory);
-
- dirList.append("/usr/X11R6/share/" + appDirName + "/" + subDirectory);
-+ dirList.append("@PREFIX@/lib/" + appDirName + "/" + subDirectory);
- dirList.append(QDir::homePath() + "/." + appDirName + "/" + subDirectory);
- #endif
+- dirList.append(QDir::homePath() + "/." + appDirName + "/" + subDirectory);
+-#endif
+-
+-#ifdef Q_OS_MAC
+- }
+-#endif
+- */
+-
+- // TODO: add a path to users home to be used to extend pattern, etc.
+- //QString appDirName = QSettings.applicationName();
+- //dirList.append(RSettings::getHomeLocation() + "/." + appDirName + "/" + subDirectory);
++ dirList.append("@PREFIX@/lib/@PKGBASE@/" + subDirectory);
++ dirList.append("@PREFIX@/share/@PKGBASE@/" + subDirectory);
++ dirList.append(QDir::homePath() + "/.@PKGBASE@/" + subDirectory);
+
+ QStringList ret;
+ for (int i=0; i<dirList.size(); i++) {
diff --git a/qcad/patches/patch-src_core_RSettings.cpp b/qcad/patches/patch-src_core_RSettings.cpp
index 1adbeb8..53eb90c 100644
--- a/qcad/patches/patch-src_core_RSettings.cpp
+++ b/qcad/patches/patch-src_core_RSettings.cpp
@@ -2,8 +2,8 @@ $NetBSD$
fix hardcoded paths
---- src/core/RSettings.cpp.orig 2016-06-30 12:42:57.000000000 +0000
-+++ src/core/RSettings.cpp
+--- RSettings.cpp.orig 2016-07-01 07:13:14.000000000 +0000
++++ RSettings.cpp
@@ -133,27 +133,7 @@ bool RSettings::isDeployed() {
}
@@ -29,6 +29,6 @@ fix hardcoded paths
- ret.cdUp();
- }
-
-+ QDir ret("@PREFIX@/lib/qcad");
++ QDir ret("@PREFIX@/lib/@PKGBASE@");
return ret.path();
}
Home |
Main Index |
Thread Index |
Old Index