Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] moarvm: new package
Date: Thu, 04 Jun 2015 01:06:00 +0200	[thread overview]
Message-ID: <556F8858.7060603@mind.be> (raw)
In-Reply-To: <1433351630-22941-1-git-send-email-francois.perrad@gadz.org>

On 06/03/15 19:13, Francois Perrad wrote:
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
>  package/Config.in        |  1 +
>  package/moarvm/Config.in | 10 ++++++++
>  package/moarvm/moarvm.mk | 66 ++++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 77 insertions(+)
>  create mode 100644 package/moarvm/Config.in
>  create mode 100644 package/moarvm/moarvm.mk
> 
> diff --git a/package/Config.in b/package/Config.in
> index e0c2e2a..00c9ce3 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -499,6 +499,7 @@ menu "Lua libraries/modules"
>  	source "package/xavante/Config.in"
>  endmenu
>  endif
> +	source "package/moarvm/Config.in"
>  	source "package/mono/Config.in"
>  	source "package/nodejs/Config.in"
>  	source "package/perl/Config.in"
> diff --git a/package/moarvm/Config.in b/package/moarvm/Config.in
> new file mode 100644
> index 0000000..d4c9bbd
> --- /dev/null
> +++ b/package/moarvm/Config.in
> @@ -0,0 +1,10 @@
> +config BR2_PACKAGE_MOARVM
> +	bool "moarvm"
> +	depends on BR2_PACKAGE_LIBATOMIC_ARCH_SUPPORTS

 This seems to use libuv, and our libuv depends on threads, MMU, and !STATIC...

> +	help
> +	  MoarVM (short for Metamodel On A Runtime Virtual Machine) is
> +	  a runtime built for the 6model object system. It is primarily aimed
> +	  at running NQP and Rakudo Perl 6, but should be able to serve as
> +	  a backend for any compilers built using the NQP compiler toolchain.
> +
> +	  http://github.com/MoarVM/MoarVM

 Isn't it better to refer to http://moarvm.com instead?

> diff --git a/package/moarvm/moarvm.mk b/package/moarvm/moarvm.mk
> new file mode 100644
> index 0000000..08f30d7
> --- /dev/null
> +++ b/package/moarvm/moarvm.mk
> @@ -0,0 +1,66 @@
> +################################################################################
> +#
> +# moarvm
> +#
> +################################################################################
> +
> +MOARVM_VERSION = 2015.05
> +MOARVM_SITE = $(call github,MoarVM,MoarVM,$(NQP_VERSION))

 If we use http://moarvm.com/releases/MoarVM-2015.05.tar.gz instead, there is no
need for all the extra downloads.

 Otherwise, you also have to set MOARVM_SOURCE = 2015.05.tar.gz it seems. github
is weird.


> +MOARVM_LICENSE = Artistic-2.0
> +MOARVM_LICENSE_FILES = Artistic2.txt
> +MOARVM_INSTALL_STAGING = YES
> +
> +# the tarball does not contain the git submodules
> +MOARVM_DYNASM_VERSION=12ace5e3a50238f69a3616e65b3e9ca188c41ac5
> +MOARVM_DYNASM_SITE = $(call github,MoarVM,dynasm,$(MOARVM_DYNASM_VERSION))
> +MOARVM_DYNASM_SOURCE = moarvm-dynasm-$(MOARVM_DYNASM_VERSION).tar.gz
> +MOARVM_DYNCALL_VERSION=1dabd7c2fd438920502c85eaf9ca4212d722c4b5
> +MOARVM_DYNCALL_SITE = $(call github,MoarVM,dyncall,$(MOARVM_DYNCALL_VERSION))
> +MOARVM_DYNCALL_SOURCE = moarvm-dyncall-$(MOARVM_DYNCALL_VERSION).tar.gz
> +MOARVM_LIBUV_VERSION=52ae456b0d666f6f4dbb7f52675f4f131855bd22
> +MOARVM_LIBUV_SITE = $(call github,joyent,libuv,$(MOARVM_LIBUV_VERSION))
> +MOARVM_LIBUV_SOURCE = moarvm-libuv-$(MOARVM_LIBUV_VERSION).tar.gz
> +MOARVM_EXTRA_DOWNLOADS = \
> +$(MOARVM_DYNASM_SITE)/$(MOARVM_DYNASM_SOURCE) \
> +$(MOARVM_DYNCALL_SITE)/$(MOARVM_DYNCALL_SOURCE) \
> +$(MOARVM_LIBUV_SITE)/$(MOARVM_LIBUV_SOURCE)
> +
> +define MOARVM_SUBMODULES_EXTRACT
> +	$(call suitable-extractor,$(MOARVM_DYNASM_SOURCE)) $(DL_DIR)/$(MOARVM_DYNASM_SOURCE) | \
> +	$(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D)/3rdparty/dynasm $(TAR_OPTIONS) -
> +	$(call suitable-extractor,$(MOARVM_DYNCALL_SOURCE)) $(DL_DIR)/$(MOARVM_DYNCALL_SOURCE) | \
> +	$(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D)/3rdparty/dyncall $(TAR_OPTIONS) -
> +	$(call suitable-extractor,$(MOARVM_LIBUV_SOURCE)) $(DL_DIR)/$(MOARVM_LIBUV_SOURCE) | \
> +	$(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D)/3rdparty/libuv $(TAR_OPTIONS) -

 Can't we use buildroot's libuv? Same for libatomic_ops? I think yes, by passing
--has-libatomic_ops --has-libuv.

> +endef
> +MOARVM_POST_EXTRACT_HOOKS += MOARVM_SUBMODULES_EXTRACT
> +
> +MOARVM_CONF_OPTS = \
> +--build=$(GNU_HOST_NAME) \

 Continuation lines should be indented with a tab.

> +--host=$(GNU_TARGET_NAME) \
> +--ar=$(TARGET_AR) \
> +--cc=$(TARGET_CC) \

 Quotes needed for ccache

> +--ld=$(TARGET_CC) \

 Same here

> +--prefix=/usr

 Shouldn't --debug/--no-debug be set as well? And probably --static for static
builds.

 Regards,
 Arnout

> +
> +ifeq ($(BR2_ENDIAN),"BIG")
> +MOARVM_CONF_OPTS += --big-endian
> +endif
> +
> +define MOARVM_CONFIGURE_CMDS
> +	(cd $(@D); perl Configure.pl $(MOARVM_CONF_OPTS))
> +endef
> +
> +define MOARVM_BUILD_CMDS
> +	$(MAKE) -C $(@D)
> +endef
> +
> +define MOARVM_INSTALL_STAGING_CMDS
> +	$(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install
> +endef
> +
> +define MOARVM_INSTALL_TARGET_CMDS
> +	$(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
> +endef
> +
> +$(eval $(generic-package))
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

  reply	other threads:[~2015-06-03 23:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-03 17:13 [Buildroot] [PATCH] moarvm: new package Francois Perrad
2015-06-03 23:06 ` Arnout Vandecappelle [this message]
2015-06-04 19:56   ` François Perrad

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=556F8858.7060603@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox