summaryrefslogtreecommitdiff
path: root/package/ecj/Makefile
blob: a7b21b411addc32e36178b2a7dee542528f69996 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.

include $(ADK_TOPDIR)/rules.mk

PKG_NAME:=		ecj
PKG_VERSION:=		4.9
PKG_RELEASE:=		1
PKG_MD5SUM:=		7339f199ba11c941890031fd9981d7be
PKG_DESCR:=		ecj java compiler
PKG_SECTION:=		dev/lang
PKG_SITES:=		ftp://sourceware.org/pub/java/

PKG_CFLINE_ECJ:=	depends on ADK_HOST_ONLY
DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.jar

include $(ADK_TOPDIR)/mk/host.mk
include $(ADK_TOPDIR)/mk/package.mk

$(eval $(call HOST_template,ECJ,ecj,$(PKG_VERSION)-${PKG_RELEASE}))

HOST_STYLE:=		manual

ecj-hostinstall:
	env LD_LIBRARY_PATH=$(STAGING_HOST_DIR)/usr/lib:$(STAGING_HOST_DIR)/usr/lib64 \
	$(STAGING_HOST_DIR)/usr/bin/gcj -lgcj -O2 -findirect-dispatch \
		-o ${STAGING_HOST_DIR}/usr/bin/ecj.native \
		--main=org.eclipse.jdt.internal.compiler.batch.Main \
		$(DL_DIR)/${PKG_NAME}-${PKG_VERSION}.jar
	echo "env LD_LIBRARY_PATH=$(STAGING_HOST_DIR)/usr/lib:$(STAGING_HOST_DIR)/usr/lib64 ${STAGING_HOST_DIR}/usr/bin/ecj.native \$$@" > \
		${STAGING_HOST_DIR}/usr/bin/ecj
	chmod u+x ${STAGING_HOST_DIR}/usr/bin/ecj
	# put a wrapper for java here
	mv ${STAGING_HOST_DIR}/usr/bin/gij ${STAGING_HOST_DIR}/usr/bin/gij.native
	echo "env LD_LIBRARY_PATH=$(STAGING_HOST_DIR)/usr/lib:$(STAGING_HOST_DIR)/usr/lib64 ${STAGING_HOST_DIR}/usr/bin/gij.native \"\$$@\"" > \
		${STAGING_HOST_DIR}/usr/bin/hostjava
	chmod u+x ${STAGING_HOST_DIR}/usr/bin/hostjava
	echo "env LD_LIBRARY_PATH=$(STAGING_HOST_DIR)/usr/lib:$(STAGING_HOST_DIR)/usr/lib64 ${STAGING_HOST_DIR}/usr/bin/gij.native \"\$$@\"" > \
		${STAGING_HOST_DIR}/usr/bin/gij
	chmod u+x ${STAGING_HOST_DIR}/usr/bin/gij

include ${ADK_TOPDIR}/mk/host-bottom.mk
include ${ADK_TOPDIR}/mk/pkg-bottom.mk