[packages/libphonenumber] switch to %use_default_jdk; rel 2

atler atler at pld-linux.org
Mon Jun 15 12:18:10 CEST 2026


commit 8f99a16f5b7174374451214f33caa775f5b08ea2
Author: Jan Palus <atler at pld-linux.org>
Date:   Mon Jun 15 12:12:21 2026 +0200

    switch to %use_default_jdk; rel 2
    
    jdk always implies jre so dependency is satisfied. altough package
    requires only jre it's not really worth the effort to roll macros for
    jre exclusively (unless it's proven otherwise).

 libphonenumber.spec | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/libphonenumber.spec b/libphonenumber.spec
index 841a389..7ff2142 100644
--- a/libphonenumber.spec
+++ b/libphonenumber.spec
@@ -3,7 +3,9 @@
 # Conditional build:
 %bcond_with	re2		# RE2 regular expressions engine (broken as of 8.12.2)
 %bcond_without	static_libs	# static libraries
-#
+
+%{?use_default_jdk}
+
 Summary:	Library to handle international phone numbers
 Summary(pl.UTF-8):	Biblioteka do obsługi międzynarodowych numerów telefonów
 Name:		libphonenumber
@@ -11,7 +13,7 @@ Name:		libphonenumber
 # tools/java/cpp-build/target/cpp-build-1.0-SNAPSHOT-jar-with-dependencies.jar (or similar)
 # some releases don't contain that file and requires building it by maven
 Version:	9.0.32
-Release:	1
+Release:	2
 License:	Apache v2.0 with BSD parts
 Group:		Libraries
 #Source0Download: https://github.com/google/libphonenumber/releases/
@@ -25,13 +27,13 @@ BuildRequires:	abseil-cpp-devel
 BuildRequires:	boost-devel >= 1.40.0
 BuildRequires:	cmake >= 3.11
 BuildRequires:	gtest-devel
-BuildRequires:	jre
+%buildrequires_jdk
 BuildRequires:	libicu-devel >= 4.4
 BuildRequires:	libstdc++-devel >= 6:7
 BuildRequires:	pkgconfig
 BuildRequires:	protobuf-devel >= 2.4
 %{?with_re2:BuildRequires:	re2-devel}
-BuildRequires:	rpmbuild(macros) >= 1.605
+BuildRequires:	rpmbuild(macros) >= 2.021
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 # avoid false postive for tls var coming from protobuf
@@ -87,6 +89,7 @@ cd build/cpp
 %cmake ../../cpp \
 	%{!?with_static_libs:-DBUILD_STATIC_LIB=OFF} \
 	-DCMAKE_CXX_STANDARD=17 \
+	-DJAVA_BIN:FILEPATH="%java" \
 	%{?with_re2:-DUSE_RE2=ON} \
 	-DUSE_STD_MAP=ON
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libphonenumber.git/commitdiff/8f99a16f5b7174374451214f33caa775f5b08ea2



More information about the pld-cvs-commit mailing list