Package init

This commit is contained in:
dogsheng 2019-12-14 18:55:09 +08:00
parent 7842d21770
commit c9d62a92ca
11 changed files with 1762 additions and 75 deletions

View File

@ -1,36 +0,0 @@
# gutenprint
#### Description
{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}
#### Software Architecture
Software architecture description
#### Installation
1. xxxx
2. xxxx
3. xxxx
#### Instructions
1. xxxx
2. xxxx
3. xxxx
#### Contribution
1. Fork the repository
2. Create Feat_xxx branch
3. Commit your code
4. Create Pull Request
#### Gitee Feature
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
4. The most valuable open source project [GVP](https://gitee.com/gvp)
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

View File

@ -1,39 +0,0 @@
# gutenprint
#### 介绍
{**以下是码云平台说明,您可以替换此简介**
码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN。专为开发者提供稳定、高效、安全的云端软件开发协作平台
无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)}
#### 软件架构
软件架构说明
#### 安装教程
1. xxxx
2. xxxx
3. xxxx
#### 使用说明
1. xxxx
2. xxxx
3. xxxx
#### 参与贡献
1. Fork 本仓库
2. 新建 Feat_xxx 分支
3. 提交代码
4. 新建 Pull Request
#### 码云特技
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

1078
cups-genppdupdate.py.in Normal file

File diff suppressed because it is too large Load Diff

BIN
gutenprint-5.2.14.tar.bz2 Normal file

Binary file not shown.

281
gutenprint-O6.patch Normal file
View File

@ -0,0 +1,281 @@
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

27
gutenprint-manpage.patch Normal file
View File

@ -0,0 +1,27 @@
diff -up gutenprint-5.2.9/man/escputil.1.in.manpage gutenprint-5.2.9/man/escputil.1.in
--- gutenprint-5.2.9/man/escputil.1.in.manpage 2013-06-27 15:02:09.997386927 +0100
+++ gutenprint-5.2.9/man/escputil.1.in 2013-06-27 15:08:16.236046768 +0100
@@ -20,6 +20,7 @@ escputil \- maintain Epson Stylus inkjet
.SH SYNOPSIS
.B escputil
[ \fI\-P\fP \fIprinter\fP | \fI\-r\fP \fIdevice\fP ] [ \fI\-m\fP \fImodel\fP ] [
+\fI\-S\fP ] [ \fI\-C\fP ] [ \fI\-p\fP ] [
\fI\-u\fP ] [ \fI\-c\fP | \fI\-n\fP | \fI\-a\fP | \fI\-i\fP | \fI\-d\fP |
\fI\-o\fP | \fI\-s\fP | \fI\-l\fP | \fI\-M\fP | \fI\-h\fP ] [ \fI\-q\fP ]
.SH DESCRIPTION
@@ -46,6 +47,15 @@ Specify the precise printer model for he
.B \-u, \-\-new
The printer is a new printer (Stylus Color 740 or newer).
.TP
+.B \-S, \-\-short\-name
+Print the short name of the printer with \-\-identify.
+.TP
+.B \-C, \-\-choices
+Specify the number of pattern choices for alignment.
+.TP
+.B \-p, \-\-patterns
+Specify the number of sets of patterns for alignment.
+.TP
.B \-c, \-\-clean\-head
Clean the print head. This can also be performed from the printer
front panel.

11
gutenprint-menu.patch Normal file
View File

@ -0,0 +1,11 @@
--- gutenprint-5.0.0/src/gimp2/print-print.c.menu 2007-03-02 17:08:51.000000000 +0000
+++ gutenprint-5.0.0/src/gimp2/print-print.c 2007-03-02 17:09:10.000000000 +0000
@@ -43,7 +43,7 @@
(BAD_CONST_CHAR) copy,
(BAD_CONST_CHAR) VERSION " - " RELEASE_DATE,
/* Do not translate the prefix "<Image>" */
- (BAD_CONST_CHAR) N_("<Image>/File/Print..."),
+ (BAD_CONST_CHAR) N_("<Image>/File/Send/Print..."),
(BAD_CONST_CHAR) types,
GIMP_PLUGIN,
n_args, 0,

View File

