From 1ce05eebc8bcef98e3f86bf6615e6293a40ce87e Mon Sep 17 00:00:00 2001 From: starlet-dx <15929766099@163.com> Date: Sun, 26 Jan 2025 15:09:29 +0800 Subject: [PATCH] Fix build failure caused by commons-math used jdk11 to build --- jmh.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/jmh.spec b/jmh.spec index 1ffe207..04cd360 100644 --- a/jmh.spec +++ b/jmh.spec @@ -2,7 +2,7 @@ Name: jmh Version: 1.25.2 -Release: 1 +Release: 2 Summary: Java Microbenchmark Harness License: GPLv2 with exceptions URL: http://openjdk.java.net/projects/code-tools/jmh/ @@ -13,6 +13,8 @@ Patch0: jopt-simple.patch BuildRequires: maven-local mvn(junit:junit) mvn(net.sf.jopt-simple:jopt-simple) >= 5 BuildRequires: mvn(org.apache.commons:commons-math3) BuildRequires: mvn(org.apache.maven.plugins:maven-site-plugin) mvn(org.ow2.asm:asm) +BuildRequires: java-11-openjdk-devel +Requires: java-11-openjdk javapackages-tools Requires: mvn(net.sf.jopt-simple:jopt-simple) >= 5 BuildArch: noarch @@ -86,6 +88,9 @@ done sed -i "s,59,51,;s,Temple Place,Franklin Street,;s,Suite 330,Fifth Floor,;s,02111-1307,02110-1301," src/license/gpl_cpe/license.txt %build +export JAVA_HOME=%{_jvmdir}/java-11-openjdk +export CFLAGS="${RPM_OPT_FLAGS}" +export CXXFLAGS="${RPM_OPT_FLAGS}" %mvn_build -s %install @@ -119,6 +124,9 @@ sed -i "s,59,51,;s,Temple Place,Franklin Street,;s,Suite 330,Fifth Floor,;s,0211 %license LICENSE src/license/* %changelog +* Sun Jan 26 2025 yaoxin <1024769339@qq.com> - 1.25.2-2 +- Fix build failure caused by commons-math used jdk11 to build + * Mon Jan 15 2024 Ge Wang -1.25.2-1 - update to version 1.25.2 -- Gitee