uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
72
pkgs/misc/drivers/foo2zjs/default.nix
Normal file
72
pkgs/misc/drivers/foo2zjs/default.nix
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
{ lib, stdenv, fetchurl, foomatic-filters, bc, ghostscript, systemd, vim, time }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "foo2zjs";
|
||||
version = "20210116";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.loegria.net/mirrors/foo2zjs/foo2zjs-${version}.tar.gz";
|
||||
sha256 = "14x3wizvncdy0xgvmcx541qanwb7bg76abygqy17bxycn1zh5r1x";
|
||||
};
|
||||
|
||||
buildInputs = [ foomatic-filters bc ghostscript systemd vim ];
|
||||
|
||||
patches = [
|
||||
./no-hardcode-fw.diff
|
||||
# Support HBPL1 printers https://www.dechifro.org/hbpl/
|
||||
./hbpl1.patch
|
||||
# Fix "Unimplemented paper code" error for hbpl1 printers
|
||||
# https://github.com/mikerr/foo2zjs/pull/2
|
||||
./papercode-format-fix.patch
|
||||
];
|
||||
|
||||
makeFlags = [
|
||||
"PREFIX=$(out)"
|
||||
"APPL=$(out)/share/applications"
|
||||
"PIXMAPS=$(out)/share/pixmaps"
|
||||
"UDEVBIN=$(out)/bin"
|
||||
"UDEVDIR=$(out)/etc/udev/rules.d"
|
||||
"UDEVD=${systemd}/sbin/udevd"
|
||||
"LIBUDEVDIR=$(out)/lib/udev/rules.d"
|
||||
"USBDIR=$(out)/etc/hotplug/usb"
|
||||
"FOODB=$(out)/share/foomatic/db/source"
|
||||
"MODEL=$(out)/share/cups/model"
|
||||
];
|
||||
|
||||
installFlags = [ "install-hotplug" ];
|
||||
|
||||
postPatch = ''
|
||||
touch all-test
|
||||
sed -e "/BASENAME=/iPATH=$out/bin:$PATH" -i *-wrapper *-wrapper.in
|
||||
sed -e "s@PREFIX=/usr@PREFIX=$out@" -i *-wrapper{,.in}
|
||||
sed -e "s@/usr/share@$out/share@" -i hplj10xx_gui.tcl
|
||||
sed -e "s@\[.*-x.*/usr/bin/logger.*\]@type logger >/dev/null 2>\&1@" -i *wrapper{,.in}
|
||||
sed -e '/install-usermap/d' -i Makefile
|
||||
sed -e "s@/etc/hotplug/usb@$out&@" -i *rules*
|
||||
sed -e "s@/usr@$out@g" -i hplj1020.desktop
|
||||
sed -e "/PRINTERID=/s@=.*@=$out/bin/usb_printerid@" -i hplj1000
|
||||
'';
|
||||
|
||||
checkInputs = [ time ];
|
||||
doCheck = false; # fails to find its own binary. Also says "Tests will pass only if you are using ghostscript-8.71-16.fc14".
|
||||
|
||||
preInstall = ''
|
||||
mkdir -pv $out/{etc/udev/rules.d,lib/udev/rules.d,etc/hotplug/usb}
|
||||
mkdir -pv $out/share/foomatic/db/source/{opt,printer,driver}
|
||||
mkdir -pv $out/share/cups/model
|
||||
mkdir -pv $out/share/{applications,pixmaps}
|
||||
|
||||
mkdir -pv "$out/bin"
|
||||
cp -v getweb arm2hpdl "$out/bin"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "ZjStream printer drivers";
|
||||
maintainers = with maintainers;
|
||||
[
|
||||
raskin
|
||||
];
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl2Plus;
|
||||
};
|
||||
}
|
||||
4676
pkgs/misc/drivers/foo2zjs/hbpl1.patch
Normal file
4676
pkgs/misc/drivers/foo2zjs/hbpl1.patch
Normal file
File diff suppressed because it is too large
Load diff
98
pkgs/misc/drivers/foo2zjs/no-hardcode-fw.diff
Normal file
98
pkgs/misc/drivers/foo2zjs/no-hardcode-fw.diff
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
#
|
||||
#
|
||||
# patch "hplj1000"
|
||||
# from [d5336e74866d31735d97874191351a0dcc092b44]
|
||||
# to [55102b37684ee5181674d19d866caec2cf603412]
|
||||
#
|
||||
============================================================
|
||||
--- a/hplj1000 d5336e74866d31735d97874191351a0dcc092b44
|
||||
+++ b/hplj1000 55102b37684ee5181674d19d866caec2cf603412
|
||||
@@ -39,11 +39,6 @@ DEV=""
|
||||
DEV=""
|
||||
|
||||
#
|
||||
-# Directory to find downloadable HP firmware files sihpMMMM.dl
|
||||
-#
|
||||
-FWDIR=/usr/share/foo2zjs/firmware
|
||||
-
|
||||
-#
|
||||
# Program used to determine USB printer id information
|
||||
#
|
||||
# NOTE: /usr/bin is NOT mounted at this point
|
||||
@@ -83,57 +78,61 @@ case "$0" in
|
||||
MODEL=P1005; FWMODEL=$MODEL
|
||||
USB1=0x03f0 #Vendor
|
||||
USB2=0x3d17 #Model
|
||||
- FWDIR=/usr/share/foo2xqx/firmware
|
||||
+ DRIVER=foo2xqx
|
||||
;;
|
||||
*P1006)
|
||||
MODEL=P1006; FWMODEL=$MODEL
|
||||
USB1=0x03f0 #Vendor
|
||||
USB2=0x3e17 #Model
|
||||
- FWDIR=/usr/share/foo2xqx/firmware
|
||||
+ DRIVER=foo2xqx
|
||||
;;
|
||||
*P1007)
|
||||
MODEL=P1007; FWMODEL=P1005 # Alias
|
||||
USB1=0x03f0 #Vendor
|
||||
USB2=0x4817 #Model
|
||||
- FWDIR=/usr/share/foo2xqx/firmware
|
||||
+ DRIVER=foo2xqx
|
||||
;;
|
||||
*P1008)
|
||||
MODEL=P1008; FWMODEL=P1006 # Alias
|
||||
USB1=0x03f0 #Vendor
|
||||
USB2=0x4917 #Model
|
||||
- FWDIR=/usr/share/foo2xqx/firmware
|
||||
+ DRIVER=foo2xqx
|
||||
;;
|
||||
*P1505)
|
||||
MODEL=P1505; FWMODEL=$MODEL
|
||||
USB1=0x03f0 #Vendor
|
||||
USB2=0x3f17 #Model
|
||||
- FWDIR=/usr/share/foo2xqx/firmware
|
||||
+ DRIVER=foo2xqx
|
||||
;;
|
||||
*P1505n)
|
||||
MODEL=P1505n; FWMODEL=$MODEL
|
||||
USB1=0x03f0 #Vendor
|
||||
USB2=0x4017 #Model
|
||||
- FWDIR=/usr/share/foo2xqx/firmware
|
||||
+ DRIVER=foo2xqx
|
||||
;;
|
||||
*1000)
|
||||
MODEL=1000; FWMODEL=$MODEL
|
||||
USB1=0x03f0 #Vendor
|
||||
USB2=0x0517 #Model
|
||||
+ DRIVER=foo2zjs
|
||||
;;
|
||||
*1005)
|
||||
MODEL=1005; FWMODEL=$MODEL
|
||||
USB1=0x03f0 #Vendor
|
||||
USB2=0x1317 #Model
|
||||
+ DRIVER=foo2zjs
|
||||
;;
|
||||
*1018)
|
||||
MODEL=1018; FWMODEL=$MODEL
|
||||
USB1=0x03f0 #Vendor
|
||||
USB2=0x4117 #Model
|
||||
+ DRIVER=foo2zjs
|
||||
;;
|
||||
*1020)
|
||||
MODEL=1020; FWMODEL=$MODEL
|
||||
USB1=0x03f0 #Vendor
|
||||
USB2=0x2b17 #Model
|
||||
+ DRIVER=foo2zjs
|
||||
;;
|
||||
*)
|
||||
log "Only HP LaserJet 100[05],1018,1020,P100[5678],P1505 are supported"
|
||||
@@ -203,7 +202,7 @@ load1() {
|
||||
#
|
||||
load1() {
|
||||
_dev="$1"
|
||||
- fw="$FWDIR/sihp$FWMODEL.dl"
|
||||
+ fw="${FOO2ZJS_DATADIR:-/usr/share}/$DRIVER/firmware/sihp$FWMODEL.dl"
|
||||
if [ ! -f "$fw" ]; then
|
||||
log "Missing HP LaserJet $MODEL firmware file $fw"
|
||||
log "...read foo2zjs installation instructions and run ./getweb $MODEL"
|
||||
101
pkgs/misc/drivers/foo2zjs/papercode-format-fix.patch
Normal file
101
pkgs/misc/drivers/foo2zjs/papercode-format-fix.patch
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
From 29ac95ac76a9d9977561cef352f8b803579fea2a Mon Sep 17 00:00:00 2001
|
||||
From: Shinbar <richard.shine@gmail.com>
|
||||
Date: Thu, 26 Mar 2020 19:33:39 +0000
|
||||
Subject: [PATCH 1/3] PPDs (e.g. Del-1660.ppd) are specifying paper sizes as
|
||||
parameters e.g. -p1 which are then being picked up as an invalid paper size
|
||||
In cups error_log manifesting as: foo2hbpl1-wrapper: Unimplemented paper code
|
||||
1
|
||||
|
||||
Have amended foo2hbpl1-wrapper.in to intepret paper sizes
|
||||
paper parameters are also now being interpreted.
|
||||
This has fixed for a Dell 1660w printer, running on Ubuntu 18.04
|
||||
---
|
||||
foo2hbpl1-wrapper.in | 28 ++++++++++++++--------------
|
||||
1 file changed, 14 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/foo2hbpl1-wrapper.in b/foo2hbpl1-wrapper.in
|
||||
index 567e891..bb20ed5 100644
|
||||
--- a/foo2hbpl1-wrapper.in
|
||||
+++ b/foo2hbpl1-wrapper.in
|
||||
@@ -341,20 +341,20 @@ Custom*)
|
||||
# /usr/share/ghostscript/9.10/Resource/Init/gs_statd.ps
|
||||
# foo2hbpl1 will provide the appropriate numeric value
|
||||
|
||||
-letter) DIM=5100x6600 ;;
|
||||
-legal) DIM=5100x8400 ;;
|
||||
-a4) DIM=4961x7016 ;;
|
||||
-executive) DIM=4350x6300 ;;
|
||||
-env10) DIM=2475x5700 ;;
|
||||
-monarch) DIM=2325x4500 ;;
|
||||
-c5) DIM=3827x5409 ;;
|
||||
-envDL) DIM=2599x5197 ;;
|
||||
-isob5|b5) DIM=4158x5906 ;;
|
||||
-jisb5) DIM=4299x6071 ;;
|
||||
-a5) DIM=3496x4961 ;;
|
||||
-folio) DIM=5100x7800 ;;
|
||||
-pa4) DIM=4961x6600 ;;
|
||||
-archA) DIM=5400x7200 ;;
|
||||
+4|letter|Letter) DIM=5100x6600 ;;
|
||||
+7|legal|Legal) DIM=5100x8400 ;;
|
||||
+1|a4|A4) DIM=4961x7016 ;;
|
||||
+5|executive|Executive) DIM=4350x6300 ;;
|
||||
+9|env10|Env10) DIM=2475x5700 ;;
|
||||
+10|monarch|EnvMonarch) DIM=2325x4500 ;;
|
||||
+11|c5|EnvC5) DIM=3827x5409 ;;
|
||||
+12|envDL|EnvDL) DIM=2599x5197 ;;
|
||||
+isob5|b5) DIM=4158x5906 ;;
|
||||
+2|jisb5|B5jis) DIM=4299x6071 ;;
|
||||
+a5) DIM=3496x4961 ;;
|
||||
+6|folio|Folio) DIM=5100x7800 ;;
|
||||
+pa4) DIM=4961x6600 ;;
|
||||
+archA) DIM=5400x7200 ;;
|
||||
*) error "Unimplemented paper code $PAPER";;
|
||||
esac
|
||||
|
||||
|
||||
From 289d55ded5af7d84a91b0ecf26bbea18f3cb2d9e Mon Sep 17 00:00:00 2001
|
||||
From: Shinbar <richard.shine@gmail.com>
|
||||
Date: Fri, 27 Mar 2020 09:19:40 +0000
|
||||
Subject: [PATCH 2/3] Added A5 paper size parameter
|
||||
|
||||
---
|
||||
foo2hbpl1-wrapper.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/foo2hbpl1-wrapper.in b/foo2hbpl1-wrapper.in
|
||||
index bb20ed5..474972d 100644
|
||||
--- a/foo2hbpl1-wrapper.in
|
||||
+++ b/foo2hbpl1-wrapper.in
|
||||
@@ -351,7 +351,7 @@ Custom*)
|
||||
12|envDL|EnvDL) DIM=2599x5197 ;;
|
||||
isob5|b5) DIM=4158x5906 ;;
|
||||
2|jisb5|B5jis) DIM=4299x6071 ;;
|
||||
-a5) DIM=3496x4961 ;;
|
||||
+3|a5|A5) DIM=3496x4961 ;;
|
||||
6|folio|Folio) DIM=5100x7800 ;;
|
||||
pa4) DIM=4961x6600 ;;
|
||||
archA) DIM=5400x7200 ;;
|
||||
|
||||
From 393f7a7c70bbf9fa0c39ac1504b220793670d201 Mon Sep 17 00:00:00 2001
|
||||
From: Shinbar <richard.shine@gmail.com>
|
||||
Date: Sun, 29 Mar 2020 10:01:31 +0100
|
||||
Subject: [PATCH 3/3] Makefile now works in FreeBSD
|
||||
|
||||
---
|
||||
osx-hotplug/Makefile | 5 +----
|
||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||
|
||||
diff --git a/osx-hotplug/Makefile b/osx-hotplug/Makefile
|
||||
index 4165085..a9aa06a 100644
|
||||
--- a/osx-hotplug/Makefile
|
||||
+++ b/osx-hotplug/Makefile
|
||||
@@ -64,8 +64,5 @@ clean:
|
||||
rm -f *.o *.1
|
||||
|
||||
uninstall:
|
||||
- ( \
|
||||
- echo "g/osx-hplj-hotplug/d"; \
|
||||
- echo "w"; \
|
||||
- ) | ex $(RC)
|
||||
+ -(echo "g/osx-hplj-hotplug/d"; echo "w") | ex $(RC)
|
||||
-rm -f $(BIN)/osx-hplj-hotplug
|
||||
Loading…
Add table
Add a link
Reference in a new issue