@ -0,0 +1,99 @@
diff -up gutenprint-5.2.6/src/main/gutenprint-internal.h.postscriptdriver gutenprint-5.2.6/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.2.6/src/main/gutenprint-internal.h 2010-08-11 16:11:19.000000000 +0200
@@ -56,6 +56,8 @@ extern void stpi_init_printer(void);
#define BUFFER_FLAG_FLIP_X 0x1
#define BUFFER_FLAG_FLIP_Y 0x2
extern stp_image_t* stpi_buffer_image(stp_image_t* image, unsigned int flags);
+extern stp_list_t *stp_paths_copy_with_prefix(stp_list_t* list,
+ const char *prefix);
#define STPI_ASSERT(x,v) \
do \
diff -up gutenprint-5.2.6/src/main/module.c.postscriptdriver gutenprint-5.2.6/src/main/module.c
--- gutenprint-5.2.6/src/main/module.c.postscriptdriver 2006-09-30 17:02:59.000000000 +0200
+++ gutenprint-5.2.6/src/main/module.c 2010-08-11 16:13:43.000000000 +0200
@@ -151,12 +151,20 @@ int stp_module_load(void)
}
else
{
+ const char *prefix = getenv("DESTDIR");
#ifdef USE_LTDL
stp_path_split(dir_list, getenv("LTDL_LIBRARY_PATH"));
stp_path_split(dir_list, lt_dlgetsearchpath());
#else
stp_path_split(dir_list, PKGMODULEDIR);
#endif
+ if (prefix)
+ {
+ stp_list_t *prefix_list;
+ prefix_list = stp_paths_copy_with_prefix(dir_list, prefix);
+ stp_list_destroy(dir_list);
+ dir_list = prefix_list;
+ }
}
#ifdef USE_LTDL
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
--- gutenprint-5.2.6/src/main/path.c.postscriptdriver 2008-06-01 16:41:18.000000000 +0200
+++ gutenprint-5.2.6/src/main/path.c 2010-08-11 16:13:43.000000000 +0200
@@ -158,7 +158,17 @@ stpi_data_path(void)
if (getenv("STP_DATA_PATH"))
stp_path_split(dir_list, getenv("STP_DATA_PATH"));
else
- stp_path_split(dir_list, PKGXMLDATADIR);
+ {
+ const char *prefix = getenv("DESTDIR");
+ stp_path_split(dir_list, PKGXMLDATADIR);
+ if (prefix)
+ {
+ stp_list_t *prefix_list;
+ prefix_list = stp_paths_copy_with_prefix(dir_list, prefix);
+ stp_list_destroy(dir_list);
+ dir_list = prefix_list;
+ }
+ }
return dir_list;
}
@@ -226,6 +236,40 @@ stp_path_split(stp_list_t *list, /* List
}
}
+/*
+ * Split a PATH-type string (colon-delimited) into separate
+ * directories.
+ */
+stp_list_t *
+stp_paths_copy_with_prefix(stp_list_t *list, /* List to add prefix to */
+ const char *prefix) /* Prefix to add */
+{
+ stp_list_t *new_list;
+ stp_list_item_t *item;
+ int prefixlen = strlen (prefix);
+ if (!(new_list = stp_list_create()))
+ return;
+
+ item = stp_list_get_start (list);
+ while (item)
+ {
+ const char *data;
+ char *new_data;
+ int len;
+ data = stp_list_item_get_data (item);
+ len = strlen (data);
+ new_data = (char *) stp_malloc(prefixlen + 1 + len + 1);
+ strncpy(new_data, prefix, prefixlen);
+ new_data[prefixlen] = '/';
+ strcpy(new_data + prefixlen + 1, data);
+ stp_list_item_create(new_list, NULL, new_data);
+
+ item = stp_list_item_next (item);
+ }
+
+ return new_list;
+}
+
/* Adapted from GNU libc <dirent.h>
These macros extract size information from a `struct dirent *'.
They may evaluate their argument multiple times, so it must not

View File

@ -0,0 +1,94 @@
--- gutenprint-5.2.12/src/cups/cups-genppdupdate.in.python36syntax
+++ gutenprint-5.2.12/src/cups/cups-genppdupdate.in
@@ -287,7 +287,7 @@ def update_ppd (ppd_source_filename):
for line in orig.readlines ():
line.rstrip ()
if line.find ("*StpLocale:") != -1:
- match = re.search ("\*StpLocale:\s*\"(.*)\"$", line)
+ match = re.search (r'\*StpLocale:\s*"(.*)"$', line)
if match:
groups = match.groups ()
if len (groups) >= 1:
@@ -295,26 +295,26 @@ def update_ppd (ppd_source_filename):
orig_locale = locale
valid = 1
elif line.startswith ("*LanguageVersion"):
- match = re.search ("^\*LanguageVersion:\s*(.*)$", line)
+ match = re.search (r'^\*LanguageVersion:\s*(.*)$', line)
if match:
groups = match.groups ()
if len (groups) >= 1:
lingo = groups[0]
elif line.startswith ("*StpDriverName:"):
- match = re.search ("^\*StpDriverName:\s*\"(.*)\"$", line)
+ match = re.search (r'^\*StpDriverName:\s*"(.*)"$', line)
if match:
groups = match.groups ()
if len (groups) >= 1:
driver = groups[0]
valid = 1
elif line.find ("*%End of ") != -1 and driver == "":
- match = re.search ("^\*%End of\s*(.*).ppd$", line)
+ match = re.search (r'^\*%End of\s*(.*).ppd$', line)
if match:
groups = match.groups ()
if len (groups) >= 1:
driver = groups[0]
elif line.startswith ("*StpPPDLocation:"):
- match = re.search ("^\*StpPPDLocation:\s*\"(.*)\"$", line)
+ match = re.search (r'^\*StpPPDLocation:\s*"(.*)"$', line)
if match:
groups = match.groups ()
if len (groups) >= 1:
@@ -436,7 +436,7 @@ def update_ppd (ppd_source_filename):
lines = source_data.rstrip ().split ("\n")
source_data = ""
for line in lines:
- m = re.search ("(\*StpLocale:\s*\")(.*)(\")", line)
+ m = re.search (r'(\*StpLocale:\s*")(.*)(")', line)
if m:
groups = m.groups ()
line = groups[0] + orig_locale + groups[2]
@@ -689,7 +689,7 @@ def get_ppd_data (fh, types, opts, resolutions, defaults, data):
line = line.strip ()
if (types or opts) and line.startswith ("*OpenUI"):
- m = re.search ("^\*OpenUI\s\*(\w+).*:\s(\w+)",
+ m = re.search (r'^\*OpenUI\s\*(\w+).*:\s(\w+)',
line)
if m:
groups = m.groups ()
@@ -704,7 +704,7 @@ def get_ppd_data (fh, types, opts, resolutions, defaults, data):
optionlist = []
elif opts and line.startswith ("*%s" % cur_opt):
- m = re.search ("^\*%s\s*(\w+)[\/:]" % cur_opt, line)
+ m = re.search (r'^\*%s\s*(\w+)[\/:]' % cur_opt, line)
if m:
groups = m.groups()
if len (groups) >= 1:
@@ -717,7 +717,7 @@ def get_ppd_data (fh, types, opts, resolutions, defaults, data):
old = s[2]
resolution_map[old] = new
elif defaults and line.startswith ("*Default"):
- m = re.search ("^\*(\w+):\s*(\w+)", line)
+ m = re.search (r'^\*(\w+):\s*(\w+)', line)
if m:
groups = m.groups ()
key = groups[0]
@@ -844,13 +844,13 @@ def find_ppd (gutenprintfilename, drivername, lang, region):
global debug
key = '^\\*FileVersion:[ ]*' + file_version
- match = re.search (".*/([^/]+\.[0-9]+\.[0-9]+)(\.sim)?(\.ppd)?(\.gz)?$",
+ match = re.search (r'.*/([^/]+\.[0-9]+\.[0-9]+)(\.sim)?(\.ppd)?(\.gz)?$',
gutenprintfilename)
if not match:
return None
stored_name = match.groups ()[0]
- if re.search (".*/([^/]*)(\.sim)(\.ppd)?(\.gz)?$", gutenprintfilename):
+ if re.search (r'.*/([^/]*)(\.sim)(\.ppd)?(\.gz)?$', gutenprintfilename):
simplified = ".sim"
else:
simplified = ""

26
gutenprint-yyin.patch Normal file
View File

@ -0,0 +1,26 @@
diff -up gutenprint-5.2.9/src/gutenprintui2/Makefile.am.yyin gutenprint-5.2.9/src/gutenprintui2/Makefile.am
--- gutenprint-5.2.9/src/gutenprintui2/Makefile.am.yyin 2010-09-12 14:52:53.000000000 +0100
+++ gutenprint-5.2.9/src/gutenprintui2/Makefile.am 2012-12-18 16:27:11.705127153 +0000
@@ -55,7 +55,8 @@ libgutenprintui2_la_CFLAGS = $(AM_CFLAGS
# Uncomment to build a versioned library
libgutenprintui2_la_LDFLAGS = \
-version-info $(GUTENPRINTUI2_CURRENT_INTERFACE):$(GUTENPRINTUI2_INTERFACE_AGE):$(GUTENPRINTUI2_BINARY_AGE) \
- -rpath $(libdir) -no-undefined
+ -rpath $(libdir) -no-undefined \
+ -export-symbols-regex '^([^y]|y[^y])'
AM_LFLAGS = -i
AM_YFLAGS = -d
diff -up gutenprint-5.2.9/src/gutenprintui2/Makefile.in.yyin gutenprint-5.2.9/src/gutenprintui2/Makefile.in
--- gutenprint-5.2.9/src/gutenprintui2/Makefile.in.yyin 2012-07-07 16:36:19.000000000 +0100
+++ gutenprint-5.2.9/src/gutenprintui2/Makefile.in 2012-12-18 16:27:11.705127153 +0000
@@ -367,7 +367,8 @@ libgutenprintui2_la_CFLAGS = $(AM_CFLAGS
# Uncomment to build a versioned library
libgutenprintui2_la_LDFLAGS = \
-version-info $(GUTENPRINTUI2_CURRENT_INTERFACE):$(GUTENPRINTUI2_INTERFACE_AGE):$(GUTENPRINTUI2_BINARY_AGE) \
- -rpath $(libdir) -no-undefined
+ -rpath $(libdir) -no-undefined \
+ -export-symbols-regex '^([^y]|y[^y])'
AM_LFLAGS = -i
AM_YFLAGS = -d

146
gutenprint.spec Normal file
View File

@ -0,0 +1,146 @@
Name: gutenprint
Version: 5.2.14
Release: 4
Summary: A suite of printer drivers
License: GPLv2+
URL: http://gimp-print.sourceforge.net/
Source0: http://downloads.sourceforge.net/gimp-print/%{name}-%{version}.tar.bz2
Source1: cups-genppdupdate.py.in
Patch0: gutenprint-menu.patch
Patch1: gutenprint-O6.patch
Patch2: gutenprint-postscriptdriver.patch
Patch3: gutenprint-yyin.patch
Patch4: gutenprint-manpage.patch
Patch5: gutenprint-python36syntax.patch
BuildRequires: cups-libs, cups-devel, cups, gettext-devel, pkgconfig, libtiff-devel, libjpeg-devel, libpng-devel
BuildRequires: pkgconfig(libusb-1.0), pkgconfig(gtk+-2.0), pkgconfig(gimpui-2.0), gimp, chrpath, python3-cups
BuildRequires: autoconf, automake, libtool, python3-devel
Requires: gimp, cups
Provides: %{name}-doc%{?_isa} %{name}-doc
Obsoletes: %{name}-doc
Provides: %{name}-libs%{?_isa} %{name}-libs
Obsoletes: %{name}-libs
Provides: %{name}-libs-ui%{?_isa} %{name}-libs-ui
Obsoletes: %{name}-libs-ui
Provides: %{name}-plugin%{?_isa} %{name}-plugin
Obsoletes: %{name}-plugin
Provides: %{name}-extras%{?_isa} %{name}-extras
Obsoletes: %{name}-extras
Provides: %{name}-cups%{?_isa} %{name}-cups
Obsoletes: %{name}-cups
%description
Gutenprint, formerly named Gimp-Print, is a suite of printer drivers that may be used with CUPS,
the Common UNIX Printing System. CUPS is the printing system used by all modern Linux and UNIX systems.
These drivers provide high quality printing for UNIX (including Macintosh OS X 10.2 and later)
and Linux systems that in many cases equal or exceed proprietary vendor-supplied drivers in quality
and functionality, and can be used for demanding printing tasks requiring flexibility and high quality.
This software package include an enhanced Print plugin for the GIMP that replaces the plugin packaged
with the GIMP in addition to the CUPS driver.
Gutenprint has been renamed in order to clearly distinguish it from the GIMP. While this package
started out as the original Print plugin for the GIMP, it has expanded into a collection of general
purpose printer drivers, and the new, enhanced Print plugin for the GIMP is now only a small part of
the package. Furthermore, the name Gutenprint recognizes Johannes Gutenberg, the inventor of the movable
type printing press. Finally, the word guten is the German word for good.
Gutenprint 5.2 incorporates extensive feedback from the beta and release candidate programs.
Gutenprint supports only the printer portion of multi-function devices (devices that typically include
scanning, copying, and fax capabilities).
Gutenprint currently supports over 700 printer models.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}, gtk2-devel
%description devel
This package includes development files for %{name}.
%package help
Summary: man files for %{name}
Requires: man
%description help
This package includes man files for %{name}.
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
cp %{SOURCE1} src/cups/cups-genppdupdate.in
sed -i -e 's,^#!/usr/bin/python3,#!%{__python3},' src/cups/cups-genppdupdate.in
%patch5 -p1
%build
sed -i -e 's,^\(TESTS *=.*\) run-weavetest,\1,' test/Makefile.in
%configure --disable-dependency-tracking --disable-static --enable-samples --enable-escputil --enable-test \
--disable-rpath --enable-cups-1_2-enhancements --disable-cups-ppds --enable-simplified-cups-ppds
%make_build
%install
%make_install
install -d $RPM_BUILD_ROOT%{_sbindir}
rm -rf $RPM_BUILD_ROOT%{_datadir}/%{name}/doc
rm -rf $RPM_BUILD_ROOT%{_datadir}/foomatic/kitload.log
rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/5.2/modules/*.la
rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/cups/command.types
%find_lang %{name}
sed 's!%{_datadir}/locale/\([^/]*\)/LC_MESSAGES/gutenprint.mo!%{_datadir}/locale/\1/gutenprint_\1.po!g' %{name}.lang >%{name}-po.lang
rm -rf %{name}.lang
%find_lang %{name} --all-name
cat %{name}-po.lang >>%{name}.lang
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%{_libdir}/gimp/*/plug-ins/*
chrpath -d $RPM_BUILD_ROOT%{_libdir}/*.so.*
chrpath -d $RPM_BUILD_ROOT%{_cups_serverbin}/driver/*
chrpath -d $RPM_BUILD_ROOT%{_cups_serverbin}/filter/*
chrpath -d $RPM_BUILD_ROOT%{_bindir}/*
%post -p /sbin/ldconfig
/usr/sbin/cups-genppdupdate &>/dev/null || :
/sbin/service cups reload &>/dev/null || :
exit 0
%postun -p /sbin/ldconfig
%files -f %{name}.lang
%license COPYING
%doc AUTHORS NEWS README doc/FAQ.html doc/%{name}-users-manual.odt doc/%{name}-users-manual.pdf
%{_bindir}/escputil
%{_bindir}/testpattern
%{_bindir}/cups-calibrate
%{_sbindir}/cups-genppd*
%{_datadir}/%{name}
%{_datadir}/%{name}/samples/*
%{_datadir}/cups/calibrate.ppm
%{_datadir}/cups/usb/net.sf.gimp-print.usb-quirks
%{_libdir}/%{name}
%{_libdir}/*.so.*
%{_libdir}/gimp/*/plug-ins/%{name}
%{_cups_serverbin}/filter/*
%{_cups_serverbin}/driver/*
%{_cups_serverbin}/backend/*
%files devel
%doc doc/developer/reference-html doc/developer/%{name}.pdf doc/%{name}*
%{_includedir}/%{name}*/
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%exclude %{_libdir}/*.la
%files help
%{_mandir}/man*/*
%changelog
* Sat Nov 30 2019 openEuler Buildteam <buildteam@openeuler.org> - 5.2.14-4
- Package init