Bug 255496 - [NEW-PORT] audio/ZMusic: standalone music library system for GZDoom, Raze, and PrBoom+
Summary: [NEW-PORT] audio/ZMusic: standalone music library system for GZDoom, Raze, an...
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-29 18:21 UTC by Kalten
Modified: 2021-11-10 16:05 UTC (History)
4 users (show)

See Also:


Attachments
Shell-Archive for new port audio/ZMusic (2.65 KB, text/plain)
2021-04-29 18:21 UTC, Kalten
no flags Details
poudriere testport -v -v -P (310.43 KB, text/plain)
2021-04-29 18:22 UTC, Kalten
no flags Details
Shell-Archive for new port audio/ZMusic (02) (2.64 KB, text/plain)
2021-04-29 18:46 UTC, Kalten
no flags Details
poudriere testport -v -v (310.13 KB, text/plain)
2021-04-29 18:47 UTC, Kalten
no flags Details
Shell-Archive for new port audio/ZMusic (03) (2.65 KB, text/plain)
2021-04-29 22:49 UTC, Kalten
no flags Details
poudriere testport -v -v (03) (310.68 KB, text/plain)
2021-04-29 22:50 UTC, Kalten
no flags Details
Shell-Archive for new port audio/ZMusic (04) (2.65 KB, text/plain)
2021-04-30 00:36 UTC, Kalten
no flags Details
poudriere testport -v -v (04) (310.68 KB, text/plain)
2021-04-30 00:37 UTC, Kalten
no flags Details
A script I created to create a proper distinfo file (272 bytes, text/plain)
2021-04-30 03:31 UTC, Chris Hutchinson
no flags Details
Shell-Archive for new port audio/ZMusic (05) (2.67 KB, text/plain)
2021-04-30 14:41 UTC, Kalten
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kalten 2021-04-29 18:21:36 UTC
Created attachment 224545 [details]
Shell-Archive for new port audio/ZMusic

Greetings!

audio/ZMusic is a new port.

Yes, it is written with capital “Z” and capital “M”.

ZMusic is the standalone music library system for GZDoom, Raze, and
PrBoom+. https://github.com/coelckers/ZMusic

It is needed for the update of games/gzdoom to version 4.5.0 (I am
working on that too) as the sound part has been outsourced to this
library.

I am a bit lost in the Makefile-section about the licenses:
Prey do have a look at the commented three entries: what is to be done
about them?

I am attaching a Shell-Archive (audio_ZMusic_01.shar) as well as the
output of poudriere(8) using »testport -v -v -P«.
The output of portlint(1) using »-AC« can be found below.

...8<--- portlint -AC
WARN: Makefile: for new port, make $FreeBSD$ tag in comment section empty, to make SVN happy.
0 fatal errors and 1 warning found.
--->8...

Thank you in advance,
 regards,
  Kalten
Comment 1 Kalten 2021-04-29 18:22:57 UTC
Created attachment 224546 [details]
poudriere testport -v -v -P
Comment 2 Kalten 2021-04-29 18:46:03 UTC
Greetings again!

I am terribly sorry!
That I did add
...8<--- pkg-plist
@dir /prefix
...>8---
did silence the warning of poudriere(8)
...8<--- poudriere testport -v -v -P audio/ZMusic
--->8...
but results in the error at installation
...8<--- make install
pkg-static: Unable to access file /usr/ports/audio/ZMusic/work/stage/prefix/:No such file or directory
*** Error code 74
--->8...

I have removed that line »@dir /prefix« from pkg-plist now.

»poudriere testport -v -v« omitting the parameter »-P« is happy.
poudriere-testport(8) »-P  Use custom prefix.«

Help please!

New Shell-Archive (audio_ZMusic_02.shar) replaced old one.

Regards,
 Kalten
Comment 3 Kalten 2021-04-29 18:46:39 UTC
Created attachment 224547 [details]
Shell-Archive for new port audio/ZMusic (02)
Comment 4 Kalten 2021-04-29 18:47:13 UTC
Created attachment 224548 [details]
poudriere testport -v -v
Comment 5 Chris Hutchinson 2021-04-29 19:13:02 UTC
Hello Kalten!

nuke this line in your Makefile:
$FreeBSD:$

This came from CVS && SVN source control.
But as we very recently switched to GIT.
It no longer carries any value. :-)

Also, I'd be happy to assist you with the
LICENSE entry. But I need to know exactly
WHAT licence the source is under && WHICH
version. :-)

HTH

--Chris
Comment 6 Kalten 2021-04-29 19:29:25 UTC
Hello Chris!

