Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] libglob: new package
@ 2016-08-01 19:58 Jörg Krause
  2016-08-01 20:07 ` Thomas Petazzoni
  2016-10-25 19:55 ` Thomas Petazzoni
  0 siblings, 2 replies; 6+ messages in thread
From: Jörg Krause @ 2016-08-01 19:58 UTC (permalink / raw)
  To: buildroot

libglob is the OpenBSD implementation of glob(3).

Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
---
 package/Config.in            |  1 +
 package/libglob/Config.in    |  4 ++++
 package/libglob/libglob.hash |  2 ++
 package/libglob/libglob.mk   | 47 ++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 54 insertions(+)
 create mode 100644 package/libglob/Config.in
 create mode 100644 package/libglob/libglob.hash
 create mode 100644 package/libglob/libglob.mk

diff --git a/package/Config.in b/package/Config.in
index 645fa29..54e9368 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1291,6 +1291,7 @@ menu "Other"
 	source "package/libffi/Config.in"
 	source "package/libgee/Config.in"
 	source "package/libglib2/Config.in"
+	source "package/libglob/Config.in"
 	source "package/libical/Config.in"
 	source "package/liblinear/Config.in"
 	source "package/libnspr/Config.in"
diff --git a/package/libglob/Config.in b/package/libglob/Config.in
new file mode 100644
index 0000000..029ed6a
--- /dev/null
+++ b/package/libglob/Config.in
@@ -0,0 +1,4 @@
+config BR2_PACKAGE_LIBGLOB
+	bool "libglob"
+	help
+	  OpenBSD implementation of glob(3).
diff --git a/package/libglob/libglob.hash b/package/libglob/libglob.hash
new file mode 100644
index 0000000..0b39407
--- /dev/null
+++ b/package/libglob/libglob.hash
@@ -0,0 +1,2 @@
+# Locally calculated:
+sha256  4f1b204dad065689941c64828a92441fb316c9c7539b39525fa728125da65e22  libglob-1.0.tar.gz
diff --git a/package/libglob/libglob.mk b/package/libglob/libglob.mk
new file mode 100644
index 0000000..62a26f3
--- /dev/null
+++ b/package/libglob/libglob.mk
@@ -0,0 +1,47 @@
+################################################################################
+#
+# libglob
+#
+################################################################################
+
+LIBGLOB_VERSION = 1.0
+LIBGLOB_SITE = $(call github,voidlinux,libglob,$(LIBGLOB_VERSION))
+LIBGLOB_LICENSE = BSD-3c
+LIBGLOB_LICENSE_FILE = LICENSE
+LIBGLOB_INSTALL_STAGING = YES
+
+ifeq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y)
+# $1: destination directory
+define LIBGLOB_INSTALL_SHARED
+	$(INSTALL) -m 0755 -D $(@D)/libglob.so.0.0.0 \
+		$(1)/usr/lib/libglob.so.0.0.0
+	ln -sf libglob.so.0.0.0 $(1)/usr/lib/libglob.so.0
+	ln -sf libglob.so.0.0.0 $(1)/usr/lib/libglob.so
+endef
+endif
+
+ifeq ($(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),y)
+# $1: destination directory
+define LIBGLOB_INSTALL_STATIC
+	$(INSTALL) -m 0644 -D $(@D)/libglob.a $(1)/usr/lib/libglob.a
+endef
+endif
+
+define LIBGLOB_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
+		$(if $(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),libglob.so) \
+		$(if $(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),libglob.a)
+endef
+
+define LIBGLOB_INSTALL_STAGING_CMDS
+	$(INSTALL) -m 0644 -D $(@D)/glob.h \
+		$(STAGING_DIR)/usr/include/libglob/glob.h
+	$(call LIBGLOB_INSTALL_SHARED,$(STAGING_DIR))
+	$(call LIBGLOB_INSTALL_STATIC,$(STAGING_DIR))
+endef
+
+define LIBGLOB_INSTALL_TARGET_CMDS
+	$(call LIBGLOB_INSTALL_SHARED,$(TARGET_DIR))
+endef
+
+$(eval $(generic-package))
-- 
2.9.2

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

* [Buildroot] [PATCH] libglob: new package
  2016-08-01 19:58 [Buildroot] [PATCH] libglob: new package Jörg Krause
@ 2016-08-01 20:07 ` Thomas Petazzoni
  2016-10-25 19:55 ` Thomas Petazzoni
  1 sibling, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2016-08-01 20:07 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon,  1 Aug 2016 21:58:36 +0200, J?rg Krause wrote:
> libglob is the OpenBSD implementation of glob(3).
> 
> Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>

There was already a submission of a libglob package by Bernd yesterday,
see:

Subject: [Buildroot] [PATCH/RFC 1/1] package/libglob: new package
Date: Sun, 31 Jul 2016 18:29:20 +0200

Best regards,

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

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

* [Buildroot] [PATCH] libglob: new package
  2016-08-01 19:58 [Buildroot] [PATCH] libglob: new package Jörg Krause
  2016-08-01 20:07 ` Thomas Petazzoni
@ 2016-10-25 19:55 ` Thomas Petazzoni
  2016-11-02 19:10   ` Jörg Krause
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2016-10-25 19:55 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon,  1 Aug 2016 21:58:36 +0200, J?rg Krause wrote:
> libglob is the OpenBSD implementation of glob(3).
> 
> Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>

I've applied your patch, with one minor change (see below).

I remember this was necessary to fix the build of a package with musl.
Do you remember which one?

> +ifeq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y)

I've added:

LIBGLOB_MAKE_TARGETS += libglob.so

here.

> +# $1: destination directory
> +define LIBGLOB_INSTALL_SHARED
> +	$(INSTALL) -m 0755 -D $(@D)/libglob.so.0.0.0 \
> +		$(1)/usr/lib/libglob.so.0.0.0
> +	ln -sf libglob.so.0.0.0 $(1)/usr/lib/libglob.so.0
> +	ln -sf libglob.so.0.0.0 $(1)/usr/lib/libglob.so
> +endef
> +endif
> +
> +ifeq ($(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),y)

LIBGLOB_MAKE_TARGETS += libglob.a

here.

> +# $1: destination directory
> +define LIBGLOB_INSTALL_STATIC
> +	$(INSTALL) -m 0644 -D $(@D)/libglob.a $(1)/usr/lib/libglob.a
> +endef
> +endif
> +
> +define LIBGLOB_BUILD_CMDS
> +	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
> +		$(if $(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),libglob.so) \
> +		$(if $(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),libglob.a)

And replaced those two lines by:

		$(LIBGLOB_MAKE_TARGETS)

This way, we have the conditions around static/shared only in one place.

Thanks!

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

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

* [Buildroot] [PATCH] libglob: new package
  2016-10-25 19:55 ` Thomas Petazzoni
@ 2016-11-02 19:10   ` Jörg Krause
  2016-11-02 20:32     ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: Jörg Krause @ 2016-11-02 19:10 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Tue, 2016-10-25 at 21:55 +0200, Thomas Petazzoni wrote:
> Hello,
> 
> On Mon,??1 Aug 2016 21:58:36 +0200, J?rg Krause wrote:
> > libglob is the OpenBSD implementation of glob(3).
> > 
> > Signed-off-by: J?rg Krause <joerg.krause@embedded.rocks>
> 
> I've applied your patch, with one minor change (see below).
> 
> I remember this was necessary to fix the build of a package with
> musl.
> Do you remember which one?

Yes, it was openswan.

J?rg

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

* [Buildroot] [PATCH] libglob: new package
  2016-11-02 19:10   ` Jörg Krause
@ 2016-11-02 20:32     ` Thomas Petazzoni
  2016-11-02 22:43       ` Jörg Krause
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2016-11-02 20:32 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, 02 Nov 2016 20:10:51 +0100, J?rg Krause wrote:

> > I remember this was necessary to fix the build of a package with
> > musl.
> > Do you remember which one?  
> 
> Yes, it was openswan.

Do we have the appropriate patches? :-)

Thanks,

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

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

* [Buildroot] [PATCH] libglob: new package
  2016-11-02 20:32     ` Thomas Petazzoni
@ 2016-11-02 22:43       ` Jörg Krause
  0 siblings, 0 replies; 6+ messages in thread
From: Jörg Krause @ 2016-11-02 22:43 UTC (permalink / raw)
  To: buildroot

On Wed, 2016-11-02 at 21:32 +0100, Thomas Petazzoni wrote:
> Hello,
> 
> On Wed, 02 Nov 2016 20:10:51 +0100, J?rg Krause wrote:
> 
> > > I remember this was necessary to fix the build of a package with
> > > musl.
> > > Do you remember which one???
> > 
> > Yes, it was openswan.
> 
> Do we have the appropriate patches? :-)

Not yet, unfortunately openswan for musl needs more fixing than adding
glob extensions :-(

J?rg

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

end of thread, other threads:[~2016-11-02 22:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-01 19:58 [Buildroot] [PATCH] libglob: new package Jörg Krause
2016-08-01 20:07 ` Thomas Petazzoni
2016-10-25 19:55 ` Thomas Petazzoni
2016-11-02 19:10   ` Jörg Krause
2016-11-02 20:32     ` Thomas Petazzoni
2016-11-02 22:43       ` Jörg Krause

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox