emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Vendoring code in a (Non?)GNU ELPA package


From: Daniel Semyonov
Subject: Re: Vendoring code in a (Non?)GNU ELPA package
Date: Mon, 01 Jan 2024 14:07:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

>>>>> Richard Stallman writes:

    > Let's not adopt that term "vendoring", particularly since the GNU
    > Project is not a "vender".  But the question is a reasonable one
    > to pose.

I agree; I only used the term originally since it seemed to describe
what I wanted to do and I saw it used online.

    > The answer would depend on questions such as
    > (1) What is the license of that library?

A choice of either Unlicense (public domain) or MIT No Attribution (I'll
paste the exact license text as it appears in the library at the end of
this email).

    > (2) What on does it do?

It provides a uniform API for playing or recording audio on various
platforms (GNU/Linux, FreeBSD, OpenBSD, NetBSD, Windows, macOS, Android,
iOS and browsers).
It also includes (quoted from the website, 'miniaud.io'): "Built-in
decoders, advanced mixing and effect processing, resource management, 3D
spatialization, filters, data conversion and more."

    > (3) What is the reason for using it?

My module only uses the audio playback API to play music through Emacs.
I don't currently have plans to make use of other parts of the library.

    > (4) When running, how does it communicate with Emacs?

Some functions exposed to Elisp in my module use subroutines defined in
"miniaudio.h".  Emacs also gets input through a pipe process (created
with 'make-pipe-process') from the module, which writes to the pipe
process through a file descriptor; this is required to notify Emacs when
audio playback finishes.

    > (5) Does it get linked with Emacs?  If so, when does that happen?
    > (6) In what sense is it a "library"?
    > (7) Would this be source code, executable, or both?

I don't have a formal background in C so I might not understand the
terminology correctly, but I think it gets linked with Emacs when my
module does (when it is loaded by Emacs with 'module-load', for
example).

It is distributed as a single source file ("miniaudio.h") which is
included by my module.  "miniaudio.h" contains all the code of the
miniaudio "library".

I don't know if my module "links" with miniaudio technically, since all
of its code is completely contained inside my module once built.

    > (8) How would it get built for your distro?

Assuming you mean the miniaudio library itself, it seems there is an
official "split" version of it which contains both "miniaudio.c" and
"miniaudio.h", where the actual implementation lives inside
"miniaudio.c".

I think the few distros that do package it compile this version and
distribute it like other C libraries.

If you mean my module, then I'm not sure - I never really looked into
how distros manage Emacs packages.

    > Some combinations of answers might make it ok, others would make
    > it unacceptable.

Hopefully I've made things clear now, thanks for your interest.

Daniel


License text which appears at the end of the file "miniaudio.h":


This software is available as a choice of the following licenses. Choose
whichever you prefer.

===============================================================================
ALTERNATIVE 1 - Public Domain (www.unlicense.org)
===============================================================================
This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
software, either in source code form or as a compiled binary, for any purpose,
commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this
software dedicate any and all copyright interest in the software to the public
domain. We make this dedication for the benefit of the public at large and to
the detriment of our heirs and successors. We intend this dedication to be an
overt act of relinquishment in perpetuity of all present and future rights to
this software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <http://unlicense.org/>

===============================================================================
ALTERNATIVE 2 - MIT No Attribution
===============================================================================
Copyright 2023 David Reid

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]