diff options
author | tcberner <tcberner@FreeBSD.org> | 2019-03-09 23:44:27 +0800 |
---|---|---|
committer | tcberner <tcberner@FreeBSD.org> | 2019-03-09 23:44:27 +0800 |
commit | 37b02c55cb069d4b84cb9c6827e74f288c84f1f2 (patch) | |
tree | bd519d83022b9a26d3d52c626e16c31bfa509525 /x11-fm | |
parent | e6d0bb3f0f4675e3869fd5215d17cb872cd979d1 (diff) | |
download | freebsd-ports-gnome-37b02c55cb069d4b84cb9c6827e74f288c84f1f2.tar.gz freebsd-ports-gnome-37b02c55cb069d4b84cb9c6827e74f288c84f1f2.tar.zst freebsd-ports-gnome-37b02c55cb069d4b84cb9c6827e74f288c84f1f2.zip |
x11-fm/qtfm: upgrade to 6.1.7 with Qt5
- this only is an upgrade, without adapting the patches present previously for mounting.
Diffstat (limited to 'x11-fm')
-rw-r--r-- | x11-fm/qtfm/Makefile | 35 | ||||
-rw-r--r-- | x11-fm/qtfm/distinfo | 5 | ||||
-rw-r--r-- | x11-fm/qtfm/files/patch-qtfm.pro | 20 | ||||
-rw-r--r-- | x11-fm/qtfm/files/patch-src_bookmarks.cpp | 111 | ||||
-rw-r--r-- | x11-fm/qtfm/files/patch-src_mainwindow.cpp | 50 | ||||
-rw-r--r-- | x11-fm/qtfm/files/patch-src_mainwindow.h | 30 | ||||
-rw-r--r-- | x11-fm/qtfm/files/patch-src_mymodel.cpp | 11 | ||||
-rw-r--r-- | x11-fm/qtfm/files/patch-src_propertiesdlg.cpp | 14 | ||||
-rw-r--r-- | x11-fm/qtfm/pkg-plist | 37 |
9 files changed, 43 insertions, 270 deletions
diff --git a/x11-fm/qtfm/Makefile b/x11-fm/qtfm/Makefile index 93d87eacadce..52e0cedfe655 100644 --- a/x11-fm/qtfm/Makefile +++ b/x11-fm/qtfm/Makefile @@ -2,35 +2,30 @@ # $FreeBSD$ PORTNAME= qtfm -DISTVERSION= 5.5 -PORTREEVISION= 1 +DISTVERSION= 6.1.7 CATEGORIES= x11-fm -MASTER_SITES= http://www.qtfm.org/ MAINTAINER= ports@FreeBSD.org COMMENT= Small, lightweight file manager based on pure Qt LICENSE= GPLv2 -LICENSE_FILE= ${WRKSRC}/COPYING - -DEPRECATED= Qt4 has been EOL since december 2015 -EXPIRATION_DATE= 2019-03-15 +LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libinotify.so:devel/libinotify -USES= dos2unix qmake qt:4 -DOS2UNIX_REGEX= .*\.(h|cpp) -USE_QT= gui network moc_build rcc_build \ - imageformats_run - -post-patch: - @cd ${WRKSRC} && \ - ${REINPLACE_CMD} -e s@/usr/@${PREFIX}/@g \ - -e s@share/qtfm@${DATADIR_REL}@ \ - qtfm.pro src/main.cpp - @cd ${WRKSRC}/src && \ - ${REINPLACE_CMD} -e s@/usr/@${LOCALBASE}/@g \ - icondlg.cpp mainwindow.cpp mymodel.cpp +USES= desktop-file-utils gl qmake qt:5 +USE_GL= gl +USE_QT= concurrent core dbus gui widgets \ + buildtools_build qmake_build + +USE_GITHUB= yes +GH_ACCOUNT= rodlie + +QMAKE_ARGS= MANDIR=${MANDIRS} \ + PREFIX=${PREFIX} \ + XDGDIR=${PREFIX}/etc/xdg + +OPTIONS_DEFINE= DOCS post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/qtfm diff --git a/x11-fm/qtfm/distinfo b/x11-fm/qtfm/distinfo index e3df48bbd93b..6ca13315c43c 100644 --- a/x11-fm/qtfm/distinfo +++ b/x11-fm/qtfm/distinfo @@ -1,2 +1,3 @@ -SHA256 (qtfm-5.5.tar.gz) = 845fc43800d12483fa1993c56a8c965ff8dc917b97f03d9ce2e24318806fb211 -SIZE (qtfm-5.5.tar.gz) = 149667 +TIMESTAMP = 1552145137 +SHA256 (rodlie-qtfm-6.1.7_GH0.tar.gz) = 294d714100c1265c3be1b88fd109c72bf71ea64774909998a110e85f54741013 +SIZE (rodlie-qtfm-6.1.7_GH0.tar.gz) = 247617 diff --git a/x11-fm/qtfm/files/patch-qtfm.pro b/x11-fm/qtfm/files/patch-qtfm.pro deleted file mode 100644 index 2f6e85887ff1..000000000000 --- a/x11-fm/qtfm/files/patch-qtfm.pro +++ /dev/null @@ -1,20 +0,0 @@ ---- qtfm.pro.orig 2012-06-04 19:48:11.000000000 +0800 -+++ qtfm.pro 2018-07-22 18:29:04.602178000 +0800 -@@ -31,7 +31,7 @@ - CONFIG += release warn_off thread - RESOURCES += resources.qrc - QT+= network --LIBS += -lmagic -+LIBS += -lmagic -linotify - - TARGET = qtfm - target.path = /usr/bin -@@ -56,7 +56,7 @@ - translations/qtfm_zh.qm \ - translations/qtfm_zh_TW.qm - --INSTALLS += target desktop icon docs trans -+INSTALLS += target desktop icon trans - - - diff --git a/x11-fm/qtfm/files/patch-src_bookmarks.cpp b/x11-fm/qtfm/files/patch-src_bookmarks.cpp deleted file mode 100644 index 4295ac4f1950..000000000000 --- a/x11-fm/qtfm/files/patch-src_bookmarks.cpp +++ /dev/null @@ -1,111 +0,0 @@ ---- src/bookmarks.cpp.orig 2014-02-12 05:22:32.988231816 +0400 -+++ src/bookmarks.cpp 2014-02-12 05:22:53.244712591 +0400 -@@ -22,6 +22,13 @@ - #ifndef BOOKMARKS_CPP - #define BOOKMARKS_CPP - -+#ifdef __FreeBSD__ -+#include <sys/event.h> -+#include <sys/mount.h> -+#endif -+ -+#include <unistd.h> -+ - #include <QtGui> - #include "bookmarkmodel.h" - #include "icondlg.h" -@@ -80,44 +87,74 @@ - } - - //--------------------------------------------------------------------------- -+#ifdef __FreeBSD__ -+void MainWindow::MountWorker::run() -+{ -+ -+ ahead = 1; -+ int kq = kqueue(); -+ struct kevent ki[1]; -+ struct timespec to[1] = {{ 0, 100000 }}; -+ -+ EV_SET(ki, 0, EVFILT_FS, EV_ADD, VQ_MOUNT | VQ_UNMOUNT, 0, 0); -+ kevent(kq, ki, 1, NULL, 0, NULL); -+ -+ while (ahead) { -+ switch (kevent(kq, NULL, 0, ki, 1, to)) { -+ case -1: -+ ::perror("kevent"); -+ break; -+ case 0: -+ continue; -+ default: -+ ((MainWindow *)parent())->MainWindow::autoBookmarkMounts(); -+ } -+ } -+ ::close(kq); -+} -+ -+void MainWindow::MountWorker::close() -+{ -+ ahead = 0; -+ wait(); -+} -+#endif -+ -+//--------------------------------------------------------------------------- - void MainWindow::autoBookmarkMounts() - { - QList<QStandardItem *> theBookmarks = modelBookmarks->findItems("*",Qt::MatchWildcard); - - QStringList autoBookmarks; - -+ size_t mntsize; -+ struct statfs *mnt, *mntbuf; -+ - foreach(QStandardItem *item, theBookmarks) - { - if(item->data(34).toString() == "1") //is an automount - autoBookmarks.append(item->data(32).toString()); - } - -- QStringList mtabMounts; -- QFile mtab("/etc/mtab"); -- mtab.open(QFile::ReadOnly); -- QTextStream stream(&mtab); -- do mtabMounts.append(stream.readLine()); -- while (!stream.atEnd()); -- mtab.close(); -+ mntsize = getmntinfo(&mntbuf, MNT_NOWAIT); - -- QStringList sysMounts = QStringList() << "/dev" << "/sys" << "/pro" << "/tmp" << "/run"; - QStringList dontShowList = settings->value("hideBookmarks",0).toStringList(); - mounts.clear(); - -- foreach(QString item, mtabMounts) -- if(!sysMounts.contains(item.split(" ").at(1).left(4))) -+ for (mnt = mntbuf; mntsize > 0; mntsize--, mnt++) -+ // XXX zpool name does not start with / -+ if (mnt->f_mntfromname[0] == '/' or !strcmp(mnt->f_fstypename, "zfs")) - { -- QString path = item.split(" ").at(1); -- path.replace("\\040"," "); -- -- mounts.append(path); -- if(!dontShowList.contains(path)) -- if(!autoBookmarks.contains(path)) //add a new auto bookmark if it doesn't exist -+ mounts.append(mnt->f_mntonname); -+ if(!dontShowList.contains(mnt->f_mntonname)) -+ //add a new auto bookmark if it doesn't exist -+ if(!autoBookmarks.contains(mnt->f_mntonname)) - { -- autoBookmarks.append(path); -- if(item.split(" ").at(2) == "iso9660") modelBookmarks->addBookmark(path,path,"1","drive-optical"); -- else if(item.split(" ").at(2).contains("fat")) modelBookmarks->addBookmark(path,path,"1","drive-removable-media"); -- else modelBookmarks->addBookmark(path,path,"1","drive-harddisk"); -+ if(strstr(mnt->f_fstypename, "9660")) -+ modelBookmarks->addBookmark(mnt->f_mntonname,mnt->f_mntonname,"1","drive-optical"); -+ else if(strstr(mnt->f_fstypename, "fat")) -+ modelBookmarks->addBookmark(mnt->f_mntonname,mnt->f_mntonname,"1","drive-removable-media"); -+ else modelBookmarks->addBookmark(mnt->f_mntonname,mnt->f_mntonname,"1","drive-harddisk"); - } - } - diff --git a/x11-fm/qtfm/files/patch-src_mainwindow.cpp b/x11-fm/qtfm/files/patch-src_mainwindow.cpp deleted file mode 100644 index 1d1e5c266757..000000000000 --- a/x11-fm/qtfm/files/patch-src_mainwindow.cpp +++ /dev/null @@ -1,50 +0,0 @@ ---- src/mainwindow.cpp.orig 2012-03-11 10:11:28.000000000 -0500 -+++ src/mainwindow.cpp 2012-04-29 23:06:06.481938775 -0500 -@@ -21,7 +21,11 @@ - - - #include <QtGui> -+#ifdef __FreeBSD__ -+#include <sys/mount.h> -+#else - #include <sys/vfs.h> -+#endif - #include <fcntl.h> - - #include "mainwindow.h" -@@ -280,10 +284,15 @@ void MainWindow::lateStart() - customMapper = new QSignalMapper(); - connect(customMapper, SIGNAL(mapped(QString)),this, SLOT(actionMapper(QString))); - -+#ifdef __FreeBSD__ -+ worker = new MountWorker(); -+ worker->setParent(this); -+ worker->start(QThread::IdlePriority); -+#else - int fd = open("/proc/self/mounts",O_RDONLY,0); - notify = new QSocketNotifier(fd,QSocketNotifier::Write); - connect(notify, SIGNAL(activated(int)), this, SLOT(mountWatcherTriggered()),Qt::QueuedConnection); -- -+#endif - - term = settings->value("term").toString(); - progress = 0; -@@ -336,6 +345,9 @@ void MainWindow::closeEvent(QCloseEvent - { - writeSettings(); - -+#ifdef __FreeBSD__ -+ worker->close(); -+#endif - if(isDaemon) - { - this->setVisible(0); -@@ -1839,7 +1851,7 @@ void MainWindow::actionMapper(QString cm - QString exec = temp.at(0); - temp.removeAt(0); - -- temp.replaceInStrings("\\","\ "); -+ temp.replaceInStrings("\\"," "); - - QProcess *customProcess = new QProcess(); - customProcess->setWorkingDirectory(pathEdit->itemText(0)); diff --git a/x11-fm/qtfm/files/patch-src_mainwindow.h b/x11-fm/qtfm/files/patch-src_mainwindow.h deleted file mode 100644 index 4bb49a783107..000000000000 --- a/x11-fm/qtfm/files/patch-src_mainwindow.h +++ /dev/null @@ -1,30 +0,0 @@ ---- src/mainwindow.h.orig 2012-03-08 04:46:39.000000000 -0600 -+++ src/mainwindow.h 2012-04-29 22:53:06.754026702 -0500 -@@ -146,6 +146,15 @@ private: - void writeSettings(); - void recurseFolder(QString path, QString parent, QStringList *); - -+ class MountWorker : public QThread -+ { -+ bool ahead; -+ protected: -+ void run(); -+ public: -+ void close(); -+ }; -+ - int zoom; - int zoomTree; - int zoomList; -@@ -182,7 +191,11 @@ private: - bookmarkmodel *modelBookmarks; - QItemSelectionModel *treeSelectionModel; - QItemSelectionModel *listSelectionModel; -+#ifdef __FreeBSD__ -+ MountWorker *worker; -+#else - QSocketNotifier *notify; -+#endif - - QStringList mounts; - diff --git a/x11-fm/qtfm/files/patch-src_mymodel.cpp b/x11-fm/qtfm/files/patch-src_mymodel.cpp deleted file mode 100644 index 06af45909c0d..000000000000 --- a/x11-fm/qtfm/files/patch-src_mymodel.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- src/mymodel.cpp.orig 2018-07-04 09:21:07 UTC -+++ src/mymodel.cpp -@@ -166,7 +166,7 @@ QString myModel::filePath(const QModelIn - - if(item) return item->absoluteFilePath(); - -- return false; -+ return QString(); - } - - //--------------------------------------------------------------------------------------- diff --git a/x11-fm/qtfm/files/patch-src_propertiesdlg.cpp b/x11-fm/qtfm/files/patch-src_propertiesdlg.cpp deleted file mode 100644 index baa6a273f937..000000000000 --- a/x11-fm/qtfm/files/patch-src_propertiesdlg.cpp +++ /dev/null @@ -1,14 +0,0 @@ ---- src/propertiesdlg.cpp~ 2012-03-08 20:34:27.000000000 -0600 -+++ src/propertiesdlg.cpp 2012-04-29 06:49:57.546488947 -0500 -@@ -23,7 +23,11 @@ - #include "propertiesdlg.h" - #include "icondlg.h" - #include "mainwindow.h" -+#ifdef __FreeBSD__ -+#include <sys/mount.h> -+#else - #include <sys/vfs.h> -+#endif - #include <sys/stat.h> - #include <magic.h> - diff --git a/x11-fm/qtfm/pkg-plist b/x11-fm/qtfm/pkg-plist index 27486c37daf9..4a8dc5e88726 100644 --- a/x11-fm/qtfm/pkg-plist +++ b/x11-fm/qtfm/pkg-plist @@ -1,14 +1,27 @@ bin/qtfm +bin/qtfm-tray +etc/xdg/autostart/qtfm-tray.desktop +man/man1/qtfm-tray.1.gz +man/man1/qtfm.1.gz share/applications/qtfm.desktop -share/pixmaps/qtfm.png -%%DATADIR%%/qtfm_da.qm -%%DATADIR%%/qtfm_de.qm -%%DATADIR%%/qtfm_es.qm -%%DATADIR%%/qtfm_fr.qm -%%DATADIR%%/qtfm_it.qm -%%DATADIR%%/qtfm_pl.qm -%%DATADIR%%/qtfm_ru.qm -%%DATADIR%%/qtfm_sr.qm -%%DATADIR%%/qtfm_sv.qm -%%DATADIR%%/qtfm_zh.qm -%%DATADIR%%/qtfm_zh_TW.qm +%%PORTDOCS%%%%DOCSDIR%%-6.1.7/AUTHORS +%%PORTDOCS%%%%DOCSDIR%%-6.1.7/ChangeLog +%%PORTDOCS%%%%DOCSDIR%%-6.1.7/LICENSE +%%PORTDOCS%%%%DOCSDIR%%-6.1.7/README.md +share/icons/hicolor/128x128/apps/qtfm.png +share/icons/hicolor/160x160/apps/qtfm.png +share/icons/hicolor/16x16/apps/qtfm.png +share/icons/hicolor/192x192/apps/qtfm.png +share/icons/hicolor/20x20/apps/qtfm.png +share/icons/hicolor/22x22/apps/qtfm.png +share/icons/hicolor/24x24/apps/qtfm.png +share/icons/hicolor/256x256/apps/qtfm.png +share/icons/hicolor/32x32/apps/qtfm.png +share/icons/hicolor/36x36/apps/qtfm.png +share/icons/hicolor/48x48/apps/qtfm.png +share/icons/hicolor/512x512/apps/qtfm.png +share/icons/hicolor/64x64/apps/qtfm.png +share/icons/hicolor/72x72/apps/qtfm.png +share/icons/hicolor/96x96/apps/qtfm.png +share/icons/hicolor/scalable/apps/qtfm.png +share/icons/hicolor/scalable/apps/qtfm.svg |