[packages/libjxl] add tests bcond (keep disabled by default) and make test deps conditional

atler atler at pld-linux.org
Sat Jul 9 20:10:20 CEST 2022


commit c6b04e9a3a5db0a3b679de85891b5fff035fc103
Author: Jan Palus <atler at pld-linux.org>
Date:   Sat Jul 9 19:53:17 2022 +0200

    add tests bcond (keep disabled by default) and make test deps conditional

 libjxl.spec | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/libjxl.spec b/libjxl.spec
index 8a39dde..68db3f1 100644
--- a/libjxl.spec
+++ b/libjxl.spec
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_with	tests		# build tests
+
 Summary:	JPEG XL reference implementation
 Summary(pl.UTF-8):	Referencyjna implementacja JPEG XL
 Name:		libjxl
@@ -19,9 +23,11 @@ BuildRequires:	doxygen
 BuildRequires:	gdk-pixbuf2-devel >= 2.38
 BuildRequires:	giflib-devel >= 5
 BuildRequires:	gimp-devel >= 1:2.10
+%if %{with tests}
 BuildRequires:	gmock-devel
 BuildRequires:	google-benchmark-devel
 BuildRequires:	gtest-devel
+%endif
 BuildRequires:	highway-devel >= 0.15.0
 BuildRequires:	lcms2-devel >= 2.10
 BuildRequires:	libavif-devel
@@ -33,7 +39,7 @@ BuildRequires:	libstdc++-devel >= 6:7
 BuildRequires:	lodepng-devel
 BuildRequires:	pkgconfig
 BuildRequires:	python3-devel >= 1:3
-BuildRequires:	rpmbuild(macros) >= 1.605
+BuildRequires:	rpmbuild(macros) >= 1.742
 # for gdk-pixbuf loader only (the rest uses lcms2 by default)
 BuildRequires:	skcms-devel
 BuildRequires:	zlib-devel
@@ -129,7 +135,7 @@ Wtyczka wczytująca/zapisująca pliki JPEG XL dla GIMP-a.
 install -d build
 cd build
 %cmake .. \
-	-DBUILD_TESTING=OFF \
+	%{cmake_on_off tests BUILD_TESTING} \
 	-DJPEGXL_ENABLE_PLUGINS=ON \
 	-DJPEGXL_ENABLE_SJPEG=OFF \
 	-DJPEGXL_ENABLE_SKCMS=OFF \
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libjxl.git/commitdiff/c6b04e9a3a5db0a3b679de85891b5fff035fc103



More information about the pld-cvs-commit mailing list