(In reply to Chris Hutchinson from comment #5)
> nuke this line in your Makefile:
> $FreeBSD:$
> 
> This came from CVS && SVN source control.
> But as we very recently switched to GIT.
> It no longer carries any value. :-)
OK! ;-) I shall do that. (best together with the license problem, I think—so one of the two of us likely).

> Also, I'd be happy to assist you with the
> LICENSE entry. But I need to know exactly
> WHAT licence the source is under && WHICH
> version. :-)
That is quite complicated, I think.
Likely it would be easiest, if you executed the *.shar and called »make extract«.
In the direktory work/ZMusic-1.1.6/licenses/ you will find all these licenses.

Greetings!
 Kalten
Comment 7 Chris Hutchinson 2021-04-29 19:38:21 UTC
(In reply to Kalten from comment #6)
LOL. I'm well familiar with the process. I'm
currently Maintainer for ~160 ports. ;-)
You aren't using LICENSE correctly. What
I'm interested in. So I can help you fix
it. Is what license does the author of
the source code claim?
GPL, BSD, MIT, CDL, ...?
If you can provide me with that && the
version. I can get you to the correct entry.

Agreed. BOTH {$FreeBSD; LICENSE} should be
done at the same time. :-)

--Chris
Comment 8 Chris Hutchinson 2021-04-29 19:57:18 UTC
Based on what I see in your shar(1) file.
You want, and only want:

LICENSE=        GPLv3 LGPL21
LICENSE_COMB=   multi

and remove the $FreeBSD line.

That should get it.

--Chris
Comment 9 Chris Hutchinson 2021-04-29 19:59:44 UTC
OH! Almost forgot. As a rule ports names &&
categories are all *lower* cased. So not doing
so, may result in rejection by the committers.

Just so you know. :-)

--Chris
Comment 10 Kalten 2021-04-29 20:21:43 UTC
(In reply to Chris Hutchinson from comment #7)
> LOL. I'm well familiar with the process. I'm
> currently Maintainer for ~160 ports. ;-)
> 
> You aren't using LICENSE correctly. What
> I'm interested in. So I can help you fix
> it. Is what license does the author of
> the source code claim?
> GPL, BSD, MIT, CDL, ...?
> If you can provide me with that && the
> version. I can get you to the correct entry.

(In reply to Chris Hutchinson from comment #8)
> Based on what I see in your shar(1) file.
> You want, and only want:
> 
> LICENSE=        GPLv3 LGPL21
> LICENSE_COMB=   multi
> 
> and remove the $FreeBSD line.
> 
> That should get it.


You want me to copy all that into here—so be it:

Firstly: I did look through https://docs.freebsd.org/en/books/porters-handbook/makefiles/#licenses
as well as /usr/ports/Mk/bsd.licenses.db.mk

The files inside work/ZMusic-1.1.6/licenses/ do lead to:
legal.txt seems to be the authors explanation:
>> ZMusic is licensed under the GPLv3.
>> 
>> The majority of original code uses a BSD-like lincese. See bsd.txt.
>> 
>> libADL and libOPN are licensed under the GPLv3.
>> 
>> WildMidi is licensed under the LGPLv3. See lgplv3.txt
>> 
>> This software uses the 'zlib' general purpose compression library by
>> Jean-loup Gailly and Mark Adler.
>> 
>> This software uses the game_music_emu library, which is covered by the GNU Lesser
>> General Public License. See lgplv21.txt.
>> 
>> This software uses the "Dynamic Universal Music Bibliotheque" library for
>> MOD music playback. See dumb.txt for original license. The version used,
>> however, has been heavily modified from its original form and is the same
>> version used by the foobar2000 component foo_dumb as of mid-2008, found at
>> http://kode54.foobar2000.org/.
>> 
>> ZMusic Lite is a feature reduced version that omits all content that is not
>> compatible with the LGPL v2.1. Use this if your project cannot comply with the GPL.
>> This means that most of the available MIDI synths, except FluidSynth, have been removed
>> and that the playback of native OPL file types is disabled.

That seems to mean and correspond to the files inside work/ZMusic-1.1.6/licenses/:

• bsd (Version unknown, but poudriere does wish a version number)
  that is why I put the following into the Makefile:
   LICENSE_FILE_BSD3CLAUSE=${WRKSRC}/licenses/bsd.txt

• dumb (Dynamic Universal Music Bibliotheque)
  I could not find this one, hence the comment in the Makefile
   #LICENSE_FILE_=${WRKSRC}/licenses/dumb.txt
  and my comment #0
  >>> Prey do have a look at the commented three entries: what is to be done about them?

• gplv3
  that is why I put the following into the Makefile:
   LICENSE_FILE_GPLv3=	${WRKSRC}/licenses/gplv3.txt

• lgplv21
  that is why I put the following into the Makefile:
   LICENSE_FILE_LGPL21=${WRKSRC}/licenses/lgplv21.txt

• lgplv3
  that is why I put the following into the Makefile:
   LICENSE_FILE_LGPL3=	${WRKSRC}/licenses/lgplv3.txt

• zmusic
  I could not find this one, hence the comment in the Makefile
   #LICENSE_FILE_=${WRKSRC}/licenses/zmusic.txt
  and my comment #0 (see •dump)

• the named file legal.txt from above 
  I thought, this one should be installed too—hence the comment in the Makefile
   #LICENSE_FILE_=${WRKSRC}/licenses/legal.txt
  and my comment #0 (see •dump)

These resulted in the entries placed above all the others, in the Makefile:
  LICENSE=	BSD3CLAUSE GPLv3 LGPL21 LGPL3 ZLIB
  LICENSE_COMB=	multi
And my question, what to do with the others.

your version in comment #8 does omit some of those!

How is that all together to be handled?


> Agreed. BOTH {$FreeBSD; LICENSE} should be
> done at the same time. :-)
OK.

(In reply to Chris Hutchinson from comment #9)
> OH! Almost forgot. As a rule ports names &&
> categories are all *lower* cased. So not doing
> so, may result in rejection by the committers.
> 
> Just so you know. :-)
Well: e.g. inside audio/ there are
 GxSwitchlessWah-lv2
 HVSC-Update
 Maaate
So—what shall it be?

Thanks in advance!
 Kalten
Comment 11 Chris Hutchinson 2021-04-29 20:45:41 UTC
(In reply to Kalten from comment #10)
Oye! What a flippin mess. ;-)

OK the following should get it for you *and*
satisfy any legal bs *providing* you ALSO
install the accompanying license files
distributed with the source. IOW any license
stuff that comes with the source. It's enough
install them with the DOC FILES.

LICENSE=        GPLv3 LGPL21 BSD3CLAUSE
LICENSE_COMB=   multi

--Chris
Comment 12 Chris Hutchinson 2021-04-29 20:54:10 UTC
(In reply to Chris Hutchinson from comment #11)
Sorry. That *should* have been:

LICENSE=        BSD3CLAUSE GPLv3 LGPL21
LICENSE_COMB=   multi

(alphabetical order) :-)

--Chris
Comment 13 Kalten 2021-04-29 22:49:43 UTC
Created attachment 224557 [details]
Shell-Archive for new port audio/ZMusic (03)

(In reply to Chris Hutchinson from comment #11 and comment #12)

> Oye! What a flippin mess. ;-)
Yes, indeed ;-)

> OK the following should get it for you *and*
> satisfy any legal bs *providing* you ALSO
> install the accompanying license files
> distributed with the source. IOW any license
> stuff that comes with the source. It's enough
> install them with the DOC FILES.
> 
> LICENSE=        BSD3CLAUSE GPLv3 LGPL21
> LICENSE_COMB=   multi
> 
> (alphabetical order) :-)
OK—I did not use the DOC-switch, as it is not optional.
I did use a similar mechanism and post-install. Is it good this way?
(see new attachment with new audio_ZMusic_03.shar)

»portlint -AC« does not accept deleting the $FreeBSD$ line ;-) at least in version 2.18.11 but I did remove it anyway.
I suppose, portlint-2.19.5 does accept it.

Regards,
 Kalten
Comment 14 Kalten 2021-04-29 22:50:21 UTC
Created attachment 224558 [details]
poudriere testport -v -v (03)
Comment 15 Chris Hutchinson 2021-04-30 00:02:48 UTC
(In reply to Kalten from comment #14)
OK this should probably work.
But I recommend not abusing LICENSE_FILES
like this. As this is not how the LICENSE
framework is intended to be used.
Why not define LFILES and simply use that
instead. The same end goal is reached, and
it will never have unintended consequences
in the future. Something like:

USE_LDCONFIG=	yes

LFILES=	bsd.txt dumb.txt gplv3.txt legal.txt lgplv21.txt \
lgplv3.txt zmusic.txt

and

${INSTALL_DATA} ${LFILES:S|^|${WRKSRC}/licenses/|} ${STAGEDIR}${DOCSDIR}

instead.

Otherwise everything should be just fine. :-)

--Chris
Comment 16 Kalten 2021-04-30 00:36:11 UTC
Created attachment 224559 [details]
Shell-Archive for new port audio/ZMusic (04)

