diff mbox

[1/1] libgdiplus: new package

Message ID 1448048842-25060-1-git-send-email-sergio.prado@e-labworks.com
State Superseded
Headers show

Commit Message

Sergio Prado Nov. 20, 2015, 7:47 p.m. UTC
Libgdiplus is an open source implementation of the GDI+ API.

Signed-off-by: Sergio Prado <sergio.prado@e-labworks.com>
---
 package/Config.in                  |  1 +
 package/libgdiplus/Config.in       | 14 ++++++++++++
 package/libgdiplus/libgdiplus.hash |  2 ++
 package/libgdiplus/libgdiplus.mk   | 46 ++++++++++++++++++++++++++++++++++++++
 4 files changed, 63 insertions(+)
 create mode 100644 package/libgdiplus/Config.in
 create mode 100644 package/libgdiplus/libgdiplus.hash
 create mode 100644 package/libgdiplus/libgdiplus.mk

Comments

Arnout Vandecappelle Nov. 22, 2015, 8:44 p.m. UTC | #1
Hi Sergio,

 Thanks for your contribution. I have a few comments below. Care to fix them up
and resend your patch? Thanks!

On 20-11-15 20:47, Sergio Prado wrote:
> Libgdiplus is an open source implementation of the GDI+ API.
> 
> Signed-off-by: Sergio Prado <sergio.prado@e-labworks.com>
> ---
>  package/Config.in                  |  1 +
>  package/libgdiplus/Config.in       | 14 ++++++++++++
>  package/libgdiplus/libgdiplus.hash |  2 ++
>  package/libgdiplus/libgdiplus.mk   | 46 ++++++++++++++++++++++++++++++++++++++
>  4 files changed, 63 insertions(+)
>  create mode 100644 package/libgdiplus/Config.in
>  create mode 100644 package/libgdiplus/libgdiplus.hash
>  create mode 100644 package/libgdiplus/libgdiplus.mk
> 
> 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..173d9af0d48a
> --- /dev/null
> +++ b/package/libgdiplus/Config.in
> @@ -0,0 +1,14 @@
> +config BR2_PACKAGE_LIBGDIPLUS
> +	bool "libgdiplus"
> +	select BR2_PACKAGE_XLIB_LIBXFT
> +	select BR2_PACKAGE_LIBGLIB2

 You need to add that package's dependencies to this package, so:

	depends on BR2_USE_WCHAR # libglib2 -> gettext
	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
	depends on BR2_USE_MMU # libglib2

> +	select BR2_PACKAGE_CAIRO

 Same here:

	depends on BR2_ARCH_HAS_ATOMICS # cairo

> +	select BR2_PACKAGE_LIBPNG
> +	depends on BR2_PACKAGE_XORG7
> +	help
> +	  An Open Source implementation of the GDI+ API.
> +
> +	  https://github.com/mono/libgdiplus
> +
> +comment "libgdiplus depends on X.org"
> +	depends on !BR2_PACKAGE_XORG7

 We don't add comments for X.org dependencies. But you should add a comment for
wchar and threads:

comment "libgdiplus needs a toolchain w/ wchar, threads"


> diff --git a/package/libgdiplus/libgdiplus.hash b/package/libgdiplus/libgdiplus.hash
> new file mode 100644
> index 000000000000..f2b0d33d71ab
> --- /dev/null
> +++ b/package/libgdiplus/libgdiplus.hash
> @@ -0,0 +1,2 @@
> +# No hash for 3.12, comes from the github-helper:

 We noticed that github tarballs are not changing anymore, so we started
requiring hashes for github tarballs as well since October.

> +none    xxx     libgdiplus-3.12.tar.gz
> diff --git a/package/libgdiplus/libgdiplus.mk b/package/libgdiplus/libgdiplus.mk
> new file mode 100644
> index 000000000000..c8e2d96a1c82
> --- /dev/null
> +++ b/package/libgdiplus/libgdiplus.mk
> @@ -0,0 +1,46 @@
> +################################################################################
> +#
> +# libgdiplus
> +#
> +################################################################################
> +
> +LIBGDIPLUS_VERSION = 3.12
> +LIBGDIPLUS_SITE = $(call github,mono,libgdiplus,$(LIBGDIPLUS_VERSION))
> +LIBGDIPLUS_LICENSE = LGPL MPLv1.0

 Ah, the licensing mess... Even though there is a LICENSE file that specifies
LGPL or MPLv1.1, and there is a MPL-1.1.html file which indeed contains the MPL,
the actual source files specify that they're licensed under MIT, and so does
COPYING. And in fact, all these predate the addition of LICENSE and
MPL-1.1.html. There are a few header files that don't specify a license, but I'm
pretty confident that the license is MIT and only MIT.

> +LIBGDIPLUS_LICENSE_FILES = LICENSE

 Unfortunately, COPYING doesn't contain the license text, so this should be

LIBGDIPLUS_LICENSE_FILES = COPYING src/carbon-private.h

> +LIBGDIPLUS_AUTORECONF = YES

 You should also add a comment here why it is needed, e.g.
# github tarball doesn't have configure

> +LIBGDIPLUS_INSTALL_STAGING = YES
> +
> +LIBGDIPLUS_DEPENDENCIES = xlib_libXft libglib2 cairo libpng

 It also depends on 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
> +
> +ifeq ($(BR2_PACKAGE_PANGO),y)
> +LIBGDIPLUS_CONF_OPTS += --with-pango
> +LIBGDIPLUS_DEPENDENCIES += pango

 We prefer to add an explicit --without-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

 There are also optional dependencies on fontconfig, freetype.


 Regards,
 Arnout

> +
> +$(eval $(autotools-package))
>
Sergio Prado Nov. 23, 2015, 12:36 p.m. UTC | #2
Hi Arnout,

2015-11-22 18:44 GMT-02:00 Arnout Vandecappelle <arnout@mind.be>:

>  Hi Sergio,
>
>  Thanks for your contribution. I have a few comments below. Care to fix
> them up
> and resend your patch? Thanks!
>
Thank you for reviewing the patch!


>
> On 20-11-15 20:47, Sergio Prado wrote:
> > Libgdiplus is an open source implementation of the GDI+ API.
> >
> > Signed-off-by: Sergio Prado <sergio.prado@e-labworks.com>
> > ---
> >  package/Config.in                  |  1 +
> >  package/libgdiplus/Config.in       | 14 ++++++++++++
> >  package/libgdiplus/libgdiplus.hash |  2 ++
> >  package/libgdiplus/libgdiplus.mk   | 46
> ++++++++++++++++++++++++++++++++++++++
> >  4 files changed, 63 insertions(+)
> >  create mode 100644 package/libgdiplus/Config.in
> >  create mode 100644 package/libgdiplus/libgdiplus.hash
> >  create mode 100644 package/libgdiplus/libgdiplus.mk
> >
> > 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..173d9af0d48a
> > --- /dev/null
> > +++ b/package/libgdiplus/Config.in
> > @@ -0,0 +1,14 @@
> > +config BR2_PACKAGE_LIBGDIPLUS
> > +     bool "libgdiplus"
> > +     select BR2_PACKAGE_XLIB_LIBXFT
> > +     select BR2_PACKAGE_LIBGLIB2
>
>  You need to add that package's dependencies to this package, so:
>
>         depends on BR2_USE_WCHAR # libglib2 -> gettext
>         depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
>
        depends on BR2_USE_MMU # libglib2
>
Libgdiplus depends on BR2_PACKAGE_XORG7, that already depends on
BR2_USE_WCHAR and BR2_TOOLCHAIN_HAS_THREADS. That means that, because of
the xorg dependency, it is not possible to select libgdiplus with a
toolchain that has no wchar or threads support. Should I still depend on
wchar and threads?


>
> > +     select BR2_PACKAGE_CAIRO
>
>  Same here:
>
>         depends on BR2_ARCH_HAS_ATOMICS # cairo
>
OK.


> > +     select BR2_PACKAGE_LIBPNG
> > +     depends on BR2_PACKAGE_XORG7
> > +     help
> > +       An Open Source implementation of the GDI+ API.
> > +
> > +       https://github.com/mono/libgdiplus
> > +
> > +comment "libgdiplus depends on X.org"
> > +     depends on !BR2_PACKAGE_XORG7
>
>  We don't add comments for X.org dependencies. But you should add a
> comment for
> wchar and threads:
>
> comment "libgdiplus needs a toolchain w/ wchar, threads"
>
OK.


