All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/3] package/perl-extutils-pkgconfig: new package
@ 2021-01-24 11:22 Fabrice Fontaine
  2021-01-24 11:22 ` [Buildroot] [PATCH 2/3] package/perl-gd: needs perl-extutils-pkgconfig Fabrice Fontaine
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Fabrice Fontaine @ 2021-01-24 11:22 UTC (permalink / raw)
  To: buildroot

host-perl-extutils-pkgconfig is needed by perl-gd to find gd in version
2.3.0

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/perl-extutils-pkgconfig/Config.in          |  6 ++++++
 .../perl-extutils-pkgconfig.hash                   |  6 ++++++
 .../perl-extutils-pkgconfig.mk                     | 14 ++++++++++++++
 3 files changed, 26 insertions(+)
 create mode 100644 package/perl-extutils-pkgconfig/Config.in
 create mode 100644 package/perl-extutils-pkgconfig/perl-extutils-pkgconfig.hash
 create mode 100644 package/perl-extutils-pkgconfig/perl-extutils-pkgconfig.mk

diff --git a/package/perl-extutils-pkgconfig/Config.in b/package/perl-extutils-pkgconfig/Config.in
new file mode 100644
index 0000000000..f3c4966fe1
--- /dev/null
+++ b/package/perl-extutils-pkgconfig/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_PERL_EXTUTILS_PKGCONFIG
+	bool "perl-extutils-pkgconfig"
+	help
+	  simplistic interface to pkg-config.
+
+	  http://gtk2-perl.sourceforge.net
diff --git a/package/perl-extutils-pkgconfig/perl-extutils-pkgconfig.hash b/package/perl-extutils-pkgconfig/perl-extutils-pkgconfig.hash
new file mode 100644
index 0000000000..7028b96be5
--- /dev/null
+++ b/package/perl-extutils-pkgconfig/perl-extutils-pkgconfig.hash
@@ -0,0 +1,6 @@
+# retrieved by scancpan from http://cpan.metacpan.org/
+md5  b86318f2b6ac6af3ee985299e1e38fe5  ExtUtils-PkgConfig-1.16.tar.gz
+sha256  bbeaced995d7d8d10cfc51a3a5a66da41ceb2bc04fedcab50e10e6300e801c6e  ExtUtils-PkgConfig-1.16.tar.gz
+
+# computed by scancpan
+sha256  1ca66d6d9d2e14426825889848f0b5b4d4e153afcd74b8f42a1f2937c3a9973d  README
diff --git a/package/perl-extutils-pkgconfig/perl-extutils-pkgconfig.mk b/package/perl-extutils-pkgconfig/perl-extutils-pkgconfig.mk
new file mode 100644
index 0000000000..b70b2f1af1
--- /dev/null
+++ b/package/perl-extutils-pkgconfig/perl-extutils-pkgconfig.mk
@@ -0,0 +1,14 @@
+################################################################################
+#
+# perl-extutils-pkgconfig
+#
+################################################################################
+
+PERL_EXTUTILS_PKGCONFIG_VERSION = 1.16
+PERL_EXTUTILS_PKGCONFIG_SOURCE = ExtUtils-PkgConfig-$(PERL_EXTUTILS_PKGCONFIG_VERSION).tar.gz
+PERL_EXTUTILS_PKGCONFIG_SITE = $(BR2_CPAN_MIRROR)/authors/id/X/XA/XAOC
+PERL_EXTUTILS_PKGCONFIG_LICENSE = LGPL-2.1
+PERL_EXTUTILS_PKGCONFIG_LICENSE_FILES = README
+PERL_EXTUTILS_PKGCONFIG_DISTNAME = ExtUtils-PkgConfig
+
+$(eval $(host-perl-package))
-- 
2.29.2

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

* [Buildroot] [PATCH 2/3] package/perl-gd: needs perl-extutils-pkgconfig
  2021-01-24 11:22 [Buildroot] [PATCH 1/3] package/perl-extutils-pkgconfig: new package Fabrice Fontaine
@ 2021-01-24 11:22 ` Fabrice Fontaine
  2021-01-25 20:48   ` Thomas Petazzoni
  2021-02-11  7:50   ` François Perrad
  2021-01-24 11:22 ` [Buildroot] [PATCH 3/3] package/perl-gd: provide gd options Fabrice Fontaine
  2021-02-11  7:44 ` [Buildroot] [PATCH 1/3] package/perl-extutils-pkgconfig: new package François Perrad
  2 siblings, 2 replies; 9+ messages in thread
