Marcel Telka
2024-04-02 f1b1912adc00984cd165470b728dda03ac81b2c6
commit | author | age
9fc4b4 1 #
G 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
5 # 1.0 of the CDDL.
6 #
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.
10 #
11
12 #
13 # Copyright 2016 Alexander Pyhalov
14 # Copyright 2019 Michal Nowak
5568bb 15 # Copyright 2021 Andreas Grueninger, Grueninger GmbH, (grueni). All rights reserved.
7ca160 16 # Copyright 2023-2024 Niklas Poslovski
71385d 17 # Copyright 2023 Franklin Ronald <franklin@wiselabs.com.br>
9fc4b4 18 #
G 19
20 include ../../../make-rules/shared-macros.mk
21
22 OPENJDK_VERSION=    11
5568bb 23 OPENJDK_UPDATE=    0
7ca160 24 OPENJDK_BUILD=    22
9fc4b4 25 COMPONENT_NAME=        openjdk
5568bb 26 COMPONENT_VERSION=    $(OPENJDK_VERSION).$(OPENJDK_UPDATE).$(OPENJDK_BUILD)
307e8b 27 COMPONENT_REVISION= 1
73de89 28 COMPONENT_FMRI=    runtime/java/$(COMPONENT_NAME)$(OPENJDK_VERSION)
9fc4b4 29 COMPONENT_SUMMARY=    Open-source implementation of the Java Platform, Standard Edition
e994db 30 COMPONENT_SRC=    jdk$(OPENJDK_VERSION)u-jdk-$(COMPONENT_VERSION)-ga
9fc4b4 31 COMPONENT_ARCHIVE=    $(COMPONENT_SRC).tar.gz
G 32 COMPONENT_ARCHIVE_HASH= \
7ca160 33     sha256:5ed47173679cdfefa0cb9fc92d443413e05ab2e157a29bb86e829d7f6a80913a
9fc4b4 34 COMPONENT_ARCHIVE_URL= \
e994db 35     https://github.com/$(COMPONENT_NAME)/jdk$(OPENJDK_VERSION)u/archive/refs/tags/jdk-$(COMPONENT_VERSION)-ga.tar.gz
73de89 36 COMPONENT_PROJECT_URL=    https://openjdk.java.net/
9fc4b4 37 COMPONENT_CLASSIFICATION=    Development/Java
G 38 COMPONENT_LICENSE=    GPLv2 with Classpath Exception
39
40 COMPONENT_NAME_1= jdk11.0.6
41 COMPONENT_SRC_1= jdk11.0.6
42 COMPONENT_ARCHIVE_1= $(COMPONENT_SRC_1).tar.bz2
43 COMPONENT_ARCHIVE_HASH_1= sha256:c4d5a78655b3edaaad688d1ec0bbd80e020ed4551131e65976caa6ae3b9a93bf
73de89 44 COMPONENT_ARCHIVE_URL_1= https://pkgs.tribblix.org/openjdk/$(COMPONENT_ARCHIVE_1)
9fc4b4 45 PKG_PROTO_DIRS += $(COMPONENT_SRC_1)
G 46
73de89 47 OPENJDK_INSTANCE=    openjdk$(COMPONENT_VERSION)
9fc4b4 48 CACERTS_STORE=    cacerts.out
G 49
50 include $(WS_MAKE_RULES)/common.mk
51
5568bb 52 PKG_MACROS += OPENJDK_INSTANCE=$(OPENJDK_INSTANCE)
NP 53 PKG_MACROS += OPENJDK_VERSION=$(OPENJDK_VERSION)
9fc4b4 54
G 55 CLEAN_PATHS += $(BUILD_DIR)
56 CLEAN_PATHS += $(CACERTS_STORE)
5568bb 57 CLEAN_PATHS += $(COMPONENT_SRC_1)
9fc4b4 58
G 59 # read the number of jobs from the arguments for make
60 JOBS=$(patsubst -j%,%,$(filter -j%,$(MAKEFLAGS)))
61
62 CONFIGURE_OPTIONS+=        --with-jobs=$(JOBS)
63 CONFIGURE_OPTIONS+=        --x-includes=$(USRDIR)
64 CONFIGURE_OPTIONS+=        --x-libraries=$(USRLIBDIR64)
65 CONFIGURE_OPTIONS+=        --with-version-pre=
66 CONFIGURE_OPTIONS+=        --with-conf-name=oi
67 CONFIGURE_OPTIONS+=        --with-boot-jdk=$(COMPONENT_DIR)/$(COMPONENT_SRC_1)
68 CONFIGURE_OPTIONS+=        --with-freetype=system
69 CONFIGURE_OPTIONS+=        --with-giflib=system
70 CONFIGURE_OPTIONS+=        --with-harfbuzz=system
5568bb 71 CONFIGURE_OPTIONS+=        --with-lcms=bundled
9fc4b4 72 CONFIGURE_OPTIONS+=        --with-libjpeg=system
G 73 CONFIGURE_OPTIONS+=        --with-libpng=system
74 CONFIGURE_OPTIONS+=        --with-zlib=system
75 CONFIGURE_OPTIONS+=        --with-x=yes
76 CONFIGURE_OPTIONS+=        --with-native-debug-symbols=none
77 CONFIGURE_OPTIONS+=        --with-jvm-variants=server
78 CONFIGURE_OPTIONS+=        --with-debug-level=release
79 CONFIGURE_OPTIONS+=        --with-toolchain-type=gcc
80 CONFIGURE_OPTIONS+=        --with-extra-cxxflags="$(CXXFLAGS)"
81 CONFIGURE_OPTIONS+=        --with-extra-ldflags="-m64"
82 CONFIGURE_OPTIONS+=        --with-cups=$(USRDIR)
83 CONFIGURE_OPTIONS+=        --with-fontconfig=$(USRDIR)
84 CONFIGURE_OPTIONS+=        --enable-unlimited-crypto
85 CONFIGURE_OPTIONS+=        --disable-dtrace
86 CONFIGURE_OPTIONS+=        --disable-hotspot-gtest
87 CONFIGURE_OPTIONS+=        --disable-warnings-as-errors
88 CONFIGURE_OPTIONS+=        --disable-precompiled-headers
89 CONFIGURE_OPTIONS+=        --disable-ccache
90 CONFIGURE_OPTIONS+=        --disable-option-checking
91
5568bb 92 COMPONENT_POST_BUILD_ACTION=    ($(LN) -s server/libjvm.so $(@D)/images/jdk/lib/libjvm.so)
9fc4b4 93
G 94 COMPONENT_BUILD_TARGETS = images
95
96 # reset arguments from Jenkins
97 COMPONENT_BUILD_ARGS=
98
99 CACERTS_DIR=$(WS_TOP)/components/openindiana/ca-certificates
100 CACERTS_INSTALLED=$(CACERTS_DIR)/build/$(MACH32)/.installed
101 CACERTS_PROTO_DIR=$(CACERTS_DIR)/build/prototype/$(MACH)
102
103 $(CACERTS_INSTALLED):
104     gmake -C $(CACERTS_DIR) install
105
106 $(CACERTS_STORE): $(BUILD_DIR_64)/.built $(CACERTS_INSTALLED)
107     $(RM) $@
108     for cert in $(CACERTS_PROTO_DIR)/etc/certs/CA/*.pem; do              \
5568bb 109                 LC_ALL=en_US.UTF-8  $(BUILD_DIR_64)/images/jdk/bin/keytool \
9fc4b4 110                   -noprompt                                                       \
G 111                   -importcert                                          \
112                   -keystore $@                                         \
113                   -alias `echo $$cert | $(GSED) -e 's,.*/\\([^/]*\\)\\.pem,\\1,'` \
114                   -file $$cert                                         \
115                   -storetype jks                                       \
116                   -storepass changeit;                                 \
117         done
118
119 build:        $(BUILD_64)
120
121 install: $(BUILD_DIR_64)/.built    $(CACERTS_STORE)
122     $(RM) -r $(PROTO_DIR)/usr/jdk/instances/$(OPENJDK_INSTANCE)
123     $(MKDIR) $(PROTO_DIR)/usr/jdk/instances/$(OPENJDK_INSTANCE)
5568bb 124     $(CP) -a $(BUILD_DIR_64)/images/jdk/* $(PROTO_DIR)/usr/jdk/instances/$(OPENJDK_INSTANCE)
9fc4b4 125     $(CHMOD) +x $(PROTO_DIR)/usr/jdk/instances/$(OPENJDK_INSTANCE)/lib/jspawnhelper
G 126     $(CP) $(CACERTS_STORE) $(PROTO_DIR)/usr/jdk/instances/$(OPENJDK_INSTANCE)/lib/security/cacerts
127     $(TOUCH) $@
128
129 test:        $(NO_TESTS)
130
131 # manually added to support audio
132 REQUIRED_PACKAGES += system/header/header-audio
133 REQUIRED_PACKAGES += system/library/c++/sunpro
134
135 # Auto-generated dependencies
136 REQUIRED_PACKAGES += $(GCC_RUNTIME_PKG)
137 REQUIRED_PACKAGES += $(GXX_RUNTIME_PKG)
307e8b 138 REQUIRED_PACKAGES += $(JPEG_IMPLEM_PKG)
TW 139 REQUIRED_PACKAGES += image/library/libjpeg-turbo
9fc4b4 140 REQUIRED_PACKAGES += image/library/libpng16
G 141 REQUIRED_PACKAGES += library/c++/harfbuzz
142 REQUIRED_PACKAGES += library/giflib
143 REQUIRED_PACKAGES += library/zlib
144 REQUIRED_PACKAGES += system/library
145 REQUIRED_PACKAGES += system/library/freetype-2
146 REQUIRED_PACKAGES += system/library/math
147 REQUIRED_PACKAGES += x11/library/libx11
148 REQUIRED_PACKAGES += x11/library/libxext
149 REQUIRED_PACKAGES += x11/library/libxi
150 REQUIRED_PACKAGES += x11/library/libxrender
151 REQUIRED_PACKAGES += x11/library/libxtst