replace sablevm and sablevm-classpath with sablevm-sdk, add a sablevm-mini package containing a minimal set of classes and a working example
git-svn-id: svn://svn.openwrt.org/openwrt/packages@6995 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
4a1f9acd06
commit
01108f8d7c
@ -1,98 +0,0 @@
|
||||
#
|
||||
# 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-classpath
|
||||
PKG_VERSION:=1.13
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://sablevm.org/download/release/$(PKG_VERSION)/
|
||||
PKG_MD5SUM:=9476bb7a0ad67c6cfa353d06f094cdce
|
||||
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-classpath/Default
|
||||
SECTION:=lang
|
||||
CATEGORY:=Languages
|
||||
URL:=http://www.gnu.org/software/classpath/
|
||||
endef
|
||||
|
||||
define Package/libsablevm-classpath
|
||||
$(call Package/sablevm-classpath/Default)
|
||||
TITLE:=Essential native libraries for Java
|
||||
DESCRIPTION:=\
|
||||
GNU Classpath, Essential Libraries for Java, is a GNU project to create \\\
|
||||
free core class libraries for use with virtual machines and compilers for \\\
|
||||
the java programming language.\\\
|
||||
This is a modified version for use with SableVM.
|
||||
endef
|
||||
|
||||
define Package/sablevm-classpath-full
|
||||
$(call Package/sablevm-classpath/Default)
|
||||
DEPENDS:=+libsablevm-classpath
|
||||
TITLE+= (full)
|
||||
endef
|
||||
|
||||
define Package/sablevm-classpath-mini
|
||||
$(call Package/sablevm-classpath/Default)
|
||||
DEPENDS:=+libsablevm-classpath
|
||||
TITLE+= (minimal)
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
$(call Build/Configure/Default, \
|
||||
--disable-gtk-peer \
|
||||
--disable-gtk-cairo \
|
||||
--with-jikes \
|
||||
--without-x \
|
||||
)
|
||||
endef
|
||||
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
DESTDIR="$(PKG_INSTALL_DIR)" \
|
||||
all install
|
||||
$(CP) ./files/mini.classlist $(PKG_BUILD_DIR)/lib/
|
||||
cd $(PKG_BUILD_DIR)/lib ; fastjar -Mcf mini.jar -@ < mini.classlist
|
||||
endef
|
||||
|
||||
define Package/libsablevm-classpath/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/sablevm-classpath
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/sablevm-classpath/libjava*.so $(1)/usr/lib/sablevm-classpath/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/security
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/security/classpath.security $(1)/usr/lib/security/
|
||||
endef
|
||||
|
||||
define Package/sablevm-classpath-full/install
|
||||
$(INSTALL_DIR) $(1)/usr/share/sablevm-classpath
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/share/sablevm-classpath/{libclasspath,resources}.jar \
|
||||
$(1)/usr/share/sablevm-classpath/
|
||||
endef
|
||||
|
||||
define Package/sablevm-classpath-mini/install
|
||||
$(INSTALL_DIR) $(1)/usr/share/sablevm-classpath
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/mini.jar \
|
||||
$(1)/usr/share/sablevm-classpath/libclasspath.jar
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libsablevm-classpath))
|
||||
$(eval $(call BuildPackage,sablevm-classpath-full))
|
||||
$(eval $(call BuildPackage,sablevm-classpath-mini))
|
||||
|
||||
$(foreach command, jikes fastjar, \
|
||||
$(eval $(call RequireCommand,$(command), \
|
||||
$(PKG_NAME) requires $(command). \
|
||||
)) \
|
||||
)
|
126
lang/sablevm-sdk/Makefile
Normal file
126
lang/sablevm-sdk/Makefile
Normal file
@ -0,0 +1,126 @@
|
||||
#
|
||||
# Copyright (C) 2006,2007 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-sdk
|
||||
PKG_VERSION:=1.13
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@SF/sablevm
|
||||
PKG_MD5SUM:=18a7c1a92b0748a206f9767a76a6b3bb
|
||||
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:=+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 Package/sablevm-mini
|
||||
$(call Package/sablevm)
|
||||
TITLE+= (minimal)
|
||||
DESCRIPTION+=\\\
|
||||
This package contains only the minimal set of Java classes needed to \\\
|
||||
run a simple "HelloWorld" program (included in this package).
|
||||
endef
|
||||
|
||||
|
||||
define Build/Configure
|
||||
$(call Build/Configure/Default, \
|
||||
--disable-cp-tools \
|
||||
--disable-gjdoc \
|
||||
)
|
||||
$(call Build/Configure/Default, \
|
||||
--srcdir=./../sablevm \
|
||||
--with-fastjar=/usr/bin/fastjar \
|
||||
--with-jikes=/usr/bin/jikes \
|
||||
--with-internal-libffi=yes \
|
||||
--with-internal-libpopt=no \
|
||||
, \
|
||||
LIBS=" -lltdl -lpopt -lz " \
|
||||
,
|
||||
sablevm \
|
||||
)
|
||||
$(call Build/Configure/Default, \
|
||||
--srcdir=./../sablevm-classpath \
|
||||
--with-fastjar=/usr/bin/fastjar \
|
||||
--with-jikes=/usr/bin/jikes \
|
||||
--disable-gtk-peer \
|
||||
--disable-gtk-cairo \
|
||||
--without-x \
|
||||
, \
|
||||
, \
|
||||
sablevm-classpath \
|
||||
)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
EARLY_CONFIGURE= \
|
||||
EXTRA_CONFIGURE= \
|
||||
DESTDIR="$(PKG_INSTALL_DIR)" \
|
||||
all install
|
||||
$(CP) ./files/mini.classlist $(PKG_BUILD_DIR)/sablevm-classpath/lib/
|
||||
( cd $(PKG_BUILD_DIR)/sablevm-classpath/lib; \
|
||||
fastjar -Mcf mini.jar -@ < mini.classlist; \
|
||||
)
|
||||
mkdir -p $(PKG_INSTALL_DIR)/usr/share/sablevm/examples
|
||||
$(CP) ./files/*.java $(PKG_INSTALL_DIR)/usr/share/sablevm/examples/
|
||||
( cd $(PKG_INSTALL_DIR)/usr/share/sablevm/examples; \
|
||||
jikes -bootclasspath "../../sablevm-classpath:../../sablevm-classpath/libclasspath.jar:../../sablevm-classpath/resources.jar" *.java; \
|
||||
)
|
||||
endef
|
||||
|
||||
define Package/sablevm/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/{java-,}sablevm $(1)/usr/bin/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsablevm-*.so $(1)/usr/lib/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/sablevm-classpath
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/sablevm-classpath/libjava*.so $(1)/usr/lib/sablevm-classpath/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/security
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/security/classpath.security $(1)/usr/lib/security/
|
||||
$(INSTALL_DIR) $(1)/usr/share/sablevm-classpath
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/share/sablevm-classpath/{libclasspath,resources}.jar \
|
||||
$(1)/usr/share/sablevm-classpath/
|
||||
endef
|
||||
|
||||
define Package/sablevm-mini/install
|
||||
$(call Package/sablevm/install,$(1))
|
||||
rm -f $(1)/usr/lib/security/classpath.security
|
||||
rm -f $(1)/usr/share/sablevm-classpath/resources.jar
|
||||
$(CP) $(PKG_BUILD_DIR)/sablevm-classpath/lib/mini.jar \
|
||||
$(1)/usr/share/sablevm-classpath/libclasspath.jar
|
||||
$(INSTALL_DIR) $(1)/usr/share/sablevm/examples
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/share/sablevm/examples/* \
|
||||
$(1)/usr/share/sablevm/examples/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,sablevm))
|
||||
$(eval $(call BuildPackage,sablevm-mini))
|
||||
|
||||
$(foreach command, jikes fastjar, \
|
||||
$(eval $(call RequireCommand,$(command), \
|
||||
$(PKG_NAME) requires $(command). \
|
||||
)) \
|
||||
)
|
8
lang/sablevm-sdk/files/HelloWorld.java
Normal file
8
lang/sablevm-sdk/files/HelloWorld.java
Normal file
@ -0,0 +1,8 @@
|
||||
class HelloWorld
|
||||
{
|
||||
public static void main(String args[])
|
||||
{
|
||||
System.out.println("Hello World!");
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
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
|
||||
diff -ruN sablevm-sdk-1.13-old/sablevm/src/libsablevm/system.h sablevm-sdk-1.13-new/sablevm/src/libsablevm/system.h
|
||||
--- sablevm-sdk-1.13-old/sablevm/src/libsablevm/system.h 2007-03-30 03:57:54.000000000 +0200
|
||||
+++ sablevm-sdk-1.13-new/sablevm/src/libsablevm/system.h 2007-04-11 02:25:06.000000000 +0200
|
||||
@@ -279,9 +279,9 @@
|
||||
|
||||
#elif defined (_SABLEVM_COPY_GC) || (_SABLEVM_GENCOPY_GC)
|
@ -1,60 +0,0 @@
|
||||
#
|
||||
# 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_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://sablevm.org/download/release/$(PKG_VERSION)/
|
||||
PKG_MD5SUM:=d5828200032bfe921dd43e450931e38c
|
||||
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, \
|
||||
, \
|
||||
LIBS="-lffi -lltdl -lpopt -lz" \
|
||||
)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
DESTDIR="$(PKG_INSTALL_DIR)" \
|
||||
all install
|
||||
endef
|
||||
|
||||
define Package/sablevm/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/{java-,}sablevm $(1)/usr/bin/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsablevm-*.so $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,sablevm))
|
Loading…
x
Reference in New Issue
Block a user