(In reply to Chris Hutchinson from comment #15)
> OK this should probably work.
> But I recommend not abusing LICENSE_FILES
> like this. As this is not how the LICENSE
> framework is intended to be used.
Oh! I am sorry! I did not look up, whether this variable is used—admittedly stupid of me :-(

> Why not define LFILES and simply use that
> instead. The same end goal is reached, and
> it will never have unintended consequences
> in the future. Something like:
> 
> USE_LDCONFIG=	yes
> 
> LFILES=	bsd.txt dumb.txt gplv3.txt legal.txt lgplv21.txt \
> lgplv3.txt zmusic.txt
> 
> and
> 
> ${INSTALL_DATA} ${LFILES:S|^|${WRKSRC}/licenses/|} ${STAGEDIR}${DOCSDIR}
> 
> instead.
I have changed it (see new audio_ZMusic_04.shar)

> Otherwise everything should be just fine. :-)
Very good!

Thank you,
 Kalten
Comment 17 Kalten 2021-04-30 00:37:06 UTC
Created attachment 224560 [details]
poudriere testport -v -v (04)

and »portlint -AC« is happy too.
Comment 18 Chris Hutchinson 2021-04-30 03:27:05 UTC
(In reply to Kalten from comment #17)
> Oh! I am sorry! I did not look up, whether this
> variable is used—admittedly stupid of me :-(
Heh. No reason to be sorry. This is all fairly
new to you. We all started here. :-)

Congrats! Looks good to go.

I do have one small nit;
distinfo should include a TIMESTAMP field:
TIMESTAMP = 1617631853
SHA256 (libfm-1.3.2.tar.xz) = a5042630304cf8e5d8cff9d565c6bd546f228b48c960153ed366a34e87cad1e5
SIZE (libfm-1.3.2.tar.xz) = 945532

There are recommended tools for cobbling,
and testing ports. They're all listed in the
porters-handbook
[ https://docs.freebsd.org/en/books/porters-handbook/ ]
but I whipped up a script that I like to use for
creating the distinfo file. I'll attach it to this
pr for you. :-)
Some further tips to help guide you into becoming a Pro
Maintainer:
If you're good with shell scripting. You'll find the ports
framework pretty easy to follow. For example; the LICENSE
framework is located in:
/usr/ports/Mk/bsd.licenses.mk. The licenses already supported
internally are in /usr/ports/Templates/Licenses. IOW you don't
have to point to a license in the distiles {$WRKDIR}.
If you have any questions; you'll find the solutions for the
ports framework are largely located in /usr/ports/Mk and
/usr/ports/Templates. The filenames are pretty indicative of
what their purpose is. And DO take the time to consult the
porters-handbook. :-)

Here's to a job well done! :-)

A committer should be examining this pr fairly soon, and
sign-off on it and commit it.

Feel free to poke me directly in the future if you ever get
stuck on something.

All the best!

--Chris
Comment 19 Chris Hutchinson 2021-04-30 03:31:59 UTC
Created attachment 224562 [details]
A script I created to create a proper distinfo file

Here's the distinfo script I promised you.
Please use it on this port. So it will pass
the test to be committed to the ports tree. ;-)
Comment 20 Tatsuki Makino 2021-04-30 10:24:39 UTC
(In reply to Chris Hutchinson from comment #19)

distinfo is created by "make makesum".
files/patch-* is created by "make makepatch".
pkg-plist is created by "make makeplist"...
Comment 21 Kalten 2021-04-30 14:41:03 UTC
Created attachment 224576 [details]
Shell-Archive for new port audio/ZMusic (05)

(In reply to Chris Hutchinson from comment #18 and comment #19)
> Congrats! Looks good to go.
Ahh! :-)

> I do have one small nit;
> distinfo should include a TIMESTAMP field: […]
added—see new audio_ZMusic_05.shar

> [porters-handbook, etc.; ports/Mk/ etc.]
I shall look further into it—thank you.

> A committer should be examining this pr fairly soon, and
> sign-off on it and commit it.
Let us hope so :-)

> Feel free to poke me directly in the future if you ever get
> stuck on something.
Thanks a lot! (via e-mail, I suppose)

> Here's the distinfo script I promised you […]
Thank you, and: see below ;-)

(In reply to Tatsuki Makino from comment #20)
> distinfo is created by "make makesum".
Very good! I have used it now.

> files/patch-* is created by "make makepatch".
> pkg-plist is created by "make makeplist"...
All good to know.
Thank you!

Regards,
 Kalten
Comment 22 Alexey Dokuchaev freebsd_committer freebsd_triage 2021-11-10 09:30:15 UTC
The port had been independently added with https://cgit.freebsd.org/ports/commit/?id=9633fdc9c4c4 (correctly named, but under wrong category).
Comment 23 Kyle Evans freebsd_committer freebsd_triage 2021-11-10 16:05:16 UTC
Sorry, folks! 

FWIW- I also pushed an update to gzdoom to 4.7.1 at the same time.