hplip: update to 3.18.9, add patches ImageProcessor & types-musl (resolves #3554)
This commit is contained in:
parent
96cff71dad
commit
5c7a074a42
3 changed files with 135 additions and 2 deletions
|
@ -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
|
||||||
|
--- Makefile.am
|
||||||
|
+++ 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
|
||||||
|
--- prnt/hpcups/HPCupsFilter.cpp
|
||||||
|
+++ 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;
|
||||||
|
}
|
20
srcpkgs/hplip/patches/types-musl.patch
Normal file
20
srcpkgs/hplip/patches/types-musl.patch
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
--- scan/sane/OrbliteScan/LinuxCommon.h.orig 2018-10-10 22:20:30.798911195 +0200
|
||||||
|
+++ 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;
|
|
@ -1,6 +1,6 @@
|
||||||
# Template file for 'hplip'
|
# Template file for 'hplip'
|
||||||
pkgname=hplip
|
pkgname=hplip
|
||||||
version=3.18.6
|
version=3.18.9
|
||||||
revision=1
|
revision=1
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
configure_args="
|
configure_args="
|
||||||
|
@ -30,7 +30,7 @@ maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||||
license="GPL-2.0-only, BSD-3-Clause, MIT"
|
license="GPL-2.0-only, BSD-3-Clause, MIT"
|
||||||
homepage="https://developers.hp.com/hp-linux-imaging-and-printing"
|
homepage="https://developers.hp.com/hp-linux-imaging-and-printing"
|
||||||
distfiles="${SOURCEFORGE_SITE}/hplip/hplip/${version}/hplip-${version}.tar.gz"
|
distfiles="${SOURCEFORGE_SITE}/hplip/hplip/${version}/hplip-${version}.tar.gz"
|
||||||
checksum=0ecf3e68b09480f602de81798ac00774cf8ffe754692e784bbbe0f9b2e337b7d
|
checksum=20093830994de16bb36c049c1fdb688569531525fb994f7e605e66266a2d783c
|
||||||
conflicts="hplip-gui"
|
conflicts="hplip-gui"
|
||||||
|
|
||||||
CFLAGS="-I${XBPS_CROSS_BASE}/usr/include/libusb-1.0 -I${XBPS_CROSS_BASE}/usr/include/python2.7"
|
CFLAGS="-I${XBPS_CROSS_BASE}/usr/include/libusb-1.0 -I${XBPS_CROSS_BASE}/usr/include/python2.7"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue