diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-03-03 12:21:27 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-03-03 12:21:27 +0200 |
commit | 0421037880c536a4b37ca65393b7b3647e7a9bde (patch) | |
tree | e7e3524bb1febfa65b3c834c9628752d43b4fc0d | |
parent | 6-1 (diff) | |
download | brlaser-master.tar.xz |
Per github/brlaser#52, this will allow lower memory printers to print
certain pages containing images.
-rw-r--r-- | PKGBUILD | 29 | ||||
-rw-r--r-- | lower-block-lines.patch | 27 |
2 files changed, 46 insertions, 10 deletions
@@ -1,27 +1,36 @@ # Maintainer: Colin Arnott <colin@urandom.co.uk> pkgname="brlaser" pkgver=6 -pkgrel=1 -pkgdesc="CUPS driver for the Brother DCP-7065DN" +pkgrel=2 +pkgdesc="CUPS driver for Brother laser printers, with patch to lower block lines" arch=('x86_64' 'armv7h') url="https://github.com/pdewacht/brlaser" license=('GPL2') depends=('cups') makedepends=('cmake') -source=("https://github.com/pdewacht/${pkgname}/archive/v${pkgver}.tar.gz") -sha512sums=('d7e0e63b64be9ae7633381622c13ba0589e5fe58d277212bce4f5bb712a291ed0b0f2ac3d450dce61c7f9052c1ce7323fec66b5005c5cb3da1314b284d20f06f') +source=("https://github.com/pdewacht/${pkgname}/archive/v${pkgver}.tar.gz" + "lower-block-lines.patch") +b2sums=('be8041c1b6ddb8c4e5055fa35edc2c764562b2b4e52cad17aa968a51886621264d6bf289bd7bb5af0148098bb72aa96adea603091b38c3a245068d60737e80fc' + '9500139bdc02c6c798749be5b761e52c65b37419ba3cdd6393d5f938db52e6df269861e636bb335a983a52d32f89f4280867b80150fb4d5d8994c05c49edcea6') + +prepare() { + msg2 "Applying block lines patch" + patch -p1 -i ../lower-block-lines.patch +} build() { - cd "${pkgname}-${pkgver}" - cmake . + cd "${pkgname}-${pkgver}" + mkdir build + cd build + cmake -DCMAKE_BUILD_TYPE=Release .. } check() { - cd "${pkgname}-${pkgver}" - make -k check + cd "${pkgname}-${pkgver}/build" + make -k check } package() { - cd "${pkgname}-${pkgver}" - make DESTDIR="$pkgdir/" install + cd "${pkgname}-${pkgver}/build" + make DESTDIR="$pkgdir/" install } diff --git a/lower-block-lines.patch b/lower-block-lines.patch new file mode 100644 index 0000000..6a59212 --- /dev/null +++ b/lower-block-lines.patch @@ -0,0 +1,27 @@ +--- a/brlaser-6/src/block.h ++++ b/brlaser-6/src/block.h +@@ -59,7 +59,7 @@ + + private: + static const unsigned max_block_size_ = 16350; +- static const unsigned max_lines_per_block_ = 64; ++ static const unsigned max_lines_per_block_ = 32; + + std::vector<std::vector<uint8_t>> lines_; + int line_bytes_; + +--- a/brlaser-6/test/test_block.cc ++++ b/brlaser-6/test/test_block.cc +@@ -37,10 +37,10 @@ + EXPECT(!b.empty()); + }, + +- "A block can contain 64 lines", ++ "A block can contain 32 lines", + [] { + block b; +- for (int i = 0; i < 64; ++i) { ++ for (int i = 0; i < 32; ++i) { + EXPECT(b.line_fits(1)); + b.add_line(vec(1)); + } |