introduce hwids package, providing usb.ids and co
[openadk.git] / package / openjdk7 / Makefile
blob893c3c62b170e5f7383df29dfc08ef50c8bf80b1
1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 include $(ADK_TOPDIR)/rules.mk
6 PKG_NAME:= openjdk7
7 PKG_VERSION:= 2.5.3
8 PKG_RELEASE:= 1
9 PKG_HASH:= f4f2922cfec262496e935f81c1d39af66a789f69aa12d1ceee51bcca8934f1f0
10 PKG_DESCR:= java virtual machine
11 PKG_SECTION:= dev/lang
12 PKG_BUILDDEP:= openjdk7-host alsa-lib xproto libjpeg-turbo zlib giflib libpng freetype cups
13 PKG_BUILDDEP+= libX11 libXt libXp libXinerama libXrender libXtst
14 PKG_BUILDDEP+= libpng giflib gtk+ glib fontconfig nss
15 HOST_BUILDDEP:= fastjar-host gcj-host ecj-host classpath-host jamvm-host
16 HOST_BUILDDEP+= jikes-host ant-host libXtst-host libXt-host libXinerama-host
17 HOST_BUILDDEP+= cups-host qemu-host alsa-lib-host freetype-host unzip-host
18 HOST_BUILDDEP+= libxslt-host
19 PKG_DEPENDS:= zlib libstdcxx libffi libpthread libxtst libxi cups
20 PKG_DEPENDS+= libfreetype libxrender libx11 libxext libpthread nss libjpeg-turbo
21 PKG_DEPENDS+= libpng giflib libgtk glib fontconfig
22 PKG_URL:= http://openjdk.org/
23 PKG_SITES:= http://icedtea.classpath.org/download/source/
25 PKG_BUILDDEP_UCLIBC:= libiconv-tiny
26 PKG_BUILDDEP_UCLIBC_NG:=libiconv-tiny
27 DISTFILES:= icedtea-$(PKG_VERSION).tar.xz
28 WRKDIST= ${WRKDIR}/icedtea-${PKG_VERSION}
30 GCJ_VER:= 4.8.4
32 PKG_HOST_DEPENDS:= linux
33 PKG_ARCH_DEPENDS:= arm mips ppc x86 x86_64
35 PKG_CHOICES_OPENJDK7:= ZERO
36 PKGCD_ZERO:= zero-assembly backend
38 include $(ADK_TOPDIR)/mk/host.mk
39 include $(ADK_TOPDIR)/mk/package.mk
40 include $(ADK_TOPDIR)/mk/qemu.mk
42 $(eval $(call HOST_template,OPENJDK7,openjdk7,$(PKG_VERSION)-${PKG_RELEASE}))
43 $(eval $(call PKG_template,OPENJDK7,openjdk7,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
45 CONFIG_STYLE:= basic
47 # uclibc needs -liconv
48 ifeq ($(ADK_TARGET_LIB_UCLIBC)$(ADK_TARGET_LIB_UCLIBC_NG),y)
49 TARGET_LIBS:= -liconv
50 endif
51 # for UINTPTR_MAX in stdint.h
52 TARGET_CFLAGS+= -D__STDC_LIMIT_MACROS
53 # segfaults with march=pentium-m/atom
54 TARGET_CFLAGS:= $(subst march=pentium-m,march=i686,$(TARGET_CFLAGS))
55 TARGET_CFLAGS:= $(subst march=atom,march=i686,$(TARGET_CFLAGS))
56 BOOTSTRAPJDK:= ${STAGING_HOST_DIR}/bootstrap-jdk
58 JDKARCH:= $(ADK_TARGET_CPU_ARCH)
59 ifeq ($(ADK_TARGET_ARCH),x86)
60 JDKARCH:= i386
61 endif
62 ifeq ($(ADK_TARGET_CPU_ARCH),x86_64)
63 JDKARCH:= amd64
64 endif
66 ifeq ($(ADK_PACKAGE_OPENJDK7_ZERO),y)
67 CONFIGURE_BACKEND:= --enable-zero
68 endif
70 ifeq ($(ADK_PACKAGE_OPENJDK7_JAMVM),y)
71 CONFIGURE_BACKEND:= --enable-jamvm
72 endif
74 CONFIGURE_COMMON:= --disable-docs \
75 --with-jdk-home=$(BOOTSTRAPJDK) \
76 --with-java=$(BOOTSTRAPJDK)/bin/java \
77 --with-javac=$(BOOTSTRAPJDK)/bin/javac \
78 --with-javah=$(BOOTSTRAPJDK)/bin/javah \
79 --with-jar=$(BOOTSTRAPJDK)/bin/jar \
80 --with-rmic=$(BOOTSTRAPJDK)/bin/rmic \
81 --with-native2ascii=$(BOOTSTRAPJDK)/bin/native2ascii \
82 --without-gcj \
83 --without-hotspot-build \
84 --enable-nss \
85 --enable-system-zlib \
86 --enable-system-jpeg \
87 --enable-system-png \
88 --enable-system-gif \
89 --enable-system-gtk \
90 --enable-system-gio \
91 --enable-system-fontconfig \
92 --disable-system-lcms \
93 --disable-system-kerberos \
94 --disable-compile-against-syscalls \
95 --without-rhino
97 CONFIGURE_ARGS+= $(CONFIGURE_BACKEND)
98 CONFIGURE_ARGS+= $(CONFIGURE_COMMON)
99 CONFIGURE_ARGS+= --disable-bootstrap
101 CONFIGURE_ENV+= LD_LIBRARY_PATH=$(STAGING_HOST_DIR)/usr/lib
102 MAKE_ENV+= ALT_COMPILER_PATH=$(TOOLCHAIN_DIR)/usr/$(GNU_TARGET_NAME)/bin \
103 ALT_OPENWIN_HOME=$(STAGING_TARGET_DIR)/usr/ \
104 ALT_CUPS_HEADERS_PATH=$(STAGING_TARGET_DIR)/usr/include/ \
105 ALT_FREETYPE_HEADERS_PATH=$(STAGING_TARGET_DIR)/usr/include/ \
106 OTHER_CFLAGS='$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)' \
107 OTHER_CXXFLAGS='$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)' \
108 OTHER_LDFLAGS='$(TARGET_LDFLAGS)' \
109 OTHER_LDLIBS='$(TARGET_LIBS)' \
110 GCC_HONOUR_COPTS=s CROSS_COMPILE_ARCH=$(JDKARCH) QEMU=$(QEMU) \
111 LD_LIBRARY_PATH=$(STAGING_HOST_DIR)/usr/lib
113 ALL_TARGET:= icedtea
115 # host stuff
116 OPENJDK_NATIVE_ENV:= JAVACFLAGS="-cp ${STAGING_HOST_DIR}/usr/share/java/libgcj-$(GCJ_VER).jar" \
117 LD_LIBRARY_PATH=$(STAGING_HOST_DIR)/usr/lib:$(STAGING_HOST_DIR)/usr/lib64 \
118 BOOTCLASSPATH="$(STAGING_HOST_DIR)/usr/share/jamvm/classes.zip:$(STAGING_HOST_DIR)/usr/share/classpath/glibj.zip" \
119 FFI_LDFLAGS='$(HOST_LDFLAGS)' \
120 OTHER_LDFLAGS='$(HOST_LDFLAGS)' \
121 ALSA_CPPFLAGS='$(HOST_CPPFLAGS)' \
122 ALT_OPENWIN_HOME='$(STAGING_HOST_DIR)/usr' \
123 ALT_CUPS_HEADERS_PATH="$(STAGING_HOST_DIR)/usr/include" \
124 ALT_FREETYPE_HEADERS_PATH="$(STAGING_HOST_DIR)/usr/include" \
125 ALT_FREETYPE_LIB_PATH="$(STAGING_HOST_DIR)/usr/lib"
127 HOST_CONFIGURE_ENV+= $(OPENJDK_NATIVE_ENV)
128 HOST_MAKE_ENV+= $(OPENJDK_NATIVE_ENV)
129 HOST_ALL_TARGET:= icedtea-boot
130 HOST_CONFIGURE_ARGS+= --enable-bootstrap \
131 --enable-zero \
132 --with-jdk-home=$(STAGING_HOST_DIR)/usr/lib/jvm \
133 --with-java=$(STAGING_HOST_DIR)/usr/bin/hostjava \
134 --with-javac=$(STAGING_HOST_DIR)/usr/bin/ecj \
135 --with-ecj-jar=${DL_DIR}/ecj-4.9.jar \
136 --without-hotspot-build \
137 --disable-system-zlib \
138 --disable-system-jpeg \
139 --disable-system-lcms \
140 --disable-system-png \
141 --disable-system-gif \
142 --disable-system-gtk \
143 --disable-system-gio \
144 --disable-system-kerberos \
145 --disable-system-fontconfig \
146 --disable-compile-against-syscalls \
147 --without-rhino \
148 --disable-docs
150 hostpost-install:
151 -rm -rf $(STAGING_HOST_DIR)/bootstrap-jdk
152 $(CP) $(WRKBUILD)/openjdk.build-boot/j2sdk-image $(STAGING_HOST_DIR)/bootstrap-jdk
154 openjdk7-install:
155 $(INSTALL_DIR) $(IDIR_OPENJDK7)/usr/lib/jvm/jre
156 $(INSTALL_DIR) $(IDIR_OPENJDK7)/usr/bin
157 $(CP) $(WRKBUILD)/openjdk.build/j2re-image/bin $(IDIR_OPENJDK7)/usr/lib/jvm/jre
158 $(CP) $(WRKBUILD)/openjdk.build/j2re-image/lib $(IDIR_OPENJDK7)/usr/lib/jvm/jre
159 (cd $(IDIR_OPENJDK7)/usr/bin && ln -sf ../lib/jvm/jre/bin/java .)
160 (cd $(IDIR_OPENJDK7)/usr/lib/jvm/jre/lib/$(JDKARCH) && ln -sf server/libjvm.so .)
162 include ${ADK_TOPDIR}/mk/host-bottom.mk
163 include ${ADK_TOPDIR}/mk/pkg-bottom.mk