>
>
> > diff --git a/package/libgdiplus/libgdiplus.hash
> b/package/libgdiplus/libgdiplus.hash
> > new file mode 100644
> > index 000000000000..f2b0d33d71ab
> > --- /dev/null
> > +++ b/package/libgdiplus/libgdiplus.hash
> > @@ -0,0 +1,2 @@
> > +# No hash for 3.12, comes from the github-helper:
>
>  We noticed that github tarballs are not changing anymore, so we started
> requiring hashes for github tarballs as well since October.
>
Did not know. I will add the hashes.


>
> > +none    xxx     libgdiplus-3.12.tar.gz
> > diff --git a/package/libgdiplus/libgdiplus.mk b/package/libgdiplus/
> libgdiplus.mk
> > new file mode 100644
> > index 000000000000..c8e2d96a1c82
> > --- /dev/null
> > +++ b/package/libgdiplus/libgdiplus.mk
> > @@ -0,0 +1,46 @@
> >
> +################################################################################
> > +#
> > +# libgdiplus
> > +#
> >
> +################################################################################
> > +
> > +LIBGDIPLUS_VERSION = 3.12
> > +LIBGDIPLUS_SITE = $(call github,mono,libgdiplus,$(LIBGDIPLUS_VERSION))
> > +LIBGDIPLUS_LICENSE = LGPL MPLv1.0
>
>  Ah, the licensing mess... Even though there is a LICENSE file that
> specifies
> LGPL or MPLv1.1, and there is a MPL-1.1.html file which indeed contains
> the MPL,
> the actual source files specify that they're licensed under MIT, and so
> does
> COPYING. And in fact, all these predate the addition of LICENSE and
> MPL-1.1.html. There are a few header files that don't specify a license,
> but I'm
> pretty confident that the license is MIT and only MIT.
>
You are right. Thanks.


>
> > +LIBGDIPLUS_LICENSE_FILES = LICENSE
>
>  Unfortunately, COPYING doesn't contain the license text, so this should be
>
> LIBGDIPLUS_LICENSE_FILES = COPYING src/carbon-private.h
>
OK. Is there any reason to select specifically the src/carbon-private.h
header file, instead of many others that also have copyright messages?


>
> > +LIBGDIPLUS_AUTORECONF = YES
>
>  You should also add a comment here why it is needed, e.g.
> # github tarball doesn't have configure
>
OK.


>
> > +LIBGDIPLUS_INSTALL_STAGING = YES
> > +
> > +LIBGDIPLUS_DEPENDENCIES = xlib_libXft libglib2 cairo libpng
>
>  It also depends on host-pkgconf
>
Right.


>
> > +
> > +# 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
> > +
> > +ifeq ($(BR2_PACKAGE_PANGO),y)
> > +LIBGDIPLUS_CONF_OPTS += --with-pango
> > +LIBGDIPLUS_DEPENDENCIES += pango
>
>  We prefer to add an explicit --without-pango.

