All of lore.kernel.org
 help / color / mirror / Atom feed
* [master][zeus][PATCHv2] cairo: Adapt license for cairo-dbg and cairo-src based on contents
@ 2020-01-10 22:03 Peter Kjellerstedt
  2020-01-10 23:27 ` Ross Burton
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Kjellerstedt @ 2020-01-10 22:03 UTC (permalink / raw)
  To: openembedded-core

Introduce a PACKAGECONFIG "trace" to disable cairo-trace (the only
part of the code licensed as GPL-3.0, and which is normally packaged
separately in cairo-perf-utils). By disabling this, we can adapt the
licenses for cairo-dbg and cairo-src so that they do not include
"GPLv3+" when trace is disabled and thus they can be used also when,
e.g., GPL-3.0 is blacklisted in INCOMPATIBLE_LICENSE.

The "trace" PACKAGECONFIG is enabled by default for backwards
compatibility.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---

PATCHv2: Remove the /usr/bin and /usr/lib/cairo directories if they
are empty.

 meta/recipes-graphics/cairo/cairo_1.16.0.bb | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/cairo/cairo_1.16.0.bb b/meta/recipes-graphics/cairo/cairo_1.16.0.bb
index e3de3f6164..d5820166b1 100644
--- a/meta/recipes-graphics/cairo/cairo_1.16.0.bb
+++ b/meta/recipes-graphics/cairo/cairo_1.16.0.bb
@@ -17,6 +17,10 @@ LICENSE_${PN}-doc = "MPL-1.1 | LGPLv2.1"
 LICENSE_${PN}-gobject = "MPL-1.1 | LGPLv2.1"
 LICENSE_${PN}-script-interpreter = "MPL-1.1 | LGPLv2.1"
 LICENSE_${PN}-perf-utils = "GPLv3+"
+# Adapt the licenses for cairo-dbg and cairo-src depending on whether
+# cairo-trace is being built.
+LICENSE_${PN}-dbg = "(MPL-1.1 | LGPLv2.1)${@bb.utils.contains('PACKAGECONFIG', 'trace', ' & GPLv3+', '', d)}"
+LICENSE_${PN}-src = "(MPL-1.1 | LGPLv2.1)${@bb.utils.contains('PACKAGECONFIG', 'trace', ' & GPLv3+', '', d)}"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=e73e999e0c72b5ac9012424fa157ad77"
 
@@ -40,7 +44,8 @@ X11DEPENDS = "virtual/libx11 libsm libxrender libxext"
 
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)}"
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)} \
+                   trace"
 
 PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}"
 PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb"
@@ -49,6 +54,7 @@ PACKAGECONFIG[valgrind] = "--enable-valgrind=yes,--disable-valgrind,valgrind"
 PACKAGECONFIG[egl] = "--enable-egl=yes,--disable-egl,virtual/egl"
 PACKAGECONFIG[glesv2] = "--enable-glesv2,--disable-glesv2,virtual/libgles2"
 PACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl"
+PACKAGECONFIG[trace] = "--enable-trace,--disable-trace"
 
 EXTRA_OECONF += " \
     ${@bb.utils.contains('TARGET_FPU', 'soft', '--disable-some-floating-point', '', d)} \
@@ -66,6 +72,8 @@ do_install_append () {
 	rm -rf ${D}${libdir}/cairo/cairo-sphinx*
 	rm -rf ${D}${libdir}/cairo/.debug/cairo-fdr*
 	rm -rf ${D}${libdir}/cairo/.debug/cairo-sphinx*
+	rmdir -p --ignore-fail-on-non-empty ${D}${bindir}
+	rmdir -p --ignore-fail-on-non-empty ${D}${libdir}/cairo
 }
 
 PACKAGES =+ "cairo-gobject cairo-script-interpreter cairo-perf-utils"
-- 
2.21.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [master][zeus][PATCHv2] cairo: Adapt license for cairo-dbg and cairo-src based on contents
  2020-01-10 22:03 [master][zeus][PATCHv2] cairo: Adapt license for cairo-dbg and cairo-src based on contents Peter Kjellerstedt
@ 2020-01-10 23:27 ` Ross Burton
  2020-01-11  3:19   ` Peter Kjellerstedt
  0 siblings, 1 reply; 3+ messages in thread
From: Ross Burton @ 2020-01-10 23:27 UTC (permalink / raw)
  To: openembedded-core

On 10/01/2020 22:03, Peter Kjellerstedt wrote:
> Introduce a PACKAGECONFIG "trace" to disable cairo-trace (the only
> part of the code licensed as GPL-3.0, and which is normally packaged
> separately in cairo-perf-utils). By disabling this, we can adapt the
> licenses for cairo-dbg and cairo-src so that they do not include
> "GPLv3+" when trace is disabled and thus they can be used also when,
> e.g., GPL-3.0 is blacklisted in INCOMPATIBLE_LICENSE.

The shortlog makes no mention of trace at all.  Can this be split into 
two commits, one for trace and one for the license mangling.

The license mangling is quite ugly but I'm not sure if there's a better 
solution...

Ross



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [master][zeus][PATCHv2] cairo: Adapt license for cairo-dbg and cairo-src based on contents
  2020-01-10 23:27 ` Ross Burton
@ 2020-01-11  3:19   ` Peter Kjellerstedt
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Kjellerstedt @ 2020-01-11  3:19 UTC (permalink / raw)
  To: Ross Burton, openembedded-core@lists.openembedded.org

> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org <openembedded-core-
> bounces@lists.openembedded.org> On Behalf Of Ross Burton
> Sent: den 11 januari 2020 00:28
> To: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [master][zeus][PATCHv2] cairo: Adapt license for
> cairo-dbg and cairo-src based on contents
> 
> On 10/01/2020 22:03, Peter Kjellerstedt wrote:
> > Introduce a PACKAGECONFIG "trace" to disable cairo-trace (the only
> > part of the code licensed as GPL-3.0, and which is normally packaged
> > separately in cairo-perf-utils). By disabling this, we can adapt the
> > licenses for cairo-dbg and cairo-src so that they do not include
> > "GPLv3+" when trace is disabled and thus they can be used also when,
> > e.g., GPL-3.0 is blacklisted in INCOMPATIBLE_LICENSE.
> 
> The shortlog makes no mention of trace at all.  Can this be split into
> two commits, one for trace and one for the license mangling.

I will split it in two patches.

> The license mangling is quite ugly but I'm not sure if there's a better
> solution...
> 
> Ross

//Peter



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-11  3:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-10 22:03 [master][zeus][PATCHv2] cairo: Adapt license for cairo-dbg and cairo-src based on contents Peter Kjellerstedt
2020-01-10 23:27 ` Ross Burton
2020-01-11  3:19   ` Peter Kjellerstedt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.