aboutsummaryrefslogtreecommitdiffstats
path: root/testing/hplip
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2018-11-26 08:39:20 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2018-11-26 08:40:25 +0000
commitff8e2bdfcb59d7e1381aa47a55f9d75a9c86ed3e (patch)
tree877edd9db7d46df2d6626dd947b384bd8df339ad /testing/hplip
parentc1fa63fe4f3412c40612bcb388b0c6b191658f5b (diff)
downloadaports-ff8e2bdfcb59d7e1381aa47a55f9d75a9c86ed3e.tar.bz2
aports-ff8e2bdfcb59d7e1381aa47a55f9d75a9c86ed3e.tar.xz
testing/hplip: upgrade to 3.18.10
Disable self-upgrade, remove closed-source parts Patches from Debian and Void
Diffstat (limited to 'testing/hplip')
-rw-r--r--testing/hplip/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch113
-rw-r--r--testing/hplip/APKBUILD19
-rw-r--r--testing/hplip/disable_upgrade.patch14
-rw-r--r--testing/hplip/musl-fixes.patch10
-rw-r--r--testing/hplip/types-musl.patch20
5 files changed, 170 insertions, 6 deletions
diff --git a/testing/hplip/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch b/testing/hplip/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch
new file mode 100644
index 0000000000..8d3b4d7bfd
--- /dev/null
+++ b/testing/hplip/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch
@@ -0,0 +1,113 @@
+From fa9c0cf1a5db9bf8880b4796d5e3e0da46534e3d Mon Sep 17 00:00:00 2001
+From: Didier Raboud <odyx@debian.org>
+Date: Tue, 21 Aug 2018 18:18:10 +0200
+Subject: Remove all ImageProcessor functionality, which is closed-source
+
+---
+ Makefile.am | 14 ++------------
+ prnt/hpcups/HPCupsFilter.cpp | 21 ---------------------
+ 2 files changed, 2 insertions(+), 33 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 1b097c4f9..8d5d78c9f 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -166,7 +166,7 @@ if !HPLIP_CLASS_DRIVER
+ dist_hplip_SCRIPTS = hpssd.py __init__.py hpdio.py
+ endif #HPLIP_CLASS_DRIVER
+
+-dist_noinst_DATA += prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template prnt/hpcups/libImageProcessor-x86_64.so prnt/hpcups/libImageProcessor-x86_32.so
++dist_noinst_DATA += prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template
+ dist_noinst_SCRIPTS += dat2drv.py install.py hplip-install init-suse-firewall init-iptables-firewall class_rpm_build.sh hplipclassdriver.spec createPPD.sh Makefile_dat2drv hpijs-drv
+
+ if !HPLIP_CLASS_DRIVER
+@@ -594,7 +594,7 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilter.cpp prnt/hpcups/HPCupsFilter.h prnt/hp
+ prnt/hpcups/ImageProcessor.h
+
+ hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS)
+-hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lImageProcessor -lcups -lcupsimage -lz $(DBUS_LIBS)
++hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lcups -lcupsimage -lz $(DBUS_LIBS)
+ #else
+ #hpcupsdir = $(cupsfilterdir)
+ #hpcups_PROGRAMS = hpcups
+@@ -686,16 +686,6 @@ endif #HPLIP_CLASS_DRIVER
+
+ install-data-hook:
+ if HPLIP_BUILD
+- if [ \( "$(UNAME)" = "x86_64" -a -d "$(libdir)/" \) ]; then \
+- cp prnt/hpcups/libImageProcessor-x86_64.so $(libdir)/ ; \
+- chmod 775 $(libdir)/libImageProcessor-x86_64.so ; \
+- ln -sf $(libdir)/libImageProcessor-x86_64.so $(libdir)/libImageProcessor.so ; \
+- fi; \
+- if [ \( \( "$(UNAME)" = "i686" -o "$(UNAME)" = "i386" \) -a -d "$(libdir)/" \) ]; then \
+- cp prnt/hpcups/libImageProcessor-x86_32.so $(libdir)/ ; \
+- chmod 775 $(libdir)/libImageProcessor-x86_32.so ; \
+- ln -sf $(libdir)/libImageProcessor-x86_32.so $(libdir)/libImageProcessor.so ; \
+- fi
+ if !HPLIP_CLASS_DRIVER
+ # If scanner build, add hpaio entry to sane dll.conf.
+ if [ "$(scan_build)" = "yes" ]; then \
+diff --git a/prnt/hpcups/HPCupsFilter.cpp b/prnt/hpcups/HPCupsFilter.cpp
+index 5b282d83f..0bacfafac 100644
+--- a/prnt/hpcups/HPCupsFilter.cpp
++++ b/prnt/hpcups/HPCupsFilter.cpp
+@@ -31,7 +31,6 @@
+ \*****************************************************************************/
+
+ #include "HPCupsFilter.h"
+-#include "ImageProcessor.h"
+
+ #include <signal.h>
+ #include <sys/wait.h>
+@@ -637,16 +636,10 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster)
+
+
+ sprintf(hpPreProcessedRasterFile, "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name);
+- image_processor_t* imageProcessor = imageProcessorCreate();
+
+ while (cupsRasterReadHeader2(cups_raster, &cups_header))
+ {
+
+- IMAGE_PROCESSOR_ERROR result = imageProcessorStartPage(imageProcessor, &cups_header);
+- if (result != IPE_SUCCESS){
+- dbglog("DEBUG: imageProcessorStartPage failed result = %d\n", result);
+- }
+-
+ current_page_number++;
+
+ if (current_page_number == 1) {
+@@ -745,12 +738,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster)
+ color_raster = rgbRaster;
+ black_raster = kRaster;
+
+- result = imageProcessorProcessLine(imageProcessor, m_pPrinterBuffer, cups_header.cupsBytesPerLine);
+- if (result != IPE_SUCCESS){
+- dbglog("DEBUG: imageProcessorProcessLine failed result = %d\n", result);
+- }
+-
+-
+ if ((y == 0) && !is_ljmono) {
+ //For ljmono, make sure that first line is not a blankRaster line.Otherwise printer
+ //may not skip blank lines before actual data
+@@ -780,12 +767,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster)
+ }
+ } // for() loop end
+
+- result = imageProcessorEndPage(imageProcessor);
+- if (result != IPE_SUCCESS){
+- dbglog("DEBUG: imageProcessorEndPage failed result = %d\n", result);
+- }
+-
+-
+ m_Job.NewPage();
+ if (err != NO_ERROR) {
+ break;
+@@ -800,8 +781,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster)
+ rgbRaster = NULL;
+ }
+
+- imageProcessorDestroy(imageProcessor);
+-
+ unlink(hpPreProcessedRasterFile);
+ return ret_status;
+ }
diff --git a/testing/hplip/APKBUILD b/testing/hplip/APKBUILD
index 5fa42cc176..c1197a0735 100644
--- a/testing/hplip/APKBUILD
+++ b/testing/hplip/APKBUILD
@@ -3,17 +3,21 @@
# Contributor: Timo Teräs <timo.teras@iki.fi>
# Contributor: Valery Kartel <valery.kartel@gmail.com>
pkgname=hplip
-pkgver=3.18.6
-pkgrel=2
+pkgver=3.18.10
+pkgrel=0
pkgdesc="Drivers for HP printers and scanners"
arch="x86 x86_64" # missing sane on several arches
url="http://hplipopensource.com"
license="GPL"
depends=""
-makedepends="libjpeg-turbo-dev net-snmp-dev cups-dev libusb-dev sane-dev"
+makedepends="libjpeg-turbo-dev net-snmp-dev cups-dev libusb-dev sane-dev gawk"
subpackages="$pkgname-doc $pkgname-libs sane-backend-hpaio:sane"
source="https://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
- fix-includes.patch"
+ fix-includes.patch
+ types-musl.patch
+ disable_upgrade.patch
+ 0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch
+ "
builddir="$srcdir"/$pkgname-$pkgver
prepare() {
@@ -62,5 +66,8 @@ sane() {
echo "hpaio" > "$subpkgdir"/etc/sane.d/dll.d/hpaio
}
-sha512sums="deb4e6e1c7e9ea7452967f7d7d7fd93e92eb59406b4978bb9b874db93bc5022b25aab012a7420ac3e991259032bc7cb749cd924c93a164544e29a4152962184f hplip-3.18.6.tar.gz
-173f0c2bbf0daefc717282bf125d3fd94b3914da0754078c45b58b09ab841672aae9238ca8fc0448486a871e40fc50f960da17c1e07ad3f04053d217ed634498 fix-includes.patch"
+sha512sums="8e744608f1da0e24afbeea814973363d95bbff15a7430c8471d5a53c4a9e772b141e5cd7e69ea03826d1b2e4544e9aabaedc148f2b6577339ef9b2a6d4431c96 hplip-3.18.10.tar.gz
+173f0c2bbf0daefc717282bf125d3fd94b3914da0754078c45b58b09ab841672aae9238ca8fc0448486a871e40fc50f960da17c1e07ad3f04053d217ed634498 fix-includes.patch
+dbce7d859661b1a03847edf91db755c9b3d1ad7c2d3173741ecd89b954d1595d71f1adcbd481e81821ebd58cd9ae23adcef1cc026cfa09928fb0cba599781cd1 types-musl.patch
+e9e9f6c432459fb09966ae199a6450b5f263539746137a36881b06b787593a4dac4c208286eb97f8b4512bb2aa8a58aa5ca8ce67e82b7caf6dc2b7dd49ae31b7 disable_upgrade.patch
+8710e039626878270b8b7bc1569566274d935c84652d758e25ce8fe01c0f44d911148620bb494489e1238201c01f3ba255c19f7dc5c2ff0d45a5f2a79190286b 0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch"
diff --git a/testing/hplip/disable_upgrade.patch b/testing/hplip/disable_upgrade.patch
new file mode 100644
index 0000000000..b6d657d079
--- /dev/null
+++ b/testing/hplip/disable_upgrade.patch
@@ -0,0 +1,14 @@
+--- a/upgrade.py.orig 2013-10-31 12:46:54.000000000 +0100
++++ b/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 - if you like to upgrade HPLIP, use apk.")
++clean_exit(1)
++
++
+ for o, a in opts:
+ if o in ('-h', '--help'):
+ usage()
diff --git a/testing/hplip/musl-fixes.patch b/testing/hplip/musl-fixes.patch
new file mode 100644
index 0000000000..58d833bbcd
--- /dev/null
+++ b/testing/hplip/musl-fixes.patch
@@ -0,0 +1,10 @@
+--- protocol/discovery/mdns.c.orig 2015-11-17 09:58:44.171711728 +0100
++++ protocol/discovery/mdns.c 2015-11-17 09:59:11.347535726 +0100
+@@ -28,6 +28,7 @@
+ #include <string.h>
+ #include <syslog.h>
+ #include <sys/socket.h>
++#include <sys/select.h>
+ #include <netinet/in.h>
+ #include <netdb.h>
+ #include <arpa/inet.h>
diff --git a/testing/hplip/types-musl.patch b/testing/hplip/types-musl.patch
new file mode 100644
index 0000000000..96a43690ec
--- /dev/null
+++ b/testing/hplip/types-musl.patch
@@ -0,0 +1,20 @@
+--- a/scan/sane/OrbliteScan/LinuxCommon.h.orig 2018-10-10 22:20:30.798911195 +0200
++++ b/scan/sane/OrbliteScan/LinuxCommon.h 2018-10-10 22:21:28.815911201 +0200
+@@ -3,6 +3,17 @@
+
+ #include <sys/types.h>
+
++#ifndef __GLIBC__
++#include <bits/reg.h>
++#if __WORDSIZE == 32
++# define __S64_TYPE long long int
++# define __U64_TYPE unsigned long long int
++#elif __WORDSIZE == 64
++# define __S64_TYPE long int
++# define __U64_TYPE unsigned long int
++#endif
++#endif
++
+ /* Common typedefs for Linux */
+
+ typedef unsigned char * StringPtr;