That was my previous implementation, but there is a bug in the configure
script that *enables* pango support when I pass --without-pango. Looks like
it is checking only for the string "pango" in the configure parameter to
enable it. Should I create a patch to fix this bug or just use --with-pango
as it is, adding a comment to explain why we are not using --without-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
>
>  There are also optional dependencies on fontconfig, freetype.
>
I'm not sure if it is optional. The project documentation says it is a
requirement (https://github.com/mono/libgdiplus/blob/master/README). I've
tried to build without them but the configure script does not handle these
options:

configure: WARNING: unrecognized options: --disable-gtk-doc,
--disable-gtk-doc-html, --disable-doc, --disable-docs,
--disable-documentation, --with-xmlto, --with-fop, --enable-ipv6,
--disable-nls, --without-fontconfig, --without-freetype, --without-freetype2

What do you think?


>
>  Regards,
>  Arnout
>
Thanks!


>
> > +
> > +$(eval $(autotools-package))
> >
>
>
> --
> Arnout Vandecappelle                          arnout at mind be
> Senior Embedded Software Architect            +32-16-286500
> Essensium/Mind                                http://www.mind.be
> G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
> LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
> GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
>
Arnout Vandecappelle Nov. 23, 2015, 9:43 p.m. UTC | #3
On 23-11-15 13:36, Sergio Prado wrote:
> Hi Arnout,
> 
> 2015-11-22 18:44 GMT-02:00 Arnout Vandecappelle <arnout@mind.be
> <mailto:arnout@mind.be>>:
[snip]
>     > diff --git a/package/libgdiplus/Config.in b/package/libgdiplus/Config.in
>     > new file mode 100644
>     > index 000000000000..173d9af0d48a
>     > --- /dev/null
>     > +++ b/package/libgdiplus/Config.in
>     > @@ -0,0 +1,14 @@
>     > +config BR2_PACKAGE_LIBGDIPLUS
>     > +     bool "libgdiplus"
>     > +     select BR2_PACKAGE_XLIB_LIBXFT
>     > +     select BR2_PACKAGE_LIBGLIB2
> 
>      You need to add that package's dependencies to this package, so:
> 
>             depends on BR2_USE_WCHAR # libglib2 -> gettext
>             depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
> 
>             depends on BR2_USE_MMU # libglib2
> 
> Libgdiplus depends on BR2_PACKAGE_XORG7, that already depends on BR2_USE_WCHAR
> and BR2_TOOLCHAIN_HAS_THREADS. That means that, because of the xorg dependency,
> it is not possible to select libgdiplus with a toolchain that has no wchar or
> threads support. Should I still depend on wchar and threads?

 You can choose :-). The advantage of still specifying is that if the Xorg
dependency is ever removed (e.g. when it also works for wayland), the
dependencies coming from libglib2 are still there. But indeed, it's not really
necessary.

 It would be good to mention that in a comment though, so that people like me
don't get confused :-).

 The MMU is still needed, right?

>  
> 
> 
>     > +     select BR2_PACKAGE_CAIRO
> 
>      Same here:
> 
>             depends on BR2_ARCH_HAS_ATOMICS # cairo
> 
> OK.
> 
> 
>     > +     select BR2_PACKAGE_LIBPNG
>     > +     depends on BR2_PACKAGE_XORG7
>     > +     help
>     > +       An Open Source implementation of the GDI+ API.
>     > +
>     > +       https://github.com/mono/libgdiplus
>     > +
>     > +comment "libgdiplus depends on X.org"
>     > +     depends on !BR2_PACKAGE_XORG7
> 
>      We don't add comments for X.org dependencies. But you should add a comment for
>     wchar and threads:
> 
>     comment "libgdiplus needs a toolchain w/ wchar, threads"
> 
> OK.

 This will not be needed then, it would anyway never be visible.

[snip]
>     > +LIBGDIPLUS_LICENSE_FILES = LICENSE
> 
>      Unfortunately, COPYING doesn't contain the license text, so this should be
> 
>     LIBGDIPLUS_LICENSE_FILES = COPYING src/carbon-private.h
> 
> OK. Is there any reason to select specifically the src/carbon-private.h header
> file, instead of many others that also have copyright messages?

 It's the smallest file that has a copyright header.

[snip]
>     > +ifeq ($(BR2_PACKAGE_PANGO),y)
>     > +LIBGDIPLUS_CONF_OPTS += --with-pango
>     > +LIBGDIPLUS_DEPENDENCIES += pango
> 
>      We prefer to add an explicit --without-pango.
> 
> That was my previous implementation, but there is a bug in the configure script
> that *enables* pango support when I pass --without-pango. Looks like it is
> checking only for the string "pango" in the configure parameter to enable it.
> Should I create a patch to fix this bug or just use --with-pango as it is,
> adding a comment to explain why we are not using --without-pango?

 Adding a comment would be good, yes.

>  
> 
> 
>     > +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
> 
>      There are also optional dependencies on fontconfig, freetype.
> 
> I'm not sure if it is optional. The project documentation says it is a
> requirement (https://github.com/mono/libgdiplus/blob/master/README). I've tried
> to build without them but the configure script does not handle these options:

 Sorry, fontconfig and freetype are of course already selected by xlib_libXft.
So never mind this.


 Regards,
 Arnout

> 
> configure: WARNING: unrecognized options: --disable-gtk-doc,
> --disable-gtk-doc-html, --disable-doc, --disable-docs, --disable-documentation,
> --with-xmlto, --with-fop, --enable-ipv6, --disable-nls, --without-fontconfig,
> --without-freetype, --without-freetype2
> 
> What do you think?
> 
> 
> 
>      Regards,
>      Arnout
> 
> Thanks!
>  
> 
> 
>     > +
>     > +$(eval $(autotools-package))
>     >
> 
> 
>     --
>     Arnout Vandecappelle                          arnout at mind be
>     Senior Embedded Software Architect            +32-16-286500
>     <tel:%2B32-16-286500>
>     Essensium/Mind                                http://www.mind.be
>     G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
>     LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
>     GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
> 
>
Sergio Prado Nov. 24, 2015, 9:58 a.m. UTC | #4
Hello Arnout,

2015-11-23 19:43 GMT-02:00 Arnout Vandecappelle <arnout@mind.be>:

> On 23-11-15 13:36, Sergio Prado wrote:
> > Hi Arnout,
> >
> > 2015-11-22 18:44 GMT-02:00 Arnout Vandecappelle <arnout@mind.be
> > <mailto:arnout@mind.be>>:
> [snip]
> >     > diff --git a/package/libgdiplus/Config.in
> b/package/libgdiplus/Config.in
> >     > new file mode 100644
> >     > index 000000000000..173d9af0d48a
> >     > --- /dev/null
> >     > +++ b/package/libgdiplus/Config.in
> >     > @@ -0,0 +1,14 @@
> >     > +config BR2_PACKAGE_LIBGDIPLUS
> >     > +     bool "libgdiplus"
> >     > +     select BR2_PACKAGE_XLIB_LIBXFT
> >     > +     select BR2_PACKAGE_LIBGLIB2
> >
> >      You need to add that package's dependencies to this package, so:
> >
> >             depends on BR2_USE_WCHAR # libglib2 -> gettext
> >             depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
> >
> >             depends on BR2_USE_MMU # libglib2
> >
> > Libgdiplus depends on BR2_PACKAGE_XORG7, that already depends on
> BR2_USE_WCHAR
> > and BR2_TOOLCHAIN_HAS_THREADS. That means that, because of the xorg
> dependency,
> > it is not possible to select libgdiplus with a toolchain that has no
> wchar or
> > threads support. Should I still depend on wchar and threads?
>
>  You can choose :-). The advantage of still specifying is that if the Xorg
> dependency is ever removed (e.g. when it also works for wayland), the
> dependencies coming from libglib2 are still there. But indeed, it's not
> really
> necessary.
>
>  It would be good to mention that in a comment though, so that people like
> me
> don't get confused :-).
>
Understood. I'm gonna keep these dependencies.


>  The MMU is still needed, right?
>
Yes. This one is necessary.


>
> >
> >
> >
> >     > +     select BR2_PACKAGE_CAIRO
> >
> >      Same here:
> >
> >             depends on BR2_ARCH_HAS_ATOMICS # cairo
> >
> > OK.
> >
> >
> >     > +     select BR2_PACKAGE_LIBPNG
> >     > +     depends on BR2_PACKAGE_XORG7
> >     > +     help
> >     > +       An Open Source implementation of the GDI+ API.
> >     > +
> >     > +       https://github.com/mono/libgdiplus
> >     > +
> >     > +comment "libgdiplus depends on X.org"
> >     > +     depends on !BR2_PACKAGE_XORG7
> >
> >      We don't add comments for X.org dependencies. But you should add a
> comment for
> >     wchar and threads:
> >
> >     comment "libgdiplus needs a toolchain w/ wchar, threads"
> >
> > OK.
>
>  This will not be needed then, it would anyway never be visible.
>
> [snip]
> >     > +LIBGDIPLUS_LICENSE_FILES = LICENSE
> >
> >      Unfortunately, COPYING doesn't contain the license text, so this
> should be
> >
> >     LIBGDIPLUS_LICENSE_FILES = COPYING src/carbon-private.h
> >
> > OK. Is there any reason to select specifically the src/carbon-private.h
> header
> > file, instead of many others that also have copyright messages?
>
>  It's the smallest file that has a copyright header.
>
OK.


