[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: Mixing code under different licenses

Gianfranco Berardi wrote:

The author's source is under the ZLib license, which is GPL-compliant. So far, so good.

Still, I have no experience mixing code under different licenses. I took his Main.cpp and modified it very slightly to make it my own main.cpp, so obviously I would need to keep the ZLib notice in the source file while specifiying that I had changed it.

So you are taking code licensed under Zlib, doing some modifications (possibly HUGE modifications - like throwing away all but a few lines) and incorporating that resulting stuff into your application.

The Zlib license says:

 "This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
  arising from the use of this software.

  Permission is granted to anyone to use this software for any purpose,
  including commercial applications, and to alter it and redistribute it
  freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not
     claim that you wrote the original software. If you use this software
     in a product, an acknowledgment in the product documentation would be
     appreciated but is not required.
  2. Altered source versions must be plainly marked as such, and must not be
     misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution."

...well, he says you can do what you wanted - alter it, redistribute it freely
and all.  So, just so long as you keep the Zlib license and mark it plainly
as altered and don't say that you wrote the original version, you're in the

If you want to *re*license it under GPL, you are on more slippery ground.
You don't own the copyright to his code - so you don't have the rights to
change the license terms.

I think you can ship your game under Zlib without problems though.

But what about when I write my own version of the GameEngine class? If I add a line or two to my own code, do I need to signify that those lines come from the ZLib-licensed code?

No - he's not asking you to label which parts you altered - only that you did alter it.

You can just say in your 'LICENSE' or 'COPYING' file that you didn't
write the game engine - and that you've modified the original game
engine - so this isn't the original.

Personally, I'd just add your copyright to his at the top of the
files you altered.

In general, I would try to leave his code as intact as possible and
make as many changes as possible in other files.

I have a greater appreciation of the problem with license proliferation. I'm just borrowing from one project, but if a larger project borrows from multiple sources, that could be a legal nightmare.

Yeah - it can be a nightmare.

It's better to try to leave libraries alone - just use them as-is.  If
you need changes, try to get them into the next release of the official
library sources instead of hacking up your own versions.

That is, unless I am making a mountain out of a molehill here. Am I?

No - I think you do have to be especially careful not to tread on people's license terms.

---------------------------- Steve Baker -------------------------
HomeEmail: <sjbaker1@xxxxxxxxxxx>    WorkEmail: <sjbaker@xxxxxxxx>
HomePage : http://www.sjbaker.org
Projects : http://plib.sf.net    http://tuxaqfh.sf.net
           http://tuxkart.sf.net http://prettypoly.sf.net
GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M-
V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++