From: Florian Fainelli Date: Tue, 8 Aug 2006 09:05:12 +0000 (+0000) Subject: Port sablevm to -ng X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=5bb9c0e463340dbcbcccea1e29596bb7216f6cf0;ds=sidebyside Port sablevm to -ng SVN-Revision: 4520 --- diff --git a/lang/sablevm/Makefile b/lang/sablevm/Makefile new file mode 100644 index 0000000000..170bf95332 --- /dev/null +++ b/lang/sablevm/Makefile @@ -0,0 +1,59 @@ +# +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id$ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=sablevm +PKG_VERSION:=1.13 +PKG_RELEASE:=1 +PKG_MD5SUM:=d5828200032bfe921dd43e450931e38c + +PKG_SOURCE_URL:=http://sablevm.org/download/release/$(PKG_VERSION)/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_CAT:=zcat + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install + +include $(INCLUDE_DIR)/package.mk + +define Package/sablevm + SECTION:=lang + CATEGORY:=Languages + DEPENDS:=+libffi-sable +libltdl +libpopt +libpthread +zlib + TITLE:=A Java Virtual Machine (JVM) implementation + DESCRIPTION:=SableVM is a robust, extremely portable, efficient, and specifications-\\\ + -compliant Java virtual machine that aims to be easy to maintain and to\\\ + extend. It features a state-of-the-art and efficient interpreter engine.\\\ + Its source code is very accessible and easy to understand. It also has\\\ + many robustness features that have been the object of careful design. \\\ + URL:=http://sablevm.org/ +endef + + +define Build/Configure +$(call Build/Configure/Default,--enable-shared \ + --disable-static, LDFLAGS="-L$(STAGING_DIR)/usr/lib -lffi -lltdl -lpopt -lz") +endef + +define Build/Compile + rm -rf $(PKG_INSTALL_DIR) + mkdir -p $(PKG_INSTALL_DIR) + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all install +endef + +define Package/sablevm/install + install -m0755 -d $(1)/usr/bin + $(CP) $(PKG_INSTALL_DIR)/usr/bin/{java-,}sablevm $(1)/usr/bin/ + install -m0755 -d $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsablevm-*.so $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,sablevm)) diff --git a/lang/sablevm/patches/001-heap_size.patch b/lang/sablevm/patches/001-heap_size.patch new file mode 100644 index 0000000000..d28237296a --- /dev/null +++ b/lang/sablevm/patches/001-heap_size.patch @@ -0,0 +1,15 @@ +diff -ruN sablevm-1.11.1-orig/src/libsablevm/system.h sablevm-1.11.1-1/src/libsablevm/system.h +--- sablevm-1.11.1-orig/src/libsablevm/system.h 2005-03-18 01:25:09.000000000 +0100 ++++ sablevm-1.11.1-1/src/libsablevm/system.h 2005-03-22 01:05:19.000000000 +0100 +@@ -279,9 +279,9 @@ + + #elif defined (_SABLEVM_COPY_GC) || (_SABLEVM_GENCOPY_GC) + +-#define SVM_HEAP_DEFAULT_MIN_SIZE 16777216 ++#define SVM_HEAP_DEFAULT_MIN_SIZE 1048576 + #define SVM_HEAP_DEFAULT_MAX_SIZE 0 +-#define SVM_HEAP_DEFAULT_ALLOCATION_INCREMENT 1048576 ++#define SVM_HEAP_DEFAULT_ALLOCATION_INCREMENT 65536 + + #if defined (_SABLEVM_GENCOPY_GC) +