Control: tags 912689 + patch pending Control: tags 998954 + patch pending Control: tags 1001976 + patch pending
Dear maintainer, to fix the issues with this package, I've prepared a salvaging upload for libppd (versioned as 2:0.10-8), debdiff below. An upload to DELAYED/14 will follow shortly. Please feel free to tell me if I should delay it longer. Note: To keep the debdiff short, it only contains the changes to the debian/ directory. About any other file, they now have the content as in libppd_0.10.orig.tar.gz, as a consequence of the migration to the 3.0 (quilt source) format. Incuding these changes adds no information but increases the diff size by factor 58. Regards, Christoph
diff -Nru libppd-0.10/debian/changelog libppd-0.10/debian/changelog --- libppd-0.10/debian/changelog 2022-01-12 09:19:27.000000000 +0100 +++ libppd-0.10/debian/changelog 2022-01-10 20:37:21.000000000 +0100 @@ -1,3 +1,10 @@ +libppd (2:0.10-8) unstable; urgency=medium + + * Take maintainership. Closes: #1001976 + * Packaging cleanup. Closes: #998954, #912689 + + -- Christoph Biedl <debian.a...@manchmal.in-ulm.de> Mon, 10 Jan 2022 20:37:21 +0100 + libppd (2:0.10-7.3) unstable; urgency=medium * Non-maintainer upload diff -Nru libppd-0.10/debian/compat libppd-0.10/debian/compat --- libppd-0.10/debian/compat 2022-01-12 09:19:27.000000000 +0100 +++ libppd-0.10/debian/compat 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -10 diff -Nru libppd-0.10/debian/control libppd-0.10/debian/control --- libppd-0.10/debian/control 2022-01-12 09:19:27.000000000 +0100 +++ libppd-0.10/debian/control 2022-01-10 20:18:49.000000000 +0100 @@ -1,22 +1,27 @@ Source: libppd -Section: libs +Maintainer: Christoph Biedl <debian.a...@manchmal.in-ulm.de> +Homepage: http://sourceforge.net/project/showfiles.php?group_id=3800&package_id=11729 +Standards-Version: 4.6.0 +Build-Depends: debhelper-compat (= 13), + libglib2.0-dev, Priority: optional -Maintainer: A Mennucc1 <mennu...@debian.org> -Build-Depends: debhelper (>= 10~), dh-autoreconf, libglib2.0-dev -Standards-Version: 3.8.0.0 +Section: libs +Rules-Requires-Root: no Package: libppd-dev -Section: libdevel Architecture: any -Depends: libppd0 (= ${binary:Version}), libc6-dev +Depends: ${misc:Depends}, + libc6-dev, + libppd0 (= ${binary:Version}), +Section: libdevel Description: postscript PPD file library, development kit This package contains the static library and header files used in development of programs that use libppd. Package: ppdfilt -Section: utils Architecture: any -Depends: ${shlibs:Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, +Section: utils Description: filter that inserts printer specific commands into print jobs ppdfilt is a filter program designed to be used within a filter script or from the command line tool to insert printer specific @@ -27,12 +32,11 @@ Package: libppd0 Architecture: any -Depends: ${shlibs:Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, Description: postscript PPD file library PostScript was designed as a device independent language. To be able to access device specific features like selecting different paper trays and turning on different imaging models, each printer vendor supplies a PostScript Printer Definition or PPD file. This library reads those PPD files and provides functions that allow a program to - modify PostScript print jobs to acces these special features. - + modify PostScript print jobs to access these special features. diff -Nru libppd-0.10/debian/copyright libppd-0.10/debian/copyright --- libppd-0.10/debian/copyright 2022-01-12 09:19:27.000000000 +0100 +++ libppd-0.10/debian/copyright 2022-01-10 20:18:49.000000000 +0100 @@ -1,29 +1,22 @@ -This is a Debian prepackaged version of libppd. - -This package was put together by Joey Hess <jo...@debian.org>, using -sources from: - http://download.sourceforge.net/libppd/ -or http://sourceforge.net/project/showfiles.php?group_id=3800&package_id=11729 - -Copyright 1993-1999 by Easy Software Products. - -Authors: - Ben Woodard <b...@valinux.com> - Mark Fasheh <mfas...@valinux.com> - - -License : GNU GENERAL PUBLIC LICENSE , Version 2, June 1991 - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -On Debian systems, the complete text of the GNU Library -General Public License can be found in /usr/share/common-licenses/GPL +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Files: * +Copyright: Copyright 1993-1999 by Easy Software Products +License: GPL-2.0+ + +License: GPL-2.0+ + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. + . + On Debian systems, the complete text of the GNU General + Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". diff -Nru libppd-0.10/debian/libppd0.install libppd-0.10/debian/libppd0.install --- libppd-0.10/debian/libppd0.install 1970-01-01 01:00:00.000000000 +0100 +++ libppd-0.10/debian/libppd0.install 2022-01-10 20:18:49.000000000 +0100 @@ -0,0 +1,2 @@ +usr/lib/${DEB_TARGET_MULTIARCH}/libppd.so.1 +usr/lib/${DEB_TARGET_MULTIARCH}/libppd.so.1.0.1 diff -Nru libppd-0.10/debian/libppd0.postinst libppd-0.10/debian/libppd0.postinst --- libppd-0.10/debian/libppd0.postinst 2022-01-12 09:19:27.000000000 +0100 +++ libppd-0.10/debian/libppd0.postinst 1970-01-01 01:00:00.000000000 +0100 @@ -1,4 +0,0 @@ -#!/bin/sh -e - -#DEBHELPER# - diff -Nru libppd-0.10/debian/libppd0.symbols libppd-0.10/debian/libppd0.symbols --- libppd-0.10/debian/libppd0.symbols 1970-01-01 01:00:00.000000000 +0100 +++ libppd-0.10/debian/libppd0.symbols 2022-01-10 20:18:49.000000000 +0100 @@ -0,0 +1,30 @@ +libppd.so.1 libppd0 #MINVER# + cupsAddOption@Base 0.9 + cupsFreeOptions@Base 0.9 + cupsGetOption@Base 0.9 + cupsMarkOptions@Base 0.9 + cupsParseOptions@Base 0.9 + ppd_check_option_is_marked@Base 0.9 + ppd_choice_new@Base 0.9 + ppd_constraint_new@Base 0.9 + ppd_debug_dump_ppd@Base 0.9 + ppd_emit_to_fd@Base 0.9 + ppd_emit_to_file@Base 0.9 + ppd_emulator_new@Base 0.9 + ppd_file_free@Base 0.9 + ppd_file_new@Base 0.9 + ppd_file_new_from_fd@Base 0.9 + ppd_file_new_from_filep@Base 0.9 + ppd_find_choice@Base 0.9 + ppd_find_marked_choice@Base 0.9 + ppd_find_option_by_keyword@Base 0.9 + ppd_get_num_conflicts@Base 0.9 + ppd_get_page_length@Base 0.9 + ppd_get_page_size@Base 0.9 + ppd_get_page_width@Base 0.9 + ppd_group_new@Base 0.9 + ppd_mark_defaults@Base 0.9 + ppd_mark_option@Base 0.9 + ppd_option_new@Base 0.9 + ppd_profile_new@Base 0.9 + ppd_size_new@Base 0.9 diff -Nru libppd-0.10/debian/libppd-dev.docs libppd-0.10/debian/libppd-dev.docs --- libppd-0.10/debian/libppd-dev.docs 1970-01-01 01:00:00.000000000 +0100 +++ libppd-0.10/debian/libppd-dev.docs 2022-01-10 20:18:49.000000000 +0100 @@ -0,0 +1 @@ +AUTHORS diff -Nru libppd-0.10/debian/libppd-dev.install libppd-0.10/debian/libppd-dev.install --- libppd-0.10/debian/libppd-dev.install 1970-01-01 01:00:00.000000000 +0100 +++ libppd-0.10/debian/libppd-dev.install 2022-01-10 20:18:49.000000000 +0100 @@ -0,0 +1,5 @@ +usr/include/ppd.h +usr/include/ppdenums.h +usr/include/ppdmacros.h +usr/lib/${DEB_TARGET_MULTIARCH}/libppd.a +usr/lib/${DEB_TARGET_MULTIARCH}/libppd.so diff -Nru libppd-0.10/debian/libppd-dev.manpages libppd-0.10/debian/libppd-dev.manpages --- libppd-0.10/debian/libppd-dev.manpages 1970-01-01 01:00:00.000000000 +0100 +++ libppd-0.10/debian/libppd-dev.manpages 2022-01-10 20:18:49.000000000 +0100 @@ -0,0 +1,7 @@ +usr/share/man/man3/ppd_check_option_is_marked.3 +usr/share/man/man3/ppd_emit_to_file.3 +usr/share/man/man3/ppd_file_free.3 +usr/share/man/man3/ppd_file_new.3 +usr/share/man/man3/ppd_find_choice.3 +usr/share/man/man3/ppd_get_num_conflicts.3 +usr/share/man/man3/ppd_get_page_length.3 diff -Nru libppd-0.10/debian/not-installed libppd-0.10/debian/not-installed --- libppd-0.10/debian/not-installed 1970-01-01 01:00:00.000000000 +0100 +++ libppd-0.10/debian/not-installed 2022-01-10 20:18:49.000000000 +0100 @@ -0,0 +1,2 @@ +usr/lib/${DEB_TARGET_MULTIARCH}/libppd.la +usr/share/postscript/ppd/generic-printer.ppd diff -Nru libppd-0.10/debian/patches/redo-autoconf.patch libppd-0.10/debian/patches/redo-autoconf.patch --- libppd-0.10/debian/patches/redo-autoconf.patch 1970-01-01 01:00:00.000000000 +0100 +++ libppd-0.10/debian/patches/redo-autoconf.patch 2022-01-10 20:37:17.000000000 +0100 @@ -0,0 +1,130 @@ +Subject: Redo autoconf +Author: Christoph Biedl <debian.a...@manchmal.in-ulm.de> +Date: 2022-01-08 + + Seems this automake input is that old autoconf isn't really happy + about it. Try to improve the situation, a little bit. + +--- a/configure.in ++++ /dev/null +@@ -1,41 +0,0 @@ +-dnl Process this file with autoconf to produce a configure script. +-AC_INIT(src/ppd.c) +-AM_INIT_AUTOMAKE(libppd,0.10) +-AC_LANG_C +-AM_CONFIG_HEADER(config.h) +- +-# -Wshadow doesn't work with glib +-WARNS="" +-AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging (assumes gcc/gdb) [default=no]],WARNS="-W -Wall -Wundef -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -O0 -ggdb3",AC_DEFINE(NDEBUG)) +-AC_SUBST(WARNS) +- +-dnl Checks for programs. +-AC_PROG_CC +-AC_PROG_CXX +-AM_PROG_LIBTOOL +-AM_PATH_GLIB(1.2.0,[],[ +- AC_MSG_ERROR(You must have glib installed to compile libppd) +-]) +- +-dnl Checks for libraries. +-dnl AC_CHECK_LIB(efence,malloc) +- +-dnl Checks for header files. +-AC_HEADER_STDC +- +-dnl Checks for typedefs, structures, and compiler characteristics. +-AC_C_CONST +- +-dnl Checks for library functions. +-AC_CHECK_FUNCS(strdup) +-AC_CHECK_FUNCS(strcasecmp) +-AC_CHECK_FUNCS(strncasecmp) +-AC_CHECK_FUNCS(snprintf) +-AC_CHECK_FUNCS(vsnprintf) +- +-dnl loads in the magic pixie dust for the m4 files +-TESTSCRIPTS=`cd src/tests && echo *.m4 | sed "s/m4/sh/g"` +-AC_SUBST(TESTSCRIPTS) +- +-AC_OUTPUT(Makefile src/Makefile src/tests/Makefile doc/Makefile libppd.spec) +- +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -1,24 +1,27 @@ + ppdsdir= $(datadir)/postscript/ppd/ +-CFLAGS = @CFLAGS@ @WARNS@ -DPPD_PATH=\"$(ppdsdir)\" ++# CFLAGS = @CFLAGS@ @WARNS@ -DPPD_PATH=\"$(ppdsdir)\" + SUBDIRS = tests + +-INCLUDES=$(GLIB_CFLAGS) -DG_LOG_DOMAIN=\"LibPPD\" ++AM_CPPFLAGS=$(GLIB_CFLAGS) -DG_LOG_DOMAIN=\"LibPPD\" + bin_PROGRAMS=ppdfilt + lib_LTLIBRARIES=libppd.la +-LDFLAGS=$(GLIB_LIBS) ++AM_LDFLAGS=$(GLIB_LIBS) + include_HEADERS=ppd.h ppdenums.h ppdmacros.h + + libppd_la_SOURCES=emit.c options.c page.c mark.c ppd.c init.c debug.h ppdfilt.h + libppd_la_LDFLAGS= -version-info 1:1:0 + ++ppdfilt_CFLAGS = @CFLAGS@ @WARNS@ -DPPD_PATH=\"$(ppdsdir)\" + ppdfilt_SOURCES=ppdfilt.c + ppdfilt_LDADD=libppd.la + + noinst_PROGRAMS=dumpppd ++dumpppd_CFLAGS = @CFLAGS@ @WARNS@ -DPPD_PATH=\"$(ppdsdir)\" + dumpppd_SOURCES=dumpppd.c emit.c options.c page.c mark.c ppd.c init.c \ + debug.h ppdfilt.h + + check_PROGRAMS=testmacros ++testmacros_CFLAGS = @CFLAGS@ @WARNS@ -DPPD_PATH=\"$(ppdsdir)\" + testmacros_SOURCES=testmacros.c + testmacros_LDADD=libppd.la + +--- /dev/null ++++ b/configure.ac +@@ -0,0 +1,43 @@ ++dnl Process this file with autoconf to produce a configure script. ++AC_INIT([libppd], [0.10]) ++AC_CONFIG_SRCDIR([src/ppd.c]) ++AC_CONFIG_AUX_DIR([build-aux]) ++AC_CONFIG_HEADERS(config.h) ++ ++AM_INIT_AUTOMAKE ++AC_LANG([C]) ++AC_CONFIG_MACRO_DIRS([m4]) ++ ++LT_INIT ++ ++# -Wshadow doesn't work with glib ++WARNS="" ++AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging (assumes gcc/gdb) [default=no]],WARNS="-W -Wall -Wundef -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -O0 -ggdb3",AC_DEFINE(NDEBUG)) ++AC_SUBST(WARNS) ++ ++dnl Checks for programs. ++AC_PROG_CC ++ ++dnl AC_SEARCH_LIBS([g_string_new], [glib-2.0], [], [ ++dnl AC_MSG_ERROR([unable to find glib-2.0()]) ++dnl ]) ++PKG_CHECK_MODULES(GLIB, [glib-2.0]) ++ ++AC_SUBST(GLIB_CFLAGS) ++ ++dnl Checks for typedefs, structures, and compiler characteristics. ++AC_C_CONST ++ ++dnl Checks for library functions. ++AC_CHECK_FUNCS(strdup) ++AC_CHECK_FUNCS(strcasecmp) ++AC_CHECK_FUNCS(strncasecmp) ++AC_CHECK_FUNCS(snprintf) ++AC_CHECK_FUNCS(vsnprintf) ++ ++dnl loads in the magic pixie dust for the m4 files ++TESTSCRIPTS=`cd src/tests && echo *.m4 | sed "s/m4/sh/g"` ++AC_SUBST(TESTSCRIPTS) ++ ++AC_CONFIG_FILES([Makefile src/Makefile src/tests/Makefile doc/Makefile libppd.spec]) ++AC_OUTPUT diff -Nru libppd-0.10/debian/patches/rewrite-manpage.patch libppd-0.10/debian/patches/rewrite-manpage.patch --- libppd-0.10/debian/patches/rewrite-manpage.patch 1970-01-01 01:00:00.000000000 +0100 +++ libppd-0.10/debian/patches/rewrite-manpage.patch 2022-01-10 20:19:37.000000000 +0100 @@ -0,0 +1,75 @@ +Subject: Rewrite ppdfilt manpage +Author: A Mennucc1 <mennu...@debian.org> +Date: 2007-05-17 (or earlier) + +--- a/doc/ppdfilt.1 ++++ b/doc/ppdfilt.1 +@@ -1,16 +1,12 @@ + .TH ppdfilt 1 "22 May 2000" + .SH NAME +-pstops - print filter helper program +-.sp + ppdfilt - insert printer specific code into a PS job. + .SH SYNOPSIS +-.B pstops job-id user title copies options [file] +-.br + .B "ppdfilt [\-p|\-\-ppd " + ppdfilename + .B "] [\-c|\-\-copies " + num +-.B "] [\-o|\-\-options " ++.B "] [\-o|\-Z|\-\-options " + option:value + .B "] [\-4|\-\-4up] [\-2|\-\-2up] [\-n|\-\-nup " + numpages +@@ -26,24 +22,18 @@ + .br + .B ppdfilt [-?|--help] + .SH DESCRIPTION +-.B pstops +-is designed to be called from within the CUPS system. It requires +-either five or six options. The first three, job-id, user, and title +-are ignored. Copies is an integer representing the number of copies +-you want printed and options is a single argument which looks like +-this: +-.PP +-Duplex=Tumble InputSlot=Upper +-.PP +-The path to the PPD file is fetched from the PPD environmental +-variable. If you do not specify a filename as the last parameter then +-the PS job will be read from stdin. +-.PP + .B ppdfilt +-is designed to be a more flexible command used by either users or +-within a print filter. By default it will read a file from stdin and +-it will fetch the ppd specified in the PPD environemental +-variable. ++is designed to be a flexible command used by either users or ++within a print filter. ++.B ppdfilt ++processes a Postscript file to add commands that implement ++the options as specified in a PPD file; it outputs then the ++result on standard out. ++By default ++.B ppdfilt ++will read a Postscript ++file from stdin and it will fetch the ppd specified in the PPD environmental ++variable. + .SH OPTIONS + .IP "\-? or \-\-help" + Print out a brief help message and then exit. +@@ -72,11 +62,12 @@ + .IP "\-p or \-\-ppd ppdfilename" + Specify the ppd filename rather than use the one specified in the + environmental variable PPD. +-.IP "\-o or \-\-option option:value" ++.IP "\-o or \-Z or \-\-option option:value" + This argument allows you the flexibility to specify all the options + available in the PPD file as well as the special non-ppd options + listed below. You may have as many "\-o" options on the command line +-as you like. ++as you like. You may have also multiple "option:value" pairs ++separated by commas in one "\-o". + .IP "\-V or \-\-version" + Print out the version number and exit. + .SH "NON PPD OPTIONS" diff -Nru libppd-0.10/debian/patches/series libppd-0.10/debian/patches/series --- libppd-0.10/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ libppd-0.10/debian/patches/series 2022-01-10 20:19:37.000000000 +0100 @@ -0,0 +1,4 @@ +various-code-fixes.patch +rewrite-manpage.patch +redo-autoconf.patch +typo-fixes.patch diff -Nru libppd-0.10/debian/patches/typo-fixes.patch libppd-0.10/debian/patches/typo-fixes.patch --- libppd-0.10/debian/patches/typo-fixes.patch 1970-01-01 01:00:00.000000000 +0100 +++ libppd-0.10/debian/patches/typo-fixes.patch 2022-01-10 20:19:37.000000000 +0100 @@ -0,0 +1,37 @@ +Subject: Typo fixes +Author: Christoph Biedl <debian.a...@manchmal.in-ulm.de> +Date: 2022-01-08 + +--- a/doc/ppd_file_free.3 ++++ b/doc/ppd_file_free.3 +@@ -8,7 +8,7 @@ + .BI "void ppd_file_free(PpdFile * " ppd " );" + .SH DESCRIPTION + There are many dynamically allocated sub structures within the PpdFile +-structure and this makes sure that they are all freed up appropriatly. ++structure and this makes sure that they are all freed up appropriately. + The PpdFile pointer must have been previously obtained via a call to + one of the ppd_file_new(3) functions. + .SH "SEE ALSO" +--- a/libppd.spec ++++ b/libppd.spec +@@ -29,7 +29,7 @@ + trays and turning on different imaging models, each printer vendor + supplies a PostScript Printer Definition, PPD file. This library reads + those PPD files and provides functions that allow a program to modify +-the PostScript print jobs to acces these special features. ++the PostScript print jobs to access these special features. + + %description devel + To develop programs based upon the libppd library, the system needs to +--- a/libppd.spec.in ++++ b/libppd.spec.in +@@ -29,7 +29,7 @@ + trays and turning on different imaging models, each printer vendor + supplies a PostScript Printer Definition, PPD file. This library reads + those PPD files and provides functions that allow a program to modify +-the PostScript print jobs to acces these special features. ++the PostScript print jobs to access these special features. + + %description devel + To develop programs based upon the libppd library, the system needs to diff -Nru libppd-0.10/debian/patches/various-code-fixes.patch libppd-0.10/debian/patches/various-code-fixes.patch --- libppd-0.10/debian/patches/various-code-fixes.patch 1970-01-01 01:00:00.000000000 +0100 +++ libppd-0.10/debian/patches/various-code-fixes.patch 2022-01-10 20:19:37.000000000 +0100 @@ -0,0 +1,226 @@ +Subject: Various code fixes +Author: A Mennucc1 <mennu...@debian.org> and other +Date: 2007-05-17 (or earlier) +Bug-Debian: + https://bugs.debian.org/422823 + https://bugs.debian.org/423387 +Last-Update: 2008-09-25 + + * Supports empty and comma separated options to -Z + * Delete leading and trailing spaces in options + +--- a/src/ppd.c ++++ b/src/ppd.c +@@ -425,10 +425,6 @@ + char **filter; // Pointer to filter + PpdEmulator *emul; // Pointer to emulator class + GSList *list; // Generic list enumerator +- char copt1[41], // These temporarily hold +- copt2[41], // data that will be put in +- cchoice1[41], // a PpdConstraint +- cchoice2[41]; // + // cups_lang_t *language; // Default language + + // Get the default language for the user... +@@ -740,7 +736,7 @@ + } else if (strcmp(keyword, "OpenUI") == 0) { + /* Add an option record to the current sub-group, group, or file... */ + if (name[0] == '*') +- strcpy(name, name + 1); ++ memmove(name, name + 1, strlen(name)); + + if (string == NULL) + goto failout1; +@@ -807,7 +803,7 @@ + + // Add an option record to the current JCLs... + if (name[0] == '*') +- strcpy(name, name + 1); ++ memmove(name, name + 1, strlen(name)); + + if ((option = ppd_get_option(group, name)) == NULL) + option = ppd_option_new(group, keyword); +@@ -828,11 +824,12 @@ + || strcmp(keyword, "JCLCloseUI") == 0) + option = NULL; + else if (strcmp(keyword, "OpenGroup") == 0) { ++ char *h; + // Open a new group... + if (group != NULL) + goto failout; +- if (strchr(string, '/') != NULL) // Just show human readable text +- strcpy(string, strchr(string, '/') + 1); ++ if ((h = strchr(string, '/')) != NULL) // Just show human readable text ++ memmove(string, h+1, strlen(h)); + + ppd_decode(string); + ppd_fix(string); +@@ -858,7 +855,7 @@ + if (sscanf(string, "%f%40s%40s", &order, name, keyword) != 3) + goto failout; + if (keyword[0] == '*') +- strcpy(keyword, keyword + 1); ++ memmove(keyword, keyword + 1, strlen(keyword)); + + if (strcmp(name, "ExitServer") == 0) + section = PPD_ORDER_EXIT; +@@ -992,7 +989,12 @@ + + ppd->consts = g_slist_append(ppd->consts, constraint); + +- m = sscanf(string, "%40s%40s%40s%40s", copt1, cchoice1, copt2, cchoice2); ++ {char copt1[81], // These temporarily hold ++ copt2[81], // data that will be put in ++ cchoice1[81], // a PpdConstraint ++ cchoice2[81]; // ++ ++ m = sscanf(string, "%80s%80s%80s%80s", copt1, cchoice1, copt2, cchoice2); + + switch (m) { + case 0: // Error +@@ -1003,50 +1005,49 @@ + break; + case 2: // Two options... + if (copt1[0] == '*') +- strcpy(copt1, copt1 + 1); ++ constraint->option1 = g_string_new(copt1 + 1); ++ else ++ constraint->option1 = g_string_new(copt1); + + if (cchoice1[0] == '*') +- strcpy(copt2, cchoice1 + 1); ++ constraint->option2 = g_string_new(cchoice1 + 1); + else +- strcpy(copt2, cchoice1); ++ constraint->option2 = g_string_new(cchoice1); + +- constraint->option1 = g_string_new(copt1); +- constraint->option2 = g_string_new(copt2); + break; + case 3: // Two options, one choice... + if (copt1[0] == '*') +- strcpy(copt1, copt1 + 1); +- constraint->option1 = g_string_new(copt1); ++ constraint->option1 = g_string_new(copt1 + 1); ++ else ++ constraint->option1 = g_string_new(copt1); + + if (cchoice1[0] == '*') { +- strcpy(cchoice2, copt2); +- strcpy(copt2, cchoice1 + 1); +- cchoice1[0] = '\0'; +- +- constraint->choice2 = g_string_new(cchoice2); +- constraint->option2 = g_string_new(copt2); ++ constraint->choice2 = g_string_new(copt2); ++ constraint->option2 = g_string_new(cchoice1 + 1); + } else { + if (copt2[0] == '*') +- strcpy(copt2, copt2 + 1); +- +- constraint->option2 = g_string_new(copt2); +- cchoice2[0] = '\0'; ++ constraint->option2 = g_string_new(copt2 + 1); ++ else ++ constraint->option2 = g_string_new(copt2); + } + + break; + case 4: // Two options, two choices... + if (copt1[0] == '*') +- strcpy(copt1, copt1 + 1); ++ constraint->option1 = g_string_new(copt1 + 1); ++ else ++ constraint->option1 = g_string_new(copt1); + + if (copt2[0] == '*') +- strcpy(copt2, copt2 + 1); ++ constraint->option2 = g_string_new(copt2 + 1); ++ else ++ constraint->option2 = g_string_new(copt2); + +- constraint->option1 = g_string_new(copt1); +- constraint->option2 = g_string_new(copt2); + constraint->choice1 = g_string_new(cchoice1); + constraint->choice2 = g_string_new(cchoice2); + break; + } ++ }/* closes block where we mess up with cchoice1 cchoice2 copt1 copt2 */ + } else if (strcmp(keyword, "PaperDimension") == 0) { + if ((size = ppd_get_page_size(ppd, name)) != NULL) + sscanf(string, "%f%f", &(size->width), &(size->length)); +--- a/src/ppdfilt.c ++++ b/src/ppdfilt.c +@@ -296,7 +296,7 @@ + const char *ppdfilename = getenv("PPD"); + GSList *list; // List enumeration variable. + +- unsigned int flags; ++ unsigned int flags = 0; + + clear_pageorder(&flags); + clear_flip(&flags); +@@ -341,7 +341,6 @@ + {"help", no_argument, NULL, '?'}, + {0, 0, 0, 0} + }; +- char *cur; + copies = 1; + num_options = 0; + options = NULL; +@@ -358,16 +357,35 @@ + break; + case 'o': + case 'Z': +- if ((cur = strchr(optarg, ':')) == NULL) { +- fprintf(stderr, "Bad option format: %s\n", optarg); +- exit(2); ++ { char *cur=NULL, *next=NULL, *sp,*thearg,*arg=thearg=g_strdup(optarg); ++ do { ++ /* Ignore empty argument (to ease usage in magicfilter rules)*/ ++ while (arg[0]==',' || arg[0]==' ' ) arg++; ++ if (arg[0] == '\0') break; ++ if ((cur = strchr(arg, ':')) == NULL) { ++ fprintf(stderr, "Bad option format (no semicolon): %s\n", optarg); ++ exit(2); ++ } ++ /* break the string, point cur to the value*/ ++ *cur = 0; cur++; ++ /*delete trailing spaces*/ ++ sp=cur-2; while (*sp==' ' && sp>arg ) { *sp=0;sp--;} ++ /* MLP: skip past leading spaces. */ ++ while (cur[0] == ' ') cur++; ++ /* allow comma separated values to ease usage from LPRng */ ++ if ((next = strchr(cur, ',')) != NULL) { ++ *next = 0; /* break the string */ ++ next++; ++ sp=next-1; ++ } else sp=cur+strlen(cur)-1; ++ /*delete trailing spaces*/ ++ while (*sp==' ' && sp> cur ) { *sp=0;sp--;} ++ num_options = cupsAddOption(arg, cur, num_options, &options); ++ //debugmeso//fprintf(stderr,"--arg '%s' cur '%s' \n",arg,cur ); ++ arg = next; ++ } while (next != NULL); ++ g_free(thearg); + } +- *cur = 0; // break the string +- cur++; // point cur to the value +- /* MLP: skip past leading spaces. */ +- while (cur && (cur[0] == ' ')) +- cur++; +- num_options = cupsAddOption(optarg, cur, num_options, &options); + break; + case 'p': + ppdfilename = optarg; +@@ -536,7 +554,9 @@ + + if (NUp > 1) + puts("userdict begin\n" "/ESPshowpage /showpage load def\n" +- "/showpage { } def\n" "end"); ++ "/showpage { } def\n" ++ "/setpagedevice {pop}bind 1 index where{dup wcheck{3 1 roll put}{pop def}ifelse}{def}ifelse\n" ++ "end"); + + if (gamma != 1.0 || brightness != 1.0) + printf("{ neg 1 add dup 0 lt { pop 1 } { %.3f exp neg 1 add } " diff -Nru libppd-0.10/debian/ppdfilt.install libppd-0.10/debian/ppdfilt.install --- libppd-0.10/debian/ppdfilt.install 1970-01-01 01:00:00.000000000 +0100 +++ libppd-0.10/debian/ppdfilt.install 2022-01-10 20:18:49.000000000 +0100 @@ -0,0 +1 @@ +usr/bin/ppdfilt diff -Nru libppd-0.10/debian/ppdfilt.manpages libppd-0.10/debian/ppdfilt.manpages --- libppd-0.10/debian/ppdfilt.manpages 1970-01-01 01:00:00.000000000 +0100 +++ libppd-0.10/debian/ppdfilt.manpages 2022-01-10 20:18:49.000000000 +0100 @@ -0,0 +1 @@ +usr/share/man/man1/ppdfilt.1 diff -Nru libppd-0.10/debian/rules libppd-0.10/debian/rules --- libppd-0.10/debian/rules 2022-01-12 09:19:27.000000000 +0100 +++ libppd-0.10/debian/rules 2022-01-10 20:19:37.000000000 +0100 @@ -1,82 +1,9 @@ #!/usr/bin/make -f -# Sample debian/rules that uses debhelper. -# This file is public domain software, originally written by Joey Hess. -# -# This version is for a multibinary package. It also allows you to build any -# of the binary packages independantly, via binary-<package> targets. -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 -CFLAGS = -Wall -g -LDFLAGS = -lglib-2.0 -INSTALL = install -INSTALL_FILE = $(INSTALL) -p -o root -g root -m 644 -INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755 -INSTALL_SCRIPT = $(INSTALL) -p -o root -g root -m 755 -INSTALL_DIR = $(INSTALL) -p -d -o root -g root -m 755 -export CFLAGS LDFLAGS INSTALL_FILE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DIR +%: + dh $@ -ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif -ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS))) - INSTALL_PROGRAM += -s -endif -ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) - NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) - MAKEFLAGS += -j$(NUMJOBS) -endif +override_dh_auto_test: -build: build-stamp -build-stamp: - dh_testdir - # avoid time skews - dh_autoreconf - ./configure --prefix=/usr --with-glib=2 --mandir=/usr/share/man - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp config.log - [ ! -f Makefile ] || $(MAKE) distclean distclean-generic - dh_autoreconf_clean - dh_clean - #find config.sub config.guess ltmain.sh COPYING INSTALL intl -type l | xargs -r rm - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - $(MAKE) DESTDIR=`pwd`/debian/tmp install - dh_movefiles - - -# Nothing to do. -binary-indep: - -# Build architecture dependant packages using the common target. -binary-arch: install - #dh_testversion 2 - dh_testdir - dh_testroot - dh_installdocs AUTHORS # NEWS README - dh_installexamples - dh_installchangelogs # ChangeLog - dh_compress - dh_strip - dh_fixperms - # Keep -V on until the library reaches major version 1. - dh_makeshlibs -V - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch - -.PHONY: build clean binary-indep binary-arch binary install +override_dh_missing: + dh_missing --fail-missing diff -Nru libppd-0.10/debian/source/format libppd-0.10/debian/source/format --- libppd-0.10/debian/source/format 1970-01-01 01:00:00.000000000 +0100 +++ libppd-0.10/debian/source/format 2022-01-10 20:18:49.000000000 +0100 @@ -0,0 +1 @@ +3.0 (quilt) diff -Nru libppd-0.10/debian/watch libppd-0.10/debian/watch --- libppd-0.10/debian/watch 1970-01-01 01:00:00.000000000 +0100 +++ libppd-0.10/debian/watch 2022-01-10 20:18:49.000000000 +0100 @@ -0,0 +1,3 @@ + + +# https://sourceforge.net/projects/lpr/files/libppd/0.10/
signature.asc
Description: PGP signature