From: Fabrice Fontaine @ 2021-01-24 11:22 UTC (permalink / raw)
  To: buildroot

Commit 3a291be2e89bc64388c10dae50233c751a86733d forgot to add
perl-extutils-pkgconfig dependency

Fixes:
 - http://autobuild.buildroot.org/results/e590f1990180eae21512b23b884755e105a4c588

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...-fix-cross-compilation-with-gdlib.pc.patch | 34 +++++++++++++++++++
 package/perl-gd/perl-gd.mk                    |  7 +++-
 2 files changed, 40 insertions(+), 1 deletion(-)
 create mode 100644 package/perl-gd/0001-Makefile.PL-fix-cross-compilation-with-gdlib.pc.patch

diff --git a/package/perl-gd/0001-Makefile.PL-fix-cross-compilation-with-gdlib.pc.patch b/package/perl-gd/0001-Makefile.PL-fix-cross-compilation-with-gdlib.pc.patch
new file mode 100644
index 0000000000..af053c5605
--- /dev/null
+++ b/package/perl-gd/0001-Makefile.PL-fix-cross-compilation-with-gdlib.pc.patch
@@ -0,0 +1,34 @@
+From 11dc017e902397c452331425eb6101b3315572fa Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sun, 24 Jan 2021 10:59:31 +0100
+Subject: [PATCH] Makefile.PL: fix cross-compilation with gdlib.pc
+
+Cross-compilation will fail if gdlib.pc does not contain any cflags.
+Indeed, if cflags is empty, Makefile.PL will use the default value for
+INC (i.e. -I/usr/include -I/usr/include/gd)
+
+It should be noted that gdlib-config has been dropped from gd since
+version 2.3.0
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: probably not upstreamable]
+---
+ Makefile.PL | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.PL b/Makefile.PL
+index 25f2f93..7da3651 100644
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -47,7 +47,7 @@ If you want to try to compile anyway, please rerun this script with the option -
+ END
+ }
+ 
+- at INC     = qw(-I/usr/include -I/usr/include/gd) unless @INC;
++#@INC     = qw(-I/usr/include -I/usr/include/gd) unless @INC;
+ @LIBPATH = qw(-L/usr/lib/X11 -L/usr/X11R6/lib -L/usr/X11/lib -L/usr/lib) unless @LIBPATH;
+ @LIBS    = qw(-lgd) unless @LIBS;
+ 
+-- 
+2.29.2
+
diff --git a/package/perl-gd/perl-gd.mk b/package/perl-gd/perl-gd.mk
index b058672a23..1471cfb8bf 100644
--- a/package/perl-gd/perl-gd.mk
+++ b/package/perl-gd/perl-gd.mk
@@ -7,11 +7,16 @@
 PERL_GD_VERSION = 2.73
 PERL_GD_SOURCE = GD-$(PERL_GD_VERSION).tar.gz
 PERL_GD_SITE = $(BR2_CPAN_MIRROR)/authors/id/R/RU/RURBAN
-PERL_GD_DEPENDENCIES = host-pkgconf zlib libpng freetype gd
+PERL_GD_DEPENDENCIES = \
+	host-pkgconf host-perl-extutils-pkgconfig zlib libpng freetype gd
 PERL_GD_LICENSE = Artistic or GPL-1.0+
 PERL_GD_LICENSE_FILES = LICENSE
 PERL_GD_DISTNAME = GD
 
+PERL_GD_CONF_ENV = \
+	PATH=$(BR_PATH) \
+	PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig"
+
 PERL_GD_CONF_OPTS = \
 	-lib_gd_path=$(STAGING_DIR)/usr \
 	-lib_ft_path=$(STAGING_DIR)/usr \
