Blame SOURCES/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch

7a2b19
diff -up hplip-3.21.2/Makefile.am.libimageprocessor-removal hplip-3.21.2/Makefile.am
7a2b19
--- hplip-3.21.2/Makefile.am.libimageprocessor-removal	2021-02-24 12:38:31.707900421 +0100
7a2b19
+++ hplip-3.21.2/Makefile.am	2021-02-24 12:38:31.735900172 +0100
7a2b19
@@ -167,7 +167,7 @@ if !HPLIP_CLASS_DRIVER
7a2b19
 dist_hplip_SCRIPTS = hpssd.py __init__.py hpdio.py
7a2b19
 endif #HPLIP_CLASS_DRIVER
7a2b19
 
7a2b19
-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
7a2b19
+dist_noinst_DATA += prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template
7a2b19
 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
7a2b19
 
7a2b19
 if !HPLIP_CLASS_DRIVER
7a2b19
@@ -595,7 +595,7 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilte
7a2b19
 	prnt/hpcups/ImageProcessor.h
7a2b19
 
7a2b19
 hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS)
7a2b19
-hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lImageProcessor -lcups -lcupsimage -lz $(DBUS_LIBS)
7a2b19
+hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lcups -lcupsimage -lz $(DBUS_LIBS)
7a2b19
 #else
7a2b19
 #hpcupsdir = $(cupsfilterdir)
7a2b19
 #hpcups_PROGRAMS = hpcups
7a2b19
@@ -685,16 +685,6 @@ endif #HPLIP_CLASS_DRIVER
7a2b19
 
7a2b19
 install-data-hook:
7a2b19
 if HPLIP_BUILD
7a2b19
-	if [ \( "$(UNAME)" = "x86_64" -a  -d "$(libdir)/" \) ]; then \
7a2b19
-		cp prnt/hpcups/libImageProcessor-x86_64.so $(libdir)/ ; \
7a2b19
-		chmod 775 $(libdir)/libImageProcessor-x86_64.so ; \
7a2b19
-		ln -sf $(libdir)/libImageProcessor-x86_64.so $(libdir)/libImageProcessor.so ; \
7a2b19
-	fi; \
7a2b19
-	if [ \( \( "$(UNAME)" = "i686" -o "$(UNAME)" = "i386" \) -a -d "$(libdir)/" \) ]; then \
7a2b19
-		cp prnt/hpcups/libImageProcessor-x86_32.so $(libdir)/ ; \
7a2b19
-		chmod 775 $(libdir)/libImageProcessor-x86_32.so ; \
7a2b19
-		ln -sf $(libdir)/libImageProcessor-x86_32.so $(libdir)/libImageProcessor.so ; \
7a2b19
-	fi
7a2b19
 if !HPLIP_CLASS_DRIVER
7a2b19
 #	   If scanner build, add hpaio entry to sane dll.conf.
7a2b19
 	if [ "$(scan_build)" = "yes" ]; then \
7a2b19
diff -up hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp.libimageprocessor-removal hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp
7a2b19
--- hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp.libimageprocessor-removal	2021-02-24 12:38:31.701900474 +0100
7a2b19
+++ hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp	2021-02-24 12:42:49.445720549 +0100
7a2b19
@@ -31,7 +31,6 @@
7a2b19
 \*****************************************************************************/
7a2b19
 
7a2b19
 #include "HPCupsFilter.h"
7a2b19
-#include "ImageProcessor.h"
7a2b19
 
7a2b19
 #include <signal.h>
7a2b19
 #include <sys/wait.h>
7a2b19
@@ -659,21 +658,8 @@ int HPCupsFilter::processRasterData(cups
7a2b19
 
7a2b19
     snprintf(hpPreProcessedRasterFile, sizeof (hpPreProcessedRasterFile), "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name);
7a2b19
  
7a2b19
-    image_processor_t* imageProcessor=NULL;
7a2b19
-    IMAGE_PROCESSOR_ERROR result;
7a2b19
-    //added if condition to check if pinter language is "ljzjstream"
7a2b19
-    //If so, then bypass imageprocessing functions while running HPCUPS filter.
7a2b19
-    if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0){
7a2b19
-        imageProcessor = imageProcessorCreate();
7a2b19
-    }
7a2b19
     while (cupsRasterReadHeader2(cups_raster, &cups_header))
7a2b19
     {
7a2b19
-       if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0){
7a2b19
-        result = imageProcessorStartPage(imageProcessor, &cups_header);
7a2b19
-        if (result != IPE_SUCCESS){
7a2b19
-            dbglog("DEBUG: imageProcessorStartPage failed result = %d\n", result);
7a2b19
-        }
7a2b19
-     }
7a2b19
         current_page_number++;
7a2b19
 
7a2b19
         if (current_page_number == 1) {
7a2b19
@@ -772,14 +758,6 @@ int HPCupsFilter::processRasterData(cups
7a2b19
             color_raster = rgbRaster;
7a2b19
             black_raster = kRaster;
7a2b19
 
7a2b19
-	if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0)
7a2b19
-	{
7a2b19
-            result = imageProcessorProcessLine(imageProcessor, m_pPrinterBuffer, cups_header.cupsBytesPerLine);
7a2b19
-            if (result != IPE_SUCCESS){
7a2b19
-                dbglog("DEBUG: imageProcessorProcessLine failed result = %d\n", result);
7a2b19
-            }
7a2b19
-	}
7a2b19
-
7a2b19
             if ((y == 0) && !is_ljmono) {
7a2b19
                 //For ljmono, make sure that first line is not a blankRaster line.Otherwise printer
7a2b19
                 //may not skip blank lines before actual data
7a2b19
@@ -809,14 +787,6 @@ int HPCupsFilter::processRasterData(cups
7a2b19
             }
7a2b19
         }  // for() loop end
7a2b19
 
7a2b19
-	if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0)
7a2b19
-	{
7a2b19
-        result = imageProcessorEndPage(imageProcessor);
7a2b19
-        if (result != IPE_SUCCESS){
7a2b19
-                dbglog("DEBUG: imageProcessorEndPage failed result = %d\n", result);
7a2b19
-        }
7a2b19
-	}
7a2b19
-
7a2b19
         m_Job.NewPage();
7a2b19
         if (err != NO_ERROR) {
7a2b19
             break;
7a2b19
@@ -832,10 +802,6 @@ int HPCupsFilter::processRasterData(cups
7a2b19
     }
7a2b19
 
7a2b19
  
7a2b19
-   if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0)
7a2b19
-   {
7a2b19
-    imageProcessorDestroy(imageProcessor);
7a2b19
-   }
7a2b19
     unlink(hpPreProcessedRasterFile);
7a2b19
     return ret_status;
7a2b19
 }