source: packages/lang/sablevm-sdk/Makefile @ 23358

Last change on this file since 23358 was 23358, checked in by mb, 6 years ago

sablevm-sdk: Do not hardcode host paths.

  • Property copyright set to Copyright (C) 2006 OpenWrt.org
  • Property licence set to GPLv2
  • Property svn:eol-style set to native
File size: 4.0 KB
Line 
1#
2# Copyright (C) 2006-2009 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=sablevm-sdk
11PKG_VERSION:=1.13
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=@SF/sablevm
16PKG_MD5SUM:=18a7c1a92b0748a206f9767a76a6b3bb
17
18include $(INCLUDE_DIR)/package.mk
19
20define Package/sablevm/Default
21  SUBMENU:=Java
22  SECTION:=lang
23  CATEGORY:=Languages
24  TITLE:=A Java Virtual Machine (JVM) implementation
25  URL:=http://sablevm.org/
26  DEPENDS:=+libltdl +libpopt +libpthread +zlib @!TARGET_avr32
27endef
28
29define Package/sablevm/Default/description
30 SableVM is a robust, extremely portable, efficient, and specifications-
31 -compliant Java virtual machine that aims to be easy to maintain and to
32 extend. It features a state-of-the-art and efficient interpreter engine.
33 Its source code is very accessible and easy to understand. It also has
34 many robustness features that have been the object of careful design.
35endef
36
37define Package/sablevm
38$(call Package/sablevm/Default)
39  TITLE+= (full)
40endef
41
42define Package/sablevm/description
43$(call Package/sablevm/Default/description)
44 .
45 This package contains the full set of Java classes.
46endef
47
48define Package/sablevm-mini
49$(call Package/sablevm/Default)
50  TITLE+= (minimal)
51endef
52
53define Package/sablevm-mini/description
54$(call Package/sablevm/Default/description)
55 .
56 This package contains only the minimal set of Java classes needed to
57 run a simple "HelloWorld" program (included in this package).
58endef
59
60define Build/Configure
61        $(call Build/Configure/Default, \
62                --disable-cp-tools \
63                --disable-gjdoc \
64        )
65        $(call Build/Configure/Default, \
66                --srcdir="./../sablevm" \
67                --with-fastjar=$$$$(which fastjar) \
68                --with-jikes=$$$$(which jikes) \
69                --with-internal-libffi=yes \
70                --with-internal-libpopt=no \
71                ,\
72                LIBS=" -lltdl -lpopt -lz " \
73                ,sablevm,\
74        )
75        $(call Build/Configure/Default, \
76                --srcdir=./../sablevm-classpath \
77                --with-fastjar=$$$$(which fastjar) \
78                --with-jikes=$$$$(which jikes) \
79                --disable-gtk-peer \
80                --disable-gtk-cairo \
81                --without-x \
82                ,\
83                ,sablevm-classpath,\
84        )
85endef
86
87define Build/Compile
88        $(MAKE) -C $(PKG_BUILD_DIR) \
89                EARLY_CONFIGURE= \
90                EXTRA_CONFIGURE= \
91                DESTDIR="$(PKG_INSTALL_DIR)" \
92                all install
93        $(CP) ./files/mini.classlist $(PKG_BUILD_DIR)/sablevm-classpath/lib/
94        ( cd $(PKG_BUILD_DIR)/sablevm-classpath/lib; \
95                fastjar -Mcf mini.jar -@ < mini.classlist; \
96        )
97        mkdir -p $(PKG_INSTALL_DIR)/usr/share/sablevm/examples
98        $(CP) ./files/*.java $(PKG_INSTALL_DIR)/usr/share/sablevm/examples/
99        ( cd $(PKG_INSTALL_DIR)/usr/share/sablevm/examples; \
100                jikes -bootclasspath "../../sablevm-classpath:../../sablevm-classpath/libclasspath.jar:../../sablevm-classpath/resources.jar" *.java; \
101        )
102endef
103
104define Package/sablevm/install
105        $(INSTALL_DIR) $(1)/usr/bin
106        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{java-,}sablevm $(1)/usr/bin/
107        $(INSTALL_DIR) $(1)/usr/lib
108        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsablevm-*.so $(1)/usr/lib/
109        $(INSTALL_DIR) $(1)/usr/lib/sablevm-classpath
110        $(CP) $(PKG_INSTALL_DIR)/usr/lib/sablevm-classpath/libjava*.so $(1)/usr/lib/sablevm-classpath/
111        $(INSTALL_DIR) $(1)/usr/lib/security
112        $(CP) $(PKG_INSTALL_DIR)/usr/lib/security/classpath.security $(1)/usr/lib/security/
113        $(INSTALL_DIR) $(1)/usr/share/sablevm-classpath
114        $(CP) $(PKG_INSTALL_DIR)/usr/share/sablevm-classpath/{libclasspath,resources}.jar \
115                $(1)/usr/share/sablevm-classpath/
116endef
117
118define Package/sablevm-mini/install
119  $(call Package/sablevm/install,$(1))
120        rm -f $(1)/usr/lib/security/classpath.security
121        rm -f $(1)/usr/share/sablevm-classpath/resources.jar
122        $(CP) $(PKG_BUILD_DIR)/sablevm-classpath/lib/mini.jar \
123                $(1)/usr/share/sablevm-classpath/libclasspath.jar
124        $(INSTALL_DIR) $(1)/usr/share/sablevm/examples
125        $(CP) $(PKG_INSTALL_DIR)/usr/share/sablevm/examples/* \
126                $(1)/usr/share/sablevm/examples/
127endef
128
129$(foreach command, jikes fastjar, \
130  $(eval $(call RequireCommand,$(command), \
131   $(PKG_NAME) requires $(command). \
132  )) \
133)
134
135$(eval $(call BuildPackage,sablevm))
136$(eval $(call BuildPackage,sablevm-mini))
137
Note: See TracBrowser for help on using the repository browser.