0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. From fa9c0cf1a5db9bf8880b4796d5e3e0da46534e3d Mon Sep 17 00:00:00 2001
  2. From: Didier Raboud <odyx@debian.org>
  3. Date: Tue, 21 Aug 2018 18:18:10 +0200
  4. Subject: Remove all ImageProcessor functionality, which is closed-source
  5. ---
  6. Makefile.am | 14 ++------------
  7. prnt/hpcups/HPCupsFilter.cpp | 21 ---------------------
  8. 2 files changed, 2 insertions(+), 33 deletions(-)
  9. diff --git a/Makefile.am b/Makefile.am
  10. index 1b097c4f9..8d5d78c9f 100644
  11. --- a/Makefile.am
  12. +++ b/Makefile.am
  13. @@ -166,7 +166,7 @@ if !HPLIP_CLASS_DRIVER
  14. dist_hplip_SCRIPTS = hpssd.py __init__.py hpdio.py
  15. endif #HPLIP_CLASS_DRIVER
  16. -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
  17. +dist_noinst_DATA += prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template
  18. 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
  19. if !HPLIP_CLASS_DRIVER
  20. @@ -594,7 +594,7 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilter.cpp prnt/hpcups/HPCupsFilter.h prnt/hp
  21. prnt/hpcups/ImageProcessor.h
  22. hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS)
  23. -hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lImageProcessor -lcups -lcupsimage -lz $(DBUS_LIBS)
  24. +hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lcups -lcupsimage -lz $(DBUS_LIBS)
  25. #else
  26. #hpcupsdir = $(cupsfilterdir)
  27. #hpcups_PROGRAMS = hpcups
  28. @@ -686,16 +686,6 @@ endif #HPLIP_CLASS_DRIVER
  29. install-data-hook:
  30. if HPLIP_BUILD
  31. - if [ \( "$(UNAME)" = "x86_64" -a -d "$(libdir)/" \) ]; then \
  32. - cp prnt/hpcups/libImageProcessor-x86_64.so $(libdir)/ ; \
  33. - chmod 775 $(libdir)/libImageProcessor-x86_64.so ; \
  34. - ln -sf $(libdir)/libImageProcessor-x86_64.so $(libdir)/libImageProcessor.so ; \
  35. - fi; \
  36. - if [ \( \( "$(UNAME)" = "i686" -o "$(UNAME)" = "i386" \) -a -d "$(libdir)/" \) ]; then \
  37. - cp prnt/hpcups/libImageProcessor-x86_32.so $(libdir)/ ; \
  38. - chmod 775 $(libdir)/libImageProcessor-x86_32.so ; \
  39. - ln -sf $(libdir)/libImageProcessor-x86_32.so $(libdir)/libImageProcessor.so ; \
  40. - fi
  41. if !HPLIP_CLASS_DRIVER
  42. # If scanner build, add hpaio entry to sane dll.conf.
  43. if [ "$(scan_build)" = "yes" ]; then \
  44. diff --git a/prnt/hpcups/HPCupsFilter.cpp b/prnt/hpcups/HPCupsFilter.cpp
  45. index 5b282d83f..0bacfafac 100644
  46. --- a/prnt/hpcups/HPCupsFilter.cpp
  47. +++ b/prnt/hpcups/HPCupsFilter.cpp
  48. @@ -31,7 +31,6 @@
  49. \*****************************************************************************/
  50. #include "HPCupsFilter.h"
  51. -#include "ImageProcessor.h"
  52. #include <signal.h>
  53. #include <sys/wait.h>
  54. @@ -637,16 +636,10 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster)
  55. sprintf(hpPreProcessedRasterFile, "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name);
  56. - image_processor_t* imageProcessor = imageProcessorCreate();
  57. while (cupsRasterReadHeader2(cups_raster, &cups_header))
  58. {
  59. - IMAGE_PROCESSOR_ERROR result = imageProcessorStartPage(imageProcessor, &cups_header);
  60. - if (result != IPE_SUCCESS){
  61. - dbglog("DEBUG: imageProcessorStartPage failed result = %d\n", result);
  62. - }
  63. -
  64. current_page_number++;
  65. if (current_page_number == 1) {
  66. @@ -745,12 +738,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster)
  67. color_raster = rgbRaster;
  68. black_raster = kRaster;
  69. - result = imageProcessorProcessLine(imageProcessor, m_pPrinterBuffer, cups_header.cupsBytesPerLine);
  70. - if (result != IPE_SUCCESS){
  71. - dbglog("DEBUG: imageProcessorProcessLine failed result = %d\n", result);
  72. - }
  73. -
  74. -
  75. if ((y == 0) && !is_ljmono) {
  76. //For ljmono, make sure that first line is not a blankRaster line.Otherwise printer
  77. //may not skip blank lines before actual data
  78. @@ -780,12 +767,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster)
  79. }
  80. } // for() loop end
  81. - result = imageProcessorEndPage(imageProcessor);
  82. - if (result != IPE_SUCCESS){
  83. - dbglog("DEBUG: imageProcessorEndPage failed result = %d\n", result);
  84. - }
  85. -
  86. -
  87. m_Job.NewPage();
  88. if (err != NO_ERROR) {
  89. break;
  90. @@ -800,8 +781,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster)
  91. rgbRaster = NULL;
  92. }
  93. - imageProcessorDestroy(imageProcessor);
  94. -
  95. unlink(hpPreProcessedRasterFile);
  96. return ret_status;
  97. }