diff options
author | Abdoulaye Walsimou Gaye <walsimou@walsimou.com> | 2009-12-24 17:47:44 +0100 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <walsimou@walsimou.com> | 2009-12-24 17:54:57 +0100 |
commit | 1f80aa8b93badc69b39fcfc0e30ac07c4d2d0603 (patch) | |
tree | ab2f743188510f0fbbd972f316fc038bfa3832a3 | |
parent | 31ad044265dff7e08b9ff76d6bc8520baa40f163 (diff) | |
download | embtoolkit-1f80aa8b93badc69b39fcfc0e30ac07c4d2d0603.tar.gz embtoolkit-1f80aa8b93badc69b39fcfc0e30ac07c4d2d0603.tar.bz2 embtoolkit-1f80aa8b93badc69b39fcfc0e30ac07c4d2d0603.tar.xz |
Packages: new libxml2: add libxml2 as buildable package
Signed-off-by: Abdoulaye Walsimou Gaye <walsimou@walsimou.com>
-rw-r--r-- | kconfig/packages.kconfig | 1 | ||||
-rw-r--r-- | mk/packages.mk | 7 | ||||
-rw-r--r-- | packages/misc/libxml/libxml.kconfig | 42 | ||||
-rw-r--r-- | packages/misc/libxml/libxml.mk | 88 |
4 files changed, 138 insertions, 0 deletions
diff --git a/kconfig/packages.kconfig b/kconfig/packages.kconfig index 4730e28..53b0f14 100644 --- a/kconfig/packages.kconfig +++ b/kconfig/packages.kconfig @@ -81,6 +81,7 @@ endmenu menu "Miscellaneous packages" source packages/misc/gettext/gettext.kconfig source packages/misc/glib/glib.kconfig +source packages/misc/libxml/libxml.kconfig endmenu endmenu diff --git a/mk/packages.mk b/mk/packages.mk index fedc16a..582fefd 100644 --- a/mk/packages.mk +++ b/mk/packages.mk @@ -120,6 +120,13 @@ ifeq ($(CONFIG_EMBTK_HAVE_GLIB),y) ROOTFS_COMPONENTS += glib_install endif ROOTFS_COMPONENTS_CLEAN += glib_clean + +#libxml2 +include $(EMBTK_ROOT)/packages/misc/libxml/libxml.mk +ifeq ($(CONFIG_EMBTK_HAVE_LIBXML2),y) +ROOTFS_COMPONENTS += libxml2_install +endif +ROOTFS_COMPONENTS_CLEAN += libxml2_clean ################################### BUSYBOX #################################### #Busybox ifeq ($(CONFIG_EMBTK_ROOTFS_HAVE_BB),y) diff --git a/packages/misc/libxml/libxml.kconfig b/packages/misc/libxml/libxml.kconfig new file mode 100644 index 0000000..088d64d --- /dev/null +++ b/packages/misc/libxml/libxml.kconfig @@ -0,0 +1,42 @@ +################################################################################ +# GAYE Abdoulaye Walsimou, <walsimou@walsimou.com> +# Copyright(C) 2009 GAYE Abdoulaye Walsimou. All rights reserved. +# +# This program is free software; you can distribute it and/or modify it +# under the terms of the GNU General Public License +# (Version 2 or later) published by the Free Software Foundation. +# +# This program is distributed in the hope 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, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. +################################################################################ +# +# \file libxml.kconfig +# \brief libxml.kconfig of Embtoolkit +# \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com> +# \date December 2009 +################################################################################ + +config EMBTK_HAVE_LIBXML2 + bool "Have libxml2" + help + libxml2 +choice + prompt "libxml version you wish" + depends on EMBTK_HAVE_LIBXML2 + help + Here you can choose which version of libxml2 you want to use. + + config EMBTK_LIBXML2_VERSION_2_7_6 + bool "libxml2-2.7.6" +endchoice + +config EMBTK_LIBXML2_VERSION_STRING + string + default "2.7.6" if EMBTK_LIBXML2_VERSION_2_7_6 + diff --git a/packages/misc/libxml/libxml.mk b/packages/misc/libxml/libxml.mk new file mode 100644 index 0000000..5273bd8 --- /dev/null +++ b/packages/misc/libxml/libxml.mk @@ -0,0 +1,88 @@ +################################################################################ +# GAYE Abdoulaye Walsimou, <walsimou@walsimou.com> +# Copyright(C) 2009 GAYE Abdoulaye Walsimou. All rights reserved. +# +# This program is free software; you can distribute it and/or modify it +# under the terms of the GNU General Public License +# (Version 2 or later) published by the Free Software Foundation. +# +# This program is distributed in the hope 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, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. +################################################################################ +# +# \file libxml.mk +# \brief libxml.mk of Embtoolkit +# \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com> +# \date December 2009 +################################################################################ + +LIBXML2_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_LIBXML2_VERSION_STRING))) +LIBXML2_SITE := ftp://xmlsoft.org/libxml2 +LIBXML2_PACKAGE := libxml2-$(LIBXML2_VERSION).tar.gz +LIBXML2_BUILD_DIR := $(PACKAGES_BUILD)/libxml2-$(LIBXML2_VERSION) + +LIBXML2_BINS = xml2-config xmlcatalog xmllint +LIBXML2_SBINS = +LIBXML2_INCLUDES = libxml2 +LIBXML2_LIBS = libxml2* xml2Conf.sh +LIBXML2_PKGCONFIGS = libxml*.pc +LIBXML2_LIBTOOLS = libxml2.la + +libxml2_install: $(LIBXML2_BUILD_DIR)/.installed + +$(LIBXML2_BUILD_DIR)/.installed: download_libxml2 \ + $(LIBXML2_BUILD_DIR)/.decompressed $(LIBXML2_BUILD_DIR)/.configured + $(call EMBTK_GENERIC_MESSAGE,"Compiling and installing \ + libxml2-$(LIBXML2_VERSION) in your root filesystem...") + $(Q)$(MAKE) -C $(LIBXML2_BUILD_DIR) $(J) + $(Q)$(MAKE) -C $(LIBXML2_BUILD_DIR) DESTDIR=$(SYSROOT) install + $(Q)$(MAKE) libtool_files_adapt + $(Q)$(MAKE) pkgconfig_files_adapt + @touch $@ + +download_libxml2: + $(call EMBTK_GENERIC_MESSAGE,"Downloading $(LIBXML2_PACKAGE) \ + if necessary...") + @test -e $(DOWNLOAD_DIR)/$(LIBXML2_PACKAGE) || \ + wget -O $(DOWNLOAD_DIR)/$(LIBXML2_PACKAGE) \ + $(LIBXML2_SITE)/$(LIBXML2_PACKAGE) + +$(LIBXML2_BUILD_DIR)/.decompressed: + $(call EMBTK_GENERIC_MESSAGE,"Decompressing $(LIBXML2_PACKAGE) ...") + @tar -C $(PACKAGES_BUILD) -xzvf $(DOWNLOAD_DIR)/$(LIBXML2_PACKAGE) + @touch $@ + +$(LIBXML2_BUILD_DIR)/.configured: + $(Q)cd $(LIBXML2_BUILD_DIR); \ + CC=$(TARGETCC_CACHED) CXX=$(TARGETCXX_CACHED) \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="-L$(SYSROOT)/lib -L$(SYSROOT)/usr/lib \ + -L$(SYSROOT)/lib32 -L$(SYSROOT)/usr/lib32" \ + CPPFLGAS="-I$(SYSROOT)/usr/include" \ + PKG_CONFIG=$(PKGCONFIG_BIN) \ + PKG_CONFIG_PATH=$(SYSROOT)/usr \ + ./configure --build=$(HOST_BUILD) --host=$(STRICT_GNU_TARGET) \ + --target=$(STRICT_GNU_TARGET) \ + --prefix=/usr + @touch $@ + +libxml2_clean: + $(call EMBTK_GENERIC_MESSAGE,"cleanup fontconfig-$(FONTCONFIG_VERSION)...") + $(Q)-cd $(SYSROOT)/usr/bin; rm -rf $(LIBXML2_BINS) + $(Q)-cd $(SYSROOT)/usr/sbin; rm -rf $(LIBXML2_SBINS) + $(Q)-cd $(SYSROOT)/usr/include; rm -rf $(LIBXML2_INCLUDES) + $(Q)-cd $(SYSROOT)/usr/lib; rm -rf $(LIBXML2_LIBS) + $(Q)-cd $(SYSROOT)/usr/lib/pkgconfig; rm -rf $(LIBXML2_PKGCONFIGS) + $(Q)-cd $(SYSROOT)/usr/lib/pkgconfig; rm -rf $(LIBXML2_LIBTOOLS) +ifeq ($(CONFIG_EMBTK_64BITS_FS_COMPAT32),y) + $(Q)-cd $(SYSROOT)/usr/lib32; rm -rf $(LIBXML2_LIBS) + $(Q)-cd $(SYSROOT)/usr/lib32/pkgconfig; rm -rf $(LIBXML2_PKGCONFIGS) + $(Q)-cd $(SYSROOT)/usr/lib32/pkgconfig; rm -rf $(LIBXML2_LIBTOOLS) +endif + |