From 4ed2da9e1d7ef4f4d95c1ead0220315349db81e2 Mon Sep 17 00:00:00 2001 From: Abdoulaye Walsimou Gaye Date: Sun, 6 Dec 2009 12:24:58 +0100 Subject: Packages new: add build of microperl Signed-off-by: Abdoulaye Walsimou Gaye --- kconfig/packages.kconfig | 4 ++ mk/packages.mk | 6 +++ packages/scripting-languages/perl/perl.kconfig | 53 ++++++++++++++++++++ packages/scripting-languages/perl/perl.mk | 67 ++++++++++++++++++++++++++ 4 files changed, 130 insertions(+) create mode 100644 packages/scripting-languages/perl/perl.kconfig create mode 100644 packages/scripting-languages/perl/perl.mk diff --git a/kconfig/packages.kconfig b/kconfig/packages.kconfig index 5ff58e6..c6525c8 100644 --- a/kconfig/packages.kconfig +++ b/kconfig/packages.kconfig @@ -71,6 +71,10 @@ endmenu menu "Networking packages" endmenu +menu "Scripting languages" +source packages/scripting-languages/perl/perl.kconfig +endmenu + menu "System packages" endmenu diff --git a/mk/packages.mk b/mk/packages.mk index b1c976c..0498158 100644 --- a/mk/packages.mk +++ b/mk/packages.mk @@ -93,6 +93,12 @@ ROOTFS_COMPONENTS += libpng_install endif ########################## Networking packages ################################# +############################ Scripting languages ############################### + +ifeq ($(CONFIG_EMBTK_HAVE_MICROPERL),y) +include $(EMBTK_ROOT)/packages/scripting-languages/perl/perl.mk +ROOTFS_COMPONENTS += microperl_install +endif ############################ System packages ################################### ########################## Miscellaneous packages ############################## diff --git a/packages/scripting-languages/perl/perl.kconfig b/packages/scripting-languages/perl/perl.kconfig new file mode 100644 index 0000000..af2715d --- /dev/null +++ b/packages/scripting-languages/perl/perl.kconfig @@ -0,0 +1,53 @@ +################################################################################ +# GAYE Abdoulaye Walsimou, +# 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 perl.kconfig +# \brief perl.kconfig of Embtoolkit +# \author GAYE Abdoulaye Walsimou, +# \date December 2009 +################################################################################ + +config EMBTK_HAVE_MICROPERL + bool "Have microperl" + select OPTION_EGLIBC_LIBM if EMBTK_CLIB_EGLIBC + select KEMBTK_UCLIBC_UCLIBC_HAS_FLOATS if EMBTK_CLIB_UCLIBC + help + microperl is supposed to be a really minimal perl, on the other hand + this means that interfaces between Perl and your operating system are + left very minimal. + +choice + prompt "microperl version you wish" + depends on EMBTK_HAVE_MICROPERL + help + Here you can choose which version of libpng you want to use. + + config EMBTK_MICROPERL_VERSION_5_10_1 + bool "microperl-5.10.1" + select EMBTK_PERL_NEED_PATCH + help + microperl based on perl-5.10.1 +endchoice + +config EMBTK_PERL_VERSION_STRING + string + default "5.10.1" if EMBTK_MICROPERL_VERSION_5_10_1 + +config EMBTK_PERL_NEED_PATCH + bool + diff --git a/packages/scripting-languages/perl/perl.mk b/packages/scripting-languages/perl/perl.mk new file mode 100644 index 0000000..b89b6e5 --- /dev/null +++ b/packages/scripting-languages/perl/perl.mk @@ -0,0 +1,67 @@ +################################################################################ +# GAYE Abdoulaye Walsimou, +# 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 perl.mk +# \brief perl.mk of Embtoolkit +# \author GAYE Abdoulaye Walsimou, +# \date December 2009 +################################################################################ + +PERL_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_PERL_VERSION_STRING))) +PERL_SITE := http://www.cpan.org/src +PERL_PATCH_SITE := ftp://ftp.embtoolkit.org/embtoolkit.org/perl +PERL_PACKAGE := perl-$(PERL_VERSION).tar.gz +PERL_BUILD_DIR := $(PACKAGES_BUILD)/perl-$(PERL_VERSION) +MICROPERL_BUILD_DIR := $(PACKAGES_BUILD)/perl-$(PERL_VERSION)-micro + +microperl_install: $(MICROPERL_BUILD_DIR)/.installed + +$(MICROPERL_BUILD_DIR)/.installed: download_perl \ + $(PERL_BUILD_DIR)/.decompressed + $(call EMBTK_GENERIC_MESSAGE,"Compiling and installing \ + microperl-$(PERL_VERSION) in your root filesystem...") + $(Q)$(MAKE) -C $(MICROPERL_BUILD_DIR) -f Makefile.micro \ + OPTIMIZE="$(TARGET_CFLAGS)" CC=$(TARGETCC_CACHED) + $(Q)cp $(MICROPERL_BUILD_DIR)/microperl $(ROOTFS)/usr/bin + $(Q)cd $(ROOTFS)/usr/bin; \ + ln -s microperl perl + @touch $@ + +download_perl: + $(call EMBTK_GENERIC_MESSAGE,"Downloading $(PERL_PACKAGE) \ + if necessary...") + @test -e $(DOWNLOAD_DIR)/$(PERL_PACKAGE) || \ + wget -O $(DOWNLOAD_DIR)/$(PERL_PACKAGE) \ + $(PERL_SITE)/$(PERL_PACKAGE) +ifeq ($(CONFIG_EMBTK_PERL_NEED_PATCH),y) + wget $(PERL_PATCH_SITE)/perl-$(PERL_VERSION)-*.patch \ + -O $(DOWNLOAD_DIR)/perl-$(PERL_VERSION).patch +endif + +$(PERL_BUILD_DIR)/.decompressed: + $(call EMBTK_GENERIC_MESSAGE,"Decompressing $(PERL_PACKAGE) ...") + @tar -C $(PACKAGES_BUILD) -xzvf $(DOWNLOAD_DIR)/$(PERL_PACKAGE) +ifeq ($(CONFIG_EMBTK_PERL_NEED_PATCH),y) + @cd $(PERL_BUILD_DIR); \ + patch -p1 < $(DOWNLOAD_DIR)/perl-$(PERL_VERSION).patch +endif +ifeq ($(CONFIG_EMBTK_HAVE_MICROPERL),y) + @cp -R $(PERL_BUILD_DIR) $(MICROPERL_BUILD_DIR) +endif + @touch $@ + -- cgit v1.2.3