Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] directfb: add host-directfb target for directfb-csource
@ 2009-10-02 11:11 Sven Neumann
  2009-10-02 11:15 ` Peter Korsgaard
  0 siblings, 1 reply; 8+ messages in thread
From: Sven Neumann @ 2009-10-02 11:11 UTC (permalink / raw)
  To: buildroot

directfb-csource is a code generation tool that may be needed to build
other packages. Add host-directfb target that installs directfb-csource
in the host_dir.

Signed-off-by: Sven Neumann <s.neumann@raumfeld.com>
---
 package/directfb/directfb.mk |   52 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/package/directfb/directfb.mk b/package/directfb/directfb.mk
index 5fc8868..d6b6bdc 100644
--- a/package/directfb/directfb.mk
+++ b/package/directfb/directfb.mk
@@ -147,3 +147,55 @@ DIRECTFB_CONF_OPT = \
 DIRECTFB_DEPENDENCIES = uclibc $(DIRECTFB_DEP) freetype $(DIRECTFB_FUSION)
 
 $(eval $(call AUTOTARGETS,package,directfb))
+
+
+# directfb-csource for the host
+
+DIRECTFB_HOST_DIR:=$(BUILD_DIR)/directfb-$(DIRECTFB_VERSION)-host
+DIRECTFB_HOST_BINARY:=$(HOST_DIR)/usr/bin/directfb-csource
+
+$(DL_DIR)/$(DIRECTFB_SOURCE):
+	$(call DOWNLOAD,$(DIRECTFB_SITE),$(DIRECTFB_SOURCE))
+
+$(STAMP_DIR)/host_directfb_unpacked: $(DL_DIR)/$(DIRECTFB_SOURCE)
+	mkdir -p $(DIRECTFB_HOST_DIR)
+	$(INFLATE$(suffix $(DIRECTFB_SOURCE))) $< | \
+		$(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(DIRECTFB_HOST_DIR) $(TAR_OPTIONS) -
+	touch $@
+
+$(STAMP_DIR)/host_directfb_configured: $(STAMP_DIR)/host_directfb_unpacked $(STAMP_DIR)/host_pkgconfig_installed
+	(cd $(DIRECTFB_HOST_DIR); rm -rf config.cache; \
+		$(HOST_CONFIGURE_OPTS) \
+		CFLAGS="$(HOST_CFLAGS)" \
+		LDFLAGS="$(HOST_LDFLAGS)" \
+		./configure \
+		--prefix="$(HOST_DIR)/usr" \
+		--sysconfdir="$(HOST_DIR)/etc" \
+		--enable-shared \
+		--disable-static \
+		--disable-debug \
+		--disable-multi \
+		--with-gfxdrivers=none \
+		--with-inputdrivers=none \
+	)
+	touch $@
+
+$(STAMP_DIR)/host_directfb_compiled: $(STAMP_DIR)/host_directfb_configured
+	$(MAKE) -C $(DIRECTFB_HOST_DIR)/tools directfb-csource
+	touch $@
+
+$(STAMP_DIR)/host_directfb_installed: $(STAMP_DIR)/host_directfb_compiled
+	$(INSTALL) -m 0755 $(DIRECTFB_HOST_DIR)/tools/directfb-csource $(HOST_DIR)/usr/bin
+	touch $@
+
+host-directfb: $(STAMP_DIR)/host_directfb_installed
+
+host-directfb-source: directfb-source
+
+host-directfb-clean:
+	rm -f $(addprefix $(STAMP_DIR)/host_directfb_,unpacked configured compiled installed)
+	rm -f $(HOST_DIR)/usr/bin/directfb-csource
+	-$(MAKE) -C $(DIRECTFB_HOST_DIR)/tools clean
+
+host-directfb-dirclean:
+	rm -rf $(DIRECTFB_HOST_DIR)
-- 
1.6.0.4

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

* [Buildroot] [PATCH] directfb: add host-directfb target for directfb-csource
  2009-10-02 11:11 [Buildroot] [PATCH] directfb: add host-directfb target for directfb-csource Sven Neumann
@ 2009-10-02 11:15 ` Peter Korsgaard
  2009-10-02 11:28   ` Sven Neumann
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Korsgaard @ 2009-10-02 11:15 UTC (permalink / raw)
  To: buildroot

>>>>> "Sven" == Sven Neumann <s.neumann@raumfeld.com> writes:

 Sven> directfb-csource is a code generation tool that may be needed to build
 Sven> other packages. Add host-directfb target that installs directfb-csource
 Sven> in the host_dir.

What exactly needs this? I prefer to not add unused stuff. Could we wait
until there's an actual use for this?

 Sven> +$(STAMP_DIR)/host_directfb_installed: $(STAMP_DIR)/host_directfb_compiled
 Sven> +	$(INSTALL) -m 0755 $(DIRECTFB_HOST_DIR)/tools/directfb-csource $(HOST_DIR)/usr/bin

Is directfb-csource the only thing we could ever imagine other packages
needing? What about the headers/libs for some other host tool?

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH] directfb: add host-directfb target for directfb-csource
  2009-10-02 11:15 ` Peter Korsgaard
@ 2009-10-02 11:28   ` Sven Neumann
  2009-10-02 11:40     ` Peter Korsgaard
  0 siblings, 1 reply; 8+ messages in thread
From: Sven Neumann @ 2009-10-02 11:28 UTC (permalink / raw)
  To: buildroot

On Fri, 2009-10-02 at 13:15 +0200, Peter Korsgaard wrote:
> >>>>> "Sven" == Sven Neumann <s.neumann@raumfeld.com> writes:
> 
>  Sven> directfb-csource is a code generation tool that may be needed to build
>  Sven> other packages. Add host-directfb target that installs directfb-csource
>  Sven> in the host_dir.
> 
> What exactly needs this? I prefer to not add unused stuff. Could we wait
> until there's an actual use for this?

directfb-csource is very similar to gdk-pixbuf-csource. It creates
header files from images so that they can easily be embedded into the
binary. I do make use of this in one of our packages. At some point I
even plan to release this code under the LGPL, but for now its closed. 

Of course I would prefer if the change could be upstream in buildroot,
but if you don't want to add it, then we can maintain it in our branch.
 
>  Sven> +$(STAMP_DIR)/host_directfb_installed: $(STAMP_DIR)/host_directfb_compiled
>  Sven> +	$(INSTALL) -m 0755 $(DIRECTFB_HOST_DIR)/tools/directfb-csource $(HOST_DIR)/usr/bin
> 
> Is directfb-csource the only thing we could ever imagine other packages
> needing? What about the headers/libs for some other host tool?

The other tools are actually useful on the target, but not likely useful
on the host. directfb-csource is the only code-generation tool in there.


Sven

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

* [Buildroot] [PATCH] directfb: add host-directfb target for directfb-csource
  2009-10-02 11:28   ` Sven Neumann
@ 2009-10-02 11:40     ` Peter Korsgaard
  2009-10-02 12:07       ` Sven Neumann
  2009-10-02 12:20       ` Sven Neumann
  0 siblings, 2 replies; 8+ messages in thread
From: Peter Korsgaard @ 2009-10-02 11:40 UTC (permalink / raw)
  To: buildroot

>>>>> "Sven" == Sven Neumann <s.neumann@raumfeld.com> writes:

Hi,

 >> What exactly needs this? I prefer to not add unused stuff. Could we
 >> wait until there's an actual use for this?

 Sven> directfb-csource is very similar to gdk-pixbuf-csource. It creates
 Sven> header files from images so that they can easily be embedded into the
 Sven> binary. I do make use of this in one of our packages. At some point I
 Sven> even plan to release this code under the LGPL, but for now its closed. 

 Sven> Of course I would prefer if the change could be upstream in buildroot,
 Sven> but if you don't want to add it, then we can maintain it in our branch.

Ok, fine by me - Could you please send a patch against upstream git
though?

git am -s3 /tmp/dir.patch
Applying: directfb: add host-directfb target for directfb-csource
error: patch failed: package/directfb/directfb.mk:147
error: package/directfb/directfb.mk: patch does not apply
fatal: sha1 information is lacking or useless (package/directfb/directfb.mk).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
 
 >> Is directfb-csource the only thing we could ever imagine other
 >> packages needing? What about the headers/libs for some other host
 >> tool?

 Sven> The other tools are actually useful on the target, but not likely
 Sven> useful on the host. directfb-csource is the only code-generation
 Sven> tool in there.

Ok, I was more thinking about headers/libs, if something we would need
to compile for the host uses directfb, but we can add than when/if we
need it.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH] directfb: add host-directfb target for directfb-csource
  2009-10-02 11:40     ` Peter Korsgaard
@ 2009-10-02 12:07       ` Sven Neumann
  2009-10-02 12:20       ` Sven Neumann
  1 sibling, 0 replies; 8+ messages in thread
From: Sven Neumann @ 2009-10-02 12:07 UTC (permalink / raw)
  To: buildroot

On Fri, 2009-10-02 at 13:40 +0200, Peter Korsgaard wrote:

>  Sven> Of course I would prefer if the change could be upstream in buildroot,
>  Sven> but if you don't want to add it, then we can maintain it in our branch.
> 
> Ok, fine by me - Could you please send a patch against upstream git
> though?

Sorry. It is about time that I bring our branch back in sync with
upstream buildroot...


Sven

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

* [Buildroot] [PATCH] directfb: add host-directfb target for directfb-csource
  2009-10-02 11:40     ` Peter Korsgaard
  2009-10-02 12:07       ` Sven Neumann
@ 2009-10-02 12:20       ` Sven Neumann
  2009-10-02 13:41         ` Peter Korsgaard
  2009-10-03  7:24         ` Peter Korsgaard
  1 sibling, 2 replies; 8+ messages in thread
From: Sven Neumann @ 2009-10-02 12:20 UTC (permalink / raw)
  To: buildroot

directfb-csource is a code generation tool that may be needed to build
other packages. Add host-directfb target that installs directfb-csource
in the host_dir.

Signed-off-by: Sven Neumann <s.neumann@raumfeld.com>
---
 package/directfb/directfb.mk |   52 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/package/directfb/directfb.mk b/package/directfb/directfb.mk
index 409f791..4175753 100644
--- a/package/directfb/directfb.mk
+++ b/package/directfb/directfb.mk
@@ -150,3 +150,55 @@ DIRECTFB_CONF_OPT = \
 DIRECTFB_DEPENDENCIES = $(DIRECTFB_DEP) freetype $(DIRECTFB_FUSION)
 
 $(eval $(call AUTOTARGETS,package,directfb))
