libcupsfilters-duplexfix
LOW
maintainer yangtsesu
0 votes
scanned 2026-10-19 05:23:55.891510
Why flagged
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
Triggered rules
Low
Few votes, recently uploaded
zero_votes_recent
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
PKGBUILD
1
# Maintainer: Yangtse Su <yangtsesu@gmail.com>
2
#
3
# Contributor: Andreas Radke <andyrtr@archlinux.org> (original Arch package recipe)
4
# Patched rebuild of Arch's "libcupsfilters" package.
5
#
6
# Problem (upstream issue): https://github.com/OpenPrinting/cups-filters/issues/762
7
# "pdftopdf rotates duplex back sides 180 degrees when the job carries
8
# sides=two-sided-* (duplex prints upside down on IPP Everywhere/URF printers)"
9
# The responsible code lives in this package, not in cups-filters:
10
# cupsfilters/pdftopdf.c, cfFilterPDFToPDF() sets the back side transform to
11
# the hard-coded placeholder "const char *sheet_back = \"rotated\"; "
12
# instead of asking the printer (cfGetBackSideOrientation() in
13
# cupsfilters/ipp.c reads sides-supported and urf-supported; a URF "DM1"
14
# printer reports "normal"). As a result every two-sided-long-edge job gets
15
# an extra 180 degree rotation on the back sides, while the printer applies
16
# its own duplex imposition - the back side prints upside down.
17
#
18
# Fix: libcupsfilters-pdftopdf-backside.patch derives the transform from the
19
# printer's reported back side orientation and defaults to "normal"
20
# (same default as the raster filters). Printers that really need a rotated
21
# back side are unaffected. This patch is meant to go upstream; drop this
22
# package once libcupsfilters ships a fixed release.
23
#
24
_pkgname=libcupsfilters
25
pkgname=libcupsfilters-duplexfix
26
pkgver=2.2.1.r32.gd49e9284
27
_commit=d49e92848060d6d9d2e95679a115a8da5102f1de # master 2026-10-13
28
pkgrel=1
29
pkgdesc="OpenPrinting CUPS Filters - contains all the code of the filters of the former cups-filters package as library functions"
30
arch=('x86_64')
31
url="https://github.com/OpenPrinting/libcupsfilters"
32
license=('Apache-2.0 WITH LLVM-exception')
33
# keep poppler for pdftoppm
34
depends=('libcups' 'libexif' 'pdfio' 'libjxl' 'poppler'
35
'libjpeg-turbo' 'libpng' 'libtiff' 'lcms2'
36
'fontconfig' 'glibc' 'dbus')
37
makedepends=(
38
'ghostscript'
39
'git'
40
# 'mupdf-tools' ???
41
)
42
checkdepends=('ttf-dejavu') # ttf-dejavu for make check
43
provides=("$_pkgname")
44
conflicts=("$_pkgname")
45
source=(#"https://github.com/OpenPrinting/libcupsfilters/releases/download/$pkgver/$pkgname-$pkgver.tar.xz"
46
"git+https://github.com/OpenPrinting/libcupsfilters#commit=$_commit"
47
# libcupsfilters-PR167.patch::https://github.com/OpenPrinting/libcupsfilters/pull/167.patch
48
libcupsfilters-pdftopdf-backside.patch)
49
sha256sums=('4136e3d0bc8ef8e881818cf62be67d2486361025200627c22233a7a40b8ec989'
50
# 'fa77ba778dcbea8826edcf87c4d022a11c073d288b39a1eaf06e0eaf3376f525'
51
'825ab878dd4dd4806478705b44a687fcee4a41353f75f65033d9f126335cf514')
52
53
pkgver() {
54
cd "$_pkgname"
55
git describe --tags | sed 's/-/.r/' | sed 's/-/./'
56
}
57
58
prepare() {
59
cd "$_pkgname"
60
# https://github.com/OpenPrinting/cups-filters/issues/762
61
patch -Np1 -i ../libcupsfilters-pdftopdf-backside.patch
62
# https://github.com/OpenPrinting/libcupsfilters/issues/209
63
# patch -Np1 -i ../libcupsfilters-PR167.patch
64
autoreconf -vfi
65
}
66
67
build() {
68
cd "$_pkgname"
69
./configure --prefix=/usr \
70
--sysconfdir=/etc \
71
--sbindir=/usr/bin \
72
--localstatedir=/var \
73
--disable-mutool
74
make
75
}
76
77
check() {
78
cd "$_pkgname"
79
make check
80
}
81
82
package() {
83
cd "$_pkgname"
84
make DESTDIR="$pkgdir/" install
85
# license
86
mkdir -p "${pkgdir}"/usr/share/licenses/${pkgname}
87
# install -m644 "${srcdir}"/${pkgname}-${pkgver}/{COPYING,NOTICE} "${pkgdir}"/usr/share/licenses/${pkgname}/
88
install -m644 "${srcdir}"/${_pkgname}/{COPYING,NOTICE} "${pkgdir}"/usr/share/licenses/${pkgname}/
89
}
90
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-10-19 05:23:55 | Low | 1 |