[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1054540: cups-filters: Does not automatically find proper liblouis braille tables



Package: cups-filters
Version: 1.28.17-3
Severity: normal
Tags: l10n patch upstream
Forwarded: https://github.com/OpenPrinting/cups-filters/pull/555

Hello,

Since bookworm, cups-filter does not automatically find the proper
liblouis braille tables, ending up with messages such as:

"Could not find LibLouis table with locale de_DE"

This is because liblouis changed their table format in version 3.21. The
attached patch was forwarded to upstream to accomodate for this.

Could this also be backported to bookworm? Otherwise people cannot
easily emboss documents on braille printers with bookworm.

Samuel

-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'stable-security'), (500, 'stable-debug'), (500, 'oldstable-proposed-updates-debug'), (500, 'oldstable-proposed-updates'), (500, 'oldoldstable-proposed-updates'), (500, 'oldoldstable'), (500, 'buildd-unstable'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, arm64

Kernel: Linux 6.5.0-1-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages cups-filters depends on:
ii  bc                         1.07.1-3+b1
ii  cups-filters-core-drivers  1.28.17-3
ii  ghostscript                10.02.0~dfsg-2
ii  libc6                      2.37-12
ii  libcups2                   2.4.7-1
ii  libcupsfilters1            1.28.17-3
ii  libfontconfig1             2.14.2-6
ii  libfontembed1              1.28.17-3
ii  libgcc-s1                  13.2.0-5
ii  libqpdf29                  11.6.3-1
ii  libstdc++6                 13.2.0-5
ii  poppler-utils              22.12.0-2+b1

Versions of packages cups-filters recommends:
ii  colord             1.4.6-3
ii  liblouis-bin       3.27.0-1
ii  liblouisutdml-bin  2.11.0-4
ii  lynx               2.9.0dev.12-1

Versions of packages cups-filters suggests:
ii  antiword                                   0.37-16
ii  docx2txt                                   1.4-5
ii  foomatic-db-compressed-ppds [foomatic-db]  20230202-1
ii  imagemagick                                8:6.9.11.60+dfsg-1.6
ii  imagemagick-6.q16 [imagemagick]            8:6.9.11.60+dfsg-1.6

-- no debconf information

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.
commit 0707c9645039ed872dd0a1cc970388f1ee4aa8a5
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Wed Oct 25 14:20:38 2023 +0200

    braille: Fix finding tables from liblouis ≥3.21
    
    Since 3.21 (more precisely, commit e18fe140e2f1), liblouis uses language:
    and region: rather than locale:

diff --git a/filter/braille/filters/cups-braille.sh.in b/filter/braille/filters/cups-braille.sh.in
index 47fda21a8..0ce341aff 100644
--- a/filter/braille/filters/cups-braille.sh.in
+++ b/filter/braille/filters/cups-braille.sh.in
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2015-2018 Samuel Thibault <samuel.thibault@ens-lyon.org>
+# Copyright (c) 2015-2018, 2023 Samuel Thibault <samuel.thibault@ens-lyon.org>
 # 
 # Permission is hereby granted, free of charge, to any person obtaining a copy
 # of this software and associated documentation files (the "Software"), to deal
@@ -353,10 +353,12 @@ getOptionLibLouis () {
       score=0
       name=${table#$TABLESDIR/}
 
-      if grep -q "^#+locale:$LOUIS_LOCALE$" $table; then
+      if grep -q "^#+locale: *$LOUIS_LOCALE$" $table || \
+         grep -q "^#+region: *$LOUIS_LOCALE$" $table ; then
 	printf "DEBUG: %s has correct locale %s\n" "$name" "$LOUIS_LOCALE" >&2
 	score=$((score + 15))
-      elif grep -q "^#+locale:$LANGUAGE$" $table; then
+      elif grep -q "^#+locale: *$LANGUAGE$" $table || \
+           grep -q "^#+language: *$LANGUAGE$" $table; then
 	printf "DEBUG: %s has correct language %s\n" "$name" "$LANGUAGE" >&2
 	score=$((score + 10))
       else

Reply to: