Bug 248107 - editors/cooledit: Update to 4.0.0
Summary: editors/cooledit: Update to 4.0.0
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2020-07-19 13:57 UTC by Marcel Bischoff
Modified: 2020-07-23 01:42 UTC (History)
3 users (show)

See Also:
koobs: maintainer-feedback+


Attachments
Patch (8.83 KB, patch)
2020-07-19 13:57 UTC, Marcel Bischoff
no flags Details | Diff
updated patch (8.65 KB, patch)
2020-07-22 16:41 UTC, Steve Wills
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel Bischoff 2020-07-19 13:57:57 UTC
Created attachment 216575 [details]
Patch

Portscout flagged this port and since it has no maintainer, so here's an update to the latest version.
Comment 1 Automation User 2020-07-19 16:59:33 UTC
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/168282113
Comment 2 daniel.engberg.lists 2020-07-19 19:00:36 UTC
I'm not sure if an editor should install fonts. The noto fonts are already packaged too.
Comment 3 Marcel Bischoff 2020-07-20 02:12:41 UTC
You're probably right. I'll remove the fonts from this package and make the Noto fonts a dependency.
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2020-07-20 02:17:55 UTC
Thank you Marcel! 

Would you be willing to maintain this port? If so, please update the MAINTAINER line to suit :)
Comment 5 Marcel Bischoff 2020-07-20 02:26:16 UTC
However, it installs them into an application-specific folder and appears to need it internally. To bend the Noto fonts package to install there is probably harmful and to patch the editor is way out of scope for this version bump. I'll investigate when I find the time.

Regarding maintainership: possibly. I am however not a regular user of the application so I cannot guarantee a quick turnaround. I've updated a couple of ports and by now I'm quite used to be asked to maintain it. ;) I'll consider any port I worked on, especially easy and older ones so they disappear from the "unmaintained" statistics.
Comment 6 Marcel Bischoff 2020-07-20 04:22:28 UTC
Just found to time to verify: the application aborts if it doesn't find the fonts in /usr/local/share/cooledit/fonts. As stated before, patching to prevent this behavior is way out of scope. I don't think this is an issue.

I'm also surprised to see that GCC9 gets installed wholesale automatically when USE_GCC is present, despite this application requiring it only for the build process. Is this expected behavior or something I could optimize? If I understand correctly, this is to be able to link against run-time libraries provided by GCC9.

Please advise.
Comment 7 daniel.engberg.lists 2020-07-22 11:12:42 UTC
The behaviour of USE_GCC is expected however unless it's tested with 4.2.1 I'd suggest that it should be set to yes instead unless it compiles using clang.
https://github.com/freebsd/freebsd-ports/blob/master/Mk/bsd.gcc.mk

CPPFLAGS and LDFLAGS can most likely be replaced by localbase
https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/uses-localbase.html

Fonts should be patched to look in %%FONTSDIR%% instead along with properly added dependencies, bundled libraries and whatnot isn't the way to go unless it breaks the application. 

At least the python3 patch from OpenMandriva should be imported, possibly the linking patch too.
https://github.com/OpenMandrivaAssociation/cooledit
Comment 8 daniel.engberg.lists 2020-07-22 11:37:55 UTC
There also seems to be a 4.0.1 patch provided by upstream
https://www.ibiblio.org/pub/Linux/apps/editors/X/cooledit/cooledit-4.0.1.patch

Sorry for not noticing.
Comment 9 Marcel Bischoff 2020-07-22 12:27:36 UTC
I'm starting out with porting and this is just way too much, too fast for me. I understand the need for consistency but I cannot do more for this port. Feel free to take over or abandon this submission.
Comment 10 Kubilay Kocak freebsd_committer freebsd_triage 2020-07-22 13:37:21 UTC
@Daniel Are you able and do you have cycles for an updated patch?
Comment 11 Steve Wills freebsd_committer 2020-07-22 16:41:23 UTC
Created attachment 216674 [details]
updated patch

Here's a version which fixes a few things.

It doesn't fix the font issue. When I ran the editor, it popped up an error on every character I typed. The error said "Error reading from ispell (or aspell). Ispell is being restarted." and I had to dismiss the error before I could type another character.

I'd say we deprecate this unless there is personal interest in updating and maintaining it, it doesn't seem very popular:

https://repology.org/project/cooledit/information
Comment 12 daniel.engberg.lists 2020-07-22 17:46:47 UTC
I had a discussion with swills@ on irc I agree with his conclusion. I have no personal interest in cooledit and there are multiple issues that needs to addressed on top of his patch. (Incomplete list)

Makefile changes:

DISTVERSION needs to be replaced with PORTVERSION=	4.0.1
MASTERSITES should only use https://www.ibiblio.org/pub/Linux/apps/editors/X/cooledit/ as the other mirrors are outdated and doesn't host tarball/archive.
DISTNAME=	${PORTNAME}-${PORTVERSION:R}.0 needs to be added

localbase should be added to USES and CPPFLAGS + LDFLAGS variables can be removed.

It compiles with clang (13-CURRENT) so USE_GCC can probably be removed (no run test).

CONFIGURE_ARGS=	--with-x should be added

Changes to upstream code:

Related code for font path is in widget/font.c at L209-L218 however cooledit also seems to rely on two pcf fonts that it expects to be in the same dir which need further code fixes.

Removing notosans from variable SUBDIRS in Makefile.in prevents installation of the fonts dir.
Comment 13 Kubilay Kocak freebsd_committer freebsd_triage 2020-07-23 01:42:16 UTC
(In reply to daniel.engberg.lists from comment #12)

Ok, thank you for the update. 

If the existing patch isn't ready, or work remains, can we

- Add the port to WantedPorts, with a ("WIP patch") link to this issue
- Close this Not Accepted

This ensures that breadcrumbs are in place for people to easily find and pickup where it left off