-- 
2.29.2

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

* [Buildroot] [PATCH 3/3] package/perl-gd: provide gd options
  2021-01-24 11:22 [Buildroot] [PATCH 1/3] package/perl-extutils-pkgconfig: new package Fabrice Fontaine
  2021-01-24 11:22 ` [Buildroot] [PATCH 2/3] package/perl-gd: needs perl-extutils-pkgconfig Fabrice Fontaine
@ 2021-01-24 11:22 ` Fabrice Fontaine
  2021-02-11  7:47   ` François Perrad
  2021-02-11  7:44 ` [Buildroot] [PATCH 1/3] package/perl-extutils-pkgconfig: new package François Perrad
  2 siblings, 1 reply; 9+ messages in thread
From: Fabrice Fontaine @ 2021-01-24 11:22 UTC (permalink / raw)
  To: buildroot

Now that gdlib-config is gone, provide the GD options otherwise perl-gd
will assume that everything is available:

$features = 'GD_GIF GD_GIFANIM GD_OPENPOLYGON GD_ZLIB GD_PNG GD_FREETYPE GD_FONTCONFIG GD_JPEG GD_XPM GD_TIFF GD_WEBP';

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/perl-gd/perl-gd.mk | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/package/perl-gd/perl-gd.mk b/package/perl-gd/perl-gd.mk
index 1471cfb8bf..6872fd1ce1 100644
--- a/package/perl-gd/perl-gd.mk
+++ b/package/perl-gd/perl-gd.mk
@@ -17,10 +17,31 @@ PERL_GD_CONF_ENV = \
 	PATH=$(BR_PATH) \
 	PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig"
 
+ifeq ($(BR2_PACKAGE_FONTCONFIG),y)
+PERL_GD_OPTIONS += FONTCONFIG
+endif
+
+ifeq ($(BR2_PACKAGE_FREETYPE),y)
+PERL_GD_OPTIONS += FT
+endif
+
+ifeq ($(BR2_PACKAGE_JPEG),y)
+PERL_GD_OPTIONS += JPEG
+endif
+
+ifeq ($(BR2_PACKAGE_LIBPNG),y)
+PERL_GD_OPTIONS += PNG
+endif
+
+ifeq ($(BR2_PACKAGE_XLIB_LIBXPM),y)
+PERL_GD_OPTIONS += XPM
+endif
+
 PERL_GD_CONF_OPTS = \
 	-lib_gd_path=$(STAGING_DIR)/usr \
 	-lib_ft_path=$(STAGING_DIR)/usr \
 	-lib_png_path=$(STAGING_DIR)/usr \
-	-lib_zlib_path=$(STAGING_DIR)/usr
+	-lib_zlib_path=$(STAGING_DIR)/usr \
+	-options=$(subst $(space),$(comma),$(PERL_GD_OPTIONS))
 
 $(eval $(perl-package))
-- 
2.29.2

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

* [Buildroot] [PATCH 2/3] package/perl-gd: needs perl-extutils-pkgconfig
  2021-01-24 11:22 ` [Buildroot] [PATCH 2/3] package/perl-gd: needs perl-extutils-pkgconfig Fabrice Fontaine
@ 2021-01-25 20:48   ` Thomas Petazzoni
  2021-01-25 21:04     ` Fabrice Fontaine
  2021-02-11  7:50   ` François Perrad
  1 sibling, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2021-01-25 20:48 UTC (permalink / raw)
  To: buildroot

Hello,

+Fran?ois in Cc.

On Sun, 24 Jan 2021 12:22:13 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> +- at INC     = qw(-I/usr/include -I/usr/include/gd) unless @INC;
> ++#@INC     = qw(-I/usr/include -I/usr/include/gd) unless @INC;

I'm certainly not very good with Perl, but doesn't the "unless @INC"
means "if INC is not already specified" ?

> + @LIBPATH = qw(-L/usr/lib/X11 -L/usr/X11R6/lib -L/usr/X11/lib -L/usr/lib) unless @LIBPATH;

And isn't that a problem, too ? These library paths are pretty horrible
for cross-compilation.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH 2/3] package/perl-gd: needs perl-extutils-pkgconfig
  2021-01-25 20:48   ` Thomas Petazzoni
@ 2021-01-25 21:04     ` Fabrice Fontaine
  2021-02-11  7:51       ` François Perrad
  0 siblings, 1 reply; 9+ messages in thread
From: Fabrice Fontaine @ 2021-01-25 21:04 UTC (permalink / raw)
  To: buildroot

Hello,

Le lun. 25 janv. 2021 ? 21:48, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> a ?crit :
>
> Hello,
>
> +Fran?ois in Cc.
>
> On Sun, 24 Jan 2021 12:22:13 +0100
> Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
>
> > +- at INC     = qw(-I/usr/include -I/usr/include/gd) unless @INC;
> > ++#@INC     = qw(-I/usr/include -I/usr/include/gd) unless @INC;
>
> I'm certainly not very good with Perl, but doesn't the "unless @INC"
> means "if INC is not already specified" ?
I'm also not good with Perl but it seems to me that unless means
"unless @INC is empty (i.e. not already specified or empty)"
>
> > + @LIBPATH = qw(-L/usr/lib/X11 -L/usr/X11R6/lib -L/usr/X11/lib -L/usr/lib) unless @LIBPATH;
>
> And isn't that a problem, too ? These library paths are pretty horrible
> for cross-compilation.
LIBPATH will be overriden with the -L value added by our pkg-config
wrapper thanks to this piece of code:

@LIBS = split /\s+/,$libs;
if ($libdir) {
  if ($config) {
    @LIBPATH = map {s/^-L// && "-L$_"} split /\s+/,$ldflags;
    ($lib_gd_path = $libdir) =~ s!/[^/]+$!!;
  } else {
    $lib_gd_path = $libdir;
  }
  push @LIBPATH,"-L$libdir";
}

The issue is that INC will be empty because it is extracted from cflags:
@INC = map {s/^-I// && "-I$_"} split /\s+/,$cflags;

But a review from a Perl would be nice as this solution is indeed a bit ugly.
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
Best Regards,

Fabrice

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

* [Buildroot] [PATCH 1/3] package/perl-extutils-pkgconfig: new package
  2021-01-24 11:22 [Buildroot] [PATCH 1/3] package/perl-extutils-pkgconfig: new package Fabrice Fontaine
  2021-01-24 11:22 ` [Buildroot] [PATCH 2/3] package/perl-gd: needs perl-extutils-pkgconfig Fabrice Fontaine
  2021-01-24 11:22 ` [Buildroot] [PATCH 3/3] package/perl-gd: provide gd options Fabrice Fontaine
@ 2021-02-11  7:44 ` François Perrad
  2 siblings, 0 replies; 9+ messages in thread
From: François Perrad @ 2021-02-11  7:44 UTC (permalink / raw)
  To: buildroot

Le dim. 24 janv. 2021 ? 12:23, Fabrice Fontaine <fontaine.fabrice@gmail.com>
a ?crit :

> host-perl-extutils-pkgconfig is needed by perl-gd to find gd in version
> 2.3.0
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/perl-extutils-pkgconfig/Config.in          |  6 ++++++
>  .../perl-extutils-pkgconfig.hash                   |  6 ++++++
>  .../perl-extutils-pkgconfig.mk                     | 14 ++++++++++++++
>  3 files changed, 26 insertions(+)
>  create mode 100644 package/perl-extutils-pkgconfig/Config.in
>  create mode 100644
> package/perl-extutils-pkgconfig/perl-extutils-pkgconfig.hash
>  create mode 100644 package/perl-extutils-pkgconfig/
> perl-extutils-pkgconfig.mk
>
> diff --git a/package/perl-extutils-pkgconfig/Config.in
> b/package/perl-extutils-pkgconfig/Config.in
> new file mode 100644
> index 0000000000..f3c4966fe1
> --- /dev/null
> +++ b/package/perl-extutils-pkgconfig/Config.in
> @@ -0,0 +1,6 @@
> +config BR2_PACKAGE_PERL_EXTUTILS_PKGCONFIG
> +       bool "perl-extutils-pkgconfig"
> +       help
> +         simplistic interface to pkg-config.
> +
> +         http://gtk2-perl.sourceforge.net
> diff --git a/package/perl-extutils-pkgconfig/perl-extutils-pkgconfig.hash
> b/package/perl-extutils-pkgconfig/perl-extutils-pkgconfig.hash
> new file mode 100644
> index 0000000000..7028b96be5
> --- /dev/null
> +++ b/package/perl-extutils-pkgconfig/perl-extutils-pkgconfig.hash
> @@ -0,0 +1,6 @@
> +# retrieved by scancpan from http://cpan.metacpan.org/
> +md5  b86318f2b6ac6af3ee985299e1e38fe5  ExtUtils-PkgConfig-1.16.tar.gz
> +sha256  bbeaced995d7d8d10cfc51a3a5a66da41ceb2bc04fedcab50e10e6300e801c6e
> ExtUtils-PkgConfig-1.16.tar.gz
> +
> +# computed by scancpan
> +sha256  1ca66d6d9d2e14426825889848f0b5b4d4e153afcd74b8f42a1f2937c3a9973d
> README
> diff --git a/package/perl-extutils-pkgconfig/perl-extutils-pkgconfig.mk
> b/package/perl-extutils-pkgconfig/perl-extutils-pkgconfig.mk
> new file mode 100644
> index 0000000000..b70b2f1af1
> --- /dev/null
> +++ b/package/perl-extutils-pkgconfig/perl-extutils-pkgconfig.mk
> @@ -0,0 +1,14 @@
>
> +################################################################################
> +#
> +# perl-extutils-pkgconfig
> +#
>
> +################################################################################
> +
> +PERL_EXTUTILS_PKGCONFIG_VERSION = 1.16
> +PERL_EXTUTILS_PKGCONFIG_SOURCE =
> ExtUtils-PkgConfig-$(PERL_EXTUTILS_PKGCONFIG_VERSION).tar.gz
> +PERL_EXTUTILS_PKGCONFIG_SITE = $(BR2_CPAN_MIRROR)/authors/id/X/XA/XAOC
>

Fabrice,

you miss:
PERL_EXTUTILS_PKGCONFIG_DEPENDENCIES = host-pkgconf

after that host-pkgconf could be removed from PERL_GD_DEPENDENCIES
(host-perl-extutils-pkgconfig is enough)

Fran?ois


> +PERL_EXTUTILS_PKGCONFIG_LICENSE = LGPL-2.1
> +PERL_EXTUTILS_PKGCONFIG_LICENSE_FILES = README
> +PERL_EXTUTILS_PKGCONFIG_DISTNAME = ExtUtils-PkgConfig
> +
> +$(eval $(host-perl-package))
> --
> 2.29.2
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20210211/090c17d8/attachment-0001.html>

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

* [Buildroot] [PATCH 3/3] package/perl-gd: provide gd options
  2021-01-24 11:22 ` [Buildroot] [PATCH 3/3] package/perl-gd: provide gd options Fabrice Fontaine
@ 2021-02-11  7:47   ` François Perrad
  0 siblings, 0 replies; 9+ messages in thread
From: François Perrad @ 2021-02-11  7:47 UTC (permalink / raw)
  To: buildroot

Le dim. 24 janv. 2021 ? 12:23, Fabrice Fontaine <fontaine.fabrice@gmail.com>
a ?crit :

