2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
13 # Copyright 2016 Alexander Pyhalov
14 # Copyright 2019 Michal Nowak
15 # Copyright 2021 Andreas Grueninger, Grueninger GmbH, (grueni). All rights reserved.
16 # Copyright 2022-2024 Niklas Poslovski
17 # Copyright 2023 Franklin Ronald <franklin@wiselabs.com.br>
20 include ..
/..
/..
/make-rules
/shared-macros.mk
25 COMPONENT_NAME
= openjdk
26 COMPONENT_VERSION
= $(OPENJDK_VERSION
).
$(OPENJDK_UPDATE
).
$(OPENJDK_BUILD
)
27 COMPONENT_FMRI
= runtime
/java
/$(COMPONENT_NAME
)$(OPENJDK_VERSION
)
28 COMPONENT_SUMMARY
= Open-source implementation of the Java Platform
, Standard Edition
29 COMPONENT_SRC
= jdk
$(OPENJDK_VERSION
)u-jdk-
$(OPENJDK_VERSION
).
$(OPENJDK_UPDATE
).
$(OPENJDK_BUILD
)-ga
30 COMPONENT_ARCHIVE
= jdk-
$(OPENJDK_VERSION
).
$(OPENJDK_UPDATE
).
$(OPENJDK_BUILD
)-ga.
tar.gz
31 COMPONENT_ARCHIVE_HASH
= \
32 sha256
:74654bdd094c466217d3c65d71622f5ad9039d86d0c1b5eaa0bf6b2ae6e0822d
33 COMPONENT_ARCHIVE_URL
= \
34 https
://github.com
/openjdk
/jdk
$(OPENJDK_VERSION
)u
/archive
/$(COMPONENT_ARCHIVE
)
35 COMPONENT_PROJECT_URL
= https
://openjdk.java.net
/
36 COMPONENT_CLASSIFICATION
= Development
/Java
37 COMPONENT_LICENSE
= GPLv2 with Classpath Exception
39 COMPONENT_NAME_1
= jdk17
40 COMPONENT_SRC_1
= $(COMPONENT_NAME_1
)-jdk-17-35
41 COMPONENT_ARCHIVE_1
= $(COMPONENT_SRC_1
).
tar.bz2
42 COMPONENT_ARCHIVE_HASH_1
= sha256
:973b576b3ba0b78451cf26c835162fba10216ac2d5a6141a6040dddcde9ac6c6
43 COMPONENT_ARCHIVE_URL_1
= http
://pkgs.tribblix.org
/openjdk
/$(COMPONENT_ARCHIVE_1
)
44 PKG_PROTO_DIRS
+= $(COMPONENT_SRC_1
)
46 OPENJDK_INSTANCE
= openjdk
$(COMPONENT_VERSION
)
47 CACERTS_STORE
= cacerts.out
49 include $(WS_MAKE_RULES
)/common.mk
51 PKG_MACROS
+= OPENJDK_INSTANCE
=$(OPENJDK_INSTANCE
)
52 PKG_MACROS
+= OPENJDK_VERSION
=$(OPENJDK_VERSION
)
54 CLEAN_PATHS
+= $(BUILD_DIR
)
55 CLEAN_PATHS
+= $(CACERTS_STORE
)
56 CLEAN_PATHS
+= $(COMPONENT_SRC_1
)
58 # read the number of jobs from the arguments for make
59 JOBS
=$(patsubst -j
%,%,$(filter -j
%,$(MAKEFLAGS
)))
63 CONFIGURE_OPTIONS
+= --with-jobs
=$(JOBS
)
64 CONFIGURE_OPTIONS
+= --x-includes
=$(USRDIR
)
65 CONFIGURE_OPTIONS
+= --x-libraries
=$(USRLIBDIR64
)
66 CONFIGURE_OPTIONS
+= --with-version-pre
=
67 CONFIGURE_OPTIONS
+= --with-conf-name
=oi
68 CONFIGURE_OPTIONS
+= --with-boot-jdk
=$(COMPONENT_DIR
)/$(COMPONENT_SRC_1
)
69 CONFIGURE_OPTIONS
+= --with-freetype
=system
70 CONFIGURE_OPTIONS
+= --with-giflib
=system
71 CONFIGURE_OPTIONS
+= --with-harfbuzz
=system
72 CONFIGURE_OPTIONS
+= --with-lcms
=bundled
73 CONFIGURE_OPTIONS
+= --with-libjpeg
=system
74 CONFIGURE_OPTIONS
+= --with-libpng
=system
75 CONFIGURE_OPTIONS
+= --with-zlib
=system
76 CONFIGURE_OPTIONS
+= --with-x
=yes
77 CONFIGURE_OPTIONS
+= --with-native-debug-symbols
=none
78 CONFIGURE_OPTIONS
+= --with-jvm-variants
=server
79 CONFIGURE_OPTIONS
+= --with-debug-level
=release
80 CONFIGURE_OPTIONS
+= --with-toolchain-type
=gcc
81 CONFIGURE_OPTIONS
+= --with-extra-cxxflags
="$(CXXFLAGS)"
82 CONFIGURE_OPTIONS
+= --with-extra-ldflags
="-m64"
83 CONFIGURE_OPTIONS
+= --with-cups
=$(USRDIR
)
84 CONFIGURE_OPTIONS
+= --with-fontconfig
=$(USRDIR
)
85 CONFIGURE_OPTIONS
+= --enable-unlimited-crypto
86 CONFIGURE_OPTIONS
+= --disable-dtrace
87 CONFIGURE_OPTIONS
+= --disable-hotspot-gtest
88 CONFIGURE_OPTIONS
+= --disable-warnings-as-errors
89 CONFIGURE_OPTIONS
+= --disable-precompiled-headers
90 CONFIGURE_OPTIONS
+= --disable-ccache
91 CONFIGURE_OPTIONS
+= --disable-option-checking
92 CONFIGURE_OPTIONS
+= --enable-deprecated-ports
=yes
94 CONFIGURE_ENV
+= LD
=/usr
/bin
/gld
95 CONFIGURE_ENV
+= LD_LIBRARY_PATH
=/usr
/gcc
/7/lib
/amd64
96 COMPONENT_BUILD_ENV
+= LD
=/usr
/bin
/gld
97 COMPONENT_BUILD_ENV
+= LD_LIBRARY_PATH
=/usr
/gcc
/7/lib
/amd64
99 COMPONENT_POST_BUILD_ACTION
= ($(LN
) -s server
/libjvm.so
$(@D
)/images
/jdk
/lib
/libjvm.so
)
101 COMPONENT_BUILD_TARGETS
= images
103 # reset arguments from Jenkins
104 COMPONENT_BUILD_ARGS
=
106 CACERTS_DIR
=$(WS_TOP
)/components
/openindiana
/ca-certificates
107 CACERTS_INSTALLED
=$(CACERTS_DIR
)/build
/$(MACH32
)/.installed
108 CACERTS_PROTO_DIR
=$(CACERTS_DIR
)/build
/prototype
/$(MACH
)
110 $(CACERTS_INSTALLED
):
111 gmake
-C
$(CACERTS_DIR
) install
113 $(CACERTS_STORE
): $(BUILD_DIR_64
)/.built
$(CACERTS_INSTALLED
)
115 for cert in
$(CACERTS_PROTO_DIR
)/etc
/certs
/CA
/*.pem
; do \
116 LC_ALL
=en_US.UTF-8
$(BUILD_DIR_64
)/images
/jdk
/bin
/keytool \
120 -alias
`echo $$cert | $(GSED) -e 's,.*/\\([^/]*\\)\\.pem,\\1,'` \
123 -storepass changeit
; \
128 install: $(BUILD_DIR_64
)/.built
$(CACERTS_STORE
)
129 $(RM
) -r
$(PROTO_DIR
)/usr
/jdk
/instances
/$(OPENJDK_INSTANCE
)
130 $(MKDIR
) $(PROTO_DIR
)/usr
/jdk
/instances
/$(OPENJDK_INSTANCE
)
131 $(CP
) -a
$(BUILD_DIR_64
)/images
/jdk
/* $(PROTO_DIR
)/usr
/jdk
/instances
/$(OPENJDK_INSTANCE
)
132 $(CHMOD
) +x
$(PROTO_DIR
)/usr
/jdk
/instances
/$(OPENJDK_INSTANCE
)/lib
/jspawnhelper
133 $(CP
) $(CACERTS_STORE
) $(PROTO_DIR
)/usr
/jdk
/instances
/$(OPENJDK_INSTANCE
)/lib
/security
/cacerts
138 # manually added to support audio
139 REQUIRED_PACKAGES
+= system
/header
/header-audio
140 REQUIRED_PACKAGES
+= system
/library
/c
++/sunpro
142 # Auto-generated dependencies
143 REQUIRED_PACKAGES
+= $(GCC_RUNTIME_PKG
)
144 REQUIRED_PACKAGES
+= $(GXX_RUNTIME_PKG
)
145 REQUIRED_PACKAGES
+= $(JPEG_IMPLEM_PKG
)
146 REQUIRED_PACKAGES
+= image
/library
/libjpeg-turbo
147 REQUIRED_PACKAGES
+= image
/library
/libpng16
148 REQUIRED_PACKAGES
+= library
/c
++/harfbuzz
149 REQUIRED_PACKAGES
+= library
/giflib
150 REQUIRED_PACKAGES
+= library
/zlib
151 REQUIRED_PACKAGES
+= system
/library
152 REQUIRED_PACKAGES
+= system
/library
/freetype-2
153 REQUIRED_PACKAGES
+= system
/library
/math
154 REQUIRED_PACKAGES
+= x11
/library
/libx11
155 REQUIRED_PACKAGES
+= x11
/library
/libxext
156 REQUIRED_PACKAGES
+= x11
/library
/libxi
157 REQUIRED_PACKAGES
+= x11
/library
/libxrender
158 REQUIRED_PACKAGES
+= x11
/library
/libxtst