+
+
+# directfb-csource for the host
+
+DIRECTFB_HOST_DIR:=$(BUILD_DIR)/directfb-$(DIRECTFB_VERSION)-host
+DIRECTFB_HOST_BINARY:=$(HOST_DIR)/usr/bin/directfb-csource
+
+$(DL_DIR)/$(DIRECTFB_SOURCE):
+        $(call DOWNLOAD,$(DIRECTFB_SITE),$(DIRECTFB_SOURCE))
+
+$(STAMP_DIR)/host_directfb_unpacked: $(DL_DIR)/$(DIRECTFB_SOURCE)
+        mkdir -p $(DIRECTFB_HOST_DIR)
+        $(INFLATE$(suffix $(DIRECTFB_SOURCE))) $< | \
+                $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(DIRECTFB_HOST_DIR) $(TAR_OPTIONS) -
+        touch $@
+
+$(STAMP_DIR)/host_directfb_configured: $(STAMP_DIR)/host_directfb_unpacked $(STAMP_DIR)/host_pkgconfig_installed
+        (cd $(DIRECTFB_HOST_DIR); rm -rf config.cache; \
+                $(HOST_CONFIGURE_OPTS) \
+                CFLAGS="$(HOST_CFLAGS)" \
+                LDFLAGS="$(HOST_LDFLAGS)" \
+                ./configure \
+                --prefix="$(HOST_DIR)/usr" \
+                --sysconfdir="$(HOST_DIR)/etc" \
+                --enable-shared \
+                --disable-static \
+                --disable-debug \
+                --disable-multi \
+                --with-gfxdrivers=none \
+                --with-inputdrivers=none \
+        )
+        touch $@
+
+$(STAMP_DIR)/host_directfb_compiled: $(STAMP_DIR)/host_directfb_configured
+        $(MAKE) -C $(DIRECTFB_HOST_DIR)/tools directfb-csource
+        touch $@
+
+$(STAMP_DIR)/host_directfb_installed: $(STAMP_DIR)/host_directfb_compiled
+        $(INSTALL) -m 0755 $(DIRECTFB_HOST_DIR)/tools/directfb-csource $(HOST_DIR)/usr/bin
+        touch $@
+
+host-directfb: $(STAMP_DIR)/host_directfb_installed
+
+host-directfb-source: directfb-source
+
+host-directfb-clean:
+        rm -f $(addprefix $(STAMP_DIR)/host_directfb_,unpacked configured compiled installed)
+        rm -f $(HOST_DIR)/usr/bin/directfb-csource
+        -$(MAKE) -C $(DIRECTFB_HOST_DIR)/tools clean
+
+host-directfb-dirclean:
+        rm -rf $(DIRECTFB_HOST_DIR)
-- 
1.6.0.4

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

* [Buildroot] [PATCH] directfb: add host-directfb target for directfb-csource
  2009-10-02 12:20       ` Sven Neumann
@ 2009-10-02 13:41         ` Peter Korsgaard
  2009-10-03  7:24         ` Peter Korsgaard
  1 sibling, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2009-10-02 13:41 UTC (permalink / raw)
  To: buildroot

>>>>> "Sven" == Sven Neumann <s.neumann@raumfeld.com> writes:

 Sven> directfb-csource is a code generation tool that may be needed to build
 Sven> other packages. Add host-directfb target that installs directfb-csource
 Sven> in the host_dir.

Committed, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH] directfb: add host-directfb target for directfb-csource
  2009-10-02 12:20       ` Sven Neumann
  2009-10-02 13:41         ` Peter Korsgaard
@ 2009-10-03  7:24         ` Peter Korsgaard
  1 sibling, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2009-10-03  7:24 UTC (permalink / raw)
  To: buildroot

>>>>> "Sven" == Sven Neumann <s.neumann@raumfeld.com> writes:

Hi,

 Sven> directfb-csource is a code generation tool that may be needed to build
 Sven> other packages. Add host-directfb target that installs directfb-csource
 Sven> in the host_dir.

 Sven> +DIRECTFB_HOST_DIR:=$(BUILD_DIR)/directfb-$(DIRECTFB_VERSION)-host
 Sven> +DIRECTFB_HOST_BINARY:=$(HOST_DIR)/usr/bin/directfb-csource
 Sven> +
 Sven> +$(DL_DIR)/$(DIRECTFB_SOURCE):
 Sven> +        $(call DOWNLOAD,$(DIRECTFB_SITE),$(DIRECTFB_SOURCE))

Hmm, this somehow had tabs replaced by spaces - How did that happen? git
send-email normally doesn't do stuff like that.

Anyway, fixed now.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2009-10-03  7:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-02 11:11 [Buildroot] [PATCH] directfb: add host-directfb target for directfb-csource Sven Neumann
2009-10-02 11:15 ` Peter Korsgaard
2009-10-02 11:28   ` Sven Neumann
2009-10-02 11:40     ` Peter Korsgaard
2009-10-02 12:07       ` Sven Neumann
2009-10-02 12:20       ` Sven Neumann
2009-10-02 13:41         ` Peter Korsgaard
2009-10-03  7:24         ` Peter Korsgaard

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