diff mbox

[v2] libgdiplus: new package

Message ID 1448361491-14651-1-git-send-email-sergio.prado@e-labworks.com
State Changes Requested
Headers show

Commit Message

Sergio Prado Nov. 24, 2015, 10:38 a.m. UTC
Libgdiplus is an open source implementation of the GDI+ API.

Signed-off-by: Sergio Prado <sergio.prado@e-labworks.com>
---
Changes v1 -> v2:
  - because of libglib2, package depends on BR2_USE_WCHAR,
    BR2_TOOLCHAIN_HAS_THREADS and BR2_USE_MMU
  - because of cairo, package depends on BR2_PACKAGE_CAIRO
  - adding hashes
  - fixing license to MIT
  - adding a comment explaining why we need to enable autoreconf
  - adding a dependency on package host-pkgconf
  - adding a comment explaining why we cannot use --without-pango
---
 package/Config.in                  |  1 +
 package/libgdiplus/Config.in       | 21 ++++++++++++++++
 package/libgdiplus/libgdiplus.hash |  3 +++
 package/libgdiplus/libgdiplus.mk   | 50 ++++++++++++++++++++++++++++++++++++++
 4 files changed, 75 insertions(+)
 create mode 100644 package/libgdiplus/Config.in
 create mode 100644 package/libgdiplus/libgdiplus.hash
 create mode 100644 package/libgdiplus/libgdiplus.mk

Comments

Thomas Petazzoni Nov. 24, 2015, 5:23 p.m. UTC | #1
Dear Sergio Prado,

This package looks almost ready to go, there are just two remaining
things I believe. See below.

On Tue, 24 Nov 2015 08:38:11 -0200, Sergio Prado wrote:

> diff --git a/package/libgdiplus/libgdiplus.hash b/package/libgdiplus/libgdiplus.hash
> new file mode 100644
> index 000000000000..8642d5cbf66a
> --- /dev/null
> +++ b/package/libgdiplus/libgdiplus.hash
> @@ -0,0 +1,3 @@
> +# Locally computed:
> +md5    6e9a80ba921e4842acd5a12b14c78dc9                                 libgdiplus-3.12.tar.gz
> +sha256 7eadc5105c6352d456c5f8699dc89260bf402e82ce6668e7e0c625519f9e5b44 libgdiplus-3.12.tar.gz

Only the sha256 is useful here. It's a strong hash, there's no need to
add another weak hash such as md5.

> +LIBGDIPLUS_VERSION = 3.12
> +LIBGDIPLUS_SITE = $(call github,mono,libgdiplus,$(LIBGDIPLUS_VERSION))
> +LIBGDIPLUS_LICENSE = MIT
> +LIBGDIPLUS_LICENSE_FILES = COPYING src/carbon-private.h

This is the part that I didn't like. I looked at LICENSE, and got
confused. Then I saw the discussion you had with Arnout about all the
licensing mess in this package.

So what I'd like to see here is:

 1/ A comment above those two lines that explain the situation (that
 the LICENSE file is incorrect, that the real license is indeed MIT,
 etc.)

 2/ A bug report being made to the upstream project to ask them to fix
 this mess.

> +# there is a bug in the configure script that enables pango support when 
> +# passing --without-pango, so let's just not use it
> +ifeq ($(BR2_PACKAGE_PANGO),y)
> +LIBGDIPLUS_CONF_OPTS += --with-pango
> +LIBGDIPLUS_DEPENDENCIES += pango
> +endif

You could also report this bug upstream. Since upstream uses github,
it's pretty trivial to report bugs, so I think we should do it when we
discover problems.

Can you respin a new version of the patch that fixes the hash thing and
adds more details about the license?

Thanks a lot!

Thomas
Sergio Prado Nov. 25, 2015, 12:09 a.m. UTC | #2
Hi Thomas,

2015-11-24 15:23 GMT-02:00 Thomas Petazzoni <
thomas.petazzoni@free-electrons.com>:

> Dear Sergio Prado,
>
> This package looks almost ready to go, there are just two remaining
> things I believe. See below.
>
> On Tue, 24 Nov 2015 08:38:11 -0200, Sergio Prado wrote:
>
> > diff --git a/package/libgdiplus/libgdiplus.hash
> b/package/libgdiplus/libgdiplus.hash
> > new file mode 100644
> > index 000000000000..8642d5cbf66a
> > --- /dev/null
> > +++ b/package/libgdiplus/libgdiplus.hash
> > @@ -0,0 +1,3 @@
> > +# Locally computed:
> > +md5    6e9a80ba921e4842acd5a12b14c78dc9
>  libgdiplus-3.12.tar.gz
> > +sha256 7eadc5105c6352d456c5f8699dc89260bf402e82ce6668e7e0c625519f9e5b44
> libgdiplus-3.12.tar.gz
>
> Only the sha256 is useful here. It's a strong hash, there's no need to
> add another weak hash such as md5.
>
OK.


>
> > +LIBGDIPLUS_VERSION = 3.12
> > +LIBGDIPLUS_SITE = $(call github,mono,libgdiplus,$(LIBGDIPLUS_VERSION))
> > +LIBGDIPLUS_LICENSE = MIT
> > +LIBGDIPLUS_LICENSE_FILES = COPYING src/carbon-private.h
>
> This is the part that I didn't like. I looked at LICENSE, and got
> confused. Then I saw the discussion you had with Arnout about all the
> licensing mess in this package.
>
> So what I'd like to see here is:
>
>  1/ A comment above those two lines that explain the situation (that
>  the LICENSE file is incorrect, that the real license is indeed MIT,
>  etc.)
>
OK.


>
>  2/ A bug report being made to the upstream project to ask them to fix
>  this mess.
>
Done: https://bugzilla.xamarin.com/show_bug.cgi?id=36227


> > +# there is a bug in the configure script that enables pango support when
> > +# passing --without-pango, so let's just not use it
> > +ifeq ($(BR2_PACKAGE_PANGO),y)
> > +LIBGDIPLUS_CONF_OPTS += --with-pango
> > +LIBGDIPLUS_DEPENDENCIES += pango
> > +endif
>
> You could also report this bug upstream. Since upstream uses github,
> it's pretty trivial to report bugs, so I think we should do it when we
> discover problems.
>
You are right. Done: https://bugzilla.xamarin.com/show_bug.cgi?id=36228

>
> Can you respin a new version of the patch that fixes the hash thing and
> adds more details about the license?
>
V3 is on the way.


> Thanks a lot!
>
Thanks!


>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
>
diff mbox

Patch

diff --git a/package/Config.in b/package/Config.in
index bdc3063abd1a..ef09361c5440 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -824,6 +824,7 @@  menu "Graphics"
 	source "package/libfm-extra/Config.in"
 	source "package/libfreeimage/Config.in"
 	source "package/libgail/Config.in"
+	source "package/libgdiplus/Config.in"
 	source "package/libgeotiff/Config.in"
 	source "package/libglade/Config.in"
 	source "package/libglew/Config.in"
diff --git a/package/libgdiplus/Config.in b/package/libgdiplus/Config.in
new file mode 100644
index 000000000000..f860ab339469
--- /dev/null
+++ b/package/libgdiplus/Config.in
@@ -0,0 +1,21 @@ 
+config BR2_PACKAGE_LIBGDIPLUS
+	bool "libgdiplus"
+	select BR2_PACKAGE_XLIB_LIBXFT
+	select BR2_PACKAGE_LIBGLIB2
+	select BR2_PACKAGE_CAIRO
+	select BR2_PACKAGE_LIBPNG
+	depends on BR2_PACKAGE_XORG7
+	depends on BR2_USE_WCHAR # libglib2 -> gettext
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
+	depends on BR2_USE_MMU # libglib2
+	depends on BR2_ARCH_HAS_ATOMICS # cairo
+	help
+	  An Open Source implementation of the GDI+ API.
+
+	  https://github.com/mono/libgdiplus
+
+comment "libgdiplus needs a toolchain w/ wchar, threads"
+	depends on BR2_USE_MMU
+	depends on BR2_ARCH_HAS_ATOMICS
+	depends on BR2_PACKAGE_XORG7
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/libgdiplus/libgdiplus.hash b/package/libgdiplus/libgdiplus.hash
new file mode 100644
index 000000000000..8642d5cbf66a
--- /dev/null
+++ b/package/libgdiplus/libgdiplus.hash
@@ -0,0 +1,3 @@ 
+# Locally computed:
+md5    6e9a80ba921e4842acd5a12b14c78dc9                                 libgdiplus-3.12.tar.gz
+sha256 7eadc5105c6352d456c5f8699dc89260bf402e82ce6668e7e0c625519f9e5b44 libgdiplus-3.12.tar.gz
diff --git a/package/libgdiplus/libgdiplus.mk b/package/libgdiplus/libgdiplus.mk
new file mode 100644
index 000000000000..d3b4f218970b
--- /dev/null
+++ b/package/libgdiplus/libgdiplus.mk
@@ -0,0 +1,50 @@ 
+################################################################################
+#
+# libgdiplus
+#
+################################################################################
+
+LIBGDIPLUS_VERSION = 3.12
+LIBGDIPLUS_SITE = $(call github,mono,libgdiplus,$(LIBGDIPLUS_VERSION))
+LIBGDIPLUS_LICENSE = MIT
+LIBGDIPLUS_LICENSE_FILES = COPYING src/carbon-private.h
+LIBGDIPLUS_INSTALL_STAGING = YES
+
+# github tarball doesn't have configure
+LIBGDIPLUS_AUTORECONF = YES
+
+LIBGDIPLUS_DEPENDENCIES = xlib_libXft libglib2 cairo libpng host-pkgconf
+
+# API changes in recent versions of libgif makes it incompatible with
+# this version of libgdiplus, so we are disabling it for now.
+LIBGDIPLUS_CONF_OPTS = --without-libgif
+
+# there is a bug in the configure script that enables pango support when 
+# passing --without-pango, so let's just not use it
+ifeq ($(BR2_PACKAGE_PANGO),y)
+LIBGDIPLUS_CONF_OPTS += --with-pango
+LIBGDIPLUS_DEPENDENCIES += pango
+endif
+
+ifeq ($(BR2_PACKAGE_LIBEXIF),y)
+LIBGDIPLUS_CONF_OPTS += --with-libexif
+LIBGDIPLUS_DEPENDENCIES += libexif
+else
+LIBGDIPLUS_CONF_OPTS += --without-libexif
+endif
+
+ifeq ($(BR2_PACKAGE_JPEG),y)
+LIBGDIPLUS_CONF_OPTS += --with-libjpeg
+LIBGDIPLUS_DEPENDENCIES += jpeg 
+else
+LIBGDIPLUS_CONF_OPTS += --without-libjpeg
+endif
+
+ifeq ($(BR2_PACKAGE_TIFF),y)
+LIBGDIPLUS_CONF_OPTS += --with-libtiff
+LIBGDIPLUS_DEPENDENCIES += tiff
+else
+LIBGDIPLUS_CONF_OPTS += --without-libtiff
+endif
+
+$(eval $(autotools-package))