From 53510c22097a6c9dcc83acc47ce6441673424915 Mon Sep 17 00:00:00 2001 From: Francesco Marinucci Date: Tue, 6 Jun 2017 21:45:13 +0100 Subject: [PATCH] hplip: moved to desktop --- ...-ppd.h-in-various-places-as-CUPS-2.2.patch | 50 ---------- hplip/PKGBUILD | 94 ------------------- hplip/disable_upgrade.patch | 14 --- hplip/fix_tabs.patch | 17 ---- hplip/hplip.install | 10 -- 5 files changed, 185 deletions(-) delete mode 100644 hplip/0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch delete mode 100644 hplip/PKGBUILD delete mode 100644 hplip/disable_upgrade.patch delete mode 100644 hplip/fix_tabs.patch delete mode 100644 hplip/hplip.install diff --git a/hplip/0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch b/hplip/0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch deleted file mode 100644 index 491c3072b..000000000 --- a/hplip/0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch +++ /dev/null @@ -1,50 +0,0 @@ -From b3a7fa4d4a573cfe0073ae50197f679af7e3a0ac Mon Sep 17 00:00:00 2001 -From: Till Kamppeter -Date: Sat, 24 Sep 2016 10:37:20 +0200 -Subject: Add 'include ' in various places as CUPS 2.2 moved some - definitions to ppd.h - ---- - configure.in | 2 +- - prnt/hpcups/HPCupsFilter.h | 2 ++ - prnt/hpijs/hpcupsfax.cpp | 1 + - 3 files changed, 4 insertions(+), 1 deletion(-) - -diff --git a/configure.in b/configure.in -index d3a1ddb..eabe14a 100755 ---- a/configure.in -+++ b/configure.in -@@ -554,7 +554,7 @@ fi - - if test "$hpijs_only_build" = "no" && test "$hpcups_only_build" = "no"; then - AC_CHECK_LIB([cups], [cupsDoFileRequest], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libcups support], 9)]) -- AC_CHECK_HEADERS(cups/cups.h, ,[AC_MSG_ERROR([cannot find cups-devel support], 3)]) -+ AC_CHECK_HEADERS(cups/cups.h cups/ppd.h, ,[AC_MSG_ERROR([cannot find cups-devel support], 3)]) - if test "$libusb01_build" = "yes"; then - AC_CHECK_LIB([usb], [usb_init], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libusb support], 2)]) - AC_CHECK_HEADERS(usb.h, ,[AC_MSG_ERROR([cannot find libusb-devel support], 11)]) -diff --git a/prnt/hpcups/HPCupsFilter.h b/prnt/hpcups/HPCupsFilter.h -index ff5548e..c517989 100644 ---- a/prnt/hpcups/HPCupsFilter.h -+++ b/prnt/hpcups/HPCupsFilter.h -@@ -38,6 +38,8 @@ - - #include "dbuscomm.h" - -+#include -+ - #define DBITMAPFILEHEADER 14 - #define DBITMAPINFOHEADER 40 - -diff --git a/prnt/hpijs/hpcupsfax.cpp b/prnt/hpijs/hpcupsfax.cpp -index 8514775..994e50f 100644 ---- a/prnt/hpijs/hpcupsfax.cpp -+++ b/prnt/hpijs/hpcupsfax.cpp -@@ -43,6 +43,7 @@ - #include - #include - #include -+#include - #include - #include - #ifdef FALSE diff --git a/hplip/PKGBUILD b/hplip/PKGBUILD deleted file mode 100644 index 15fbe6bf3..000000000 --- a/hplip/PKGBUILD +++ /dev/null @@ -1,94 +0,0 @@ -pkgname=hplip -pkgver=3.16.11 -pkgrel=2 -pkgdesc="Drivers for HP DeskJet, OfficeJet, Photosmart, Business Inkjet and some LaserJet." -arch=('x86_64') -url="http://hplipopensource.com" -license=('GPL') -depends=('python3' 'ghostscript' 'net-snmp' 'wget' 'foomatic-db-engine' - #dependencies added by default to run the GUI and other services - 'python3-pyqt5' 'python3-gobject' 'cups' 'libusb' 'python3-dbus') -makedepends=('sane' 'rpcbind' ) -optdepends=('sane: for scanner support' - 'python3-pillow: for commandline scanning support' - 'python3-reportlab: for pdf output in hp-scan' - 'rpcbind: for network support') -install=hplip.install -source=(https://downloads.sourceforge.net/${pkgname}/$pkgname-$pkgver.tar.gz - disable_upgrade.patch - fix_tabs.patch - 0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch) -md5sums=('7d187c3142ba323a3021767d333ad9f4' - '4ebb9377a989b4fb776e37f5968bb7b0' - '434fcb7583bb9dc21e64341672d219e2' - 'ceb7449b12e2ecf70f898bc50b161a3c') - -prepare() { - cd $pkgname-$pkgver - - export PYTHON=python3 - - find . -type f -exec sed -i 's~^#.*env python~#!/usr/bin/env python3~' {} + - sed -i '1s|#!/usr/bin/python|#!/usr/bin/python3|' doctor.py setup.py makeuri.py logcapture.py base/magic.py - sed -i '1s|#!/usr/bin/python|#!/usr/bin/python3|' ui/upgradeform.py uninstall.py upgrade.py config_usb_printer.py - sed -i 's|python ./print.py|python3 ./print.py|' scan.py - sed -i 's|python ./testpage.py|python3 ./testpage.py|' setup.py - sed -i 's|python ./setup.py|python3 ./setup.py|' ui4/devmgr5.py ui4/nodevicesdialog.py - sed -i 's|python %HOME%|python3 %HOME%|' base/utils.py - sed -i 's|python ./plugin.py|python3 ./plugin.py|' base/pkit.py - sed -i 's|/usr/bin/python|/usr/bin/python3|' data/rules/hplip-printer@.service - - # disable insecure update - https://bugs.archlinux.org/task/38083 - patch -Np0 -i ${srcdir}/disable_upgrade.patch - - # fix tabs breaking printing; FS#50588 - patch -Np0 -i ${srcdir}/fix_tabs.patch - # add missing 'include ' at various places - patch -Np1 -i ${srcdir}/0022-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch - - # Use system foomatic-rip for hpijs driver instead of foomatic-rip-hplip - # The hpcups driver does not use foomatic-rip - local i - for i in ppd/hpijs/*.ppd.gz ; do - rm -f ${i}.temp - gunzip -c ${i} | sed 's/foomatic-rip-hplip/foomatic-rip/g' | \ - gzip > ${i}.temp || return 1 - mv ${i}.temp ${i} - done - - export AUTOMAKE='automake --foreign' - autoreconf --force --install -} - -build() { - cd $pkgname-$pkgver - ./configure --prefix=/usr \ - --enable-qt5 \ - --disable-qt4 \ - --disable-foomatic-rip-hplip-install \ - --enable-foomatic-ppd-install \ - --enable-hpcups-install \ - --enable-new-hpcups \ - --enable-cups-ppd-install \ - --enable-cups-drv-install \ - --enable-hpijs-install \ - --enable-foomatic-drv-install \ - --enable-pp-build #--help - - make -} - -package() { - cd $pkgname-$pkgver - make -j1 rulesdir=/usr/lib/udev/rules.d DESTDIR=$pkgdir install - - # remove config provided by sane and autostart of hp-daemon - rm -rf $pkgdir/etc/{sane.d,xdg} - - # remove HAL .fdi file because HAL is no longer used - rm -rf $pkgdir/usr/share/hal - - # remove rc script - rm -rf $pkgdir/etc/init.d -} - diff --git a/hplip/disable_upgrade.patch b/hplip/disable_upgrade.patch deleted file mode 100644 index c39252dd4..000000000 --- a/hplip/disable_upgrade.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- upgrade.py.orig 2013-10-31 12:46:54.000000000 +0100 -+++ upgrade.py 2013-12-04 14:58:03.000000000 +0100 -@@ -134,6 +134,11 @@ except getopt.GetoptError, e: - if os.getenv("HPLIP_DEBUG"): - log.set_level('debug') - -+ -+log.error("HPLIP upgrade is disabled by Chakra for security reasons, if you like to upgrade HPLIP, use the Chakra software package manager pacman or open a bugreport on http://chakraos.org/bugtracker") -+clean_exit(1) -+ -+ - for o, a in opts: - if o in ('-h', '--help'): - usage() diff --git a/hplip/fix_tabs.patch b/hplip/fix_tabs.patch deleted file mode 100644 index 1552933df..000000000 --- a/hplip/fix_tabs.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- prnt/filters/hpps 2016-08-26 12:04:29.000000000 +0200 -+++ prnt/filters/hpps.new 2016-08-31 21:19:57.868640372 +0200 -@@ -191,11 +191,11 @@ - msg("Setting Pin to default") - else: - szKeyInitials = ['HPFIDigit', 'HPSEDigit', 'HPTHDigit', 'HPFTDigit'] -- for x in szKeyInitials: -+ for x in szKeyInitials: - try: -- secpin += opts[x] -+ secpin += opts[x] - except KeyError: -- secpin += '0' -+ secpin += '0' - - os.write(output_fd, to_bytes_utf8('@PJL SET HOLDKEY="%s"\x0a' % secpin)) - diff --git a/hplip/hplip.install b/hplip/hplip.install deleted file mode 100644 index cb0eaf8e8..000000000 --- a/hplip/hplip.install +++ /dev/null @@ -1,10 +0,0 @@ -post_install() { - cat << EOF - -NOTE ----- -# If you want to use this driver with sane: -# echo "hpaio" >> /etc/sane.d/dll.conf - -EOF -}