From 318c5f839c59303c9a84737e5a49bd0ceb48943e Mon Sep 17 00:00:00 2001 From: Francesco Marinucci Date: Tue, 6 Jun 2017 22:04:04 +0100 Subject: [PATCH] epson-inkjet-printer-escpr: moved to desktop --- epson-inkjet-printer-escpr/PKGBUILD | 36 ++++++++ epson-inkjet-printer-escpr/bug_x86_64.patch | 98 +++++++++++++++++++++ 2 files changed, 134 insertions(+) create mode 100644 epson-inkjet-printer-escpr/PKGBUILD create mode 100644 epson-inkjet-printer-escpr/bug_x86_64.patch diff --git a/epson-inkjet-printer-escpr/PKGBUILD b/epson-inkjet-printer-escpr/PKGBUILD new file mode 100644 index 000000000..8218f9eb9 --- /dev/null +++ b/epson-inkjet-printer-escpr/PKGBUILD @@ -0,0 +1,36 @@ +#Contributions from AUR: https://aur.archlinux.org/packages/epson-inkjet-printer-escpr/ + +pkgname=epson-inkjet-printer-escpr +pkgver=1.6.11 +pkgrel=1 +pkgdesc="Epson Inkjet Printer Driver (ESC/P-R) for Linux" +arch=('x86_64') +url="http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX" +license=('GPL2') +depends=('cups' 'ghostscript') +source=('https://download3.ebz.epson.net/dsc/f/03/00/05/36/34/7b858fe7440558b9864dde0a6d353821ddb6f310/epson-inkjet-printer-escpr-1.6.11-1lsb3.2.tar.gz' + 'bug_x86_64.patch') +sha256sums=('367f2503b533ffacae9b9f529f629daaf9f4f8068615ae3d77cb5a4e13bbe39d' + '277bc9afe581d2c434217db646e20ecfd1b6045bdcce861f2f08992ccf854084') + +prepare() { + cd "$pkgname-$pkgver" + + patch -p1 -i "${srcdir}/bug_x86_64.patch" + +} + +build() { + cd "$pkgname-$pkgver" + + ./configure --prefix=/usr \ + --with-cupsfilterdir=/usr/lib/cups/filter \ + --with-cupsppddir=/usr/share/ppd + make +} + +package() { + cd "$pkgname-$pkgver" + make DESTDIR="$pkgdir" install +} + diff --git a/epson-inkjet-printer-escpr/bug_x86_64.patch b/epson-inkjet-printer-escpr/bug_x86_64.patch new file mode 100644 index 000000000..e4dd72d6f --- /dev/null +++ b/epson-inkjet-printer-escpr/bug_x86_64.patch @@ -0,0 +1,98 @@ +diff -Naur epson-inkjet-printer-escpr-1.6.9/src/filter.c epson-inkjet-printer-escpr-1.6.9-fixed/src/filter.c +--- epson-inkjet-printer-escpr-1.6.9/src/filter.c 2016-09-21 03:55:30.000000000 +0200 ++++ epson-inkjet-printer-escpr-1.6.9-fixed/src/filter.c 2016-10-07 22:07:23.965463021 +0200 +@@ -34,6 +34,8 @@ + #include "epson-protocol.h" + #include "epson-escpr-api.h" + #include "epson-escpr-mem.h" ++#include "epson-escpr-services.h" ++#include "epson-escpage.h" + + #include "err.h" + #include "mem.h" +@@ -42,6 +44,11 @@ + #include "libprtX.h" + #include "optBase.h" + #include "linux_cmn.h" ++#include "xfifo.h" ++ ++extern EPS_ERR_CODE SetupJobAttrib (const EPS_JOB_ATTRIB*); ++extern EPS_ERR_CODE SendStartJob (); ++extern EPS_ERR_CODE PrintBand (const EPS_UINT8*, EPS_UINT32, EPS_UINT32*); + + #define WIDTH_BYTES(bits) (((bits) + 31) / 32 * 4) + +@@ -380,10 +387,10 @@ + }else{ + debug_msg("pageStartJob() success"); + } +- ++ + printJob.jobStatus = EPS_STATUS_ESTABLISHED; +- int printHeight = 0; +-/////////////////////////////////////////////////////////////////////////////////////////////////////////// ++ EPS_UINT32 printHeight = 0; ++/////////////////////////////////////////////////////////////////////////////////////////////////////////// + + print_area_x = printJob.printableAreaWidth; + print_area_y = printJob.printableAreaHeight; +@@ -535,7 +542,7 @@ + memcpy(rever_buf + k*3, startpage + pos + (bandBmp.widthBytes - 6) - k*3, 3); + } + } +- PrintBand (rever_buf, bandBmp.widthBytes, &printHeight); ++ PrintBand ((const EPS_UINT8 *)rever_buf, bandBmp.widthBytes, &printHeight); + pos -= bandBmp.widthBytes; + } + +@@ -642,17 +649,17 @@ + } + } + } +- ++ + band_line_count ++; +- ++ + if (band_line_count >= band_line) + { + printHeight = band_line_count; + PrintBand (bandBmp.bits, bandBmp.widthBytes, &printHeight); + #if (HAVE_PPM) + fp = fopen(ppmfilename, "a+"); +- int i=0; +- for(i=0; i + #include "mem.h" ++#include "err.h" + + void * + mem_malloc (unsigned int size, bool_t crit)