pkgsrc-WIP-changes archive

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

qcad: fix path to libraries directory



Module Name:	pkgsrc-wip
Committed By:	Iain Hibbert <plunky%netbsd.org@localhost>
Pushed By:	plunky
Date:		Wed Aug 24 18:59:19 2016 +0100
Changeset:	6992f76f65f1dafb2467087522951b454eed82a2

Modified Files:
	qcad/Makefile
	qcad/distinfo
Added Files:
	qcad/patches/patch-scripts_Widgets_LibraryBrowser_LibraryBrowser.js

Log Message:
qcad: fix path to libraries directory

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

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

diffstat:
 qcad/Makefile                                        |  1 +
 qcad/distinfo                                        |  1 +
 ...-scripts_Widgets_LibraryBrowser_LibraryBrowser.js | 20 ++++++++++++++++++++
 3 files changed, 22 insertions(+)

diffs:
diff --git a/qcad/Makefile b/qcad/Makefile
index b434672..78871dc 100644
--- a/qcad/Makefile
+++ b/qcad/Makefile
@@ -28,6 +28,7 @@ SUBST_STAGE.paths=	post-patch
 SUBST_MESSAGE.paths=	Attending to hard-coded paths.
 SUBST_FILES.paths+=	shared.pri src/core/RS.cpp src/core/RSettings.cpp
 SUBST_FILES.paths+=	scripts/Help/ShowReadme/ShowReadme.js
+SUBST_FILES.paths+=	scripts/Widgets/LibraryBrowser/LibraryBrowser.js
 SUBST_SED.paths=	-e 's,@PREFIX@,${PREFIX},g'
 
 AUTO_MKDIRS=	yes
diff --git a/qcad/distinfo b/qcad/distinfo
index a689018..e690483 100644
--- a/qcad/distinfo
+++ b/qcad/distinfo
@@ -7,6 +7,7 @@ Size (qcad-3.15.4.1.zip) = 37420623 bytes
 SHA1 (patch-qcad.1) = 64beab5b4d83e889352d80b64ab09aaa080421c2
 SHA1 (patch-scripts_Help_About_About.js) = 011bf46171a3363cca3cd84b5a3f2479414023ba
 SHA1 (patch-scripts_Help_ShowReadme_ShowReadme.js) = 362ef9b608bb4c4960b7a79103f9d1b171e93ab6
+SHA1 (patch-scripts_Widgets_LibraryBrowser_LibraryBrowser.js) = e3b8fe54ad7a9fc78aaaf75ec09a552f1d52e1ea
 SHA1 (patch-shared.pri) = fa940892d1deab185a752cab8e5346a04ba1bf03
 SHA1 (patch-shared__app.pri) = e0361f809815691b435d5112ee67e86918a85189
 SHA1 (patch-src_3rdparty_dxflib_dxflib.pro) = f16fb28a741a8a99e38adc2faa8037298bd174e2
diff --git a/qcad/patches/patch-scripts_Widgets_LibraryBrowser_LibraryBrowser.js b/qcad/patches/patch-scripts_Widgets_LibraryBrowser_LibraryBrowser.js
new file mode 100644
index 0000000..f0b5593
--- /dev/null
+++ b/qcad/patches/patch-scripts_Widgets_LibraryBrowser_LibraryBrowser.js
@@ -0,0 +1,20 @@
+$NetBSD$
+
+fix path to libraries
+
+--- scripts/Widgets/LibraryBrowser/LibraryBrowser.js.orig	2016-07-01 07:13:14.000000000 +0000
++++ scripts/Widgets/LibraryBrowser/LibraryBrowser.js
+@@ -173,12 +173,12 @@ LibraryBrowser.getSourceList = function(
+     var libs;
+
+     // no configuration: add all libraries available in libraries subdir:
+-    librariesDir = new QDir("libraries");
++    librariesDir = new QDir("@PREFIX@/share/qcad/libraries");
+     libs = librariesDir.entryList([], filters, sortFlags);
+     for (i=0; i<libs.length; i++) {
+         // always add default library if available:
+         if (libs[i]==="default" || noSourcesConfigured) {
+-            sourceList.push(QDir.fromNativeSeparators(new QDir("libraries/%1".arg(libs[i])).absolutePath()));
++            sourceList.push(QDir.fromNativeSeparators(new QDir("%1/%2".arg(librariesDir.absolutePath()).arg(libs[i])).absolutePath()));
+         }
+     }


Home | Main Index | Thread Index | Old Index