[packages/hplip] - up to 3.22.6, use python3/qt5
baggins
baggins at pld-linux.org
Sun Jul 10 23:48:59 CEST 2022
commit 010d46082ce8471a2398d2f99609a0ea77379b92
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Jul 10 23:48:36 2022 +0200
- up to 3.22.6, use python3/qt5
hplip-desktop.patch | 2 +-
hplip-destdir.patch | 14 +++++++-------
hplip-udev-rules.patch | 2 +-
hplip.spec | 40 +++++++++++++++++++++++-----------------
no-undefined-macro.patch | 11 +++++++++++
pld-distro.patch | 17 ++++++++---------
unresolved.patch | 36 ++++++++++++++++++------------------
7 files changed, 69 insertions(+), 53 deletions(-)
---
diff --git a/hplip.spec b/hplip.spec
index b71c671..f0f091e 100644
--- a/hplip.spec
+++ b/hplip.spec
@@ -15,12 +15,12 @@
Summary: Hewlett-Packard Linux Imaging and Printing suite - printing and scanning using HP devices
Summary(pl.UTF-8): Narzędzia Hewlett-Packard Linux Imaging and Printing - drukowanie i skanowanie przy użyciu urządzeń HP
Name: hplip
-Version: 3.18.6
-Release: 2
+Version: 3.22.6
+Release: 1
License: BSD (hpijs), MIT (low-level scanning and printing code), GPL v2 (the rest)
Group: Applications/System
Source0: http://downloads.sourceforge.net/hplip/%{name}-%{version}.tar.gz
-# Source0-md5: 3857eae76c49c00fa185628d4dce7d61
+# Source0-md5: 77eb0b3552f85a46a079d24f4632385f
Patch0: %{name}-desktop.patch
Patch1: unresolved.patch
Patch2: pld-distro.patch
@@ -30,6 +30,7 @@ Patch2: pld-distro.patch
Patch3: %{name}-binary-fixup.patch
Patch4: %{name}-destdir.patch
Patch5: %{name}-udev-rules.patch
+Patch6: no-undefined-macro.patch
URL: http://hplipopensource.com/
BuildRequires: autoconf
BuildRequires: automake
@@ -44,21 +45,21 @@ BuildRequires: libusb-devel >= 1.0
BuildRequires: net-snmp-devel
BuildRequires: openssl-devel
BuildRequires: pkgconfig
-BuildRequires: python-devel >= 2.2
-BuildRequires: python-modules >= 2.2
+BuildRequires: python3-devel
+BuildRequires: python3-modules
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.752
BuildRequires: sane-backends-devel
BuildRequires: sed >= 4.0
Requires: %{name}-libs = %{version}-%{release}
-Requires: python-modules
+Requires: python3-modules
Obsoletes: hal-hplip
Obsoletes: hpijs
Obsoletes: hplip-daemon
Obsoletes: python-hplip
Conflicts: ghostscript <= 7.00-3
# used in scan.py
-Suggests: python-ReportLab >= 2.0
+Suggests: python3-ReportLab >= 2.0
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _ulibdir %{_prefix}/lib
@@ -89,7 +90,7 @@ Summary: HPLIP GUI tools
Summary(pl.UTF-8): Narzędzia HPLIP z graficznym interfejsem użytkownika
Group: Applications/System
Requires: %{name} = %{version}-%{release}
-Requires: python-PyQt4
+Requires: python3-PyQt5
%description gui-tools
HPLIP GUI tools.
@@ -167,18 +168,19 @@ urządzenia HP AiO.
%prep
%setup -q
-%undos Makefile.am
+%undos Makefile.am installer/distros.dat
%patch0 -p1
%patch1 -p1
%patch2 -p1
#%patch3 -p1
%patch4 -p1
%patch5 -p1
+%patch6 -p1
-%{__sed} -i -e '1s,^#!/usr/bin/env python$,#!%{__python},' *.py fax/filters/pstotiff prnt/filters/hpps
+%{__sed} -i -e '1s,^#!/usr/bin/env python$,#!%{__python3},' *.py fax/filters/pstotiff prnt/filters/hpps
find base fax installer prnt scan ui ui4 -name '*.py' | xargs \
- %{__sed} -i -e '1s,^#!/usr/bin/env python$,#!%{__python},'
-%{__sed} -i -e '1s,^#!/usr/bin/python$,#!%{__python},' logcapture.py doctor.py
+ %{__sed} -i -e '1s,^#!/usr/bin/env python$,#!%{__python3},'
+%{__sed} -i -e '1s,^#!/usr/bin/python$,#!%{__python3},' logcapture.py doctor.py
%{__sed} -i -e 's#test -d /usr/share/polkit-1#true#' configure.in
@@ -189,6 +191,7 @@ find base fax installer prnt scan ui ui4 -name '*.py' | xargs \
%{__automake}
CXXFLAGS="%{rpmcflags} -fno-exceptions -fno-rtti"
%configure \
+ PYTHON=%{__python3} \
%{!?with_dbus:--disable-dbus-build} \
%{!?with_fax:--disable-fax-build} \
--enable-cups-drv-install \
@@ -225,7 +228,7 @@ done
ln -s %{cups_filterdir}/foomatic-rip $RPM_BUILD_ROOT%{cups_filterdir}/foomatic-rip-hplip
# useless (nothing is going to link to installed libraries/modules)
-%{__rm} $RPM_BUILD_ROOT{%{_libdir}/libhp*.{so,la},%{_libdir}/sane/*.{so,la},%{py_sitedir}/*.la}
+%{__rm} $RPM_BUILD_ROOT{%{_libdir}/libhp*.{so,la},%{_libdir}/sane/*.{so,la},%{py3_sitedir}/*.la}
# handled by post script
%{__rm} $RPM_BUILD_ROOT/etc/sane.d/dll.conf
# junk
@@ -332,10 +335,10 @@ fi
%{_datadir}/hplip/scan
%attr(755,root,root) %{_datadir}/hplip/dat2drv
%attr(755,root,root) %{_datadir}/hplip/locatedriver
-%attr(755,root,root) %{py_sitedir}/cupsext.so
-%attr(755,root,root) %{py_sitedir}/hpmudext.so
-%attr(755,root,root) %{py_sitedir}/pcardext.so
-%attr(755,root,root) %{py_sitedir}/scanext.so
+%attr(755,root,root) %{py3_sitedir}/cupsext.so
+%attr(755,root,root) %{py3_sitedir}/hpmudext.so
+%attr(755,root,root) %{py3_sitedir}/pcardext.so
+%attr(755,root,root) %{py3_sitedir}/scanext.so
%dir %{_sysconfdir}/hp
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hp/hplip.conf
/lib/udev/rules.d/56-hpmud.rules
@@ -386,6 +389,9 @@ fi
%files sane
%defattr(644,root,root,755)
%doc scan/sane/hpaio.desc
+%attr(755,root,root) %{_bindir}/hp-uiscan
+%{_datadir}/applications/hp-uiscan.desktop
+%{_datadir}/hplip/uiscan.py
%attr(755,root,root) %{_libdir}/sane/libsane-hpaio.so.*.*.*
%attr(755,root,root) %{_libdir}/sane/libsane-hpaio.so.1
diff --git a/hplip-desktop.patch b/hplip-desktop.patch
index d9447ae..ff760f6 100644
--- a/hplip-desktop.patch
+++ b/hplip-desktop.patch
@@ -11,7 +11,7 @@
--- hplip-3.10.2/hplip-systray.desktop.in~ 2010-02-25 00:07:55.000000000 +0100
+++ hplip-3.10.2/hplip-systray.desktop.in 2010-05-12 12:57:27.908662640 +0200
@@ -7,6 +7,6 @@
- Exec=hp-systray
+ Exec=hp-systray -x
Icon=@abs_datadir@/hplip/data/images/128x128/hp_logo.png
Terminal=false
-Categories=Application;Utility;
diff --git a/hplip-destdir.patch b/hplip-destdir.patch
index 2c6b620..6153600 100644
--- a/hplip-destdir.patch
+++ b/hplip-destdir.patch
@@ -1,6 +1,6 @@
---- hplip-3.18.6/Makefile.am.orig 2018-09-02 18:32:31.253307873 +0200
-+++ hplip-3.18.6/Makefile.am 2018-09-02 18:50:52.193295299 +0200
-@@ -701,14 +701,14 @@
+--- hplip-3.22.6/Makefile.am.orig 2022-07-10 22:56:39.843717171 +0200
++++ hplip-3.22.6/Makefile.am 2022-07-10 22:57:54.445156428 +0200
+@@ -713,14 +713,14 @@
echo hpaio >>$(DESTDIR)/etc/sane.d/dll.conf ; \
fi; \
if [ \( "$(UNAME)" = "x86_64" -a -d "$(libdir)/x86_64-linux-gnu/sane" \) ]; then \
@@ -10,12 +10,12 @@
+ ln -sf $(libdir)/sane/libsane-hpaio.so.1 $(DESTDIR)$(libdir)/x86_64-linux-gnu/sane/ ; \
fi; \
if [ \( \( "$(UNAME)" = "i686" -o "$(UNAME)" = "i386" \) -a -d "$(libdir)/i386-linux-gnu" \) ]; then \
-- ln -sf $(libdir)/libhpmud.so.0.0.6 $(libdir)/i386-linux-gnu/libhpmud.so ; \
-- ln -sf $(libdir)/libhpmud.so.0.0.6 $(libdir)/i386-linux-gnu/libhpmud.so.0 ; \
+- ln -sf $(libdir)/libhpmud.so.0.0.6 $(libdir)/i386-linux-gnu/libhpmud.so ; \
+- ln -sf $(libdir)/libhpmud.so.0.0.6 $(libdir)/i386-linux-gnu/libhpmud.so.0 ; \
- ln -sf $(libdir)/sane/libsane-hpaio.so.1.0.0 $(libdir)/i386-linux-gnu/sane/libsane-hpaio.so.1 ; \
- ln -sf $(libdir)/sane/libsane-hpaio.so.1.0.0 $(libdir)/i386-linux-gnu/sane/libsane-hpaio.so ; \
-+ ln -sf $(libdir)/libhpmud.so.0.0.6 $(DESTDIR)$(libdir)/i386-linux-gnu/libhpmud.so ; \
-+ ln -sf $(libdir)/libhpmud.so.0.0.6 $(DESTDIR)$(libdir)/i386-linux-gnu/libhpmud.so.0 ; \
++ ln -sf $(libdir)/libhpmud.so.0.0.6 $(DESTDIR)$(libdir)/i386-linux-gnu/libhpmud.so ; \
++ ln -sf $(libdir)/libhpmud.so.0.0.6 $(DESTDIR)$(libdir)/i386-linux-gnu/libhpmud.so.0 ; \
+ ln -sf $(libdir)/sane/libsane-hpaio.so.1.0.0 $(DESTDIR)$(libdir)/i386-linux-gnu/sane/libsane-hpaio.so.1 ; \
+ ln -sf $(libdir)/sane/libsane-hpaio.so.1.0.0 $(DESTDIR)$(libdir)/i386-linux-gnu/sane/libsane-hpaio.so ; \
fi \
diff --git a/hplip-udev-rules.patch b/hplip-udev-rules.patch
index eb67997..255a60c 100644
--- a/hplip-udev-rules.patch
+++ b/hplip-udev-rules.patch
@@ -2,7 +2,7 @@
+++ hplip-3.16.2/data/rules/56-hpmud.rules 2016-02-22 17:41:52.463499649 +0100
@@ -12,7 +12,4 @@
# ENV{ID_HPLIP}="1" is for Ubuntu udev-acl
- ATTR{idVendor}=="03f0", ENV{ID_USB_INTERFACES}=="*:0701??:*|*:08????:", OWNER="root", GROUP="lp", MODE="0664", ENV{libsane_matched}="yes", ENV{hp_test}="yes", ENV{ID_HPLIP}="1"
+ ATTR{idVendor}=="03f0", ENV{ID_USB_INTERFACES}=="*:0701??:*|*:ffcc00:", OWNER="root", GROUP="lp", MODE="0664", ENV{libsane_matched}="yes", ENV{hp_test}="yes", ENV{ID_HPLIP}="1"
-# This rule will check the smart install feature, plugin status and firmware download for the required printers.
-ENV{hp_test}=="yes", PROGRAM="/bin/sh -c 'logger -p user.info loading HP Device $env{BUSNUM} $env{DEVNUM}'", RUN+="/bin/sh -c '/usr/bin/nohup /usr/bin/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM}'"
diff --git a/no-undefined-macro.patch b/no-undefined-macro.patch
new file mode 100644
index 0000000..caf02b2
--- /dev/null
+++ b/no-undefined-macro.patch
@@ -0,0 +1,11 @@
+--- hplip-3.22.6/scan/sane/orblite.c~ 2022-06-23 06:56:30.000000000 +0200
++++ hplip-3.22.6/scan/sane/orblite.c 2022-07-10 23:33:28.815232120 +0200
+@@ -195,7 +195,7 @@
+
+ static int bb_unload(SANE_THandle ps)
+ {
+- _DBG("Calling orblite bb_unload: \n");
++ //_DBG("Calling orblite bb_unload: \n");
+ if (ps->bb_handle)
+ {
+ dlclose(ps->bb_handle);
diff --git a/pld-distro.patch b/pld-distro.patch
index f63c306..40c090f 100644
--- a/pld-distro.patch
+++ b/pld-distro.patch
@@ -1,20 +1,19 @@
---- hplip-3.18.7/installer/distros.dat.orig 2018-07-15 22:08:17.000000000 +0200
-+++ hplip-3.18.7/installer/distros.dat 2018-08-31 16:24:23.832035335 +0200
-@@ -92,7 +92,7 @@
+--- hplip-3.22.6/installer/distros.dat.orig 2022-07-10 22:48:06.595991488 +0200
++++ hplip-3.22.6/installer/distros.dat 2022-07-10 22:49:19.547691691 +0200
+@@ -94,7 +94,7 @@
# ****************************************
[distros]
--distros=unknown,mepis,debian,suse,mandriva,fedora,redhat,rhel,slackware,gentoo,redflag,ubuntu,xandros,freebsd,linspire,ark,pclinuxos,centos,igos,linuxmint,linpus,gos,boss,lfs,manjarolinux
-+distros=unknown,mepis,debian,suse,mandriva,fedora,redhat,rhel,slackware,gentoo,redflag,ubuntu,xandros,freebsd,linspire,ark,pclinuxos,centos,igos,linuxmint,linpus,gos,boss,lfs,manjarolinux,pld
+-distros=unknown,mepis,debian,suse,mandriva,fedora,redhat,rhel,slackware,gentoo,redflag,ubuntu,xandros,freebsd,linspire,ark,pclinuxos,centos,igos,linuxmint,linpus,gos,boss,lfs,manjarolinux,zorin,mxlinux,elementary
++distros=unknown,mepis,debian,suse,mandriva,fedora,redhat,rhel,slackware,gentoo,redflag,ubuntu,xandros,freebsd,linspire,ark,pclinuxos,centos,igos,linuxmint,linpus,gos,boss,lfs,manjarolinux,zorin,mxlinux,elementary,pld
# ****************************************
-@@ -10795,3 +10795,131 @@
- packages=automake
-
+@@ -19541,3 +19541,130 @@
+ packages=epm
+ # ****************************************
+
-+# ****************************************
+[pld]
+index=60
+versions=3
diff --git a/unresolved.patch b/unresolved.patch
index 6093f46..8dd4e11 100644
--- a/unresolved.patch
+++ b/unresolved.patch
@@ -1,17 +1,7 @@
---- hplip-3.10.9/scan/sane/ledm.c.wiget 2010-11-07 18:01:26.887129289 +0100
-+++ hplip-3.10.9/scan/sane/ledm.c 2010-11-07 18:02:17.662175777 +0100
-@@ -973,7 +973,7 @@ void ledm_close(SANE_Handle handle)
-
- if (ps == NULL || ps != session)
- {
-- BUG("invalid sane_close\n");
-+// BUG("invalid sane_close\n");
- return;
- }
-
---- hplip-3.16.2/Makefile.am.orig 2016-02-22 17:38:26.050174980 +0100
-+++ hplip-3.16.2/Makefile.am 2016-02-22 17:39:36.503505355 +0100
-@@ -60,7 +60,7 @@
+diff -urNp -x '*.orig' hplip-3.22.6.org/Makefile.am hplip-3.22.6/Makefile.am
+--- hplip-3.22.6.org/Makefile.am 2022-07-10 22:42:55.852246806 +0200
++++ hplip-3.22.6/Makefile.am 2022-07-10 22:42:59.782176747 +0200
+@@ -71,7 +71,7 @@ else
libsane_hpaio_la_LDFLAGS = -version-info 1:0:0
endif
# The following is a interlibrary dependency that must be compiled first.
@@ -20,14 +10,24 @@
#libsane_hpaio_la_CFLAGS = -DWITH_NONAMESPACES -DSOAP_DEBUG
libsane_hpaio_la_CFLAGS = $(DBUS_CFLAGS) -Iprotocol
---- hplip-3.16.2/Makefile.am.orig 2016-02-22 18:12:48.406755100 +0100
-+++ hplip-3.16.2/Makefile.am 2016-02-23 21:07:09.809356876 +0100
-@@ -288,7 +288,7 @@
+@@ -324,7 +324,7 @@ lib_LTLIBRARIES += libhpipp.la
libhpipp_la_SOURCES = protocol/hp_ipp.c protocol/hp_ipp.h protocol/hp_ipp_i.h
libhpipp_la_CFLAGS = -DCONFDIR=\"$(hplip_confdir)\"
libhpipp_la_LDFLAGS = -version-info 0:1:0
-libhpipp_la_LIBADD = libhpmud.la
+libhpipp_la_LIBADD = libhpmud.la -lcups
-
# cupsext
+ cupsextdir = $(pyexecdir)
+diff -urNp -x '*.orig' hplip-3.22.6.org/scan/sane/ledm.c hplip-3.22.6/scan/sane/ledm.c
+--- hplip-3.22.6.org/scan/sane/ledm.c 2022-06-23 06:56:30.000000000 +0200
++++ hplip-3.22.6/scan/sane/ledm.c 2022-07-10 22:42:59.782176747 +0200
+@@ -1078,7 +1078,7 @@ void ledm_close(SANE_Handle handle)
+
+ if (ps == NULL || ps != session)
+ {
+- BUG("invalid sane_close\n");
++// BUG("invalid sane_close\n");
+ return;
+ }
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/hplip.git/commitdiff/010d46082ce8471a2398d2f99609a0ea77379b92
More information about the pld-cvs-commit
mailing list