From d8caae046c418b337b2072ccbc3665de1042a255 Mon Sep 17 00:00:00 2001 From: Abdoulaye Walsimou Gaye Date: Sat, 3 Jul 2010 12:50:03 +0200 Subject: Packages: New add expat-2.0.1 Signed-off-by: Abdoulaye Walsimou Gaye --- packages/misc/expat/expat.kconfig | 50 ++++++++++++++++++ packages/misc/expat/expat.mk | 103 ++++++++++++++++++++++++++++++++++++++ packages/misc/misc.kconfig | 1 + packages/misc/misc.mk | 5 ++ 4 files changed, 159 insertions(+) create mode 100644 packages/misc/expat/expat.kconfig create mode 100644 packages/misc/expat/expat.mk diff --git a/packages/misc/expat/expat.kconfig b/packages/misc/expat/expat.kconfig new file mode 100644 index 0000000..f90e1c7 --- /dev/null +++ b/packages/misc/expat/expat.kconfig @@ -0,0 +1,50 @@ +################################################################################ +# Abdoulaye Walsimou GAYE +# Copyright(C) 2010 Abdoulaye Walsimou GAYE. All rights reserved. +# +# 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 +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################ +# +# \file expat.kconfig +# \brief expat.kconfig of Embtoolkit +# \author Abdoulaye Walsimou GAYE +# \date July 2010 +################################################################################ + +config EMBTK_HAVE_EXPAT + bool "Have Expat" + help + Expat is an XML parser library written in C. It is a + stream-oriented parser in which an application registers + handlers for things the parser might find in the XML document + (like start tags). +choice + prompt "expat version you wish" + depends on EMBTK_HAVE_EXPAT + help + Here you can choose which version of Expat you want to use. + + config EMBTK_EXPAT_VERSION_2_0_1 + bool "expat-2.0.1" +endchoice + +config EMBTK_EXPAT_VERSION_STRING + string + default "2.0.1" if EMBTK_EXPAT_VERSION_2_0_1 + +config EMBTK_EXPAT_NEED_PATCH + bool + + diff --git a/packages/misc/expat/expat.mk b/packages/misc/expat/expat.mk new file mode 100644 index 0000000..b1b8da9 --- /dev/null +++ b/packages/misc/expat/expat.mk @@ -0,0 +1,103 @@ +################################################################################ +# Abdoulaye Walsimou GAYE +# Copyright(C) 2010 Abdoulaye Walsimou GAYE. All rights reserved. +# +# 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 +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +################################################################################ +# +# \file expat.mk +# \brief expat.mk of Embtoolkit +# \author Abdoulaye Walsimou GAYE +# \date July 2010 +################################################################################ + +EXPAT_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_EXPAT_VERSION_STRING))) +EXPAT_SITE := http://downloads.sourceforge.net/expat +EXPAT_PATCH_SITE := ftp://ftp.embtoolkit.org/embtoolkit.org/expat/$(EXPAT_VERSION) +EXPAT_PACKAGE := expat-$(EXPAT_VERSION).tar.gz +EXPAT_BUILD_DIR := $(PACKAGES_BUILD)/expat-$(EXPAT_VERSION) + +EXPAT_BINS = xmlwf +EXPAT_SBINS = +EXPAT_INCLUDES = expat_external.h expat.h +EXPAT_LIBS = libexpat.* +EXPAT_PKGCONFIGS = + +EXPAT_DEPS = + +expat_install: $(EXPAT_BUILD_DIR)/.installed + +$(EXPAT_BUILD_DIR)/.installed: $(EXPAT_DEPS) download_expat \ + $(EXPAT_BUILD_DIR)/.decompressed $(EXPAT_BUILD_DIR)/.configured + $(call EMBTK_GENERIC_MESSAGE,"Compiling and installing \ + expat-$(EXPAT_VERSION) in your root filesystem...") + $(Q)$(MAKE) -C $(EXPAT_BUILD_DIR) $(J) + $(Q)$(MAKE) -C $(EXPAT_BUILD_DIR) DESTDIR=$(SYSROOT) install + $(Q)$(MAKE) libtool_files_adapt + $(Q)$(MAKE) pkgconfig_files_adapt + @touch $@ + +download_expat: + $(call EMBTK_GENERIC_MESSAGE,"Downloading $(EXPAT_PACKAGE) \ + if necessary...") + @test -e $(DOWNLOAD_DIR)/$(EXPAT_PACKAGE) || \ + wget -O $(DOWNLOAD_DIR)/$(EXPAT_PACKAGE) \ + $(EXPAT_SITE)/$(EXPAT_PACKAGE) +ifeq ($(CONFIG_EMBTK_EXPAT_NEED_PATCH),y) + @test -e $(DOWNLOAD_DIR)/expat-$(EXPAT_VERSION).patch || \ + wget -O $(DOWNLOAD_DIR)/expat-$(EXPAT_VERSION).patch \ + $(EXPAT_PATCH_SITE)/expat-$(EXPAT_VERSION)-*.patch +endif + +$(EXPAT_BUILD_DIR)/.decompressed: + $(call EMBTK_GENERIC_MESSAGE,"Decompressing $(EXPAT_PACKAGE) ...") + @tar -C $(PACKAGES_BUILD) -xzf $(DOWNLOAD_DIR)/$(EXPAT_PACKAGE) +ifeq ($(CONFIG_EMBTK_EXPAT_NEED_PATCH),y) + @cd $(PACKAGES_BUILD)/expat-$(EXPAT_VERSION); \ + patch -p1 < $(DOWNLOAD_DIR)/expat-$(EXPAT_VERSION).patch +endif + @touch $@ + +$(EXPAT_BUILD_DIR)/.configured: + $(Q)cd $(EXPAT_BUILD_DIR); \ + CC=$(TARGETCC_CACHED) \ + CXX=$(TARGETCXX_CACHED) \ + AR=$(TARGETAR) \ + RANLIB=$(TARGETRANLIB) \ + AS=$(CROSS_COMPILE)as \ + LD=$(TARGETLD) \ + NM=$(TARGETNM) \ + STRIP=$(TARGETSTRIP) \ + OBJDUMP=$(TARGETOBJDUMP) \ + OBJCOPY=$(TARGETOBJCOPY) \ + CFLAGS="$(TARGET_CFLAGS)" \ + CXXFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="-L$(SYSROOT)/$(LIBDIR) -L$(SYSROOT)/usr/$(LIBDIR)" \ + CPPFLGAS="-I$(SYSROOT)/usr/include" \ + PKG_CONFIG=$(PKGCONFIG_BIN) \ + PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \ + ./configure --build=$(HOST_BUILD) --host=$(STRICT_GNU_TARGET) \ + --target=$(STRICT_GNU_TARGET) --libdir=/usr/$(LIBDIR) \ + --prefix=/usr + @touch $@ + +expat_clean: + $(call EMBTK_GENERIC_MESSAGE,"cleanup expat-$(EXPAT_VERSION)...") + $(Q)-cd $(SYSROOT)/usr/bin; rm -rf $(EXPAT_BINS) + $(Q)-cd $(SYSROOT)/usr/sbin; rm -rf $(EXPAT_SBINS) + $(Q)-cd $(SYSROOT)/usr/include; rm -rf $(EXPAT_INCLUDES) + $(Q)-cd $(SYSROOT)/usr/$(LIBDIR); rm -rf $(EXPAT_LIBS) + $(Q)-cd $(SYSROOT)/usr/$(LIBDIR)/pkgconfig; rm -rf $(EXPAT_PKGCONFIGS) + diff --git a/packages/misc/misc.kconfig b/packages/misc/misc.kconfig index 27d2a28..4fb0899 100644 --- a/packages/misc/misc.kconfig +++ b/packages/misc/misc.kconfig @@ -24,6 +24,7 @@ # \date February 2010 ################################################################################ +source packages/misc/expat/expat.kconfig source packages/misc/gettext/gettext.kconfig source packages/misc/glib/glib.kconfig source packages/misc/libelf/libelf.kconfig diff --git a/packages/misc/misc.mk b/packages/misc/misc.mk index aacfc15..ea5779d 100644 --- a/packages/misc/misc.mk +++ b/packages/misc/misc.mk @@ -22,6 +22,11 @@ # \date February 2010 ################################################################################ +#expat +include $(EMBTK_ROOT)/packages/misc/expat/expat.mk +ROOTFS_COMPONENTS_CLEAN += expat_clean +ROOTFS_COMPONENTS-$(CONFIG_EMBTK_HAVE_EXPAT) += expat_install + #gettext include $(EMBTK_ROOT)/packages/misc/gettext/gettext.mk ROOTFS_COMPONENTS_CLEAN += gettext_clean -- cgit v1.2.3