>
> [snip]
> >     > +ifeq ($(BR2_PACKAGE_PANGO),y)
> >     > +LIBGDIPLUS_CONF_OPTS += --with-pango
> >     > +LIBGDIPLUS_DEPENDENCIES += pango
> >
> >      We prefer to add an explicit --without-pango.
> >
> > That was my previous implementation, but there is a bug in the configure
> script
> > that *enables* pango support when I pass --without-pango. Looks like it
> is
> > checking only for the string "pango" in the configure parameter to
> enable it.
> > Should I create a patch to fix this bug or just use --with-pango as it
> is,
> > adding a comment to explain why we are not using --without-pango?
>
>  Adding a comment would be good, yes.
>
Right.


>
> >
> >
> >
> >     > +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
> >
> >      There are also optional dependencies on fontconfig, freetype.
> >
> > I'm not sure if it is optional. The project documentation says it is a
> > requirement (https://github.com/mono/libgdiplus/blob/master/README).
> I've tried
> > to build without them but the configure script does not handle these
> options:
>
>  Sorry, fontconfig and freetype are of course already selected by
> xlib_libXft.
> So never mind this.
>
OK.


>
>
>  Regards,
>  Arnout
>
I'm gonna send v2. Thanks!


>
> >
> > configure: WARNING: unrecognized options: --disable-gtk-doc,
> > --disable-gtk-doc-html, --disable-doc, --disable-docs,
> --disable-documentation,
> > --with-xmlto, --with-fop, --enable-ipv6, --disable-nls,
> --without-fontconfig,
> > --without-freetype, --without-freetype2
> >
> > What do you think?
> >
> >
> >
> >      Regards,
> >      Arnout
> >
> > Thanks!
> >
> >
> >
> >     > +
> >     > +$(eval $(autotools-package))
> >     >
> >
> >
> >     --
> >     Arnout Vandecappelle                          arnout at mind be
> >     Senior Embedded Software Architect            +32-16-286500
> >     <tel:%2B32-16-286500>
> >     Essensium/Mind                                http://www.mind.be
> >     G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR
> Leuven
> >     LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
> >     GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
> >
> >
>
>
> --
> Arnout Vandecappelle                          arnout at mind be
> Senior Embedded Software Architect            +32-16-286500
> Essensium/Mind                                http://www.mind.be
> G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
> LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
> GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
>
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..173d9af0d48a
--- /dev/null
+++ b/package/libgdiplus/Config.in
@@ -0,0 +1,14 @@ 
+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
+	help
+	  An Open Source implementation of the GDI+ API.
+
+	  https://github.com/mono/libgdiplus
+
+comment "libgdiplus depends on X.org"
+	depends on !BR2_PACKAGE_XORG7
diff --git a/package/libgdiplus/libgdiplus.hash b/package/libgdiplus/libgdiplus.hash
new file mode 100644
index 000000000000..f2b0d33d71ab
--- /dev/null
+++ b/package/libgdiplus/libgdiplus.hash
@@ -0,0 +1,2 @@ 
+# No hash for 3.12, comes from the github-helper:
+none    xxx     libgdiplus-3.12.tar.gz
diff --git a/package/libgdiplus/libgdiplus.mk b/package/libgdiplus/libgdiplus.mk
new file mode 100644
index 000000000000..c8e2d96a1c82
--- /dev/null
+++ b/package/libgdiplus/libgdiplus.mk
@@ -0,0 +1,46 @@ 
+################################################################################
+#
+# libgdiplus
+#
+################################################################################
+
+LIBGDIPLUS_VERSION = 3.12
+LIBGDIPLUS_SITE = $(call github,mono,libgdiplus,$(LIBGDIPLUS_VERSION))
+LIBGDIPLUS_LICENSE = LGPL MPLv1.0
+LIBGDIPLUS_LICENSE_FILES = LICENSE
+LIBGDIPLUS_AUTORECONF = YES
+LIBGDIPLUS_INSTALL_STAGING = YES
+
+LIBGDIPLUS_DEPENDENCIES = xlib_libXft libglib2 cairo libpng
+
+# 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
+
+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))