From 72c4c684eef8f47f2f518278235d0ee8471c69ba Mon Sep 17 00:00:00 2001 From: Abdoulaye Walsimou Gaye Date: Sun, 10 Jul 2011 18:27:34 +0200 Subject: Packages: libtiff: give ability to build for host development machine Signed-off-by: Abdoulaye Walsimou Gaye --- packages/graphics/graphics.mk | 1 + packages/graphics/libtiff/libtiff.kconfig | 25 +++++++++-- packages/graphics/libtiff/libtiff.mk | 69 +++++++++++++++++-------------- 3 files changed, 60 insertions(+), 35 deletions(-) (limited to 'packages') diff --git a/packages/graphics/graphics.mk b/packages/graphics/graphics.mk index 023a884..a59f616 100644 --- a/packages/graphics/graphics.mk +++ b/packages/graphics/graphics.mk @@ -68,6 +68,7 @@ HOSTTOOLS_COMPONENTS-$(CONFIG_EMBTK_HOST_HAVE_LIBPNG) += libpng_host_install #libtiff include $(EMBTK_ROOT)/packages/graphics/libtiff/libtiff.mk ROOTFS_COMPONENTS-$(CONFIG_EMBTK_HAVE_LIBTIFF) += libtiff_install +HOSTTOOLS_COMPONENTS-$(CONFIG_EMBTK_HOST_HAVE_LIBTIFF) += libtiff_host_install #Pango include $(EMBTK_ROOT)/packages/graphics/pango/pango.mk diff --git a/packages/graphics/libtiff/libtiff.kconfig b/packages/graphics/libtiff/libtiff.kconfig index daec17d..b65222f 100644 --- a/packages/graphics/libtiff/libtiff.kconfig +++ b/packages/graphics/libtiff/libtiff.kconfig @@ -1,6 +1,6 @@ ################################################################################ # Embtoolkit -# Copyright(C) 2009-2011 GAYE Abdoulaye Walsimou. +# Copyright(C) 2009-2011 Abdoulaye Walsimou GAYE. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,10 +19,16 @@ # # \file libtiff.kconfig # \brief libtiff.kconfig of Embtoolkit -# \author GAYE Abdoulaye Walsimou, +# \author Abdoulaye Walsimou GAYE # \date December 2009 ################################################################################ +config EMBTK_HOST_HAVE_LIBTIFF + bool + select EMBTK_LIBTIFF_PKG_IS_TARGZ + help + libtiff for host development machine. + config EMBTK_HAVE_LIBTIFF bool "Have libtiff" select EMBTK_LIBTIFF_PKG_IS_TARGZ @@ -36,7 +42,7 @@ config EMBTK_HAVE_LIBTIFF need to leave out some of the compression support. choice prompt "libtiff version you wish" - depends on EMBTK_HAVE_LIBTIFF + depends on EMBTK_HAVE_LIBTIFF || EMBTK_HOST_HAVE_LIBTIFF help Here you can choose which version of libtiff you want to use. @@ -50,9 +56,22 @@ config EMBTK_LIBTIFF_VERSION_STRING config EMBTK_LIBTIFF_NEED_PATCH bool + select EMBTK_LIBTIFF_HOST_NEED_PATCH config EMBTK_LIBTIFF_NEED_AUTORECONF bool + select EMBTK_LIBTIFF_HOST_NEED_AUTORECONF config EMBTK_LIBTIFF_PKG_IS_TARGZ bool + select EMBTK_LIBTIFF_HOST_PKG_IS_TARGZ config EMBTK_LIBTIFF_PKG_IS_TARBZ2 bool + select EMBTK_LIBTIFF_HOST_PKG_IS_TARBZ2 + +config EMBTK_LIBTIFF_HOST_NEED_PATCH + bool +config EMBTK_LIBTIFF_HOST_NEED_AUTORECONF + bool +config EMBTK_LIBTIFF_HOST_PKG_IS_TARGZ + bool +config EMBTK_LIBTIFF_HOST_PKG_IS_TARBZ2 + bool diff --git a/packages/graphics/libtiff/libtiff.mk b/packages/graphics/libtiff/libtiff.mk index c7ad8f7..2457cfa 100644 --- a/packages/graphics/libtiff/libtiff.mk +++ b/packages/graphics/libtiff/libtiff.mk @@ -23,48 +23,53 @@ # \date December 2009 ################################################################################ -LIBTIFF_NAME := libtiff -LIBTIFF_VERSION := $(call embtk_get_pkgversion,LIBTIFF) -LIBTIFF_SITE := ftp://ftp.remotesensing.org/pub/libtiff -LIBTIFF_SITE_MIRROR3 := ftp://ftp.embtoolkit.org/embtoolkit.org/packages-mirror -LIBTIFF_PATCH_SITE := ftp://ftp.embtoolkit.org/embtoolkit.org/libtiff/$(LIBTIFF_VERSION) -LIBTIFF_PACKAGE := tiff-$(LIBTIFF_VERSION).tar.gz -LIBTIFF_SRC_DIR := $(PACKAGES_BUILD)/tiff-$(LIBTIFF_VERSION) -LIBTIFF_BUILD_DIR := $(PACKAGES_BUILD)/tiff-$(LIBTIFF_VERSION) +LIBTIFF_NAME := libtiff +LIBTIFF_VERSION := $(call embtk_get_pkgversion,libtiff) +LIBTIFF_SITE := ftp://ftp.remotesensing.org/pub/libtiff +LIBTIFF_SITE_MIRROR3 := ftp://ftp.embtoolkit.org/embtoolkit.org/packages-mirror +LIBTIFF_PATCH_SITE := ftp://ftp.embtoolkit.org/embtoolkit.org/libtiff/$(LIBTIFF_VERSION) +LIBTIFF_PACKAGE := tiff-$(LIBTIFF_VERSION).tar.gz +LIBTIFF_SRC_DIR := $(PACKAGES_BUILD)/tiff-$(LIBTIFF_VERSION) +LIBTIFF_BUILD_DIR := $(PACKAGES_BUILD)/tiff-$(LIBTIFF_VERSION) LIBTIFF_BINS = vbmp2tiff fax2tiff pal2rgb ras2tiff rgb2ycbcr tiff2bw tiff2ps \ tiffcmp tiffcrop tiffdump tiffmedian tiffsplit fax2ps gif2tiff \ ppm2tiff raw2tiff thumbnail tiff2pdf tiff2rgba tiffcp \ tiffdither tiffinfo tiffset bmp2tiff -LIBTIFF_SBINS = -LIBTIFF_INCLUDES = tiffconf.h tiff.h tiffio.h tiffio.hxx tiffvers.h -LIBTIFF_LIBS = libtiff* -LIBTIFF_PKGCONFIGS = +LIBTIFF_SBINS = +LIBTIFF_INCLUDES = tiffconf.h tiff.h tiffio.h tiffio.hxx tiffvers.h +LIBTIFF_LIBS = libtiff* +LIBTIFF_PKGCONFIGS = -LIBTIFF_CONFIGURE_OPTS := --disable-cxx --program-prefix="" +LIBTIFF_CONFIGURE_OPTS := --disable-cxx --program-prefix="" libtiff_install: - @test -e $(LIBTIFF_BUILD_DIR)/.installed || \ - $(MAKE) $(LIBTIFF_BUILD_DIR)/.installed + $(call embtk_install_pkg,libtiff) -$(LIBTIFF_BUILD_DIR)/.installed: download_libtiff \ - $(LIBTIFF_BUILD_DIR)/.decompressed $(LIBTIFF_BUILD_DIR)/.configured - $(call embtk_generic_message,"Compiling and installing \ - libtiff-$(LIBTIFF_VERSION) in your root filesystem...") - $(Q)$(MAKE) -C $(LIBTIFF_BUILD_DIR) $(J) - $(Q)$(MAKE) -C $(LIBTIFF_BUILD_DIR) DESTDIR=$(SYSROOT) install - $(Q)$(MAKE) libtool_files_adapt - $(Q)$(MAKE) pkgconfig_files_adapt - @touch $@ +libtiff_clean: + $(call embtk_cleanup_pkg,libtiff) -download_libtiff: - $(call embtk_download_pkg,LIBTIFF) +# +# libtiff for host development machine +# +LIBTIFF_HOST_NAME := $(LIBTIFF_NAME) +LIBTIFF_HOST_VERSION := $(LIBTIFF_VERSION) +LIBTIFF_HOST_SITE := $(LIBTIFF_SITE) +LIBTIFF_HOST_SITE_MIRROR1 := $(LIBTIFF_SITE_MIRROR1) +LIBTIFF_HOST_SITE_MIRROR2 := $(LIBTIFF_SITE_MIRROR2) +LIBTIFF_HOST_SITE_MIRROR3 := $(LIBTIFF_SITE_MIRROR3) +LIBTIFF_HOST_PATCH_SITE := $(LIBTIFF_PATCH_SITE) +LIBTIFF_HOST_PACKAGE := $(LIBTIFF_PACKAGE) +LIBTIFF_HOST_SRC_DIR := $(TOOLS_BUILD)/tiff-$(LIBTIFF_VERSION) +LIBTIFF_HOST_BUILD_DIR := $(TOOLS_BUILD)/tiff-$(LIBTIFF_VERSION) -$(LIBTIFF_BUILD_DIR)/.decompressed: - $(call embtk_decompress_pkg,LIBTIFF) +LIBTIFF_HOST_CONFIGURE_OPTS := --disable-cxx --program-prefix="" -$(LIBTIFF_BUILD_DIR)/.configured: - $(call embtk_configure_pkg,LIBTIFF) +libtiff_host_install: + $(call embtk_install_hostpkg,libtiff_host) -libtiff_clean: - $(call embtk_cleanup_pkg,LIBTIFF) +# +# Common for host and target +# +download_libtiff download_libtiff_host: + $(call embtk_download_pkg,libtiff) -- cgit v1.2.3