Bug 248107

Summary: editors/cooledit: Update to 4.0.0
Product: Ports & Packages Reporter: Marcel Bischoff <marcel>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Open ---    
Severity: Affects Some People CC: daniel.engberg.lists, eduardo, swills
Priority: --- Keywords: needs-patch, needs-qa
Version: LatestFlags: koobs: maintainer-feedback+
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch
none
updated patch none

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
Comment 14 daniel.engberg.lists 2021-03-03 07:54:47 UTC
Pass this on to new maintainer
Comment 15 Nuno Teixeira freebsd_committer 2021-03-03 08:43:29 UTC
Hello!

I'm new port maintainer and I missed this PR.

I'm working on this update to 4.0.1 that include patch:

---
PORTNAME=       cooledit
DISTVERSION=    4.0.1
CATEGORIES=     editors
MASTER_SITES=   SUNSITE/apps/editors/X/${PORTNAME}
DISTNAME=       cooledit-4.0.0

PATCH_SITES=    ${MASTER_SITES}
PATCHFILES=     ${PORTNAME}-${DISTVERSION}.patch:-p1
---
And I switched from gcc to clang(c11).

I need more tests and I'm waiting for new release tarball from author with more fixes like, e.g., NLS knob not working atm.

Please wait a little more so I can test/talk with author.

Please take a look at my Makefile: https://termbin.com/mtr2

Why did you remove Next_Look option?

Thanks,

Nuno Teixeira
Comment 16 Nuno Teixeira freebsd_committer 2021-03-10 08:52:31 UTC
And I'm working on Noto fonts