[packages/genders] switch to %use_default_jdk
atler
atler at pld-linux.org
Fri Jul 7 02:27:37 CEST 2023
commit dc89bce33c4187dc502bd76d88444489cf8788bb
Author: Jan Palus <atler at pld-linux.org>
Date: Fri Jul 7 00:30:46 2023 +0200
switch to %use_default_jdk
genders.spec | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/genders.spec b/genders.spec
index 1ac976b..18ca13c 100644
--- a/genders.spec
+++ b/genders.spec
@@ -3,6 +3,9 @@
%bcond_without java # Java extensions
%bcond_without static_libs # static library
#
+
+%{?with_java:%{?use_default_jdk}}
+
Summary: Static cluster configuration database
Summary(pl.UTF-8): Statyczna baza danych konfiguracji klastra
Name: genders
@@ -20,7 +23,7 @@ BuildRequires: autoconf >= 2.50
BuildRequires: automake
BuildRequires: bison
BuildRequires: flex
-%{?with_java:BuildRequires: jdk}
+%{?with_java:%{?use_jdk:%buildrequires_jdk}%{!?use_jdk:BuildRequires: jdk}}
BuildRequires: libstdc++-devel
BuildRequires: libtool >= 2:2
BuildRequires: perl-ExtUtils-MakeMaker
@@ -28,7 +31,7 @@ BuildRequires: perl-tools-pod
BuildRequires: python-devel
BuildRequires: rpm-perlprov
BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.745
+BuildRequires: rpmbuild(macros) >= 2.021
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -182,8 +185,15 @@ Interfejs Pythona do biblioteki genders.
%{__autoconf}
%{__autoheader}
%{__automake}
-CPPFLAGS="%{rpmcppflags} -I%{_jvmdir}/java/include -I%{_jvmdir}/java/include/linux"
+%{?with_java:CPPFLAGS="%{rpmcppflags} -I%{java_home}/include -I%{java_home}/include/linux"}
%configure \
+%if %{with java}
+ ac_cv_prog_JAR="%{java_home}/bin/jar" \
+ ac_cv_prog_JAVA="%{java_home}/bin/java" \
+ ac_cv_prog_JAVAC="%{java_home}/bin/javac" \
+ ac_cv_prog_JAVADOC="%{java_home}/bin/javadoc" \
+ ac_cv_prog_JAVAH="%{java_home}/bin/javah" \
+%endif
--disable-silent-rules \
%{!?with_static_libs:--disable-static} \
--with-extension-destdir=$RPM_BUILD_ROOT \
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/genders.git/commitdiff/dc89bce33c4187dc502bd76d88444489cf8788bb
More information about the pld-cvs-commit
mailing list