Bug 281810

Summary: [NEW PORT] www/snip: SNIP is a powerful, simple, and easy to use Open-Source PHP Pastebin
Product: Ports & Packages Reporter: ek
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: New ---    
Severity: Affects Only Me CC: diizzy, ek, fuz, nxjoseph
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
[NEW PORT] www/snip patch
none
Updated new port patch
none
Updated www/snip patch
ek: maintainer-approval+
www/snip.patch
ek: maintainer-approval+
All diffs, changes made from me. none

Description ek 2024-10-02 05:01:41 UTC
Created attachment 253950 [details]
[NEW PORT] www/snip patch

This port is a fork of www/Stikked (which hasn't been updated in 5 years) which has many updates to work with PHP 8.x along with additional features.

Poudriere build log can be found at: https://pkg.purplehat.org/data/fbsd_14-1_x64-HEAD/2024-10-01_22h38m47s/logs/snip-1.0.0.log

I'm not sure if www/Stikked should be removed/replaced by this or not. However, www/Stikked does not work with PHP 8.x, and multiple pull requests to the project to fix many issues have been ignored/dormant for nearly one year.

Please let me know if there is anything else I can provide. Thank you!
Comment 1 ek 2024-10-03 23:14:55 UTC
Created attachment 253986 [details]
Updated new port patch

After speaking with the developer, they fixed some minor issues upstream and provided an update. So, this new patch includes those changes.
Comment 2 Robert Clausecker freebsd_committer freebsd_triage 2024-10-04 13:23:41 UTC
Could you please open a bug against stickked indicating that it doesn't work?  This would make it easy for me to deprecate and remove the port.
Comment 3 ek 2025-02-08 04:43:15 UTC
Hi, Robert. It looks like the www/Stikked removal request went into place (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281858). Thank you!

Is there something wrong with this new port request? Something I need to update to make it acceptable? I'm unsure why this hasn't been approved. Perhaps it needs additional verification (which is fine, but is there something or someone specific I should bring this attention to?)

Thanks again!
Comment 4 Robert Clausecker freebsd_committer freebsd_triage 2025-02-08 10:54:07 UTC
(In reply to ek from comment #3)

I'm sorry for how long this one has been open with no response.

I think this is just the case of nobody having looked into it.  I don't know PHP and thus do not process PHP-based ports.  Perhaps try posting on ports@freebsd.org and request someone to review your port.
Comment 5 Daniel Engberg freebsd_committer freebsd_triage 2025-02-08 14:05:39 UTC
Also not referring to the actual release tag
Comment 6 ek 2025-02-13 23:41:55 UTC
(In reply to Daniel Engberg from comment #5)
Can you help me understand what you mean by this? Is there a version mismatch somewhere or should I be adding/changing something in the port to refer to something in particular, maybe? I'd like to get this sorted out before I ask ports@ to take a look.
Comment 7 ek 2025-02-14 00:00:30 UTC
... wait a second. You're talking about the release tag on GH that differs, I believe. It looks like the project maintainer made some changes but didn't bump the version of "Latest." I'll check it out and update the port to reflect the correct commit. If the project owner continues to do this, could cause problems. I'll ask them if there's any possibility they can bump the version when they make changes.
Comment 8 ek 2025-02-14 00:22:56 UTC
Created attachment 257511 [details]
Updated www/snip patch

Updated for upstream commit changes (version stays the same.)
Comment 9 Yusuf Yaman 2025-02-14 12:24:58 UTC
Created attachment 257522 [details]
www/snip.patch

I edited git commit message.
I used port tools (portclippy,portfmt,portlint) to improve the port.
I made use of OPT_USE instead of ${PORT_OPTIONS}.
I changed portname to match github project name.

I'll also attach the diff so you can better see what I changed.

I tested it in poudriere 14.2-R amd64 and testport is fine, didn't test if it works fine, though.
Comment 10 Yusuf Yaman 2025-02-14 12:25:25 UTC
Created attachment 257523 [details]
All diffs, changes made from me.
Comment 11 ek 2025-02-14 21:28:24 UTC
(In reply to Yusuf Yaman from comment #9)

This all looks great to me and thank you for the help! I tested the build in both Poudriere and manual. Both work. I also verified the software works as expected.

Approved.
Comment 12 Yusuf Yaman 2025-02-14 21:29:44 UTC
(In reply to ek from comment #11)
Nice, you are welcome. Thanks.
Comment 13 ek 2025-02-14 21:45:41 UTC
Here's a quick question - Since the project name (and therefore the port name) is now in all capital letters, should the www/snip directory be named the same way and changed to www/SNIP for consistency?

I don't see very many ports with capital letters, so I'm not sure if this would be correct or not. But, I can certainly change that before this gets committed if that would be prudent.
Comment 14 Yusuf Yaman 2025-02-14 21:51:35 UTC
(In reply to ek from comment #13)
> should the www/snip directory be named the same way and changed to www/SNIP for consistency?

In my opinion, it should stay lowercase but that's just my opinion, I don't know how it should be.

> I don't see very many ports with capital letters, so I'm not sure if this would be correct or not. 

I don't generally encounter with all-uppercase portnames either.

> But, I can certainly change that before this gets committed if that would be prudent.

Of course, it can be changed but the reason why i made it all uppercase is that: Robert Clausecker was suggested me to change my port's PORTNAME to match with GH PROJECT name but it was not all uppercase, it was camelcase, so from all lowercase to camelcase: tuba --> Tuba.
Comment 15 ek 2025-02-14 22:02:16 UTC
(In reply to Yusuf Yaman from comment #14)

That's all very good info. Thanks again! I don't see a tuba/Tuba port anywhere in the ports tree (yet) but did you rename the port directory to "Tuba" as well or did you leave it as "tuba" and that was fine?
Comment 16 Yusuf Yaman 2025-02-14 22:06:07 UTC
(In reply to ek from comment #15)
That's all very good info. Thanks again! I don't see a tuba/Tuba port anywhere in the ports tree (yet) but did you rename the port directory to "Tuba" as well or did you leave it as "tuba" and that was fine?

You're welcome!

> I don't see a tuba/Tuba port anywhere in the ports tree (yet)

It is not yet committed to the Ports tree because it depends on a PR which should be resolved to commit Tuba. Tuba requires a newer version of gtksourceview5 and the version in Ports is lower than what Tuba requires.

Here it is: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=284793

> did you rename the port directory to "Tuba" as well or did you leave it as "tuba" and that was fine?

I didn't rename the directory name so I guess that this is fine.
Comment 17 ek 2025-02-14 22:09:34 UTC
(In reply to Yusuf Yaman from comment #16)

Again, great info and thank you very much!
Comment 18 Robert Clausecker freebsd_committer freebsd_triage 2025-02-14 23:08:15 UTC
directory name and PORTNAME don't have to match.  It's okay to have one lower case and the other case, see e.g. emulators/tic-80.
Comment 19 ek 2025-02-14 23:34:30 UTC
(In reply to Robert Clausecker from comment #18)

Perfect. Thanks, fuz!