Bug 268570 - [new port] sysutils/sndy: desktop program for sound switching
Summary: [new port] sysutils/sndy: desktop program for sound switching
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Robert Clausecker
URL: https://github.com/Clockwork6400/sndy
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-26 16:52 UTC by Clockwork
Modified: 2023-02-14 20:29 UTC (History)
3 users (show)

See Also:


Attachments
You can add this port to the ports tree (3.86 KB, text/plain)
2022-12-26 16:52 UTC, Clockwork
Clockwork6400: maintainer-approval-
Details
I am attaching the port archive again. (2.43 KB, text/plain)
2022-12-28 21:31 UTC, Clockwork
Clockwork6400: maintainer-approval-
Details
I am attaching the port archive again. (2) (2.42 KB, text/plain)
2022-12-29 10:54 UTC, Clockwork
Clockwork6400: maintainer-approval-
Details
I am attaching the port archive again. (3) (2.42 KB, text/plain)
2022-12-29 11:20 UTC, Clockwork
Clockwork6400: maintainer-approval-
Details
I am attaching the port archive again. (4) (2.43 KB, text/plain)
2022-12-30 17:50 UTC, Clockwork
Clockwork6400: maintainer-approval-
Details
My attachment in git-format patch. (2.73 KB, patch)
2023-01-24 18:46 UTC, Clockwork
Clockwork6400: maintainer-approval+
Details | Diff
sndy-0.0.4v7.patch (2.70 KB, patch)
2023-02-01 21:38 UTC, Clockwork
Clockwork6400: maintainer-approval+
Details | Diff
sndy-0.0.4v8.patch (2.05 KB, patch)
2023-02-12 14:39 UTC, Clockwork
Clockwork6400: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Clockwork 2022-12-26 16:52:37 UTC
Created attachment 239035 [details]
You can add this port to the ports tree

I want to try to make a port for my program that I recently drew in tcl.

I will optimize the program code, so do not laugh.

COMMENT=        PROGRAM FOR SOUND SWITCHING IN FreeBSD Desktop.
Comment 1 Robert Clausecker freebsd_committer freebsd_triage 2022-12-27 13:22:37 UTC
Please remove the LICENSE file from your shell archive.  The license of the FreeBSD ports collection is given by the COPYRIGHT file in /usr/ports.  The license of your port is given by the contents of the LICENSE make macro in the port Makefile.

From pkg-descr:

> sndy is a tickle program for sound switching on FreeBSD desktops.

Do you mean "tcl program"?  There is some weird grammar in the pkg-descr file, too.  Please seek advice from a native speaker to improve the wording.

> MAINTAINER=	Clockwork@FreeBSD.org

This does not appear to be your email address.  Please put in your actual email address for this field.

> COMMENT=	PROGRAM FOR SOUND SWITCHING IN FreeBSD

Please avoid all-caps writing.  That the program is for FreeBSD is clear from this being the description of a FreeBSD port.  Perhaps try

    COMMENT= Sound Switcher

I see in your github repository that you have instructions for generating a desktop-file for the program.  Please follow the instructions in §6.9.5 "Desktop Entries" of the Porter's Handbook on how to generate such files for a FreeBSD port.

I also advise you to install your script without a file extension so it can be executed by just typing "sndy" instead of "sndy.tcl".  You may need to use the shebangfix USES helper to fix up the shebang so it works.

> GH_TAGNAME=	abfbce63

Instead of using a commit id, I recommend that you tag a release and push it to github so that release tag can be used to identify the distribution file.  If your tag has the name "1.0.0" you can even omit GH_TAGNAME as it defaults to ${DISTVERSIONPREFIX}${DISTVERSION}.
Comment 2 Clockwork 2022-12-28 21:31:05 UTC
Created attachment 239100 [details]
I am attaching the port archive again.

Сhangelog:

* removed the license from the directory with the port.
* updated translation of pkg-descr file
* actual email address
* comment = Sound Switcher
* added desktop-file
* shebangfix is now in use
* GH_TAGNAME= changed from commit cache to release version.
Comment 3 Robert Clausecker freebsd_committer freebsd_triage 2022-12-28 22:15:29 UTC
(In reply to Clockwork from comment #2)

Thank you for the improvements.  Here are three further things you should do:

 * add audio and tcl to CATEGORIES as your port deals with audio and is written in tcl.
 * replace the explicit dependency to tcl and tk with USES=tcl tk.  Refer to the Porter's handbook for details.  If you specifically need version 8.6, you can specify that.
 * for the SHEBANGFIX, I'm sorry that I was not precise enough.  You need to supply a list of files that need their shebang fixed.  Unfortunately the shebang you use in your sndy script is not recognised by the script.  Add

    tk_OLD_CMD+= /usr/local/bin/wish8.6
    SHEBANG_FILES= sndy

to the Makefile to have shebangfix recognise the shebang and fix it.

You can omit GH_TAGNAME as it's the same as DISTVERSION.

Apart from that, your port looks good!
Comment 4 Clockwork 2022-12-29 10:54:38 UTC
Created attachment 239114 [details]
I am attaching the port archive again. (2)
Comment 5 Clockwork 2022-12-29 10:59:18 UTC
Comment on attachment 239114 [details]
I am attaching the port archive again. (2)

Сhanges:

* added audio and tcl to CATEGORIES ;
* Replaced explicit dependency;
* added SHEBANG_FILES and tk_OLD_CMD;
* GH_TAGNAME is no longer used.
Comment 6 Robert Clausecker freebsd_committer freebsd_triage 2022-12-29 11:02:01 UTC
(In reply to Clockwork from comment #5)

Your tk_OLD_CMD must exactly match what you have in your script.  In your script, it has /usr/local/bin/wish8.6.  If ${LOCALBASE} is not /usr/local, that doesn't match.  So you must not use ${LOCALBASE} here.

Apart from that, the port looks good.  I will go ahead and test it later today.
Comment 7 Clockwork 2022-12-29 11:20:09 UTC
Created attachment 239116 [details]
I am attaching the port archive again. (3)
Comment 8 Robert Clausecker freebsd_committer freebsd_triage 2022-12-30 11:24:32 UTC
A Poudriere run says:

Warning: you may not need USES=desktop-file-utils 
pkg-static: DEVELOPER_MODE: Notice: arch "FreeBSD:13:armv7" -- no architecture specific files found:                   
**** could this package use a wildcard architecture?       

To fix these warnings, add desktop-file-utils to USES.  Also add NO_ARCH=yes to the Makefile.

I've also noticed that some of the variables are in the wrong order (e.g. USE_GITHUB and GH_ACCOUNT should go directly after USES).  The committer will fix this when checking in your port.

The program itself seems to work, but crashes in an unelegant manner if graphics are unavailable.  I see that the user interface is in Russian.  You might want to consider either adding English localisation or moving the port to the russian category.  It's not a must though; the program is simple enough to understand that there's no need to read the text.

With these changes, I think the port is good to go!

Thank you for programming this!
Comment 9 Clockwork 2022-12-30 17:50:59 UTC
Created attachment 239135 [details]
I am attaching the port archive again. (4)

I am attaching the port archive again. (4)

* address for bugzilla
* NO_ARCH=yes in Makefile
* USE_GITHUB and GH_ACCOUNT right after USES.

the problem of crashes with unavailable graphical is still being solved.
Comment 10 Clockwork 2023-01-24 18:46:57 UTC
Created attachment 239680 [details]
My attachment in git-format patch.
Comment 11 Clockwork 2023-02-01 21:38:07 UTC
Created attachment 239848 [details]
sndy-0.0.4v7.patch

Code is optimized. Details on GitHub.
Comment 12 Clockwork 2023-02-12 14:39:20 UTC
Created attachment 240107 [details]
sndy-0.0.4v8.patch

Update README.md and pkg-descr
Comment 13 commit-hook freebsd_committer freebsd_triage 2023-02-14 20:24:21 UTC
A commit in branch main references this bug:

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

commit d61ab0f964be87f5bebfff8805195909f95b9d23
Author:     Clockwork6400 <Clockwork6400@protonmail.com>
AuthorDate: 2023-02-01 21:33:40 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-02-14 20:23:23 +0000

    sysutils/sndy: new port

    sndy is an audio switching program that allows you to redirect sound
    output to any port of your computer.  The buttons in the program toggle
    the sound output to a different device.  The scroll bar can be used to
    change the volume level.

    PR:             268570
    Reviewed by:    diizzy, grahamperrin
    Approved by:    eduardo (mentor)
    Differential Revision: https://reviews.freebsd.org/D38518

 sysutils/Makefile             |  1 +
 sysutils/sndy/Makefile (new)  | 29 +++++++++++++++++++++++++++++
 sysutils/sndy/distinfo (new)  |  3 +++
 sysutils/sndy/pkg-descr (new) |  4 ++++
 4 files changed, 37 insertions(+)
Comment 14 Robert Clausecker freebsd_committer freebsd_triage 2023-02-14 20:29:30 UTC
Committed, thanks.