update to version 5.3.4

This commit is contained in:
wang--ge 2023-10-09 11:00:34 +08:00
parent c47ebceeea
commit 565e709a38
11 changed files with 259 additions and 396 deletions

32
cups-genppdupdate.py.in Normal file → Executable file
View File

@ -255,6 +255,23 @@ def parse_options():
return args return args
def check_encoding(filename):
import charset_normalizer
with open(filename, 'rb') as f:
charenc = charset_normalizer.detect(f.read())['encoding']
if debug & 1:
print("File encoding: {}".format(charenc))
if charenc in ['ascii', 'utf-8']:
return 'utf-8'
else:
if debug & 1:
print("Trying to use latin1 for decoding {}".format(charenc))
return 'latin1'
def update_ppd (ppd_source_filename): def update_ppd (ppd_source_filename):
global ppd_dest_filename global ppd_dest_filename
global ppd_out_dir global ppd_out_dir
@ -271,7 +288,8 @@ def update_ppd (ppd_source_filename):
ppd_dest_filename = "%s/%s" % (ppd_out_dir, ppd_dest_filename = "%s/%s" % (ppd_out_dir,
os.path.basename (ppd_dest_filename)) os.path.basename (ppd_dest_filename))
orig = open (ppd_source_filename, encoding="utf-8") fenc = check_encoding(ppd_source_filename)
orig = open(ppd_source_filename, encoding=fenc)
orig_metadata = os.fstat (orig.fileno ()) orig_metadata = os.fstat (orig.fileno ())
if debug & 1: if debug & 1:
print ("Source Filename: %s" % ppd_source_filename) print ("Source Filename: %s" % ppd_source_filename)
@ -284,7 +302,17 @@ def update_ppd (ppd_source_filename):
region = "" region = ""
valid = 0 valid = 0
orig_locale = "" orig_locale = ""
for line in orig.readlines ():
try:
orig_lines = orig.readlines()
except UnicodeDecodeError:
if debug & 1:
print('PPD {} has an unexpected enconding, '
'skipping.'.format(ppd_source_filename))
return -1
for line in orig_lines:
line.rstrip () line.rstrip ()
if line.find ("*StpLocale:") != -1: if line.find ("*StpLocale:") != -1:
match = re.search ("\*StpLocale:\s*\"(.*)\"$", line) match = re.search ("\*StpLocale:\s*\"(.*)\"$", line)

Binary file not shown.

BIN
gutenprint-5.3.4.tar.bz2 Normal file

Binary file not shown.

View File

@ -1,42 +0,0 @@
From b154b16431712017ea69d2dd7fda25efb487c86d Mon Sep 17 00:00:00 2001
From: Robert Krawitz <rlk@alum.mit.edu>
Date: Tue, 24 Jul 2018 08:06:49 -0400
Subject: [PATCH] Add Epson Expression ET-2600 EcoTank
---
NEWS | 6 ++++++
src/xml/printers.xml | 1 +
2 files changed, 7 insertions(+)
diff --git a/NEWS b/NEWS
index 13b793ca..aeb63ed0 100644
--- a/NEWS
+++ b/NEWS
@@ -248,6 +248,12 @@ device. We have determined that the data is in fact written by the
III) MAJOR CHANGES FROM PREVIOUS RELEASES
+* Changes from 5.2.14
+
+ 1) The following Epson inkjet printer has been added:
+
+ Epson Expression ET-2600 EcoTank ET
+
* Changes from 5.2.13
1) The PCL driver now supports color laser printers that use PCL 5c
diff --git a/src/xml/printers.xml b/src/xml/printers.xml
index 32573ea7..9d15b2f4 100644
--- a/src/xml/printers.xml
+++ b/src/xml/printers.xml
@@ -1534,6 +1534,7 @@
<printer translate="name" name="Epson B-500DN" driver="escp2-b500dn" manufacturer="Epson" model="87" parameters="standard_params" />
<printer translate="name" name="Epson B-508DN" driver="escp2-b508dn" manufacturer="Epson" model="87" parameters="standard_params" />
<printer translate="name" name="Epson B-510DN" driver="escp2-b510dn" manufacturer="Epson" model="87" parameters="standard_params" />
+ <printer translate="name" name="Epson Expression ET-2600 EcoTank" driver="escp2-et2600" manufacturer="Epson" model="80" parameters="cx3500_params" />
<printer translate="name" name="Epson L120" driver="escp2-l120" manufacturer="Epson" model="80" parameters="cx3500_params" />
<printer translate="name" name="Epson L210" driver="escp2-l210" manufacturer="Epson" model="80" parameters="cx3500_params" />
<printer translate="name" name="Epson L310" driver="escp2-l310" manufacturer="Epson" model="129" parameters="cx3500_params" />
--
2.27.0

View File

@ -1,25 +0,0 @@
From 907f862a4e838207b7e2a673e18b4fbd998b8529 Mon Sep 17 00:00:00 2001
From: Robert Krawitz <rlk@alum.mit.edu>
Date: Sun, 29 Jul 2018 10:33:24 -0400
Subject: [PATCH] Minor doc issues
---
scripts/autogen.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/autogen.sh b/scripts/autogen.sh
index c510dfcc..a5c580c0 100644
--- a/scripts/autogen.sh
+++ b/scripts/autogen.sh
@@ -298,7 +298,7 @@ if test -d /usr/share/sgml/docbook ; then
fi
{
- test -d "/usr/share/sgml/docbook_4" || test -d "/usr/share/sgml/docbook/dtd/4.0" || test -d "/usr/share/sgml/docbook_4.1" || test -n "$fedora_docbook"
+ test -d "/usr/share/sgml/docbook_4" || test -d "/usr/share/sgml/docbook/dtd/4.0" || test -d "/usr/share/sgml/docbook/dtd/4.1" || test -d "/usr/share/sgml/docbook_4.1" || test -n "$fedora_docbook"
} || {
echo " "
echo "***Warning***: You must have Docbook v4 installed to"
--
2.39.0.windows.2

View File

@ -1,281 +0,0 @@
diff -up gutenprint-5.2.12-pre3/configure.ac.O6 gutenprint-5.2.12-pre3/configure.ac
--- gutenprint-5.2.12-pre3/configure.ac.O6 2016-10-14 10:41:54.290398824 +0200
+++ gutenprint-5.2.12-pre3/configure.ac 2016-10-14 10:44:04.921328215 +0200
@@ -638,27 +638,6 @@ AH_TEMPLATE(PKGMODULEDIR,, [Package modu
PKGMODULEDIR="${PACKAGE_LIB_DIR}/${GUTENPRINT_RELEASE_VERSION}/modules"
AC_DEFINE_UNQUOTED(PKGMODULEDIR, ["$PKGMODULEDIR"])
-dnl Compiler flags
-if test x$ac_compiler_gnu = "xyes"; then
- STP_ADD_COMPILER_ARGS([-Wall -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wwrite-strings -Werror-implicit-function-declaration -Winline -Wformat=2 -finline-limit=131072],, [GNUCFLAGS])
- if test x${USE_MAINTAINER_MODE} = xyes ; then
- STP_ADD_COMPILER_ARGS([-D_POSIX_C_SOURCE=200809L -std=c99 -pedantic -Waggregate-return -Wcast-qual -Wshadow -Wredundant-decls],, [GNUCFLAGS])
- fi
- if test x$ENABLE_DEBUG = xyes ; then
- STP_ADD_COMPILER_ARG([-g])
- else
- STP_ADD_FIRST_COMPILER_ARG([-O6 -O3 -O2 -O1 -O])
- fi
-else
- if test x$ENABLE_DEBUG = xyes ; then
- STP_ADD_COMPILER_ARG([-g])
- else
- STP_ADD_FIRST_COMPILER_ARG([-O])
- fi
-fi
-if test x$ENABLE_PROFILE = xyes ; then
- STP_ADD_COMPILER_ARG([-pg])
-fi
AC_SUBST(GNUCFLAGS)
AH_TEMPLATE([HAVE_GCC_ATTRIBUTES],
diff -up gutenprint-5.2.12-pre3/configure.O6 gutenprint-5.2.12-pre3/configure
--- gutenprint-5.2.12-pre3/configure.O6 2016-10-14 10:41:54.293398800 +0200
+++ gutenprint-5.2.12-pre3/configure 2016-10-14 10:53:25.392709079 +0200
@@ -17651,246 +17651,6 @@ cat >>confdefs.h <<_ACEOF
#define PKGMODULEDIR "$PKGMODULEDIR"
_ACEOF
-
-if test x$ac_compiler_gnu = "xyes"; then
-
- for stp_ac_arg in -Wall -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wwrite-strings -Werror-implicit-function-declaration -Winline -Wformat=2 -finline-limit=131072 ; do
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports ${stp_ac_arg}" >&5
-$as_echo_n "checking if ${CC} supports ${stp_ac_arg}... " >&6; }
- stp_acOLDCFLAGS="${CFLAGS}"
- CFLAGS="${GNUCFLAGS} ${stp_ac_arg}"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; };
- stp_newCFLAGS="$CFLAGS"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; };
- stp_newCFLAGS="$stp_acOLDCFLAGS"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$stp_acOLDCFLAGS"
- GNUCFLAGS="${stp_newCFLAGS}"
-
- done
-
- if test x${USE_MAINTAINER_MODE} = xyes ; then
-
- for stp_ac_arg in -D_POSIX_C_SOURCE=200809L -std=c99 -pedantic -Waggregate-return -Wcast-qual -Wshadow -Wredundant-decls ; do
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports ${stp_ac_arg}" >&5
-$as_echo_n "checking if ${CC} supports ${stp_ac_arg}... " >&6; }
- stp_acOLDCFLAGS="${CFLAGS}"
- CFLAGS="${GNUCFLAGS} ${stp_ac_arg}"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; };
- stp_newCFLAGS="$CFLAGS"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; };
- stp_newCFLAGS="$stp_acOLDCFLAGS"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$stp_acOLDCFLAGS"
- GNUCFLAGS="${stp_newCFLAGS}"
-
- done
-
- fi
- if test x$ENABLE_DEBUG = xyes ; then
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports -g" >&5
-$as_echo_n "checking if ${CC} supports -g... " >&6; }
- stp_acOLDCFLAGS="${CFLAGS}"
- CFLAGS="${CFLAGS} -g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; };
- stp_newCFLAGS="$CFLAGS"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; };
- stp_newCFLAGS="$stp_acOLDCFLAGS"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$stp_acOLDCFLAGS"
- CFLAGS="${stp_newCFLAGS}"
-
- else
-
- for stp_ac_arg in -O6 -O3 -O2 -O1 -O ; do
- stp_ac_save_CFLAGS="${CFLAGS}"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports ${stp_ac_arg}" >&5
-$as_echo_n "checking if ${CC} supports ${stp_ac_arg}... " >&6; }
- stp_acOLDCFLAGS="${CFLAGS}"
- CFLAGS="${CFLAGS} ${stp_ac_arg}"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; };
- stp_newCFLAGS="$CFLAGS"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; };
- stp_newCFLAGS="$stp_acOLDCFLAGS"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$stp_acOLDCFLAGS"
- CFLAGS="${stp_newCFLAGS}"
-
- test "${stp_ac_save_CFLAGS}" != "${CFLAGS}" && break
- done
-
- fi
-else
- if test x$ENABLE_DEBUG = xyes ; then
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports -g" >&5
-$as_echo_n "checking if ${CC} supports -g... " >&6; }
- stp_acOLDCFLAGS="${CFLAGS}"
- CFLAGS="${CFLAGS} -g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; };
- stp_newCFLAGS="$CFLAGS"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; };
- stp_newCFLAGS="$stp_acOLDCFLAGS"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$stp_acOLDCFLAGS"
- CFLAGS="${stp_newCFLAGS}"
-
- else
-
- for stp_ac_arg in -O ; do
- stp_ac_save_CFLAGS="${CFLAGS}"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports ${stp_ac_arg}" >&5
-$as_echo_n "checking if ${CC} supports ${stp_ac_arg}... " >&6; }
- stp_acOLDCFLAGS="${CFLAGS}"
- CFLAGS="${CFLAGS} ${stp_ac_arg}"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; };
- stp_newCFLAGS="$CFLAGS"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; };
- stp_newCFLAGS="$stp_acOLDCFLAGS"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$stp_acOLDCFLAGS"
- CFLAGS="${stp_newCFLAGS}"
-
- test "${stp_ac_save_CFLAGS}" != "${CFLAGS}" && break
- done
-
- fi
-fi
-if test x$ENABLE_PROFILE = xyes ; then
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ${CC} supports -pg" >&5
-$as_echo_n "checking if ${CC} supports -pg... " >&6; }
- stp_acOLDCFLAGS="${CFLAGS}"
- CFLAGS="${CFLAGS} -pg"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; };
- stp_newCFLAGS="$CFLAGS"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; };
- stp_newCFLAGS="$stp_acOLDCFLAGS"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$stp_acOLDCFLAGS"
- CFLAGS="${stp_newCFLAGS}"
-
-fi
-
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports __attribute__ syntax" >&5
$as_echo_n "checking if $CC supports __attribute__ syntax... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext

View File

@ -0,0 +1,75 @@
diff --git a/src/cups/backend_common.c b/src/cups/backend_common.c
index 6333408..b19668d 100644
--- a/src/cups/backend_common.c
+++ b/src/cups/backend_common.c
@@ -753,8 +753,7 @@ static struct dyesub_backend *backends[] = {
NULL,
};
-static int find_and_enumerate(struct libusb_context *ctx,
- struct libusb_device ***list,
+static int find_and_enumerate(struct libusb_device ***list,
const struct dyesub_backend *backend,
const char *match_serno,
const char *make,
@@ -777,7 +776,7 @@ static int find_and_enumerate(struct libusb_context *ctx,
STATE("+org.gutenprint.searching-for-device\n");
/* Enumerate and find suitable device */
- num = libusb_get_device_list(ctx, list);
+ num = libusb_get_device_list(NULL, list);
/* See if we can actually match on the supplied make! */
if (backend && make) {
@@ -1010,7 +1009,6 @@ along with this program; if not, see <https://www.gnu.org/licenses/>.\n\n";
void print_help(const char *argv0, const struct dyesub_backend *backend)
{
- struct libusb_context *ctx = NULL;
struct libusb_device **list = NULL;
const char *ptr = getenv("BACKEND");
@@ -1072,7 +1070,7 @@ void print_help(const char *argv0, const struct dyesub_backend *backend)
}
/* Scan for all printers for the specified backend */
- find_and_enumerate(ctx, &list, backend, NULL, ptr, 1, 1, NULL);
+ find_and_enumerate(&list, backend, NULL, ptr, 1, 1, NULL);
libusb_free_device_list(list, 1);
}
@@ -1251,7 +1249,6 @@ done:
int main (int argc, char **argv)
{
- struct libusb_context *ctx = NULL;
struct libusb_device **list = NULL;
struct dyesub_backend *backend = NULL;
@@ -1414,7 +1411,7 @@ int main (int argc, char **argv)
#endif
/* Libusb setup */
- ret = libusb_init(&ctx);
+ ret = libusb_init(NULL);
if (ret) {
ERROR("Failed to initialize libusb (%d)\n", ret);
ret = CUPS_BACKEND_RETRY_CURRENT;
@@ -1438,7 +1435,7 @@ int main (int argc, char **argv)
}
/* Enumerate devices */
- found = find_and_enumerate(ctx, &list, backend, use_serno, backend_str, 0, NUM_CLAIM_ATTEMPTS, &conn);
+ found = find_and_enumerate(&list, backend, use_serno, backend_str, 0, NUM_CLAIM_ATTEMPTS, &conn);
if (found == -1) {
ERROR("Printer open failure (No matching printers found!)\n");
@@ -1572,7 +1569,7 @@ done:
if (list)
libusb_free_device_list(list, 1);
- libusb_exit(ctx);
+ libusb_exit(NULL);
return ret;
}

View File

@ -1,7 +1,7 @@
diff -up gutenprint-5.2.6/src/main/gutenprint-internal.h.postscriptdriver gutenprint-5.2.6/src/main/gutenprint-internal.h diff -up gutenprint-5.3.3/src/main/gutenprint-internal.h.postscriptdriver gutenprint-5.3.3/src/main/gutenprint-internal.h
--- gutenprint-5.2.6/src/main/gutenprint-internal.h.postscriptdriver 2010-08-04 02:33:56.000000000 +0200 --- gutenprint-5.3.3/src/main/gutenprint-internal.h.postscriptdriver 2018-01-28 03:32:45.000000000 +0100
+++ gutenprint-5.2.6/src/main/gutenprint-internal.h 2010-08-11 16:11:19.000000000 +0200 +++ gutenprint-5.3.3/src/main/gutenprint-internal.h 2019-11-06 12:13:29.936061606 +0100
@@ -56,6 +56,8 @@ extern void stpi_init_printer(void); @@ -54,6 +54,8 @@ extern void stpi_init_printer(void);
#define BUFFER_FLAG_FLIP_X 0x1 #define BUFFER_FLAG_FLIP_X 0x1
#define BUFFER_FLAG_FLIP_Y 0x2 #define BUFFER_FLAG_FLIP_Y 0x2
extern stp_image_t* stpi_buffer_image(stp_image_t* image, unsigned int flags); extern stp_image_t* stpi_buffer_image(stp_image_t* image, unsigned int flags);
@ -10,10 +10,10 @@ diff -up gutenprint-5.2.6/src/main/gutenprint-internal.h.postscriptdriver gutenp
#define STPI_ASSERT(x,v) \ #define STPI_ASSERT(x,v) \
do \ do \
diff -up gutenprint-5.2.6/src/main/module.c.postscriptdriver gutenprint-5.2.6/src/main/module.c diff -up gutenprint-5.3.3/src/main/module.c.postscriptdriver gutenprint-5.3.3/src/main/module.c
--- gutenprint-5.2.6/src/main/module.c.postscriptdriver 2006-09-30 17:02:59.000000000 +0200 --- gutenprint-5.3.3/src/main/module.c.postscriptdriver 2019-05-25 16:34:21.000000000 +0200
+++ gutenprint-5.2.6/src/main/module.c 2010-08-11 16:13:43.000000000 +0200 +++ gutenprint-5.3.3/src/main/module.c 2019-11-06 12:13:29.936061606 +0100
@@ -151,12 +151,20 @@ int stp_module_load(void) @@ -159,12 +159,20 @@ int stp_module_load(void)
} }
else else
{ {
@ -34,17 +34,16 @@ diff -up gutenprint-5.2.6/src/main/module.c.postscriptdriver gutenprint-5.2.6/sr
} }
#ifdef USE_LTDL #ifdef USE_LTDL
file_list = stp_path_search(dir_list, ".la"); file_list = stp_path_search(dir_list, ".la");
diff -up gutenprint-5.2.6/src/main/path.c.postscriptdriver gutenprint-5.2.6/src/main/path.c diff -up gutenprint-5.3.3/src/main/path.c.postscriptdriver gutenprint-5.3.3/src/main/path.c
--- gutenprint-5.2.6/src/main/path.c.postscriptdriver 2008-06-01 16:41:18.000000000 +0200 --- gutenprint-5.3.3/src/main/path.c.postscriptdriver 2019-05-25 16:34:21.000000000 +0200
+++ gutenprint-5.2.6/src/main/path.c 2010-08-11 16:13:43.000000000 +0200 +++ gutenprint-5.3.3/src/main/path.c 2019-11-06 12:29:30.709190171 +0100
@@ -158,7 +158,17 @@ stpi_data_path(void) @@ -154,6 +154,17 @@ stp_generate_path(const char *path)
if (getenv("STP_DATA_PATH")) return NULL;
stp_path_split(dir_list, getenv("STP_DATA_PATH")); stp_list_set_freefunc(dir_list, stp_list_node_free_data);
else stp_path_split(dir_list, path);
- stp_path_split(dir_list, PKGXMLDATADIR); + if (!strncmp(PKGXMLDATADIR, path, strlen(path)))
+ { + {
+ const char *prefix = getenv("DESTDIR"); + const char *prefix = getenv("DESTDIR");
+ stp_path_split(dir_list, PKGXMLDATADIR);
+ if (prefix) + if (prefix)
+ { + {
+ stp_list_t *prefix_list; + stp_list_t *prefix_list;
@ -56,7 +55,7 @@ diff -up gutenprint-5.2.6/src/main/path.c.postscriptdriver gutenprint-5.2.6/src/
return dir_list; return dir_list;
} }
@@ -226,6 +236,40 @@ stp_path_split(stp_list_t *list, /* List @@ -262,6 +273,40 @@ stp_path_split(stp_list_t *list, /* List
} }
} }
@ -72,7 +71,7 @@ diff -up gutenprint-5.2.6/src/main/path.c.postscriptdriver gutenprint-5.2.6/src/
+ stp_list_item_t *item; + stp_list_item_t *item;
+ int prefixlen = strlen (prefix); + int prefixlen = strlen (prefix);
+ if (!(new_list = stp_list_create())) + if (!(new_list = stp_list_create()))
+ return; + return NULL;
+ +
+ item = stp_list_get_start (list); + item = stp_list_get_start (list);
+ while (item) + while (item)

View File

@ -1,7 +1,7 @@
--- gutenprint-5.2.12/src/cups/cups-genppdupdate.in.python36syntax --- gutenprint-5.2.12/src/cups/cups-genppdupdate.in.python36syntax
+++ gutenprint-5.2.12/src/cups/cups-genppdupdate.in +++ gutenprint-5.2.12/src/cups/cups-genppdupdate.in
@@ -287,7 +287,7 @@ def update_ppd (ppd_source_filename): @@ -287,7 +287,7 @@ def update_ppd (ppd_source_filename):
for line in orig.readlines (): for line in orig_lines:
line.rstrip () line.rstrip ()
if line.find ("*StpLocale:") != -1: if line.find ("*StpLocale:") != -1:
- match = re.search ("\*StpLocale:\s*\"(.*)\"$", line) - match = re.search ("\*StpLocale:\s*\"(.*)\"$", line)

107
gutenprint-xmlfixes.patch Normal file
View File

@ -0,0 +1,107 @@
diff --git a/src/xml/escp2/inks/claria_xp.xml b/src/xml/escp2/inks/claria_xp.xml
index 44d38b5..693c2b1 100644
--- a/src/xml/escp2/inks/claria_xp.xml
+++ b/src/xml/escp2/inks/claria_xp.xml
@@ -78,7 +78,7 @@ xsi:schemaLocation="http://gimp-print.sourceforge.net/xsd/gp.xsd-1.0 gutenprint.
<InkName translate="text" name="CMYKk" text="Six Color Photo" InkID="OTHER">
<Channels>
<channel name="claria_photo_black" index="0">
- <subchannel color="0" subchannel="0" subchannel="0" name="Black" text="Black" translate="text">
+ <subchannel color="0" subchannel="0" name="Black" text="Black" translate="text">
<ChannelDensityParam name="BlackDensity"/>
<SubchannelTransitionParam name="LightBlackTrans"/>
</subchannel>
diff --git a/src/xml/escp2/inputslots/standard_roll_feed.xml b/src/xml/escp2/inputslots/standard_roll_feed.xml
index 1422d39..16316c8 100644
--- a/src/xml/escp2/inputslots/standard_roll_feed.xml
+++ b/src/xml/escp2/inputslots/standard_roll_feed.xml
@@ -1,4 +1,4 @@
- <?xml version="1.0"?>
+<?xml version="1.0"?>
<gutenprint xmlns="http://gimp-print.sourceforge.net/xsd/gp.xsd-1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
diff --git a/src/xml/escp2/media/artisan.xml b/src/xml/escp2/media/artisan.xml
index 6e567ee..362759e 100644
--- a/src/xml/escp2/media/artisan.xml
+++ b/src/xml/escp2/media/artisan.xml
@@ -1125,7 +1125,7 @@ xsi:schemaLocation="http://gimp-print.sourceforge.net/xsd/gp.xsd-1.0 gutenprint.
</ink>
</paper>
-<paper translate="text" name="GlossyPaper" text="Photo Quality Glossy Paper"class="premium">
+<paper translate="text" name="GlossyPaper" text="Photo Quality Glossy Paper" class="premium">
<parameter type="integer" name="PaperMedia">19</parameter>
<parameter type="integer" name="PrintMethod">0x41</parameter>
diff --git a/src/xml/escp2/media/claria.xml b/src/xml/escp2/media/claria.xml
index ce894f5..5b6be23 100644
--- a/src/xml/escp2/media/claria.xml
+++ b/src/xml/escp2/media/claria.xml
@@ -1933,7 +1933,7 @@ xsi:schemaLocation="http://gimp-print.sourceforge.net/xsd/gp.xsd-1.0 gutenprint.
</ink>
</paper>
-<paper translate="text" name="GlossyPaper" text="Photo Quality Glossy Paper"class="premium">
+<paper translate="text" name="GlossyPaper" text="Photo Quality Glossy Paper" class="premium">
<parameter type="integer" name="PaperMedia">19</parameter>
<parameter type="integer" name="PrintMethod">0x54</parameter>
diff --git a/src/xml/escp2/media/claria1400.xml b/src/xml/escp2/media/claria1400.xml
index a9b36e5..6a5deb7 100644
--- a/src/xml/escp2/media/claria1400.xml
+++ b/src/xml/escp2/media/claria1400.xml
@@ -1933,7 +1933,7 @@ xsi:schemaLocation="http://gimp-print.sourceforge.net/xsd/gp.xsd-1.0 gutenprint.
</ink>
</paper>
-<paper translate="text" name="GlossyPaper" text="Photo Quality Glossy Paper"class="premium">
+<paper translate="text" name="GlossyPaper" text="Photo Quality Glossy Paper" class="premium">
<parameter type="integer" name="PaperMedia">19</parameter>
<parameter type="integer" name="PrintMethod">0x54</parameter>
diff --git a/src/xml/escp2/media/claria_xp.xml b/src/xml/escp2/media/claria_xp.xml
index 32759b5..79f43c3 100644
--- a/src/xml/escp2/media/claria_xp.xml
+++ b/src/xml/escp2/media/claria_xp.xml
@@ -2037,7 +2037,7 @@ xsi:schemaLocation="http://gimp-print.sourceforge.net/xsd/gp.xsd-1.0 gutenprint.
</ink>
</paper>
-<paper translate="text" name="GlossyPaper" text="Photo Quality Glossy Paper"class="premium">
+<paper translate="text" name="GlossyPaper" text="Photo Quality Glossy Paper" class="premium">
<parameter type="integer" name="PaperMedia">19</parameter>
<parameter type="integer" name="PrintMethod">0x54</parameter>
diff --git a/src/xml/escp2/weaves/standard.xml b/src/xml/escp2/weaves/standard.xml
index d9176db..efc89de 100644
--- a/src/xml/escp2/weaves/standard.xml
+++ b/src/xml/escp2/weaves/standard.xml
@@ -1,4 +1,4 @@
- <?xml version="1.0"?>
+<?xml version="1.0"?>
<gutenprint xmlns="http://gimp-print.sourceforge.net/xsd/gp.xsd-1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
diff --git a/src/xml/printers/dyesub.xml b/src/xml/printers/dyesub.xml
index 1bd62e6..aa7985d 100644
--- a/src/xml/printers/dyesub.xml
+++ b/src/xml/printers/dyesub.xml
@@ -95,7 +95,7 @@
<printer translate="name" name="Citizen CW-02" driver="citizen-cw-02" manufacturer="Citizen" model="6000" />
<printer translate="name" name="Citizen CX" driver="citizen-cx" deviceid="MANUFACTURER:CITIZEN SYSTEMS ;MODEL:CX;" manufacturer="Citizen" model="6000" />
<printer translate="name" name="Citizen CX-02" deviceid="MANUFACTURER:CITIZEN SYSTEMS ;MODEL:CX-02;" driver="citizen-cx-02" manufacturer="Citizen" model="6003" />
- <printer translate="name" name="Citizen CX-02W" "MANUFACTURER:CITIZEN SYSTEMS ;MODEL:CX-02W;" driver="citizen-cx-02w" manufacturer="Citizen" model="6007" />
+ <printer translate="name" name="Citizen CX-02W" deviceid="MANUFACTURER:CITIZEN SYSTEMS ;MODEL:CX-02W;" driver="citizen-cx-02w" manufacturer="Citizen" model="6007" />
<printer translate="name" name="Citizen CX-W" driver="citizen-cx-w" manufacturer="Citizen" model="6001" />
<printer translate="name" name="Citizen CY" driver="citizen-cy" manufacturer="Citizen" model="6002" />
<printer translate="name" name="Citizen CY-02" driver="citizen-cy-02" manufacturer="Citizen" model="6002" />
@@ -127,7 +127,7 @@
<printer translate="name" name="Kodak 1400" deviceid="MFG:Eastman Kodak Company;CMD:EK1;MDL: 1400 Printer;CLS:Printer;DES:Kodak 1400 Printer;`" driver="kodak-1400" manufacturer="Kodak" model="4004" />
<printer translate="name" name="Kodak 6800" deviceid="MFG:Eastman Kodak Company;CMD:ESC;MDL:Photo Printer 6800;CLS:PRINTER;DES:KODAK Photo Printer 6800;" driver="kodak-6800" manufacturer="Kodak" model="4001" />
<printer translate="name" name="Kodak 6850" deviceid="MFG:Eastman Kodak Company;CMD:ESC;MDL:Photo Printer 6850;CLS:PRINTER;DES:KODAK Photo Printer 6850;" driver="kodak-6850" manufacturer="Kodak" model="4002" />
- <printer translate="name" name="Kodak 6900" deviceid="MFG:Kodak Alaris Inc.;CMD:SUPCC;MDL:KODAK 6900 Photo Printer;CLS:PRINTER;DES Thermal Dye Photo Printer;"driver="kodak-6900" manufacturer="Kodak" model="4010">EXPERIMENTAL</printer>
+ <printer translate="name" name="Kodak 6900" deviceid="MFG:Kodak Alaris Inc.;CMD:SUPCC;MDL:KODAK 6900 Photo Printer;CLS:PRINTER;DES Thermal Dye Photo Printer;" driver="kodak-6900" manufacturer="Kodak" model="4010">EXPERIMENTAL</printer>
<printer translate="name" name="Kodak 7000" deviceid="MFG:Eastman Kodak Company;CMD:SUPCC;MDL:KODAK 7000 Photo Printer;CLS:PRINTER;DES:Thermal Dye Photo Printer;" driver="kodak-7000" manufacturer="Kodak" model="4008" />
<printer translate="name" name="Kodak 7010" deviceid="MFG:Eastman Kodak Company;CMD:SUPCC;MDL:KODAK 7010 Photo Printer;CLS:PRINTER;DES:Thermal Dye Photo Printer;" driver="kodak-7010" manufacturer="Kodak" model="4008">EXPERIMENTAL</printer>
<printer translate="name" name="Kodak 7015" driver="kodak-7015" manufacturer="Kodak" model="4009">EXPERIMENTAL</printer>

View File

@ -1,21 +1,21 @@
%bcond_with gimp %bcond_with gimp
Name: gutenprint Name: gutenprint
Version: 5.2.14 Version: 5.3.4
Release: 8 Release: 1
Summary: A suite of printer drivers Summary: A suite of printer drivers
License: GPLv2+ and MIT License: GPLv2+ and MIT
URL: http://gimp-print.sourceforge.net/ URL: http://gimp-print.sourceforge.net/
Source0: http://downloads.sourceforge.net/gimp-print/%{name}-%{version}.tar.bz2 Source0: http://downloads.sourceforge.net/gimp-print/%{name}-%{version}.tar.bz2
Source1: cups-genppdupdate.py.in Source1: cups-genppdupdate.py.in
Patch0: gutenprint-menu.patch Patch0: gutenprint-menu.patch
Patch1: gutenprint-O6.patch Patch1: gutenprint-postscriptdriver.patch
Patch2: gutenprint-postscriptdriver.patch Patch2: gutenprint-yyin.patch
Patch3: gutenprint-yyin.patch Patch3: gutenprint-manpage.patch
Patch4: gutenprint-manpage.patch Patch4: gutenprint-python36syntax.patch
Patch5: gutenprint-python36syntax.patch Patch5: gutenprint-xmlfixes.patch
Patch6: gutenprint-Add-Epson-Expression-ET-2600-EcoTank.patch Patch6: gutenprint-libusb-crash.patch
Patch7: gutenprint-Minor-doc-issues.patch
%if %{with gimp} %if %{with gimp}
BuildRequires: pkgconfig(gimpui-2.0), gimp BuildRequires: pkgconfig(gimpui-2.0), gimp
@ -73,16 +73,15 @@ This package includes man files for %{name}.
%prep %prep
%setup -q -n %{name}-%{version} %setup -q -n %{name}-%{version}
%patch0 -p1 %patch -P 0 -p1 -b .menu
%patch1 -p1 %patch -P 1 -p1 -b .postscriptdriver
%patch2 -p1 %patch -P 2 -p1 -b .yyin
%patch3 -p1 %patch -P 3 -p1 -b .manpage
%patch4 -p1
cp %{SOURCE1} src/cups/cups-genppdupdate.in cp %{SOURCE1} src/cups/cups-genppdupdate.in
sed -i -e 's,^#!/usr/bin/python3,#!%{__python3},' src/cups/cups-genppdupdate.in sed -i -e 's,^#!/usr/bin/python3,#!%{__python3},' src/cups/cups-genppdupdate.in
%patch5 -p1 %patch -P 4 -p1 -b .python36syntax
%patch6 -p1 %patch -P 5 -p1 -b .xmlfixes
%patch7 -p1 %patch -P 6 -p1 -b .crash
%build %build
sed -i -e 's,^\(TESTS *=.*\) run-weavetest,\1,' test/Makefile.in sed -i -e 's,^\(TESTS *=.*\) run-weavetest,\1,' test/Makefile.in
@ -110,7 +109,7 @@ cat %{name}-po.lang >>%{name}.lang
echo .so man8/cups-genppd.8 > $RPM_BUILD_ROOT%{_mandir}/man8/cups-genppd.5.2.8 echo .so man8/cups-genppd.8 > $RPM_BUILD_ROOT%{_mandir}/man8/cups-genppd.5.2.8
chrpath -d $RPM_BUILD_ROOT%{_sbindir}/cups-genppd.5.2 chrpath -d $RPM_BUILD_ROOT%{_sbindir}/cups-genppd.5.3
%if %{with gimp} %if %{with gimp}
chrpath -d $RPM_BUILD_ROOT%{_libdir}/gimp/*/plug-ins/* chrpath -d $RPM_BUILD_ROOT%{_libdir}/gimp/*/plug-ins/*
%endif %endif
@ -158,6 +157,9 @@ exit 0
%{_mandir}/man*/* %{_mandir}/man*/*
%changelog %changelog
* Mon Oct 09 2023 Ge Wang <wang__Ge@126.com> - 5.3.4-1
- Update to version 5.3.4
* Mon Jan 9 2023 yaoguangzhong <yaoguangzhong@xfusion.com> - 5.2.14-8 * Mon Jan 9 2023 yaoguangzhong <yaoguangzhong@xfusion.com> - 5.2.14-8
- backport Minor doc issues - backport Minor doc issues