diff options
author | Abdoulaye Walsimou Gaye <walsimou@walsimou.com> | 2009-12-23 10:54:36 +0100 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <walsimou@walsimou.com> | 2009-12-23 10:55:49 +0100 |
commit | ab416eca8279605957a84d5a3734fd95a9ebd430 (patch) | |
tree | 78ff883d21bff5db00a8304edc7511ed0846cb94 | |
parent | d690adefdc8e254b7e251e37866b47d20b4d1b88 (diff) | |
download | embtoolkit-ab416eca8279605957a84d5a3734fd95a9ebd430.tar.gz embtoolkit-ab416eca8279605957a84d5a3734fd95a9ebd430.tar.bz2 embtoolkit-ab416eca8279605957a84d5a3734fd95a9ebd430.tar.xz |
Packages: new gettext: add gettext among misc buildable packages
Signed-off-by: Abdoulaye Walsimou Gaye <walsimou@walsimou.com>
-rw-r--r-- | kconfig/packages.kconfig | 1 | ||||
-rw-r--r-- | mk/packages.mk | 6 | ||||
-rw-r--r-- | packages/misc/gettext/gettext.kconfig | 63 | ||||
-rw-r--r-- | packages/misc/gettext/gettext.mk | 89 |
4 files changed, 159 insertions, 0 deletions
diff --git a/kconfig/packages.kconfig b/kconfig/packages.kconfig index c6525c8..7a04ad7 100644 --- a/kconfig/packages.kconfig +++ b/kconfig/packages.kconfig @@ -79,6 +79,7 @@ menu "System packages" endmenu menu "Miscellaneous packages" +source packages/misc/gettext/gettext.kconfig endmenu endmenu diff --git a/mk/packages.mk b/mk/packages.mk index 78b7740..af248ab 100644 --- a/mk/packages.mk +++ b/mk/packages.mk @@ -107,6 +107,12 @@ endif ########################## Miscellaneous packages ############################## +#gettext +include $(EMBTK_ROOT)/packages/misc/gettext/gettext.mk +ifeq ($(CONFIG_EMBTK_HAVE_GETTEXT),y) +ROOTFS_COMPONENTS += gettext_install +endif +ROOTFS_COMPONENTS_CLEAN += gettext_clean ################################### BUSYBOX #################################### #Busybox ifeq ($(CONFIG_EMBTK_ROOTFS_HAVE_BB),y) diff --git a/packages/misc/gettext/gettext.kconfig b/packages/misc/gettext/gettext.kconfig new file mode 100644 index 0000000..abc55ad --- /dev/null +++ b/packages/misc/gettext/gettext.kconfig @@ -0,0 +1,63 @@ +################################################################################ +# 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 gettext.kconfig +# \brief gettext.kconfig of Embtoolkit +# \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com> +# \date December 2009 +################################################################################ + +config EMBTK_HAVE_GETTEXT + bool "Have gettext" + help + GNU `gettext' is an important step for the GNU Translation + Project, as it is an asset on which we may build many other + steps. This package offers to programmers, translators, and even + users, a well integrated set of tools and documentation. + Specifically, the GNU `gettext' utilities are a set of tools + that provides a framework to help other GNU packages produce + multi-lingual messages. These tools include a set of conventions + about how programs should be written to support message + catalogs, a directory and file naming organization for the + message catalogs themselves, a runtime library supporting the + retrieval of translated messages, and a few stand-alone programs + to massage in various ways the sets of translatable strings, or + already translated strings. A special GNU Emacs mode also helps + interested parties in preparing these sets, or bringing them up + to date. + Online Manual is available at: + www.gnu.org/software/gettext/manual/gettext.html + The Frequently Asked Questions and their answers are at: + www.gnu.org/software/gettext/FAQ.html +choice + prompt "gettext version you wish" + depends on EMBTK_HAVE_GETTEXT + help + Here you can choose which version of gettext you want to use. + + config EMBTK_GETTEXT_VERSION_0_17 + bool "gettext-0.17" + config EMBTK_GETTEXT_VERSION_0_16_1 + bool "gettext-0.16.1" +endchoice + +config EMBTK_GETTEXT_VERSION_STRING + string + default "0.17" if EMBTK_GETTEXT_VERSION_0_17 + default "0.16.1" if EMBTK_GETTEXT_VERSION_0_16_1 + diff --git a/packages/misc/gettext/gettext.mk b/packages/misc/gettext/gettext.mk new file mode 100644 index 0000000..e6c2707 --- /dev/null +++ b/packages/misc/gettext/gettext.mk @@ -0,0 +1,89 @@ +################################################################################ +# 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 gettext.mk +# \brief gettext.mk of Embtoolkit +# \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com> +# \date December 2009 +################################################################################ + +GETTEXT_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_GETTEXT_VERSION_STRING))) +GETTEXT_SITE := http://ftp.gnu.org/pub/gnu/gettext +GETTEXT_PACKAGE := gettext-$(GETTEXT_VERSION).tar.gz +GETTEXT_BUILD_DIR := $(PACKAGES_BUILD)/gettext-$(GETTEXT_VERSION) + +GETTEXT_BINS = autopoint gettext gettext.sh msgcat msgcomm msgen msgfilter \ + msggrep msgmerge msguniq recode-sr-latin envsubst gettextize \ + msgattrib msgcmp msgconv msgexec msgfmt msginit msgunfmt \ + ngettext xgettext +GETTEXT_SBINS = +GETTEXT_INCLUDES = autosprintf.h gettext-po.h libintl.h +GETTEXT_LIBS = gettext libgettext* libasprintf* libintl* +GETTEXT_PKGCONFIGS = + +gettext_install: $(GETTEXT_BUILD_DIR)/.installed + +$(GETTEXT_BUILD_DIR)/.installed: termcap_target_install download_gettext \ + $(GETTEXT_BUILD_DIR)/.decompressed $(GETTEXT_BUILD_DIR)/.configured + $(call EMBTK_GENERIC_MESSAGE,"Compiling and installing \ + gettext-$(GETTEXT_VERSION) in your root filesystem...") + $(Q)$(MAKE) -C $(GETTEXT_BUILD_DIR) $(J) + $(Q)$(MAKE) -C $(GETTEXT_BUILD_DIR) install + @touch $@ + +download_gettext: + $(call EMBTK_GENERIC_MESSAGE,"Downloading $(GETTEXT_PACKAGE) \ + if necessary...") + @test -e $(DOWNLOAD_DIR)/$(GETTEXT_PACKAGE) || \ + wget -O $(DOWNLOAD_DIR)/$(GETTEXT_PACKAGE) \ + $(GETTEXT_SITE)/$(GETTEXT_PACKAGE) + +$(GETTEXT_BUILD_DIR)/.decompressed: + $(call EMBTK_GENERIC_MESSAGE,"Decompressing $(GETTEXT_PACKAGE) ...") + @tar -C $(PACKAGES_BUILD) -xzf $(DOWNLOAD_DIR)/$(GETTEXT_PACKAGE) + @touch $@ + +$(GETTEXT_BUILD_DIR)/.configured: + $(Q)cd $(GETTEXT_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" \ + gl_cv_func_wcwidth_works=yes \ + am_cv_func_iconv_works=yes \ + gl_cv_func_wcwidth_works=yes \ + gt_cv_func_printf_posix=yes \ + gt_cv_int_divbyzero_sigfpe=yes \ + ./configure --build=$(HOST_BUILD) --host=$(STRICT_GNU_TARGET) \ + --target=$(STRICT_GNU_TARGET) \ + --prefix=$(SYSROOT)/usr --with-included-gettext --disable-rpath + @touch $@ + +gettext_clean: + $(call EMBTK_GENERIC_MESSAGE,"cleanup gettext-$(GETTEXT_VERSION)...") + $(Q)-cd $(SYSROOT)/usr/bin; rm -rf $(GETTEXT_BINS) + $(Q)-cd $(SYSROOT)/usr/sbin; rm -rf $(GETTEXT_SBINS) + $(Q)-cd $(SYSROOT)/usr/include; rm -rf $(GETTEXT_INCLUDES) + $(Q)-cd $(SYSROOT)/usr/lib; rm -rf $(GETTEXT_LIBS) + $(Q)-cd $(SYSROOT)/usr/lib/pkgconfig; rm -rf $(GETTEXT_PKGCONFIGS) +ifeq ($(CONFIG_EMBTK_64BITS_FS_COMPAT32),y) + $(Q)-cd $(SYSROOT)/usr/lib32; rm -rf $(GETTEXT_LIBS) + $(Q)-cd $(SYSROOT)/usr/lib32/pkgconfig; rm -rf $(GETTEXT_PKGCONFIGS) +endif + |