> Now that gdlib-config is gone, provide the GD options otherwise perl-gd
> will assume that everything is available:
>
> $features = 'GD_GIF GD_GIFANIM GD_OPENPOLYGON GD_ZLIB GD_PNG GD_FREETYPE
> GD_FONTCONFIG GD_JPEG GD_XPM GD_TIFF GD_WEBP';
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  package/perl-gd/perl-gd.mk | 23 ++++++++++++++++++++++-
>  1 file changed, 22 insertions(+), 1 deletion(-)
>
> diff --git a/package/perl-gd/perl-gd.mk b/package/perl-gd/perl-gd.mk
> index 1471cfb8bf..6872fd1ce1 100644
> --- a/package/perl-gd/perl-gd.mk
> +++ b/package/perl-gd/perl-gd.mk
> @@ -17,10 +17,31 @@ PERL_GD_CONF_ENV = \
>         PATH=$(BR_PATH) \
>         PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig"
>
> +ifeq ($(BR2_PACKAGE_FONTCONFIG),y)
> +PERL_GD_OPTIONS += FONTCONFIG
> +endif
> +
> +ifeq ($(BR2_PACKAGE_FREETYPE),y)
> +PERL_GD_OPTIONS += FT
> +endif
> +
> +ifeq ($(BR2_PACKAGE_JPEG),y)
> +PERL_GD_OPTIONS += JPEG
> +endif
> +
> +ifeq ($(BR2_PACKAGE_LIBPNG),y)
> +PERL_GD_OPTIONS += PNG
> +endif
> +
> +ifeq ($(BR2_PACKAGE_XLIB_LIBXPM),y)
> +PERL_GD_OPTIONS += XPM
> +endif
> +
>  PERL_GD_CONF_OPTS = \
>         -lib_gd_path=$(STAGING_DIR)/usr \
>         -lib_ft_path=$(STAGING_DIR)/usr \
>         -lib_png_path=$(STAGING_DIR)/usr \
> -       -lib_zlib_path=$(STAGING_DIR)/usr
> +       -lib_zlib_path=$(STAGING_DIR)/usr \
> +       -options=$(subst $(space),$(comma),$(PERL_GD_OPTIONS))
>
>
Fabrice,

PERL_GD_DEPENDENCIES & PERL_GD_CONF_OPTS should depend on optional
dependencies, like that:

PERL_GD_DEPENDENCIES = host-perl-extutils-pkgconfig zlib gd
...

PERL_GD_CONF_OPTS = \
-lib_gd_path=$(STAGING_DIR)/usr \
-lib_zlib_path=$(STAGING_DIR)/usr

ifeq ($(BR2_PACKAGE_FONTCONFIG),y)
PERL_GD_DEPENDENCIES += fontconfig
PERL_GD_OPTIONS += FONTCONFIG
PERL_GD_CONF_OPTS += -lib_fontconfig_path=$(STAGING_DIR)/usr
endif

ifeq ($(BR2_PACKAGE_FREETYPE),y)
PERL_GD_DEPENDENCIES += freetype
PERL_GD_OPTIONS += FT
PERL_GD_CONF_OPTS += -lib_ft_path=$(STAGING_DIR)/usr
endif

ifeq ($(BR2_PACKAGE_JPEG),y)
PERL_GD_DEPENDENCIES += jpeg
PERL_GD_OPTIONS += JPEG
PERL_GD_CONF_OPTS += -lib_jpeg_path=$(STAGING_DIR)/usr
endif

ifeq ($(BR2_PACKAGE_LIBPNG),y)
PERL_GD_DEPENDENCIES += libpng
PERL_GD_OPTIONS += PNG
PERL_GD_CONF_OPTS += -lib_png_path=$(STAGING_DIR)/usr
endif

ifeq ($(BR2_PACKAGE_XLIB_LIBXPM),y)
PERL_GD_OPTIONS += XPM
PERL_GD_CONF_OPTS += -lib_xpm_path=$(STAGING_DIR)/usr
endif

PERL_GD_CONF_OPTS += -options=$(subst $(space),$(comma),$(PERL_GD_OPTIONS))

Fran?ois

 $(eval $(perl-package))
> --
> 2.29.2
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20210211/08bd7f3b/attachment.html>

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

* [Buildroot] [PATCH 2/3] package/perl-gd: needs perl-extutils-pkgconfig
  2021-01-24 11:22 ` [Buildroot] [PATCH 2/3] package/perl-gd: needs perl-extutils-pkgconfig Fabrice Fontaine
  2021-01-25 20:48   ` Thomas Petazzoni
@ 2021-02-11  7:50   ` François Perrad
  1 sibling, 0 replies; 9+ messages in thread
From: François Perrad @ 2021-02-11  7:50 UTC (permalink / raw)
  To: buildroot

Le dim. 24 janv. 2021 ? 12:23, Fabrice Fontaine <fontaine.fabrice@gmail.com>
a ?crit :

> Commit 3a291be2e89bc64388c10dae50233c751a86733d forgot to add
> perl-extutils-pkgconfig dependency
>
> Fixes:
>  -
> http://autobuild.buildroot.org/results/e590f1990180eae21512b23b884755e105a4c588
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  ...-fix-cross-compilation-with-gdlib.pc.patch | 34 +++++++++++++++++++
>  package/perl-gd/perl-gd.mk                    |  7 +++-
>  2 files changed, 40 insertions(+), 1 deletion(-)
>  create mode 100644
> package/perl-gd/0001-Makefile.PL-fix-cross-compilation-with-gdlib.pc.patch
>
> diff --git
> a/package/perl-gd/0001-Makefile.PL-fix-cross-compilation-with-gdlib.pc.patch
> b/package/perl-gd/0001-Makefile.PL-fix-cross-compilation-with-gdlib.pc.patch
> new file mode 100644
> index 0000000000..af053c5605
> --- /dev/null
> +++
> b/package/perl-gd/0001-Makefile.PL-fix-cross-compilation-with-gdlib.pc.patch
> @@ -0,0 +1,34 @@
> +From 11dc017e902397c452331425eb6101b3315572fa Mon Sep 17 00:00:00 2001
> +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +Date: Sun, 24 Jan 2021 10:59:31 +0100
> +Subject: [PATCH] Makefile.PL: fix cross-compilation with gdlib.pc
> +
> +Cross-compilation will fail if gdlib.pc does not contain any cflags.
> +Indeed, if cflags is empty, Makefile.PL will use the default value for
> +INC (i.e. -I/usr/include -I/usr/include/gd)
> +
> +It should be noted that gdlib-config has been dropped from gd since
> +version 2.3.0
> +
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +[Upstream status: probably not upstreamable]
> +---
> + Makefile.PL | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/Makefile.PL b/Makefile.PL
> +index 25f2f93..7da3651 100644
> +--- a/Makefile.PL
> ++++ b/Makefile.PL
> +@@ -47,7 +47,7 @@ If you want to try to compile anyway, please rerun this
> script with the option -
> + END
> + }
> +
> +- at INC     = qw(-I/usr/include -I/usr/include/gd) unless @INC;
> ++#@INC     = qw(-I/usr/include -I/usr/include/gd) unless @INC;
> + @LIBPATH = qw(-L/usr/lib/X11 -L/usr/X11R6/lib -L/usr/X11/lib -L/usr/lib)
> unless @LIBPATH;
> + @LIBS    = qw(-lgd) unless @LIBS;
> +
> +--
> +2.29.2
> +
> diff --git a/package/perl-gd/perl-gd.mk b/package/perl-gd/perl-gd.mk
> index b058672a23..1471cfb8bf 100644
> --- a/package/perl-gd/perl-gd.mk
> +++ b/package/perl-gd/perl-gd.mk
> @@ -7,11 +7,16 @@
>  PERL_GD_VERSION = 2.73
>  PERL_GD_SOURCE = GD-$(PERL_GD_VERSION).tar.gz
>  PERL_GD_SITE = $(BR2_CPAN_MIRROR)/authors/id/R/RU/RURBAN
> -PERL_GD_DEPENDENCIES = host-pkgconf zlib libpng freetype gd
> +PERL_GD_DEPENDENCIES = \
> +       host-pkgconf host-perl-extutils-pkgconfig zlib libpng freetype gd
>

Fabrice,

host-pkgconfig could be removed from PERL_GD_DEPENDENCIES (it comes with
host-perl-extutils-pkgconfig)

Fran?ois


>  PERL_GD_LICENSE = Artistic or GPL-1.0+
>  PERL_GD_LICENSE_FILES = LICENSE
>  PERL_GD_DISTNAME = GD
>
> +PERL_GD_CONF_ENV = \
> +       PATH=$(BR_PATH) \
> +       PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig"
> +
>  PERL_GD_CONF_OPTS = \
>         -lib_gd_path=$(STAGING_DIR)/usr \
>         -lib_ft_path=$(STAGING_DIR)/usr \
> --
> 2.29.2
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20210211/2ad39bb2/attachment.html>

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

* [Buildroot] [PATCH 2/3] package/perl-gd: needs perl-extutils-pkgconfig
  2021-01-25 21:04     ` Fabrice Fontaine
@ 2021-02-11  7:51       ` François Perrad
  0 siblings, 0 replies; 9+ messages in thread
From: François Perrad @ 2021-02-11  7:51 UTC (permalink / raw)
  To: buildroot

Le lun. 25 janv. 2021 ? 22:05, Fabrice Fontaine <fontaine.fabrice@gmail.com>
a ?crit :

> Hello,
>
> Le lun. 25 janv. 2021 ? 21:48, Thomas Petazzoni
> <thomas.petazzoni@bootlin.com> a ?crit :
> >
> > Hello,
> >
> > +Fran?ois in Cc.
> >
> > On Sun, 24 Jan 2021 12:22:13 +0100
> > Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> >
> > > +- at INC     = qw(-I/usr/include -I/usr/include/gd) unless @INC;
> > > ++#@INC     = qw(-I/usr/include -I/usr/include/gd) unless @INC;
> >
> > I'm certainly not very good with Perl, but doesn't the "unless @INC"
> > means "if INC is not already specified" ?
> I'm also not good with Perl but it seems to me that unless means
> "unless @INC is empty (i.e. not already specified or empty)"
> >
> > > + @LIBPATH = qw(-L/usr/lib/X11 -L/usr/X11R6/lib -L/usr/X11/lib
> -L/usr/lib) unless @LIBPATH;
> >
> > And isn't that a problem, too ? These library paths are pretty horrible
> > for cross-compilation.
> LIBPATH will be overriden with the -L value added by our pkg-config
> wrapper thanks to this piece of code:
>
> @LIBS = split /\s+/,$libs;
> if ($libdir) {
>   if ($config) {
>     @LIBPATH = map {s/^-L// && "-L$_"} split /\s+/,$ldflags;
>     ($lib_gd_path = $libdir) =~ s!/[^/]+$!!;
>   } else {
>     $lib_gd_path = $libdir;
>   }
>   push @LIBPATH,"-L$libdir";
> }
>
> The issue is that INC will be empty because it is extracted from cflags:
> @INC = map {s/^-I// && "-I$_"} split /\s+/,$cflags;
>
> But a review from a Perl would be nice as this solution is indeed a bit
> ugly.
>

the patch against Makefile.PL is fine.

Fran?ois


> >
> > Thomas
> > --
> > Thomas Petazzoni, CTO, Bootlin
> > Embedded Linux and Kernel engineering
> > https://bootlin.com
> Best Regards,
>
> Fabrice
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20210211/326392bd/attachment.html>

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

end of thread, other threads:[~2021-02-11  7:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-24 11:22 [Buildroot] [PATCH 1/3] package/perl-extutils-pkgconfig: new package Fabrice Fontaine
2021-01-24 11:22 ` [Buildroot] [PATCH 2/3] package/perl-gd: needs perl-extutils-pkgconfig Fabrice Fontaine
2021-01-25 20:48   ` Thomas Petazzoni
2021-01-25 21:04     ` Fabrice Fontaine
2021-02-11  7:51       ` François Perrad
2021-02-11  7:50   ` François Perrad
2021-01-24 11:22 ` [Buildroot] [PATCH 3/3] package/perl-gd: provide gd options Fabrice Fontaine
2021-02-11  7:47   ` François Perrad
2021-02-11  7:44 ` [Buildroot] [PATCH 1/3] package/perl-extutils-pkgconfig: new package François Perrad

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.