fastfetch: update to 2.30.1
[oi-userland.git] / components / runtime / openjdk-21 / Makefile
blobc1376eb5e7233253c6d136ccea16670c0617de42
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.
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 2023-2024 Niklas Poslovski
19 include ../../../make-rules/shared-macros.mk
21 OPENJDK_VERSION= 21
22 OPENJDK_UPDATE= 0
23 OPENJDK_BUILD= 4
24 COMPONENT_REVISION= 1
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:9223a0f1db1b7ee0ca480e010d6473a8be72eaae93d883fd31ef9ba6dcc41014
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 OPENJDK_INSTANCE= openjdk$(COMPONENT_VERSION)
40 CACERTS_STORE= cacerts.out
42 include $(WS_MAKE_RULES)/common.mk
44 PKG_MACROS += OPENJDK_INSTANCE=$(OPENJDK_INSTANCE)
45 PKG_MACROS += OPENJDK_VERSION=$(OPENJDK_VERSION)
47 CLEAN_PATHS += $(BUILD_DIR)
48 CLEAN_PATHS += $(CACERTS_STORE)
49 CLEAN_PATHS += $(COMPONENT_SRC_1)
51 # read the number of jobs from the arguments for make
52 JOBS=$(patsubst -j%,%,$(filter -j%,$(MAKEFLAGS)))
54 CFLAGS += -c99
56 CONFIGURE_OPTIONS+= --with-jobs=$(JOBS)
57 CONFIGURE_OPTIONS+= --x-includes=$(USRDIR)
58 CONFIGURE_OPTIONS+= --x-libraries=$(USRLIBDIR64)
59 CONFIGURE_OPTIONS+= --with-version-pre=
60 CONFIGURE_OPTIONS+= --with-conf-name=oi
61 CONFIGURE_OPTIONS+= --with-boot-jdk=/usr/jdk/openjdk21/
62 CONFIGURE_OPTIONS+= --with-freetype=system
63 CONFIGURE_OPTIONS+= --with-giflib=system
64 CONFIGURE_OPTIONS+= --with-harfbuzz=system
65 CONFIGURE_OPTIONS+= --with-lcms=bundled
66 CONFIGURE_OPTIONS+= --with-libjpeg=system
67 CONFIGURE_OPTIONS+= --with-libpng=system
68 CONFIGURE_OPTIONS+= --with-zlib=system
69 CONFIGURE_OPTIONS+= --with-x=yes
70 CONFIGURE_OPTIONS+= --with-native-debug-symbols=none
71 CONFIGURE_OPTIONS+= --with-jvm-variants=server
72 CONFIGURE_OPTIONS+= --with-debug-level=release
73 CONFIGURE_OPTIONS+= --with-toolchain-type=gcc
74 CONFIGURE_OPTIONS+= --with-source-date=current
75 CONFIGURE_OPTIONS+= --with-extra-cxxflags="$(CXXFLAGS)"
76 CONFIGURE_OPTIONS+= --with-extra-ldflags="-m64"
77 CONFIGURE_OPTIONS+= --with-cups=$(USRDIR)
78 CONFIGURE_OPTIONS+= --with-fontconfig=$(USRDIR)
79 CONFIGURE_OPTIONS+= --enable-unlimited-crypto
80 CONFIGURE_OPTIONS+= --disable-dtrace
81 CONFIGURE_OPTIONS+= --disable-hotspot-gtest
82 CONFIGURE_OPTIONS+= --disable-warnings-as-errors
83 CONFIGURE_OPTIONS+= --disable-precompiled-headers
84 CONFIGURE_OPTIONS+= --disable-ccache
85 CONFIGURE_OPTIONS+= --disable-option-checking
86 CONFIGURE_OPTIONS+= --enable-deprecated-ports=yes
87 CONFIGURE_OPTIONS+= DATE=/usr/bin/gdate
89 CONFIGURE_ENV+= LD=/usr/bin/gld
90 COMPONENT_BUILD_ENV+= LD=/usr/bin/gld
92 COMPONENT_POST_BUILD_ACTION= ($(LN) -s server/libjvm.so $(@D)/images/jdk/lib/libjvm.so)
94 COMPONENT_BUILD_TARGETS = images
96 # reset arguments from Jenkins
97 COMPONENT_BUILD_ARGS=
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)
103 $(CACERTS_INSTALLED):
104 gmake -C $(CACERTS_DIR) install
106 $(CACERTS_STORE): $(BUILD_DIR_64)/.built $(CACERTS_INSTALLED)
107 $(RM) $@
108 for cert in $(CACERTS_PROTO_DIR)/etc/certs/CA/*.pem; do \
109 LC_ALL=en_US.UTF-8 $(BUILD_DIR_64)/images/jdk/bin/keytool \
110 -noprompt \
111 -importcert \
112 -keystore $@ \
113 -alias `echo $$cert | $(GSED) -e 's,.*/\\([^/]*\\)\\.pem,\\1,'` \
114 -file $$cert \
115 -storetype jks \
116 -storepass changeit; \
117 done
119 build: $(BUILD_64)
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)
124 $(CP) -a $(BUILD_DIR_64)/images/jdk/* $(PROTO_DIR)/usr/jdk/instances/$(OPENJDK_INSTANCE)
125 $(CHMOD) +x $(PROTO_DIR)/usr/jdk/instances/$(OPENJDK_INSTANCE)/lib/jspawnhelper
126 $(CP) $(CACERTS_STORE) $(PROTO_DIR)/usr/jdk/instances/$(OPENJDK_INSTANCE)/lib/security/cacerts
127 $(TOUCH) $@
129 test: $(NO_TESTS)
131 # manually added to support audio
132 REQUIRED_PACKAGES += system/header/header-audio
133 REQUIRED_PACKAGES += system/library/c++/sunpro
135 # Manually added boot JDK
136 REQUIRED_PACKAGES += runtime/java/openjdk21
138 # Auto-generated dependencies
139 REQUIRED_PACKAGES += $(GCC_RUNTIME_PKG)
140 REQUIRED_PACKAGES += $(GXX_RUNTIME_PKG)
141 REQUIRED_PACKAGES += $(JPEG_IMPLEM_PKG)
142 REQUIRED_PACKAGES += image/library/libjpeg-turbo
143 REQUIRED_PACKAGES += image/library/libpng16
144 REQUIRED_PACKAGES += library/c++/harfbuzz
145 REQUIRED_PACKAGES += library/giflib
146 REQUIRED_PACKAGES += library/zlib
147 REQUIRED_PACKAGES += system/library
148 REQUIRED_PACKAGES += system/library/freetype-2
149 REQUIRED_PACKAGES += system/library/math
150 REQUIRED_PACKAGES += x11/library/libx11
151 REQUIRED_PACKAGES += x11/library/libxext
152 REQUIRED_PACKAGES += x11/library/libxi
153 REQUIRED_PACKAGES += x11/library/libxrender
154 REQUIRED_PACKAGES += x11/library/libxtst