Bug 272033 - graphics/krita: Missing Script Support
Summary: graphics/krita: Missing Script Support
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: freebsd-kde (group)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-17 05:01 UTC by Jonathan M Davis
Modified: 2023-07-18 10:38 UTC (History)
1 user (show)

See Also:
tcberner: maintainer-feedback+


Attachments
v1 (2.50 KB, patch)
2023-07-14 19:58 UTC, Tobias C. Berner
no flags Details | Diff
v1' (18.36 KB, patch)
2023-07-14 20:11 UTC, Tobias C. Berner
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan M Davis 2023-06-17 05:01:10 UTC
Krita is supposed to have support for python scripts, and it comes with several out of the box. However, for some reason, the FreeBSD port for Krita specifically compiles out that support, thus removing some very useful functionality from Krita.

Specifically, the Makefile has

    CMAKE_ARGS=	-DCMAKE_DISABLE_FIND_PACKAGE_PyQt5:BOOL=true

in it, which makes it so that the build decides that pyqt is not available, and thus, the python script support is not compiled in.

Using the git repo, I can see that that line was added in

commit 4b59a1f96754873c1d4b5854cdb8a2fd265d6cfa
Author: Tobias C. Berner <tcberner@FreeBSD.org>
Date:   Sat Nov 2 19:17:45 2019 +0000

    graphics/krita: update to 4.2.7.1

Looking at what freshports lists for Krita, I think that that corresponds to revision 516362 in the SVN repo.

Either way, the commit message unfortunately provides no indication as to why that line was added to the Makefile. Maybe pyqt had issues at the time, but that's just a guess. Either way, if the functionality can be reasonably restored, I'd very much like it to be, since it's very annoying to not have it.

By messing with the port locally, it looks like removing that line from the Makefile and updating pkg-plist results in a properly working build of Krita with the python script support (though it's certainly possible that some aspect of it isn't working properly, and I just haven't hit that). So, from what I can tell, it shouldn't be a problem to update the Krita port to restore the python scripts, but I also can only guess as to why it was disabled in the first place.

I don't know enough about ports to know how dependencies are defined, but py39-qt5-pyqt isn't currently listed as a dependency for Krita on freshports (which makes sense given that it's not being used right now), so presumably, if/when the Krita port is updated to use pyqt again, that dependency will need to be added.
Comment 1 Tobias C. Berner freebsd_committer freebsd_triage 2023-07-14 17:29:33 UTC
Moin moin 

I'll take a look.


mfg Tobias
Comment 2 Tobias C. Berner freebsd_committer freebsd_triage 2023-07-14 19:58:18 UTC
Created attachment 243394 [details]
v1

Moin moin

Could you please test the attached patch, and see if that works for you?


mfg Tobias
Comment 3 Tobias C. Berner freebsd_committer freebsd_triage 2023-07-14 20:11:49 UTC
Created attachment 243395 [details]
v1'

Let's pretend I didn't use the wrong CMAKE_BOOL variant -- please try this patch, which effectively enables the python stuff :)
Comment 4 Jonathan M Davis 2023-07-15 19:30:31 UTC
It does look like the patch works. Thanks.
Comment 5 commit-hook freebsd_committer freebsd_triage 2023-07-18 10:36:51 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=20ae12c87dac8ec9f9a7e648281b3d9c69bab018

commit 20ae12c87dac8ec9f9a7e648281b3d9c69bab018
Author:     Tobias C. Berner <tcberner@FreeBSD.org>
AuthorDate: 2023-07-14 19:56:11 +0000
Commit:     Tobias C. Berner <tcberner@FreeBSD.org>
CommitDate: 2023-07-18 10:34:57 +0000

    graphics/krita: add PYTHON option

    This enable the script support in krita. This can be disabled
    via the PYTHON option.

    PR:             272033
    Reported by:    Jonathan M Davis <freebsd.bugs@jmdavisprog.com>

 graphics/krita/Makefile  |  27 +++---
 graphics/krita/pkg-plist | 215 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 232 insertions(+), 10 deletions(-)
Comment 6 Tobias C. Berner freebsd_committer freebsd_triage 2023-07-18 10:38:44 UTC
Committed :)