directfb: convert to autotools infrastructure for host package
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 2 Nov 2009 23:09:34 +0000 (00:09 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 15 Dec 2009 18:57:35 +0000 (19:57 +0100)
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/directfb/directfb.mk

index eb492cd3cd6ac6ec378373b5127cc1087562ea4e..57b2e17eb8b02ec17a9765ccdaff2be3112fe206 100644 (file)
@@ -150,56 +150,23 @@ 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" \
+HOST_DIRECTFB_DEPENDENCIES = host-pkg-config
+HOST_DIRECTFB_CONF_OPT = \
                --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 $@
+               --with-inputdrivers=none
 
-host-directfb: $(STAMP_DIR)/host_directfb_installed
+HOST_DIRECTFB_BUILD_CMDS = \
+       $(MAKE) -C $(@D)/tools directfb-csource
 
-host-directfb-source: directfb-source
+HOST_DIRECTFB_INSTALL_CMDS = \
+       $(INSTALL) -m 0755 $(@D)/tools/directfb-csource $(HOST_DIR)/usr/bin
 
-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
+$(eval $(call AUTOTARGETS,package,directfb))
+$(eval $(call AUTOTARGETS,package,directfb,host))
 
-host-directfb-dirclean:
-       rm -rf $(DIRECTFB_HOST_DIR)
+# directfb-csource for the host
+DIRECTFB_HOST_BINARY:=$(HOST_DIR)/usr/bin/directfb-csource