hp-check: use pkgconf when checking for cups version

This commit is contained in:
Zdenek Dohnal 2023-08-24 16:34:43 +02:00
parent 606f617bde
commit 66bf018624
2 changed files with 14 additions and 8 deletions

View File

@ -1,16 +1,17 @@
diff -up hplip-3.17.11/installer/core_install.py.check-cups hplip-3.17.11/installer/core_install.py
--- hplip-3.17.11/installer/core_install.py.check-cups 2017-12-07 15:34:24.855761874 +0100
+++ hplip-3.17.11/installer/core_install.py 2017-12-07 15:38:44.749568860 +0100
@@ -349,9 +349,9 @@ class CoreInstall(object):
diff --git a/installer/core_install.py b/installer/core_install.py
index a6654e2..0bd1e9c 100644
--- a/installer/core_install.py
+++ b/installer/core_install.py
@@ -362,9 +362,9 @@ class CoreInstall(object):
'automake': (True, ['prnt'], AUTOMAKE_STR, self.check_automake, DEPENDENCY_RUN_AND_COMPILE_TIME, '-', None, GENERALDEP),
'libjpeg': (True, ['base', 'prnt'], JPEG_STR, self.check_libjpeg, DEPENDENCY_RUN_AND_COMPILE_TIME, '-', None, GENERALDEP),
'libtool': (True, ['base', 'prnt'], LIBTOOL_STR, self.check_libtool, DEPENDENCY_COMPILE_TIME, '-', 'libtool --version', COMPILEDEP),
- 'cups': (True, ['base', 'prnt'], CUPS_STR, self.check_cups, DEPENDENCY_RUN_TIME, '1.1', 'cups-config --version', EXTERNALDEP),
- 'cups-devel': (True, ['base', 'prnt'], CUPS_DEV_STR, self.check_cups_devel, DEPENDENCY_COMPILE_TIME, '-', 'cups-config --version', GENERALDEP),
- 'cups-image': (True, ['base', 'prnt'], CUPS_IMG_STR, self.check_cups_image, DEPENDENCY_COMPILE_TIME, '-', 'cups-config --version', GENERALDEP),
+ 'cups': (True, ['base', 'prnt'], CUPS_STR, self.check_cups, DEPENDENCY_RUN_TIME, '1.1', 'lpstat -r', EXTERNALDEP),
+ 'cups-devel': (True, ['base', 'prnt'], CUPS_DEV_STR, self.check_cups_devel, DEPENDENCY_COMPILE_TIME, '-', 'lpstat -r', GENERALDEP),
+ 'cups-image': (True, ['base', 'prnt'], CUPS_IMG_STR, self.check_cups_image, DEPENDENCY_COMPILE_TIME, '-', 'lpstat -r', GENERALDEP),
+ 'cups': (True, ['base', 'prnt'], CUPS_STR, self.check_cups, DEPENDENCY_RUN_TIME, '-', None, EXTERNALDEP),
+ 'cups-devel': (True, ['base', 'prnt'], CUPS_DEV_STR, self.check_cups_devel, DEPENDENCY_COMPILE_TIME, '1.1', 'pkgconf --modversion cups', GENERALDEP),
+ 'cups-image': (True, ['base', 'prnt'], CUPS_IMG_STR, self.check_cups_image, DEPENDENCY_COMPILE_TIME, '1.1', 'pkgconf --modversion cups', GENERALDEP),
'gcc': (True, ['base', 'prnt'], GCC_STR, self.check_gcc, DEPENDENCY_COMPILE_TIME, '-', 'gcc --version', COMPILEDEP),
'make': (True, ['base', 'prnt'], MAKE_STR, self.check_make, DEPENDENCY_COMPILE_TIME, '3.0', 'make --version', COMPILEDEP),
'libpthread': (True, ['base', 'prnt'], THREAD_STR, self.check_libpthread, DEPENDENCY_RUN_AND_COMPILE_TIME, '-', 'FUNC#get_libpthread_version', GENERALDEP),

View File

@ -7,7 +7,7 @@
Summary: HP Linux Imaging and Printing Project
Name: hplip
Version: 3.23.5
Release: 8%{?dist}
Release: 9%{?dist}
# most files (base/*, *, ui*/...) - GPL2+
# prnt/hpijs/ jpeg related files - IJG
# prnt/* - BSD-3-Clause - it is modified a little, asked here https://gitlab.com/fedora/legal/fedora-license-data/-/issues/267 - proposed as BSD-3-Clause-HP
@ -364,6 +364,8 @@ BuildRequires: libappstream-glib
# for avahi-browse - looks for devices on local network
Recommends: avahi-tools
Recommends: libsane-hpaio%{?_isa} = %{version}-%{release}
# for hp-check
Recommends: pkgconf
Requires: %{name}%{?_isa} = %{version}-%{release}
# hpssd.py
@ -977,6 +979,9 @@ find doc/images -type f -exec chmod 644 {} \;
%config(noreplace) %{_sysconfdir}/sane.d/dll.d/hpaio
%changelog
* Thu Aug 24 2023 Zdenek Dohnal <zdohnal@redhat.com> - 3.23.5-9
- hp-check: use pkgconf when checking for cups version
* Thu Aug 03 2023 Zdenek Dohnal <zdohnal@redhat.com> - 3.23.5-8
- fallback to using external plugin for Hbpl1 printers