openjdk8: update to latest stable version
[openadk.git] / package / openjdk8 / Makefile
blob6fe8837010a7ca177caea91dfe1709f85f77b0f9
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:= openjdk8
7 PKG_VERSION:= 8u121-b13
8 PKG_RELEASE:= 1
9 PKG_HASH:= 1e681ea5db9feec8ed65acef5b60555dddd8297143b3858e0e3f148f1772dc0d
10 PKG_DESCR:= java virtual machine
11 PKG_SECTION:= dev/lang
12 PKG_DEPENDS:= alsa-lib freetype libx11 libxext libxrender libxtst
13 PKG_DEPENDS+= libxt libffi zlib
14 PKG_BUILDDEP:= openjdk7-host libX11 libXext libXrender libXtst libXt
15 PKG_BUILDDEP+= freetype alsa-lib cups libffi zlib
16 PKG_NEEDS:= threads c++
17 PKG_URL:= http://openjdk.org/
18 PKG_HG:= http://hg.openjdk.java.net/jdk8u/jdk8u
19 PKG_SITES:= ${PKG_HG}/archive/
20 PKG_NOPARALLEL:= 1
21 ICEDTEA_VERSION:= 3.3.0
23 PKG_HOST_DEPENDS:= linux
24 PKG_ARCH_DEPENDS:= arm mips ppc x86 x86_64
26 DISTFILES:= jdk$(PKG_VERSION).tar.bz2
27 WRKSRC= ${WRKDIST}/openjdk
29 include $(ADK_TOPDIR)/mk/package.mk
31 $(eval $(call PKG_template,OPENJDK8,openjdk8,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION)))
33 JDKARCH:= $(ADK_TARGET_CPU_ARCH)
34 ifeq ($(ADK_TARGET_ARCH),x86)
35 JDKARCH:= i386
36 endif
37 ifeq ($(ADK_TARGET_CPU_ARCH),x86_64)
38 JDKARCH:= amd64
39 endif
41 TARGET_LDFLAGS:= -lm -liconv
43 CONFIG_STYLE:= basic
44 CONFIGURE_ARGS+= --prefix=$(WRKINST)/usr \
45 --with-jvm-variants=zero \
46 --with-stdc++lib=dynamic \
47 --enable-unlimited-crypto \
48 --disable-debug-symbols \
49 --with-debug-level=release \
50 --with-zlib=system \
51 --enable-freetype-bundling \
52 --with-freetype=$(STAGING_TARGET_DIR)/usr \
53 --with-freetype-include=$(STAGING_TARGET_DIR)/usr/include/freetype2 \
54 --with-boot-jdk=$(STAGING_HOST_DIR)/bootstrap-jdk \
55 --with-extra-cflags="$(TARGET_CFLAGS)" \
56 --with-extra-cxxflags="$(TARGET_CXXFLAGS)" \
57 --with-extra-ldflags="$(TARGET_LDFLAGS)" \
58 --with-cups=$(STAGING_TARGET_DIR)/usr \
59 --with-alsa=$(STAGING_TARGET_DIR) \
60 --with-x=$(STAGING_TARGET_DIR)/usr \
61 --x-includes=$(STAGING_TARGET_DIR)/usr/include \
62 --x-libraries=$(STAGING_TARGET_DIR)/usr/lib
63 CONFIGURE_ENV:= BUILD_CC=/usr/bin/gcc \
64 BUILD_CXX=/usr/bin/g++ \
65 BUILD_LD=/usr/bin/ld \
66 ac_cv_path_POTENTIAL_CC=$(TARGET_CC) \
67 ac_cv_path_POTENTIAL_CXX=$(TARGET_CXX) \
68 LD=$(TARGET_CC) \
69 OBJCOPY='$(TARGET_CROSS)objcopy' \
70 STRIP='$(TARGET_CROSS)strip' \
71 LIBFFI_CFLAGS="$(TARGET_CPPFLAGS)" \
72 LIBFFI_LIBS="$(TARGET_LDFLAGS) -lffi"
74 XAKE_FLAGS+= LD='$(TARGET_CC)' \
75 STRIP='$(TARGET_CROSS)strip' \
76 BUILD_CC='$(HOST_CC)' \
77 BUILD_LD='$(HOST_CC)' \
78 LOG=debug \
79 JOBS="4"
81 post-extract:
82 (cd $(DL_DIR); \
83 for file in jdk corba hotspot jaxp jaxws langtools nashorn; do \
84 if [ ! -f openjdk8-$${file}$(PKG_VERSION).tar.bz2 ]; then \
85 wget -c -O openjdk8-$${file}$(PKG_VERSION).tar.bz2 $(PKG_HG)/$${file}/archive/jdk$(PKG_VERSION).tar.bz2 ; \
86 fi; \
87 done; \
88 if [ ! -f icedtea-$(ICEDTEA_VERSION).tar.xz ]; then \
89 wget -O icedtea-$(ICEDTEA_VERSION).tar.xz http://icedtea.classpath.org/download/source/icedtea-$(ICEDTEA_VERSION).tar.xz; \
90 fi; \
92 mkdir -p $(WRKDIST)/openjdk
93 (cd $(WRKDIST); \
94 tar --strip-components=1 -xvf $(DL_DIR)/icedtea-$(ICEDTEA_VERSION).tar.bz2; \
95 tar --strip-components=1 -C $(WRKDIST)/openjdk -xvf $(DL_DIR)/jdk$(PKG_VERSION).tar.bz2; \
96 for file in jdk corba hotspot jaxp jaxws langtools nashorn; do \
97 mkdir -p $(WRKDIST)/openjdk/$${file}; \
98 tar --strip-components=1 -C $(WRKDIST)/openjdk/$${file} -xvf $(DL_DIR)/openjdk8-$${file}$(PKG_VERSION).tar.bz2 ; \
99 done; \
101 (cd $(WRKDIST)/openjdk; patch -p1 < $(ADK_TOPDIR)/package/openjdk8/files/openadk.patch)
102 (cd $(WRKDIST); \
103 PATH=$(HOST_PATH) sed -e 's|@abs_top_srcdir@|$(WRKDIST)|g' -e '/^patch.*/d' fsg.sh.in > fsg.sh; \
104 ${BASH} fsg.sh; \
106 cat $(WRKDIST)/openjdk/common/autoconf/configure.ac | PATH=$(HOST_PATH) sed -e "s|@DATE_WHEN_GENERATED@|`LC_ALL=C date +%s`|" | $(STAGING_HOST_DIR)/usr/bin/autoconf \
107 -W all -I$(WRKDIST)/openjdk/common/autoconf - > $(WRKDIST)/openjdk/common/autoconf/generated-configure.sh
109 openjdk8-install:
110 $(INSTALL_DIR) $(IDIR_OPENJDK8)/usr/bin
111 $(INSTALL_DIR) $(IDIR_OPENJDK8)/usr/lib/jvm
112 $(CP) $(WRKINST)//usr/jvm/openjdk-1.8.0-internal/* \
113 $(IDIR_OPENJDK8)/usr/lib/jvm
114 (cd $(IDIR_OPENJDK8)/usr/bin && ln -sf ../lib/jvm/jre/bin/java .)
115 (cd $(IDIR_OPENJDK8)/usr/lib/jvm/jre/lib/$(JDKARCH) && ln -sf server/libjvm.so .)
117 include $(ADK_TOPDIR)/mk/pkg-bottom.mk