jamvm: Add host build
authorRosen Penev <rosenp@gmail.com>
Sun, 11 Aug 2019 20:58:21 +0000 (13:58 -0700)
committerRosen Penev <rosenp@gmail.com>
Sat, 25 Jan 2020 06:01:47 +0000 (22:01 -0800)
Needed for classpath. GCJ is also needed but that can be dealt with
separately.

Fix compilation with musl by defining _GNU_SOURCE. What's funny here is
that if __USE_GNU gets replaced, the host build fails. The man page says
_GNU_SOURCE for pthread_getattr_np but glibc violates that statement.

Removed classpath dependency. classpaths must select jamvm, not the other
way around.

Removed target whitelist. Switched to blacklist.

Fixed License information.

Various other cleanups.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry-picked from 2972cc98ebfb512d394ffe406410961545821936 and synced
from master)

lang/jamvm/Makefile
lang/jamvm/patches/010-musl.patch [new file with mode: 0644]

index 53f23f685dbdd870c75862295d06e1fa05814b65..0db18b385b364022356024d9a418e38fa841bc88 100644 (file)
@@ -9,28 +9,30 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=jamvm
 PKG_VERSION:=2.0.0
-PKG_RELEASE:=2
-PKG_LICENSE:=GPL-2.0+
-PKG_MAINTAINER:=Dana H. Myers <k6jq@comcast.net>
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
-PKG_MD5SUM:=a6e3321ef4b3cfb4afc20bd75452e11e
+PKG_HASH:=76428e96df0ae9dd964c7a7c74c1e9a837e2f312c39e9a357fa8178f7eff80da
 
-PKG_USE_MIPS16:=0
+PKG_MAINTAINER:=Dana H. Myers <k6jq@comcast.net>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
 
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
+PKG_USE_MIPS16:=0
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
 
 define Package/jamvm
   SUBMENU:=Java
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=A compact Java Virtual Machine
-  URL:=http://sourceforge.net/projects/jamvm
-  DEPENDS:=+zlib +libpthread +librt +classpath @!avr32
+  URL:=http://jamvm.sourceforge.net/
+  DEPENDS:=+zlib +libpthread +librt +CONFIG_powerpc64:libffi @!arc @!aarch64
 endef
 
 define Package/jamvm/description
@@ -65,3 +67,4 @@ define Build/InstallDev
 endef
 
 $(eval $(call BuildPackage,jamvm))
+$(eval $(call HostBuild))
diff --git a/lang/jamvm/patches/010-musl.patch b/lang/jamvm/patches/010-musl.patch
new file mode 100644 (file)
index 0000000..337012f
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/src/os/linux/os.c
++++ b/src/os/linux/os.c
+@@ -26,6 +26,9 @@
+ #include <sys/sysinfo.h>
+ #define __USE_GNU
++#ifndef _GNU_SOURCE
++#define _GNU_SOURCE
++#endif
+ #include <dlfcn.h>
+ #include <pthread.h>