libcupsfilters-duplexfix

LOW
maintainer yangtsesu 0 votes scanned 2026-10-19 05:23:55.891510
View on AUR
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
25pkgname=libcupsfilters-duplexfix
26pkgver=2.2.1.r32.gd49e9284
27_commit=d49e92848060d6d9d2e95679a115a8da5102f1de # master 2026-10-13
28pkgrel=1
29pkgdesc="OpenPrinting CUPS Filters - contains all the code of the filters of the former cups-filters package as library functions"
30arch=('x86_64')
31url="https://github.com/OpenPrinting/libcupsfilters"
32license=('Apache-2.0 WITH LLVM-exception')
33# keep poppler for pdftoppm
34depends=('libcups' 'libexif' 'pdfio' 'libjxl' 'poppler'
35 'libjpeg-turbo' 'libpng' 'libtiff' 'lcms2'
36 'fontconfig' 'glibc' 'dbus')
37makedepends=(
38 'ghostscript'
39 'git'
40# 'mupdf-tools' ???
41)
42checkdepends=('ttf-dejavu') # ttf-dejavu for make check
43provides=("$_pkgname")
44conflicts=("$_pkgname")
45source=(#"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)
49sha256sums=('4136e3d0bc8ef8e881818cf62be67d2486361025200627c22233a7a40b8ec989'
50 # 'fa77ba778dcbea8826edcf87c4d022a11c073d288b39a1eaf06e0eaf3376f525'
51 '825ab878dd4dd4806478705b44a687fcee4a41353f75f65033d9f126335cf514')
52
53pkgver() {
54 cd "$_pkgname"
55 git describe --tags | sed 's/-/.r/' | sed 's/-/./'
56}
57
58prepare() {
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
67build() {
68 cd "$_pkgname"
69 ./configure --prefix=/usr \
70 --sysconfdir=/etc \
71 --sbindir=/usr/bin \
72 --localstatedir=/var \
73 --disable-mutool
74 make
75}
76
77check() {
78 cd "$_pkgname"
79 make check
80}
81
82package() {
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)SeverityRules
2026-10-19 05:23:55 Low 1

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion