remove -fhonour-copts usage
[openadk.git] / package / openjdk7 / Makefile
blobd757ba965be0c7643130cfef67fdd7490c5ca213
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.6.9
8 PKG_RELEASE:= 1
9 PKG_HASH:= 8e4f3eb8d41ef66f1797825343141046973c124b18bf7d4698fae0a9a25495ea
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 libgtk2 glib fontconfig nss gconf ncurses
15 HOST_BUILDDEP:= fastjar-host gcj-host ecj-host unzip-host ant-host libXcomposite-host
16 HOST_BUILDDEP+= libXtst-host libXt-host libXinerama-host libXrender-host
17 HOST_BUILDDEP+= cups-host qemu-host alsa-lib-host freetype-host libxslt-host
18 PKG_DEPENDS:= zlib libffi libxtst libxi cups gconf
19 PKG_DEPENDS+= libfreetype libxrender libx11 libxext nss libjpeg-turbo
20 PKG_DEPENDS+= libpng giflib libgtk2 glib fontconfig libncurses
21 PKG_NEEDS:= threads c++
22 PKG_URL:= http://openjdk.org/
23 PKG_SITES:= http://icedtea.classpath.org/download/source/
25 DISTFILES:= icedtea-$(PKG_VERSION).tar.xz
26 WRKDIST= ${WRKDIR}/icedtea-${PKG_VERSION}
28 GCJ_VER:= 5.4.0
30 PKG_HOST_DEPENDS:= linux
31 PKG_ARCH_DEPENDS:= arm mips ppc x86 x86_64
33 include $(ADK_TOPDIR)/mk/host.mk
34 include $(ADK_TOPDIR)/mk/package.mk
35 include $(ADK_TOPDIR)/mk/qemu.mk
37 $(eval $(call HOST_template,OPENJDK7,openjdk7,$(PKG_VERSION)-${PKG_RELEASE}))
38 $(eval $(call PKG_template,OPENJDK7,openjdk7,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
40 CONFIG_STYLE:= basic
42 # uclibc with iconv-tiny/libiconv needs -liconv
43 ifeq ($(ADK_TARGET_LIBC_ICONV),)
44 ifeq ($(ADK_TARGET_LIB_UCLIBC_NG),y)
45 TARGET_LIBS:= -liconv -lm
46 endif
47 endif
49 # for UINTPTR_MAX in stdint.h
50 TARGET_CFLAGS+= -D__STDC_LIMIT_MACROS
51 # segfaults with march=pentium-m/atom
52 TARGET_CFLAGS:= $(subst march=pentium-m,march=i686,$(TARGET_CFLAGS))
53 TARGET_CFLAGS:= $(subst march=atom,march=i686,$(TARGET_CFLAGS))
55 BOOTSTRAPJDK:= ${STAGING_HOST_DIR}/bootstrap-jdk
57 JDKARCH:= $(ADK_TARGET_CPU_ARCH)
58 ifeq ($(ADK_TARGET_ARCH),x86)
59 JDKARCH:= i386
60 endif
61 ifeq ($(ADK_TARGET_CPU_ARCH),x86_64)
62 JDKARCH:= amd64
63 endif
65 CONFIGURE_ARGS:= --enable-zero \
66 --disable-docs \
67 --with-jdk-home=$(BOOTSTRAPJDK) \
68 --with-java=$(BOOTSTRAPJDK)/bin/java \
69 --with-javac=$(BOOTSTRAPJDK)/bin/javac \
70 --with-javah=$(BOOTSTRAPJDK)/bin/javah \
71 --with-jar=$(BOOTSTRAPJDK)/bin/jar \
72 --with-rmic=$(BOOTSTRAPJDK)/bin/rmic \
73 --with-native2ascii=$(BOOTSTRAPJDK)/bin/native2ascii \
74 --without-gcj \
75 --without-hotspot-build \
76 --enable-nss \
77 --enable-system-zlib \
78 --enable-system-jpeg \
79 --enable-system-png \
80 --enable-system-gif \
81 --enable-system-gtk \
82 --enable-system-gio \
83 --enable-system-fontconfig \
84 --enable-system-gconf \
85 --disable-system-sctp \
86 --disable-system-pcsc \
87 --disable-system-lcms \
88 --disable-system-kerberos \
89 --disable-compile-against-syscalls \
90 --without-rhino \
91 --disable-bootstrap
93 CONFIGURE_ENV+= LD_LIBRARY_PATH=$(STAGING_HOST_DIR)/usr/lib
94 MAKE_ENV+= ALT_COMPILER_PATH=$(TOOLCHAIN_DIR)/usr/$(GNU_TARGET_NAME)/bin \
95 ALT_OPENWIN_HOME=$(STAGING_TARGET_DIR)/usr/ \
96 ALT_CUPS_HEADERS_PATH=$(STAGING_TARGET_DIR)/usr/include/ \
97 ALT_FREETYPE_HEADERS_PATH=$(STAGING_TARGET_DIR)/usr/include/ \
98 OTHER_CFLAGS='$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)' \
99 OTHER_CXXFLAGS='$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS)' \
100 OTHER_LDFLAGS='$(TARGET_LDFLAGS)' \
101 OTHER_LDLIBS='$(TARGET_LIBS)' \
102 NO_DOCS=true \
103 CROSS_COMPILE_ARCH=$(JDKARCH) QEMU=$(QEMU) \
104 LD_LIBRARY_PATH=$(STAGING_HOST_DIR)/usr/lib
106 ALL_TARGET:= icedtea
108 # host stuff
109 OPENJDK_NATIVE_ENV:= JAVACFLAGS="-cp ${STAGING_HOST_DIR}/usr/share/java/libgcj-$(GCJ_VER).jar" \
110 NO_DOCS=true \
111 LD_LIBRARY_PATH=$(STAGING_HOST_DIR)/usr/lib:$(STAGING_HOST_DIR)/usr/lib64 \
112 BOOTCLASSPATH="$(STAGING_HOST_DIR)/usr/share/jamvm/classes.zip:$(STAGING_HOST_DIR)/usr/share/classpath/glibj.zip" \
113 OTHER_CPPFLAGS='$(HOST_CPPFLAGS)' \
114 OTHER_LDFLAGS='$(HOST_LDFLAGS)' \
115 ALSA_CPPFLAGS='$(HOST_CPPFLAGS)' \
116 LIBFFI_CFLAGS='-I$(STAGING_HOST_DIR)/usr/include -L$(STAGING_HOST_DIR)/usr/lib' \
117 ALT_OPENWIN_HOME='$(STAGING_HOST_DIR)/usr' \
118 ALT_CUPS_HEADERS_PATH="$(STAGING_HOST_DIR)/usr/include" \
119 ALT_FREETYPE_HEADERS_PATH="$(STAGING_HOST_DIR)/usr/include" \
120 ALT_FREETYPE_LIB_PATH="$(STAGING_HOST_DIR)/usr/lib"
122 HOST_CONFIGURE_ENV+= $(OPENJDK_NATIVE_ENV)
123 HOST_MAKE_ENV+= $(OPENJDK_NATIVE_ENV)
124 HOST_ALL_TARGET:= icedtea-boot
125 HOST_CONFIGURE_ARGS+= --enable-bootstrap \
126 --enable-zero \
127 --with-jdk-home=$(STAGING_HOST_DIR)/usr/lib/jvm \
128 --with-java=$(STAGING_HOST_DIR)/usr/bin/hostjava \
129 --with-javac=$(STAGING_HOST_DIR)/usr/bin/ecj \
130 --with-ecj-jar=${DL_DIR}/ecj-4.9.jar \
131 --without-hotspot-build \
132 --disable-system-zlib \
133 --disable-system-jpeg \
134 --disable-system-lcms \
135 --disable-system-png \
136 --disable-system-gif \
137 --disable-system-gtk \
138 --disable-system-gio \
139 --disable-system-kerberos \
140 --disable-system-fontconfig \
141 --disable-system-gconf \
142 --disable-system-pcsc \
143 --disable-system-sctp \
144 --disable-compile-against-syscalls \
145 --without-rhino \
146 --enable-systemtap=no \
147 --disable-docs
149 hostpost-install:
150 -rm -rf $(STAGING_HOST_DIR)/bootstrap-jdk
151 $(CP) $(WRKBUILD)/openjdk.build-boot/j2sdk-image $(STAGING_HOST_DIR)/bootstrap-jdk
153 openjdk7-install:
154 $(INSTALL_DIR) $(IDIR_OPENJDK7)/usr/lib/jvm/jre
155 $(INSTALL_DIR) $(IDIR_OPENJDK7)/usr/bin
156 $(CP) $(WRKBUILD)/openjdk.build/j2re-image/bin $(IDIR_OPENJDK7)/usr/lib/jvm/jre
157 $(CP) $(WRKBUILD)/openjdk.build/j2re-image/lib $(IDIR_OPENJDK7)/usr/lib/jvm/jre
158 (cd $(IDIR_OPENJDK7)/usr/bin && ln -sf ../lib/jvm/jre/bin/java .)
159 (cd $(IDIR_OPENJDK7)/usr/lib/jvm/jre/lib/$(JDKARCH) && ln -sf server/libjvm.so .)
160 $(CP) ./files/nss.cfg $(IDIR_OPENJDK7)/usr/lib/jvm/jre/lib/security
162 include ${ADK_TOPDIR}/mk/host-bottom.mk
163 include ${ADK_TOPDIR}/mk/pkg-bottom.mk