Bug 280422 - [NEW PORT] graphics/qimgv: add new port
Summary: [NEW PORT] graphics/qimgv: add new port
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Vladimir Druzenko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-23 23:01 UTC by Kenneth Raplee
Modified: 2024-07-27 19:50 UTC (History)
2 users (show)

See Also:


Attachments
Patch adding the port along with its patch to make it build on FreeBSD (8.31 KB, patch)
2024-07-23 23:01 UTC, Kenneth Raplee
no flags Details | Diff
v1 (12.50 KB, patch)
2024-07-24 18:18 UTC, Vladimir Druzenko
no flags Details | Diff
v2 (12.50 KB, application/x-tar)
2024-07-24 20:19 UTC, Vladimir Druzenko
no flags Details
v3 (12.50 KB, application/x-tar)
2024-07-24 20:51 UTC, Vladimir Druzenko
vvd: maintainer-approval?
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Raplee 2024-07-23 23:01:59 UTC
Created attachment 252250 [details]
Patch adding the port along with its patch to make it build on FreeBSD

Project URL: https://github.com/easymodo/qimgv

Just to note, the project's latest commit as of this writing disables inotify support in order to fix the build for FreeBSD. I've already solved this problem included in this port by using devel/libinotify and some patching. For this reason, I'm referencing the project's prior significant commit change. I'm hoping to get the author to revert that change when this port is added upstream since the disabling isn't necessary and that this is a popular image viewer.
Comment 1 Vladimir Druzenko freebsd_committer freebsd_triage 2024-07-24 18:01:13 UTC
Replace /usr/local with %%LOCALBASE%% in patch and then add this to Makefile:
post-patch:
        @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/qimgv/settings.cpp
Comment 2 Vladimir Druzenko freebsd_committer freebsd_triage 2024-07-24 18:18:47 UTC
Created attachment 252260 [details]
v1

Check my version.
It's just ports dir in tar.

We can discuss this on FreeBSD Discord server: https://discord.gg/freebsd
Comment 3 Vladimir Druzenko freebsd_committer freebsd_triage 2024-07-24 18:20:30 UTC
Warning: you need USES=desktop-file-utils
Error: /usr/local/bin/qimgv is linked to /usr/local/lib/qt5/libQt5Svg.so.5 from graphics/qt5-svg but it is not declared as a dependency
Warning: you need USES=qt:5 and USE_QT+=svg
Error: /usr/local/bin/qimgv is linked to /usr/local/lib/qt5/libQt5PrintSupport.so.5 from print/qt5-printsupport but it is not declared as a dependency
Warning: you need USES=qt:5 and USE_QT+=printsupport
Error: /usr/local/bin/qimgv is linked to /usr/local/lib/qt5/libQt5Widgets.so.5 from x11-toolkits/qt5-widgets but it is not declared as a dependency
Warning: you need USES=qt:5 and USE_QT+=widgets
Error: /usr/local/bin/qimgv is linked to /usr/local/lib/qt5/libQt5Gui.so.5 from x11-toolkits/qt5-gui but it is not declared as a dependency
Warning: you need USES=qt:5 and USE_QT+=gui
Error: /usr/local/bin/qimgv is linked to /usr/local/lib/qt5/libQt5Core.so.5 from devel/qt5-core but it is not declared as a dependency
Warning: you need USES=qt:5 and USE_QT+=core
Warning: you might not need LIB_DEPENDS on libGL.so
Warning: you might not need LIB_DEPENDS on libOpenGL.so
Warning: you might not need LIB_DEPENDS on libQt6Core.so
Warning: you might not need LIB_DEPENDS on libQt6Svg.so
Comment 4 Vladimir Druzenko freebsd_committer freebsd_triage 2024-07-24 20:19:43 UTC
Created attachment 252263 [details]
v2

Try this.
Comment 5 Vladimir Druzenko freebsd_committer freebsd_triage 2024-07-24 20:51:25 UTC
Created attachment 252264 [details]
v3

Test plz this with different combinations of options: QT5+KDE5, QT5, QT6.
Comment 6 commit-hook freebsd_committer freebsd_triage 2024-07-24 22:44:04 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=079bb54b2cb1d63fd53b21267d59b11d2f04ece2

commit 079bb54b2cb1d63fd53b21267d59b11d2f04ece2
Author:     Kenneth Raplee <kenrap@kennethraplee.com>
AuthorDate: 2024-07-24 22:40:08 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-07-24 22:40:08 +0000

    graphics/qimgv: new port: fast and easy to use image viewer

    Key features:
     * Simple UI
     * Fast
     * Easy to use
     * Fully configurable, including themes, shortcuts
     * High quality scaling
     * Basic image editing: Crop, Rotate and Resize
     * Ability to quickly copy / move images to different folders
     * Experimental video playback via libmpv
     * Folder view mode
     * Ability to run shell scripts
    https://github.com/easymodo/qimgv

    PR:     280422

 graphics/Makefile                                  |   1 +
 graphics/qimgv/Makefile (new)                      |  62 +++++++++++++
 graphics/qimgv/distinfo (new)                      |   3 +
 .../qimgv/files/patch-add-freebsd-support (new)    | 103 +++++++++++++++++++++
 graphics/qimgv/pkg-descr (new)                     |   2 +
 graphics/qimgv/pkg-plist (new)                     |  19 ++++
 6 files changed, 190 insertions(+)
Comment 7 Daniel Engberg freebsd_committer freebsd_triage 2024-07-25 23:33:04 UTC
Hi,

Requires c++17, https://github.com/easymodo/qimgv/blob/7672cb4b15f8f5eef2b5535e7bbb59248931db72/qimgv/CMakeLists.txt#L67

EXIV2_DESC can be dropped
https://cgit.freebsd.org/ports/tree/Mk/bsd.options.desc.mk

GH_TAGNAME should use short hash
https://docs.freebsd.org/en/books/porters-handbook/book/#makefile-master_sites-github

Please submit local patches upstream whenever possible

Best regards,
Daniel
Comment 8 Vladimir Druzenko freebsd_committer freebsd_triage 2024-07-26 12:11:55 UTC
(In reply to Daniel Engberg from comment #7)
> Requires c++17, https://github.com/easymodo/qimgv/blob/7672cb4b15f8f5eef2b5535e7bbb59248931db72/qimgv/CMakeLists.txt#L67
I saw this and even told the author on IRC, but forgot to include it in the Makefile.
You mean USES=compiler:c++17-lang ?

> EXIV2_DESC can be dropped
> https://cgit.freebsd.org/ports/tree/Mk/bsd.options.desc.mk
Ok.

> GH_TAGNAME should use short hash
> https://docs.freebsd.org/en/books/porters-handbook/book/#makefile-master_sites-github
I don't see anything said there about the need to use short hashes.

> Please submit local patches upstream whenever possible
Author posted it, but I can't find issue/pool request…
I posted one more time: https://github.com/easymodo/qimgv/pull/559
Comment 9 Daniel Engberg freebsd_committer freebsd_triage 2024-07-27 06:08:22 UTC
(In reply to Vladimir Druzenko from comment #8)

Yes, USES= compiler:c++17-lang would be correct

Every example in PH uses short hashes regarding the GH_TAGNAME

Ahh, thanks Kenneth for upstreaming
Comment 10 commit-hook freebsd_committer freebsd_triage 2024-07-27 19:50:05 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8dcc756c51559e7deb8ae2396721cfad17226526

commit 8dcc756c51559e7deb8ae2396721cfad17226526
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-07-27 19:43:19 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-07-27 19:43:19 +0000

    graphics/qimgv: update 1.03.g20240620 → 1.03.g20240727

    * Upstream committed our local patch with FreeBSD support.
    * Require compiler with C++ 17.
    * Drop EXIV2_DESC - bsd.options.desc.mk have it.

    PR:             280422
    Reported by:    diizzy
    Approved by:    Kenneth Raplee <kenrap@kennethraplee.com> (maintainer, via IRC)

 graphics/qimgv/Makefile                            |   8 +-
 graphics/qimgv/distinfo                            |   6 +-
 .../qimgv/files/patch-add-freebsd-support (gone)   | 103 ---------------------
 3 files changed, 6 insertions(+), 111 deletions(-)