summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pagano <mpagano@gentoo.org>2024-05-19 18:02:01 -0400
committerMike Pagano <mpagano@gentoo.org>2024-05-19 18:02:01 -0400
commit8af8fa0a14d9e5494eb507a36af508649ee406da (patch)
tree56286395a32ebd1f07b7c2875ef3bd02fc51d48b /net-print
parentdev-util/gtk-update-icon-cache: add 3.24.42 (diff)
downloadgentoo-8af8fa0a14d9e5494eb507a36af508649ee406da.tar.gz
gentoo-8af8fa0a14d9e5494eb507a36af508649ee406da.tar.bz2
gentoo-8af8fa0a14d9e5494eb507a36af508649ee406da.zip
net-print/epson-inkjet-printer-escpr: Fix to compile with gcc 14
Closes: https://bugs.gentoo.org/921258 Signed-off-by: Mike Pagano <mpagano@gentoo.org>
Diffstat (limited to 'net-print')
-rw-r--r--net-print/epson-inkjet-printer-escpr/epson-inkjet-printer-escpr-1.2.9-r1.ebuild36
-rw-r--r--net-print/epson-inkjet-printer-escpr/files/epson-inkjet-printer-escpr-2-gcc14.patch228
2 files changed, 264 insertions, 0 deletions
diff --git a/net-print/epson-inkjet-printer-escpr/epson-inkjet-printer-escpr-1.2.9-r1.ebuild b/net-print/epson-inkjet-printer-escpr/epson-inkjet-printer-escpr-1.2.9-r1.ebuild
new file mode 100644
index 000000000000..ee7aecc88746
--- /dev/null
+++ b/net-print/epson-inkjet-printer-escpr/epson-inkjet-printer-escpr-1.2.9-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MY_P="${PN}2-${PV}"
+
+DESCRIPTION="Epson Inkjet Printer Driver 2 (ESC/P-R) for Linux"
+HOMEPAGE="https://download.ebz.epson.net/dsc/search/01/search/?OSC=LX"
+SRC_URI="https://download3.ebz.epson.net/dsc/f/03/00/15/33/96/607198a4f064daa9e7931913eaf27f3a58125f2b/${MY_P}-1.tar.gz"
+S="${WORKDIR}/${MY_P}"
+LICENSE="EPSON LGPL-2.1+"
+SLOT="2"
+KEYWORDS="amd64"
+
+QA_FLAGS_IGNORED="/usr/lib64/libescpr2.so.1.0.0"
+
+DEPEND="net-print/cups"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-${SLOT}-gcc14.patch"
+)
+
+src_configure() {
+ econf \
+ --with-cupsfilterdir="${EPREFIX}/usr/libexec/cups/filter"
+ --with-cupsppddir="${EPREFIX}/usr/share/ppd"
+}
+
+src_install() {
+ default
+
+ find "${ED}/usr/lib64" -name "*.la" -delete \
+ || die "Removal of libtool files (.la) has failed."
+}
diff --git a/net-print/epson-inkjet-printer-escpr/files/epson-inkjet-printer-escpr-2-gcc14.patch b/net-print/epson-inkjet-printer-escpr/files/epson-inkjet-printer-escpr-2-gcc14.patch
new file mode 100644
index 000000000000..d415384cfbf1
--- /dev/null
+++ b/net-print/epson-inkjet-printer-escpr/files/epson-inkjet-printer-escpr-2-gcc14.patch
@@ -0,0 +1,228 @@
+--- a/src/mem.c 2024-05-19 17:31:29.121223820 -0400
++++ b/src/mem.c 2024-05-19 17:31:43.985467218 -0400
+@@ -23,6 +23,7 @@
+
+ #include <stdlib.h>
+ #include "mem.h"
++#include "err.h"
+
+ void *
+ mem_malloc (unsigned int size, bool_t crit)
+--- /dev/null 2024-05-19 14:31:56.295999966 -0400
++++ b/src/epson-escpr-services.h 2024-05-19 17:40:16.646097437 -0400
+@@ -0,0 +1,194 @@
++/*_____________________________ epson-escpr-services.h ______________________________*/
++
++/* 1 2 3 4 5 6 7 8 */
++/*34567890123456789012345678901234567890123456789012345678901234567890123456789012345678*/
++/*******************************************|********************************************/
++/*
++ * Copyright (c) 2009 Seiko Epson Corporation All rights reserved.
++ *
++ * Copyright protection claimed includes all forms and matters of
++ * copyrightable material and information now allowed by statutory or judicial
++ * law or hereinafter granted, including without limitation, material generated
++ * from the software programs which are displayed on the screen such as icons,
++ * screen display looks, etc.
++ *
++ */
++/*******************************************|********************************************/
++/* */
++/* Epson ESC/PR Sevice Functions */
++/* */
++/*******************************************|********************************************/
++#ifndef __EPSON_ESCPR_SERVICES_H__
++#define __EPSON_ESCPR_SERVICES_H__
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++/*------------------------------------ Includes -------------------------------------*/
++/*******************************************|********************************************/
++#include "epson-typedefs.h"
++#include "epson-escpr-pvt.h"
++
++/*------------------------------------- Data Types -------------------------------------*/
++/*******************************************|********************************************/
++
++/*-------------------------------------- Macros -------------------------------------*/
++/*******************************************|********************************************/
++
++/*----------------------------------- Definitions ------------------------------------*/
++/*******************************************|********************************************/
++ /*** Ink Cartridge Type */
++ /*** -------------------------------------------------------------------------------*/
++#define MI_CARTRIDGE_INDEP 0x00 /* Independent Cartridge */
++#define MI_CARTRIDGE_ONE 0x01 /* One Cartridge */
++
++ /*** Device States */
++ /*** -------------------------------------------------------------------------------*/
++#define EPS_ST_ERROR 0x01
++#define EPS_ST_SELF_PRINTING 0x02
++#define EPS_ST_BUSY 0x04
++#define EPS_ST_WAITING 0x08
++#define EPS_ST_IDLE 0x10
++/*#define EPS_ST_PAUSE 0x20*/ /* Not supported by 2006 Model */
++/*#define EPS_ST_INKDRYING 0x40*/ /* Not supported by 2006 Model */
++#define EPS_ST_CLEANING 0x80
++#define EPS_ST_FACTORY_SHIPMENT 0x100
++/*#define EPS_ST_MOTOR_DRIVE_OFF 0x200*/ /* Not supported by 2006 Model */
++#define EPS_ST_SHUTDOWN 0x400
++/*#define EPS_ST_WAITPAPERINIT 0x800*/ /* Not supported by 2006 Model */
++/*#define EPS_ST_INIT_PAPER 0x1000*/ /* Not supported by 2006 Model */
++
++ /*** Device Warnings */
++ /*** -------------------------------------------------------------------------------*/
++#define EPS_PRNWARN_NONE 0x00 /* No Warnings */
++#define EPS_PRNWARN_INKLOW (1 << 0) /* Ink Low */
++#define EPS_PRNWARN_DISABLE_CLEAN (1 << 1) /* disable cleaning */
++#define EPS_PRNWARN_COLOR_INKOUT (1 << 2) /* disable color print */
++
++
++ /*** Ink Error */
++ /*** -------------------------------------------------------------------------------*/
++#define EPS_INKERR_NONE 0
++
++#define EPS_INKERR_INKENDB -1
++#define EPS_INKERR_INKENDC -2
++#define EPS_INKERR_INKENDCY -3
++#define EPS_INKERR_INKENDMA -4
++#define EPS_INKERR_INKENDYL -5
++#define EPS_INKERR_INKENDLC -6
++#define EPS_INKERR_INKENDLM -7
++#define EPS_INKERR_INKENDLY -8
++#define EPS_INKERR_INKENDDY -9
++#define EPS_INKERR_INKENDB2 -10
++#define EPS_INKERR_INKENDRD -11
++#define EPS_INKERR_INKENDBL -12
++#define EPS_INKERR_INKENDMB -13
++#define EPS_INKERR_INKENDPB -14
++#define EPS_INKERR_INKENDGO -15
++#define EPS_INKERR_INKENDALL -16
++#define EPS_INKERR_INKENDBC -17
++
++#define EPS_INKERR_CEMPTYB -101
++#define EPS_INKERR_CEMPTYC -102
++#define EPS_INKERR_CEMPTYCY -103
++#define EPS_INKERR_CEMPTYMA -104
++#define EPS_INKERR_CEMPTYYL -105
++#define EPS_INKERR_CEMPTYLC -106
++#define EPS_INKERR_CEMPTYLM -107
++#define EPS_INKERR_CEMPTYLY -108
++#define EPS_INKERR_CEMPTYDY -109
++#define EPS_INKERR_CEMPTYB2 -110
++#define EPS_INKERR_CEMPTYRD -111
++#define EPS_INKERR_CEMPTYBL -112
++#define EPS_INKERR_CEMPTYMB -113
++#define EPS_INKERR_CEMPTYPB -114
++#define EPS_INKERR_CEMPTYGO -115
++#define EPS_INKERR_CEMPTYBC -116
++#define EPS_INKERR_CEMPTYALL -117
++
++#define EPS_INKERR_CFAILB -201
++#define EPS_INKERR_CFAILC -202
++#define EPS_INKERR_CFAILCY -203
++#define EPS_INKERR_CFAILMA -204
++#define EPS_INKERR_CFAILYL -205
++#define EPS_INKERR_CFAILLC -206
++#define EPS_INKERR_CFAILLM -207
++#define EPS_INKERR_CFAILLY -208
++#define EPS_INKERR_CFAILDY -209
++#define EPS_INKERR_CFAILB2 -210
++#define EPS_INKERR_CFAILRD -211
++#define EPS_INKERR_CFAILBL -212
++#define EPS_INKERR_CFAILMB -213
++#define EPS_INKERR_CFAILPB -214
++#define EPS_INKERR_CFAILGO -215
++#define EPS_INKERR_CFAILBC -216
++#define EPS_INKERR_CFAILALL -217
++
++ /*** Cancel request from printer */
++ /*** -------------------------------------------------------------------------------*/
++#define EPS_CAREQ_CANCEL -300
++#define EPS_CAREQ_NOCANCEL -301
++
++ /*** Other Printer Information */
++ /*** -------------------------------------------------------------------------------*/
++#define EPS_PREPARE_OVERHEAT -400
++#define EPS_PREPARE_NORMALHEAT -401
++#define EPS_PREPARE_TRAYOPENED -402
++#define EPS_PREPARE_TRAYCLOSED -403
++
++ /*** reset mode */
++ /*** -------------------------------------------------------------------------------*/
++#define EPS_PM_PAGE 1
++#define EPS_PM_JOB 2
++
++ /*** Misc */
++ /*** -------------------------------------------------------------------------------*/
++#define _SECOND_ 1000 /* Unit for changing milli second to second */
++#define _STATUS_REPLY_BUF 512 /* Printer status buffer size */
++
++
++ /*** Model depend */
++ /*** -------------------------------------------------------------------------------*/
++#define EPS_MDC_STATUS (1)
++#define EPS_MDC_NOZZLE (2)
++
++/*--------------------------- Public Function Declarations ---------------------------*/
++/*******************************************|********************************************/
++extern EPS_INT32 serParseDeviceID (EPS_INT8*, EPS_INT32, EPS_INT8*, EPS_INT8*,
++ EPS_INT32*, EPS_UINT32*, EPS_UINT32* );
++extern EPS_BOOL serCheckLang (EPS_INT8*, EPS_UINT32* );
++extern EPS_ERR_CODE serAnalyzeStatus (EPS_INT8*, EPS_UINT32, EPS_STATUS_INFO*);
++extern void serDelayThread (EPS_UINT32, EPS_CMN_FUNC* );
++extern EPS_INT32 serInkLevelNromalize (EPS_INT32 );
++extern EPS_ERR_CODE serGetSerialNo (EPS_INT8*, EPS_INT32, EPS_INT8* );
++extern EPS_ERR_CODE serGetSerialNoFormST (EPS_INT8*, EPS_INT8*, EPS_INT32 );
++extern EPS_ERR_CODE serGetSupplyInfo (EPS_UINT8*, EPS_SUPPLY_INFO* );
++
++#ifdef GCOMSW_EPSON_SLEEP
++extern EPS_ERR_CODE serSleep (EPS_UINT32 );
++#endif
++
++
++extern void obsSetPrinter (const EPS_PRINTER_INN* );
++extern void obsSetColorPlane (EPS_UINT8 );
++extern void obsClear (void );
++extern EPS_INT32 obsGetPageMode (void );
++extern EPS_BOOL obsIsA3Model (EPS_INT32 );
++extern EPS_BOOL obsEnableDuplex (EPS_INT32 );
++extern EPS_BOOL obsEnableAutoFeed (void );
++
++#ifdef __cplusplus
++}
++#endif
++
++#endif /* def __EPSON_ESCPR_SERVICES_H__ */
++
++
++/*_____________________________ epson-escpr-services.h _______________________________*/
++
++/*34567890123456789012345678901234567890123456789012345678901234567890123456789012345678*/
++/* 1 2 3 4 5 6 7 8 */
++/*******************************************|********************************************/
++/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%|%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
++/***** End of File *** End of File *** End of File *** End of File *** End of File ******/
++/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%|%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+--- a/src/filter.c 2024-05-19 17:41:19.567178280 -0400
++++ b/src/filter.c 2024-05-19 17:46:15.780301782 -0400
+@@ -39,6 +39,7 @@
+ #include "epson-escpr-api.h"
+ #include "epson-escpr-services.h"
+ #include "epson-escpr-mem.h"
++#include "epson-escpr-services.h"
+
+ #include "err.h"
+ #include "mem.h"
+@@ -48,6 +49,10 @@
+ #include "optBase.h"
+ #include "linux_cmn.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)
+
+ #define PIPSLITE_FILTER_VERSION "* epson-escpr is a part of " PACKAGE_STRING