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
7 PKG_VERSION
:= 8u131-b
11
9 PKG_HASH
:= d57a81345acd26d8d2681201bcf00671ad54d5d6e4b61ad1fe621994ba1fb1ec
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
++ iconv
17 PKG_URL
:= http
://openjdk.org
/
18 PKG_HG
:= http
://hg.openjdk.java.net
/jdk8u
/jdk8u
19 PKG_SITES
:= ${PKG_HG}/archive
/
21 ICEDTEA_VERSION
:= 3.4.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
)
37 ifeq ($(ADK_TARGET_CPU_ARCH
),x86_64
)
41 # https://bugzilla.redhat.com/show_bug.cgi?id=1306558
42 TARGET_CFLAGS
+= -fno-lifetime-dse
-fno-delete-null-pointer-checks
43 TARGET_CXXFLAGS
+= -fno-lifetime-dse
-fno-delete-null-pointer-checks
-std
=gnu
++98
46 CONFIGURE_ARGS
+= --prefix=$(WRKINST
)/usr \
47 --with-jvm-variants
=zero \
48 --with-stdc
++lib
=dynamic \
49 --enable-unlimited-crypto \
50 --disable-debug-symbols \
51 --with-debug-level
=release \
53 --enable-freetype-bundling \
54 --with-freetype
=$(STAGING_TARGET_DIR
)/usr \
55 --with-freetype-include
=$(STAGING_TARGET_DIR
)/usr
/include/freetype2 \
56 --with-boot-jdk
=$(STAGING_HOST_DIR
)/bootstrap-jdk \
57 --with-extra-cflags
="$(TARGET_CFLAGS)" \
58 --with-extra-cxxflags
="$(TARGET_CXXFLAGS)" \
59 --with-extra-ldflags
="$(TARGET_LDFLAGS)" \
60 --with-cups
=$(STAGING_TARGET_DIR
)/usr \
61 --with-alsa
=$(STAGING_TARGET_DIR
) \
62 --with-x
=$(STAGING_TARGET_DIR
)/usr \
63 --x-includes
=$(STAGING_TARGET_DIR
)/usr
/include \
64 --x-libraries
=$(STAGING_TARGET_DIR
)/usr
/lib
65 CONFIGURE_ENV
:= BUILD_CC
=/usr
/bin
/gcc \
66 BUILD_CXX
=/usr
/bin
/g
++ \
67 BUILD_LD
=/usr
/bin
/ld \
68 ac_cv_path_POTENTIAL_CC
=$(TARGET_CC
) \
69 ac_cv_path_POTENTIAL_CXX
=$(TARGET_CXX
) \
71 OBJCOPY
='$(TARGET_CROSS)objcopy' \
72 STRIP
='$(TARGET_CROSS)strip' \
73 LIBFFI_CFLAGS
="$(TARGET_CPPFLAGS)" \
74 LIBFFI_LIBS
="$(TARGET_LDFLAGS) -lffi"
76 XAKE_FLAGS
+= LD
='$(TARGET_CC)' \
77 STRIP
='$(TARGET_CROSS)strip' \
78 BUILD_CC
='$(HOST_CC)' \
79 BUILD_LD
='$(HOST_CC)' \
85 for file in jdk corba hotspot jaxp jaxws langtools nashorn
; do \
86 if
[ ! -f openjdk8-
$${file}$(PKG_VERSION
).
tar.bz2
]; then \
87 wget
-c
-O openjdk8-
$${file}$(PKG_VERSION
).
tar.bz2
$(PKG_HG
)/$${file}/archive
/jdk
$(PKG_VERSION
).
tar.bz2
; \
90 if
[ ! -f icedtea-
$(ICEDTEA_VERSION
).
tar.xz
]; then \
91 wget
-O icedtea-
$(ICEDTEA_VERSION
).
tar.xz http
://icedtea.classpath.org
/download
/source
/icedtea-
$(ICEDTEA_VERSION
).
tar.xz
; \
94 mkdir
-p
$(WRKDIST
)/openjdk
96 tar --strip-components
=1 -xvf
$(DL_DIR
)/icedtea-
$(ICEDTEA_VERSION
).
tar.xz
; \
97 tar --strip-components
=1 -C
$(WRKDIST
)/openjdk
-xvf
$(DL_DIR
)/jdk
$(PKG_VERSION
).
tar.bz2
; \
98 for file in jdk corba hotspot jaxp jaxws langtools nashorn
; do \
99 mkdir
-p
$(WRKDIST
)/openjdk
/$${file}; \
100 tar --strip-components
=1 -C
$(WRKDIST
)/openjdk
/$${file} -xvf
$(DL_DIR
)/openjdk8-
$${file}$(PKG_VERSION
).
tar.bz2
; \
103 (cd
$(WRKDIST
)/openjdk
; patch
-p1
< $(ADK_TOPDIR
)/package
/openjdk8
/files
/openadk.patch
)
105 PATH
=$(HOST_PATH
) sed
-e
's|@abs_top_srcdir@|$(WRKDIST)|g' -e
'/^patch.*/d' fsg.sh.in
> fsg.sh
; \
108 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 \
109 -W
all -I
$(WRKDIST
)/openjdk
/common
/autoconf
- > $(WRKDIST
)/openjdk
/common
/autoconf
/generated-configure.sh
110 $(SED
) "s#^WARNINGS_ARE_ERRORS.*#WARNINGS_ARE_ERRORS=#" $(WRKDIST
)/openjdk
/hotspot
/make
/linux
/makefiles
/gcc.make
113 $(INSTALL_DIR
) $(IDIR_OPENJDK8
)/usr
/bin
114 $(INSTALL_DIR
) $(IDIR_OPENJDK8
)/usr
/lib
/jvm
115 $(CP
) $(WRKINST
)//usr
/jvm
/openjdk-1.8
.0-internal
/* \
116 $(IDIR_OPENJDK8
)/usr
/lib
/jvm
117 (cd
$(IDIR_OPENJDK8
)/usr
/bin
&& ln
-sf ..
/lib
/jvm
/jre
/bin
/java .
)
118 (cd
$(IDIR_OPENJDK8
)/usr
/lib
/jvm
/jre
/lib
/$(JDKARCH
) && ln
-sf server
/libjvm.so .
)
120 include $(ADK_TOPDIR
)/mk
/pkg-bottom.mk