Page MenuHomeFreeBSD

[New PORT] x11/admiral: Merge concurrent outputs for a status bar.
ClosedPublic

Authored by rigoletto on Jun 16 2018, 2:47 AM.
Referenced Files
Unknown Object (File)
Sun, Mar 10, 11:46 PM
Unknown Object (File)
Feb 12 2024, 1:14 AM
Unknown Object (File)
Feb 12 2024, 1:13 AM
Unknown Object (File)
Feb 12 2024, 1:13 AM
Unknown Object (File)
Feb 12 2024, 1:13 AM
Unknown Object (File)
Feb 12 2024, 1:13 AM
Unknown Object (File)
Feb 12 2024, 1:13 AM
Unknown Object (File)
Feb 12 2024, 1:13 AM
Subscribers

Details

Summary

PR: 229063

This port should be particularly useful to simplify the scripting for x11/lemonbar users.

Test Plan

Upstream use libc-0.2.37 cargo crate and I got this message:

CARGO_CRATES=libc-0.2.37 or older maybe unstable on FreeBSD 12.0. Consider updating to the latest version.

I do not have any -CURRENT installation and so I patched to updated it to libc-0.2.42 cargo crate.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 17323
Build 17158: arc lint + arc unit

Event Timeline

rigoletto retitled this revision from [New PORT] x11/admiral to [New PORT] x11/admiral: Executes multiple programs concurrently to generate output for bars..Jun 16 2018, 2:52 AM
rigoletto edited the summary of this revision. (Show Details)
rigoletto edited the test plan for this revision. (Show Details)
rigoletto added a reviewer: adridg.
tobik added inline comments.
x11/admiral/Makefile
16

The upstream repo has a tag, so follow [1] instead of setting GH_TAGNAME when you need a newer commit.

https://www.freebsd.org/doc/en/books/porters-handbook/makefile-distfiles.html#makefile-master_sites-github-ex5

45–46

Add an EXAMPLES option and add the examples to PORTEXAMPLES instead.

51

Never use ${CP} to install files (see [1]).

${COPYTREE_SHARE} could be useful here, but there seem to be only two files so a regular ${INSTALL_DATA} will probably do.

[1] https://www.freebsd.org/doc/en/books/porters-handbook/install.html

x11/admiral/files/patch-Cargo.lock
1–2

Remove this patch. Cargo will automatically update Cargo.lock when you bump the libc crate in CARGO_CRATES. There is no need to patch it manually.

x11/admiral/Makefile
51

The problem I had while using ${INSTALL_DATA} was an error I assumed happened because I was trying to copy the 'admiral.d' directory instead of the files inside it. The reason is the configuration files should be installed inside a directory called 'admiral.d' and so I want to keep the reference.

x11/admiral/Makefile
51

But thinking about it now I could have created the directory just on the line before.

Thanks! :)

rigoletto marked 5 inline comments as done.

Done.

I think PLIST_FILES cannot be used when PORTEXAMPLES is set, can you confirm please?

Thanks!

In D15840#335030, @lbdm_privacychain.ch wrote:

Done.

I think PLIST_FILES cannot be used when PORTEXAMPLES is set, can you confirm please?

Thanks!

No, that's not true. You should remove pkg-plist again and just set PLIST_FILES=bin/admiral. What you add to PORTEXAMPLES does not have to appear in PLIST_FILES again.

x11/admiral/Makefile
20

With these changes I get this error message:

Error: Orphaned: %%PORTEXAMPLES%%%%EXAMPLESDIR%%/admiral.toml
Error: Orphaned: %%PORTEXAMPLES%%%%EXAMPLESDIR%%/bspwm_workspaces.sh

I am missing something. :(

Thanks!

Fix contiguous blank lines.

rigoletto marked an inline comment as done.

Re-organizing OPTIONS.

x11/admiral/Makefile
48–49

Either do not set EXAMPLESDIR or change PORTEXAMPLES.

The files in PORTEXAMPLES are supposed to be relative to EXAMPLESDIR but that is not the case now.

rigoletto marked an inline comment as done.

Done.

Thanks!

x11/admiral/Makefile
49

This looks bogus. It would probably be better to use COPYTREE_SHARE in post-install-EXAMPLES-on so that the whole hierarchy is replicated.

57–58

Should happen before the EXAMPLES one.

rigoletto marked 2 inline comments as done.

Done.

Thanks!

x11/admiral/Makefile
56–57
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
(cd ${WRKSRC} && ${COPYTREE_SHARE} admiral.d ${STAGEDIR}${EXAMPLESDIR})
rigoletto marked an inline comment as done.

Thank you @mat I thought ${COPYTREE_SHARE} would just worked for files.

In D15840#336204, @lbdm_privacychain.ch wrote:

Thank you @mat I thought ${COPYTREE_SHARE} would just worked for files.

It does. But you are not working on files, you are working on directories here. Whenever you are using COPYTREE_SHARE on . and the directory name is the same in the remote location, it is better to let the macro handle the directory creation.

Is everyone happy with this now? :)

Fine except for the confusion over "bars"

x11/admiral/Makefile
11

"Merge concurrent outputs for a status bar" is shorter and IMO, more to the point. I was wondering why there would be specific applications for drinking establishments -- not until the second sentence of pkg-descr does it become clear that this is for stats-bar applications in window managers.

x11/admiral/pkg-descr
2

Possibly "status bars"

x11/admiral/Makefile
11

Oh, I was wondering wtf this was doing, but I am so used to COMMENT and pkg-descr being not descriptive unless you already know what it does that I do not comment about it any more.

rigoletto retitled this revision from [New PORT] x11/admiral: Executes multiple programs concurrently to generate output for bars. to [New PORT] x11/admiral: Merge concurrent outputs for a status bar..Jun 30 2018, 5:14 PM
rigoletto marked 3 inline comments as done.

Done. ^^

This revision was not accepted when it landed; it landed in state Needs Review.Jul 15 2018, 1:34 PM
This revision was automatically updated to reflect the committed changes.