aboutsummaryrefslogtreecommitdiffstats
path: root/net-print
diff options
context:
space:
mode:
authorla-ninpre <leobrekalini@gmail.com>2022-06-28 02:11:08 +0300
committerla-ninpre <leobrekalini@gmail.com>2022-06-28 02:11:08 +0300
commitddb931cdb9c15c7b6209dbdf862ba64081b9f115 (patch)
treea9338679443ccbfc1b94b83e46440015e3f07291 /net-print
parent4c3584bb8525a0e0ee7950b33aa524707ecfb304 (diff)
downloadla-ninpre-overlay-ddb931cdb9c15c7b6209dbdf862ba64081b9f115.tar.gz
la-ninpre-overlay-ddb931cdb9c15c7b6209dbdf862ba64081b9f115.zip
net-print/epson-inkjet-printer: initial import
phew. i don't think that it's perfect, but it at least kinda works.
Diffstat (limited to 'net-print')
-rw-r--r--net-print/epson-inkjet-printer/Manifest1
-rw-r--r--net-print/epson-inkjet-printer/epson-inkjet-printer-1.0.0.ebuild70
-rw-r--r--net-print/epson-inkjet-printer/files/epson-inkjet-printer-1.0.0-cups-libexec-dir.patch11
-rw-r--r--net-print/epson-inkjet-printer/files/epson-inkjet-printer-1.0.0-raster.patch101
-rw-r--r--net-print/epson-inkjet-printer/files/epson-inkjet-printer-1.0.0-resource-dir.patch11
-rw-r--r--net-print/epson-inkjet-printer/files/epson-inkjet-printer-1.0.0-usrdoc.patch11
-rw-r--r--net-print/epson-inkjet-printer/metadata.xml11
-rw-r--r--net-print/metadata.xml32
8 files changed, 248 insertions, 0 deletions
diff --git a/net-print/epson-inkjet-printer/Manifest b/net-print/epson-inkjet-printer/Manifest
new file mode 100644
index 0000000..3da77f2
--- /dev/null
+++ b/net-print/epson-inkjet-printer/Manifest
@@ -0,0 +1 @@
+DIST epson-inkjet-printer-201207w-1.0.0-1lsb3.2.src.rpm 2440228 BLAKE2B 6e311cae8ff49fc92afe56e5647a455a485f2d06713b8300ad7fd0b91b6fc0de266ad9c2cc5afcb1b002680edba508746a59d938d3962b226078eddf07e8d001 SHA512 7e6787a5b7e5fc282f5fa914c1937ead24a104c2e0fa118d44f283783a53fc78fbebe08aeeb80da6fbc9fd5e882efcca08a9a56d3dfefed16d4b262bd117daaa
diff --git a/net-print/epson-inkjet-printer/epson-inkjet-printer-1.0.0.ebuild b/net-print/epson-inkjet-printer/epson-inkjet-printer-1.0.0.ebuild
new file mode 100644
index 0000000..a0948b7
--- /dev/null
+++ b/net-print/epson-inkjet-printer/epson-inkjet-printer-1.0.0.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+inherit rpm
+
+DESCRIPTION="Epson Inkjet Printer Driver (ESC/P)"
+HOMEPAGE="https://download.ebz.epson.net/dsc/search/01/search/?OSC=LX"
+SRC_URI="http://download.ebz.epson.net/dsc/f/01/00/01/87/87/4bb10f016a8e2e3ec39d55ff72b636c0a340365c/${PN}-201207w-${PV}-1lsb3.2.src.rpm"
+
+S="${WORKDIR}/${PN}-filter-${PV}"
+
+# don't know if it's ok to specify custom variables, but why not
+
+_printer_dir="${WORKDIR}/${PN}-201207w-${PV}"
+_cups_libexec_dir="/usr/libexec/cups"
+
+LICENSE="GPL-2 EPSON-EULA"
+SLOT="0"
+KEYWORDS="amd64"
+IUSE="abi_x86_32"
+
+DEPEND="net-print/cups"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${P}-cups-libexec-dir.patch"
+ "${FILESDIR}/${P}-resource-dir.patch"
+ "${FILESDIR}/${P}-raster.patch"
+ "${FILESDIR}/${P}-usrdoc.patch"
+)
+
+src_unpack() {
+ rpm_src_unpack "${A}"
+}
+
+src_prepare() {
+ default
+ eautoreconf
+
+ sed -i -e "/^\*cupsFilter/ s:/opt/${PN}-201207w/cups/lib:${_cups_libexec_dir}:" \
+ -e "s:/opt/${PN}-201207w:/usr/share/${PN}:" \
+ ${_printer_dir}/ppds/*.ppd
+}
+
+src_configure() {
+ econf LDFLAGS="${LDFLAGS} -Wl,--no-as-needed" --enable-debug
+}
+
+src_install() {
+ default
+
+ if use abi_x86_32; then
+ dolib.so "${_printer_dir}/lib/libEpson_201207w.MT.so.1.0.0" \
+ "${_printer_dir}/lib/libEpson_201207w.so.1.0.0"
+ else
+ dolib.so "${_printer_dir}/lib64/libEpson_201207w.MT.so.1.0.0" \
+ "${_printer_dir}/lib64/libEpson_201207w.so.1.0.0"
+ fi
+
+ insinto "/usr/share/${PN}"
+ doins -r "${_printer_dir}/resource/" \
+ "${_printer_dir}/watermark/"
+
+ insinto "/usr/share/ppd/${PN}"
+ doins ${_printer_dir}/ppds/*.ppd
+
+}
diff --git a/net-print/epson-inkjet-printer/files/epson-inkjet-printer-1.0.0-cups-libexec-dir.patch b/net-print/epson-inkjet-printer/files/epson-inkjet-printer-1.0.0-cups-libexec-dir.patch
new file mode 100644
index 0000000..47b6387
--- /dev/null
+++ b/net-print/epson-inkjet-printer/files/epson-inkjet-printer-1.0.0-cups-libexec-dir.patch
@@ -0,0 +1,11 @@
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -9,7 +9,7 @@ INCLUDES = \
+ -I./pagemanager \
+ -I./filteropt
+
+-bindir = $(CUPS_SERVER_DIR)/filter
++bindir = /usr/libexec/cups/filter
+
+ bin_PROGRAMS = epson_inkjet_printer_filter
+
diff --git a/net-print/epson-inkjet-printer/files/epson-inkjet-printer-1.0.0-raster.patch b/net-print/epson-inkjet-printer/files/epson-inkjet-printer-1.0.0-raster.patch
new file mode 100644
index 0000000..8594db3
--- /dev/null
+++ b/net-print/epson-inkjet-printer/files/epson-inkjet-printer-1.0.0-raster.patch
@@ -0,0 +1,101 @@
+
+
+--- a/src/pagemanager/pagemanager.c
++++ b/src/pagemanager/pagemanager.c
+@@ -22,7 +22,7 @@
+ #include "epcgdef.h"
+ #include "debuglog.h"
+ #include "memory.h"
+-#include "raster.h"
++#include "raster-helper.h"
+ #include "pagemanager.h"
+
+ extern int JobCanceled;
+@@ -45,7 +45,7 @@ fetchRaster(EpsPageManager *pageManager)
+ int error = 0;
+ int did_fetch = 0;
+ int read_bytes = 0;
+- int nraster;
++ size_t nraster;
+
+ while (error == 0 && did_fetch == 0 && JobCanceled == 0) {
+ eps_raster_fetch(privateData->raster_h, NULL, 0, 0, &status);
+@@ -212,7 +212,7 @@ int pageManagerGetPageRegion(EpsPageManager *pageManager, EpsPageRegion *pageReg
+ return EPS_OK;
+ }
+
+-int pageManagerGetRaster(EpsPageManager *pageManager, char *buf, int bufSize)
++size_t pageManagerGetRaster(EpsPageManager *pageManager, char *buf, int bufSize)
+ {
+ PageManagerPrivateData *privateData = NULL;
+ int error = EPS_OK;
+
+
+--- a/src/pagemanager/pagemanager.h
++++ b/src/pagemanager/pagemanager.h
+@@ -31,7 +31,7 @@ extern "C"
+ #define EPS_ERROR -1
+ #define EPS_OK 0
+
+-typedef int (*EpsRasterSource)(char *buf, int bufSize);
++typedef size_t (*EpsRasterSource)(char *buf, int bufSize);
+
+ typedef struct {
+ EpsRasterSource rasterSource;
+@@ -47,7 +47,7 @@ typedef struct {
+ EpsPageManager* pageManagerCreate(EpsPageRegion pageRegion, EpsFilterPrintOption filterPrintOption, EpsRasterSource rasterSource);
+ void pageManagerDestroy(EpsPageManager *pageManager);
+ int pageManagerGetPageRegion(EpsPageManager *pageManager, EpsPageRegion *pageRegion);
+-int pageManagerGetRaster(EpsPageManager *pageManager, char *buf, int bufSize);
++size_t pageManagerGetRaster(EpsPageManager *pageManager, char *buf, int bufSize);
+ int pageManagerIsNextPage(EpsPageManager *pageManager);
+
+ #ifdef __cplusplus
+
+
+--- a/src/raster/raster.c
++++ b/src/raster/raster.c
+@@ -218,7 +218,7 @@ eps_raster_init (RASTER * handle, EpsRasterOpt * data, EpsRasterPipeline * pipel
+
+ /* if raster_p equals NULL means that it is need to flush a page. */
+ int
+-eps_raster_print (RASTER handle, char * raster_p, int raster_bytes, int pixel_num, int * outraster)
++eps_raster_print (RASTER handle, char * raster_p, int raster_bytes, int pixel_num, size_t * outraster)
+ {
+ EpsRaster * raster = (EpsRaster *) handle;
+ EpsRasterPipeline * pipeline = NULL;
+
+
+--- a/src/raster/raster.h
++++ b/src/raster/raster.h
+@@ -143,7 +143,7 @@ typedef enum {
+ } EpsRasterFetchStatus;
+
+ int eps_raster_init (RASTER *, EpsRasterOpt *, EpsRasterPipeline *);
+-int eps_raster_print (RASTER, char *, int, int, int *);
++int eps_raster_print (RASTER, char *, int, int, size_t *);
+ int eps_raster_fetch (RASTER, char *, int, int, EpsRasterFetchStatus *);
+ int eps_raster_free (RASTER);
+
+
+
+--- a/src/raster_to_epson.c
++++ b/src/raster_to_epson.c
+@@ -33,7 +33,7 @@
+ #include <cups/ppd.h>
+ #include <cups/raster.h>
+
+-#include "raster.h"
++#include "raster-helper.h"
+ #include "memory.h"
+ #include "raster_to_epson.h"
+ #include "pagemanager.h"
+@@ -75,7 +75,7 @@ static int page_no = 0;
+ static int pageHeight = 0;
+ #endif
+
+-int rasterSource(char *buf, int bufSize)
++size_t rasterSource(char *buf, int bufSize)
+ {
+ int readBytes = 0;
+ if (JobCanceled == 0) {
diff --git a/net-print/epson-inkjet-printer/files/epson-inkjet-printer-1.0.0-resource-dir.patch b/net-print/epson-inkjet-printer/files/epson-inkjet-printer-1.0.0-resource-dir.patch
new file mode 100644
index 0000000..34dcda2
--- /dev/null
+++ b/net-print/epson-inkjet-printer/files/epson-inkjet-printer-1.0.0-resource-dir.patch
@@ -0,0 +1,11 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -61,7 +61,7 @@ AC_SUBST(DL_LIBS)
+ AC_SUBST(STDCPP_LIBS)
+
+ CORE_LIBRARY_PATH=${prefix}/lib"$LSB_ARCH"
+-CORE_RESOURCE_PATH=${prefix}/resource
++CORE_RESOURCE_PATH=${prefix}/share/epson-inkjet-printer/resource
+
+ AC_SUBST(CORE_LIBRARY_PATH)
+ AC_SUBST(CORE_RESOURCE_PATH)
diff --git a/net-print/epson-inkjet-printer/files/epson-inkjet-printer-1.0.0-usrdoc.patch b/net-print/epson-inkjet-printer/files/epson-inkjet-printer-1.0.0-usrdoc.patch
new file mode 100644
index 0000000..4815d0d
--- /dev/null
+++ b/net-print/epson-inkjet-printer/files/epson-inkjet-printer-1.0.0-usrdoc.patch
@@ -0,0 +1,11 @@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,7 +1,7 @@
+ # Copyright (C) Seiko Epson Corporation 2009.
+ SUBDIRS = src
+
+-docdir = @prefix@/doc
++docdir = @prefix@/share/doc/${P}
+ doc_DATA = \
+ AUTHORS \
+ COPYING \
diff --git a/net-print/epson-inkjet-printer/metadata.xml b/net-print/epson-inkjet-printer/metadata.xml
new file mode 100644
index 0000000..155d589
--- /dev/null
+++ b/net-print/epson-inkjet-printer/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>aaoth@aaoth.xyz</email>
+ <name>la ninpre</name>
+ </maintainer>
+ <use>
+ <flag name="abi_x86_32">enable 32-bit abi</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-print/metadata.xml b/net-print/metadata.xml
new file mode 100644
index 0000000..449c4f4
--- /dev/null
+++ b/net-print/metadata.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The net-print category contains network printing packages.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie net-print enthält Software für das Drucken in Netzwerken.
+ </longdescription>
+ <longdescription lang="es">
+ La categoría net-print contiene programas relacionadas con impresion.
+ </longdescription>
+ <longdescription lang="ja">
+ net-printカテゴリーにはネットワーク・プリンティングのパッケージが含まれています。
+ </longdescription>
+ <longdescription lang="nl">
+ De net-print categorie bevat applicaties voor netwerkprinten.
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm net-print chứa các phần mềm in ấn qua mạng.
+ </longdescription>
+ <longdescription lang="it">
+ La categoria net-print contiene programmi per la stampa via rete.
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria net-print contém pacotes relacionados com impressão
+ de rede.
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria net-print zawiera programy do drukowania w sieci.
+ </longdescription>
+</catmetadata>