pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/x11/qt5-qscintilla Make it aware of .api files wich ma...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/cbedfd1f5421
branches:  trunk
changeset: 410634:cbedfd1f5421
user:      rhialto <rhialto%pkgsrc.org@localhost>
date:      Sun Jan 26 12:54:15 2020 +0000

description:
Make it aware of .api files wich may be installed in different qt5/qsci*
directories depending on Python version.

diffstat:

 x11/qt5-qscintilla/Makefile                   |   4 +-
 x11/qt5-qscintilla/distinfo                   |   3 +-
 x11/qt5-qscintilla/patches/patch-qsciapis.cpp |  47 +++++++++++++++++++++++++++
 3 files changed, 51 insertions(+), 3 deletions(-)

diffs (75 lines):

diff -r 007e68bef0a5 -r cbedfd1f5421 x11/qt5-qscintilla/Makefile
--- a/x11/qt5-qscintilla/Makefile       Sun Jan 26 12:53:34 2020 +0000
+++ b/x11/qt5-qscintilla/Makefile       Sun Jan 26 12:54:15 2020 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.3 2020/01/18 21:48:35 jperkin Exp $
+# $NetBSD: Makefile,v 1.4 2020/01/26 12:54:15 rhialto Exp $
 
-PKGREVISION= 1
+PKGREVISION=   2
 .include "../../x11/qt5-qscintilla/Makefile.common"
 
 PKGNAME=       qt5-${DISTNAME:tl:S/_gpl-/-/}
diff -r 007e68bef0a5 -r cbedfd1f5421 x11/qt5-qscintilla/distinfo
--- a/x11/qt5-qscintilla/distinfo       Sun Jan 26 12:53:34 2020 +0000
+++ b/x11/qt5-qscintilla/distinfo       Sun Jan 26 12:54:15 2020 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.1 2019/10/26 13:19:17 kamil Exp $
+$NetBSD: distinfo,v 1.2 2020/01/26 12:54:15 rhialto Exp $
 
 SHA1 (QScintilla_gpl-2.11.2.tar.gz) = 1815040576bfb62bedb0dd48a39e36a13bd0f5e9
 RMD160 (QScintilla_gpl-2.11.2.tar.gz) = fb0631db0fa228eb2d4c35db69f085a67d7d8036
 SHA512 (QScintilla_gpl-2.11.2.tar.gz) = de4eb9fb8d13c1a8f1acb6e941a8e751e0f0df02b59eb1a32bcdbedc1cc62ad3a1b778d45541ea048710349db827323a07aaede415712d6c9ac6acc07f0c160f
 Size (QScintilla_gpl-2.11.2.tar.gz) = 2986600 bytes
+SHA1 (patch-qsciapis.cpp) = bd595be57ea39acba021ba0dd662c872005bc407
diff -r 007e68bef0a5 -r cbedfd1f5421 x11/qt5-qscintilla/patches/patch-qsciapis.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/qt5-qscintilla/patches/patch-qsciapis.cpp     Sun Jan 26 12:54:15 2020 +0000
@@ -0,0 +1,47 @@
+$NetBSD: patch-qsciapis.cpp,v 1.1 2020/01/26 12:54:15 rhialto Exp $
+
+Search in qt5/qsci*/api/.../*.api.
+
+--- qsciapis.cpp.orig  2019-06-25 12:49:27.000000000 +0000
++++ qsciapis.cpp
+@@ -982,6 +982,7 @@ QString QsciAPIs::prepName(const QString
+ // Return installed API files.
+ QStringList QsciAPIs::installedAPIFiles() const
+ {
++#if 0
+     QString qtdir = QLibraryInfo::location(QLibraryInfo::DataPath);
+ 
+     QDir apidir = QDir(QString("%1/qsci/api/%2").arg(qtdir).arg(lexer()->lexer()));
+@@ -996,4 +997,32 @@ QStringList QsciAPIs::installedAPIFiles(
+         filenames << fi.absoluteFilePath();
+ 
+     return filenames;
++#endif
++
++    QString datapath = QLibraryInfo::location(QLibraryInfo::DataPath);
++    QString lexerdir = lexer()->lexer();
++
++    QStringList filenames;
++
++    QStringList filters;
++    filters << "*.api";
++
++    QStringList qscifilters;
++    qscifilters << "qsci*";
++
++    // Find QTDIR/qsci*/api/LEXER/*.api
++    QDir datadir = QDir(datapath);
++    QFileInfoList dlist = datadir.entryInfoList(qscifilters, QDir::AllDirs, QDir::IgnoreCase);
++
++    foreach (QFileInfo di, dlist) {
++      QString qscidir = di.absoluteFilePath();
++      QDir apidir = QDir(QString("%1/api/%2").arg(qscidir).arg(lexerdir));
++
++      QFileInfoList flist = apidir.entryInfoList(filters, QDir::Files, QDir::IgnoreCase);
++
++      foreach (QFileInfo fi, flist)
++          filenames << fi.absoluteFilePath();
++    }
++
++    return filenames;
+ }



Home | Main Index | Thread Index | Old Index