Skip to content

Commit 4930706

Browse files
committed
add possibility to select specific jdk with env var; rel 2
proposed in: mesonbuild/meson#14951 but suffers from: mesonbuild/meson#14953 so needs to be used carefully
1 parent c89e574 commit 4930706

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

javac-selection.patch

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
From 04cd0e2e0057146782df0085995408856ceff5d0 Mon Sep 17 00:00:00 2001
2+
From: Jan Palus <[email protected]>
3+
Date: Mon, 25 Aug 2025 14:10:37 +0200
4+
Subject: [PATCH] Allow explicit selection of Java compiler
5+
6+
Makes Java more consistent with other compilers and allows explicit
7+
selection of Java compiler version and/or provider when building with
8+
Meson.
9+
---
10+
docs/markdown/Reference-tables.md | 1 +
11+
mesonbuild/envconfig.py | 1 +
12+
2 files changed, 2 insertions(+)
13+
14+
diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
15+
index 43fad0cd2..c85d8da90 100644
16+
--- a/mesonbuild/envconfig.py
17+
+++ b/mesonbuild/envconfig.py
18+
@@ -101,6 +101,7 @@ ENV_VAR_COMPILER_MAP: T.Mapping[str, str] = {
19+
'rust': 'RUSTC',
20+
'vala': 'VALAC',
21+
'nasm': 'NASM',
22+
+ 'java': 'JAVAC',
23+
24+
# Linkers
25+
'c_ld': 'CC_LD',
26+
--
27+
2.51.0
28+

meson.spec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Summary: High productivity build system
22
Summary(pl.UTF-8): System budowania o dużej produktywności
33
Name: meson
44
Version: 1.8.1
5-
Release: 1
5+
Release: 2
66
License: Apache v2.0
77
Group: Development/Tools
88
#Source0Download: https://github.com/mesonbuild/meson/releases/
@@ -12,6 +12,7 @@ Patch0: %{name}-gtkdocdir.patch
1212
Patch1: rust-proc-macro-filter-out-target.patch
1313
Patch2: allow-arm-on-arm64.patch
1414
Patch3: rpm-macros-pld.patch
15+
Patch4: javac-selection.patch
1516
URL: https://mesonbuild.com/
1617
BuildRequires: ninja >= 1.8.2
1718
BuildRequires: python3 >= 1:3.7
@@ -59,6 +60,7 @@ Mesona.
5960
%patch -P1 -p1
6061
%patch -P2 -p1 -R
6162
%patch -P3 -p1
63+
%patch -P4 -p1
6264

6365
%{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' \
6466
meson.py

0 commit comments

Comments
 (0)