2021-03-24 23:25:59 +00:00
|
|
|
diff -up hplip-3.21.2/Makefile.am.libimageprocessor-removal hplip-3.21.2/Makefile.am
|
|
|
|
--- hplip-3.21.2/Makefile.am.libimageprocessor-removal 2021-02-24 12:38:31.707900421 +0100
|
|
|
|
+++ hplip-3.21.2/Makefile.am 2021-02-24 12:38:31.735900172 +0100
|
|
|
|
@@ -167,7 +167,7 @@ if !HPLIP_CLASS_DRIVER
|
2020-10-15 10:26:13 +00:00
|
|
|
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
|
2021-03-24 23:25:59 +00:00
|
|
|
@@ -595,7 +595,7 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilte
|
2020-10-15 10:26:13 +00:00
|
|
|
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
|
2021-03-24 23:25:59 +00:00
|
|
|
@@ -685,16 +685,6 @@ endif #HPLIP_CLASS_DRIVER
|
2020-10-15 10:26:13 +00:00
|
|
|
|
|
|
|
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 \
|
2021-03-24 23:25:59 +00:00
|
|
|
diff -up hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp.libimageprocessor-removal hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp
|
|
|
|
--- hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp.libimageprocessor-removal 2021-02-24 12:38:31.701900474 +0100
|
|
|
|
+++ hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp 2021-02-24 12:42:49.445720549 +0100
|
2020-10-15 10:26:13 +00:00
|
|
|
@@ -31,7 +31,6 @@
|
|
|
|
\*****************************************************************************/
|
|
|
|
|
|
|
|
#include "HPCupsFilter.h"
|
|
|
|
-#include "ImageProcessor.h"
|
|
|
|
|
|
|
|
#include <signal.h>
|
|
|
|
#include <sys/wait.h>
|
2021-03-24 23:25:59 +00:00
|
|
|
@@ -659,21 +658,8 @@ int HPCupsFilter::processRasterData(cups
|
2020-10-15 10:26:13 +00:00
|
|
|
|
|
|
|
snprintf(hpPreProcessedRasterFile, sizeof (hpPreProcessedRasterFile), "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name);
|
2021-03-24 23:25:59 +00:00
|
|
|
|
|
|
|
- image_processor_t* imageProcessor=NULL;
|
|
|
|
- IMAGE_PROCESSOR_ERROR result;
|
|
|
|
- //added if condition to check if pinter language is "ljzjstream"
|
|
|
|
- //If so, then bypass imageprocessing functions while running HPCUPS filter.
|
|
|
|
- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0){
|
|
|
|
- imageProcessor = imageProcessorCreate();
|
|
|
|
- }
|
2020-10-15 10:26:13 +00:00
|
|
|
while (cupsRasterReadHeader2(cups_raster, &cups_header))
|
|
|
|
{
|
2021-03-24 23:25:59 +00:00
|
|
|
- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0){
|
|
|
|
- result = imageProcessorStartPage(imageProcessor, &cups_header);
|
2020-10-15 10:26:13 +00:00
|
|
|
- if (result != IPE_SUCCESS){
|
|
|
|
- dbglog("DEBUG: imageProcessorStartPage failed result = %d\n", result);
|
|
|
|
- }
|
2021-03-24 23:25:59 +00:00
|
|
|
- }
|
2020-10-15 10:26:13 +00:00
|
|
|
current_page_number++;
|
|
|
|
|
|
|
|
if (current_page_number == 1) {
|
2021-03-24 23:25:59 +00:00
|
|
|
@@ -772,14 +758,6 @@ int HPCupsFilter::processRasterData(cups
|
2020-10-15 10:26:13 +00:00
|
|
|
color_raster = rgbRaster;
|
|
|
|
black_raster = kRaster;
|
|
|
|
|
2021-03-24 23:25:59 +00:00
|
|
|
- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0)
|
|
|
|
- {
|
2020-10-15 10:26:13 +00:00
|
|
|
- result = imageProcessorProcessLine(imageProcessor, m_pPrinterBuffer, cups_header.cupsBytesPerLine);
|
|
|
|
- if (result != IPE_SUCCESS){
|
|
|
|
- dbglog("DEBUG: imageProcessorProcessLine failed result = %d\n", result);
|
|
|
|
- }
|
2021-03-24 23:25:59 +00:00
|
|
|
- }
|
2020-10-15 10:26:13 +00:00
|
|
|
-
|
|
|
|
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
|
2021-03-24 23:25:59 +00:00
|
|
|
@@ -809,14 +787,6 @@ int HPCupsFilter::processRasterData(cups
|
2020-10-15 10:26:13 +00:00
|
|
|
}
|
|
|
|
} // for() loop end
|
|
|
|
|
2021-03-24 23:25:59 +00:00
|
|
|
- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0)
|
|
|
|
- {
|
2020-10-15 10:26:13 +00:00
|
|
|
- result = imageProcessorEndPage(imageProcessor);
|
|
|
|
- if (result != IPE_SUCCESS){
|
|
|
|
- dbglog("DEBUG: imageProcessorEndPage failed result = %d\n", result);
|
|
|
|
- }
|
2021-03-24 23:25:59 +00:00
|
|
|
- }
|
2020-10-15 10:26:13 +00:00
|
|
|
-
|
|
|
|
m_Job.NewPage();
|
|
|
|
if (err != NO_ERROR) {
|
|
|
|
break;
|
2021-03-24 23:25:59 +00:00
|
|
|
@@ -832,10 +802,6 @@ int HPCupsFilter::processRasterData(cups
|
2020-10-15 10:26:13 +00:00
|
|
|
}
|
|
|
|
|
2021-03-24 23:25:59 +00:00
|
|
|
|
|
|
|
- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0)
|
|
|
|
- {
|
2020-10-15 10:26:13 +00:00
|
|
|
- imageProcessorDestroy(imageProcessor);
|
2021-03-24 23:25:59 +00:00
|
|
|
- }
|
2020-10-15 10:26:13 +00:00
|
|
|
unlink(hpPreProcessedRasterFile);
|
|
|
|
return ret_status;
|
|
|
|
}
|