diff options
author | Foxfair Hu <foxfair@FreeBSD.org> | 1999-05-17 10:32:43 +0000 |
---|---|---|
committer | Foxfair Hu <foxfair@FreeBSD.org> | 1999-05-17 10:32:43 +0000 |
commit | 5db405731c69a0df10aaea4caf828459036ed704 (patch) | |
tree | 4603c9f019b6a23ef0564145054b674257aebb3f /print | |
parent | PR: 11457 (diff) |
PR: 11721
Submitted by: Yin-Jieh Chen <yinjieh@csie.nctu.edu.tw>
Notes
Notes:
svn path=/head/; revision=18861
Diffstat (limited to 'print')
-rw-r--r-- | print/pdq/Makefile | 39 | ||||
-rw-r--r-- | print/pdq/distinfo | 3 | ||||
-rw-r--r-- | print/pdq/files/patch-aa | 62 | ||||
-rw-r--r-- | print/pdq/files/patch-ab | 88 | ||||
-rw-r--r-- | print/pdq/files/patch-ad | 10 | ||||
-rw-r--r-- | print/pdq/files/patch-af | 39 | ||||
-rw-r--r-- | print/pdq/files/patch-ag | 34 | ||||
-rw-r--r-- | print/pdq/files/patch-ak | 11 | ||||
-rw-r--r-- | print/pdq/pkg-comment | 1 | ||||
-rw-r--r-- | print/pdq/pkg-descr | 16 | ||||
-rw-r--r-- | print/pdq/pkg-plist | 6 |
11 files changed, 309 insertions, 0 deletions
diff --git a/print/pdq/Makefile b/print/pdq/Makefile new file mode 100644 index 000000000000..e2cd41612252 --- /dev/null +++ b/print/pdq/Makefile @@ -0,0 +1,39 @@ +# New ports collection makefile for: pdq +# Version required: 2.1.1 +# Date created: 15 May 1999 +# Whom: Yin-Jieh Chen <yinjieh@csie.nctu.edu.tw> +# +# $Id$ +# + +DISTNAME= pdq-2.1.1 +CATEGORIES= print +MASTER_SITES= ftp://feynman.tam.uiuc.edu/pub/pdq/ +EXTRACT_SUFX= .tgz + +MAINTAINER= yinjieh@csie.nctu.edu.tw + +LIB_DEPENDS= gtk12.1:${PORTSDIR}/x11-toolkits/gtk12 + +GNU_CONFIGURE= yes +CONFIGURE_ENV= GTK_CONFIG="${X11BASE}/bin/gtk12-config" \ + GLIB_CONFIG="${LOCALBASE}/bin/glib12-config" + +MAN1= lpd_cancel.1 lpd_print.1 lpd_status.1 pdq.1 xpdq.1 +MAN5= printrc.5 + +post-install: + ${CP} ${WRKSRC}/sample_etc_printrc ${PREFIX}/etc/printrc.sample + strip ${PREFIX}/bin/pdq + strip ${PREFIX}/bin/xpdq + strip ${PREFIX}/bin/lpd_cancel + strip ${PREFIX}/bin/lpd_print + strip ${PREFIX}/bin/lpd_status + @${ECHO} '*******************************************************' + @${ECHO} '* *' + @${ECHO} '* Please copy /usr/local/etc/printrc.sample to *' + @${ECHO} '* /usr/local/etc/printrc by yourself, thanks. *' + @${ECHO} '* *' + @${ECHO} '*******************************************************' + +.include <bsd.port.mk> diff --git a/print/pdq/distinfo b/print/pdq/distinfo new file mode 100644 index 000000000000..84b4f47e0e50 --- /dev/null +++ b/print/pdq/distinfo @@ -0,0 +1,3 @@ +MD5 (pdq-2.1.1.tgz) = bcdcb66d449ae9c5ec544227dc2a059a +MD5 (pdq-2.1.1.tgz) = 6c684021b2f22ae5d957480b3a196d61 + diff --git a/print/pdq/files/patch-aa b/print/pdq/files/patch-aa new file mode 100644 index 000000000000..4e0d8bb786c9 --- /dev/null +++ b/print/pdq/files/patch-aa @@ -0,0 +1,62 @@ +--- src/job.c.orig Sat May 15 01:03:09 1999 ++++ src/job.c Sat May 15 01:08:30 1999 +@@ -248,12 +248,9 @@ + } + sprintf(pat, "%s/[0-9][0-9][0-9].status", sd); + i = glob (pat, 0, NULL, &globbuf); +- if (i != 0) { +- if (i != GLOB_NOMATCH) { ++ if (i != 0) return (NULL); + /* Unknown error (or on some systems, no match) */ +- return (NULL); +- } +- } else { ++ else { + if (globbuf.gl_pathc == 0) { + /* No match */ + return (NULL); +@@ -385,14 +382,10 @@ + i = glob (pat, 0, NULL, &globbuf); + free (pat); + if (i != 0) { +- if (i != GLOB_NOMATCH) { + fprintf (stderr, "Unknown error globbing for job id.\n"); + perror (NULL); + fprintf (stderr, "Failed to purge old jobs.\n"); + my_exit (1); +- } else { +- /* No match */ +- } + } else { + if (globbuf.gl_pathc == 0) { + return; +@@ -432,14 +425,10 @@ + i = glob (pat, 0, NULL, &globbuf); + free (pat); + if (i != 0) { +- if (i != GLOB_NOMATCH) { + fprintf (stderr, "Unknown error globbing for job id.\n"); + perror (NULL); + fprintf (stderr, "Failed to purge old jobs.\n"); + my_exit (1); +- } else { +- /* No match */ +- } + } else { + if (globbuf.gl_pathc == 0) { + return; +@@ -495,11 +484,9 @@ + i = glob (pat, 0, NULL, &globbuf); + free (pat); + if (i != 0) { +- if (i != GLOB_NOMATCH) { +- fprintf (stderr, "Unknown error globbing for job id.\n"); +- perror (NULL); +- my_exit (1); +- } ++ fprintf (stderr, "Unknown error globbing for job id.\n"); ++ perror (NULL); ++ my_exit (1); + claim_try = 1; + } else { + if (globbuf.gl_pathc == 0) { diff --git a/print/pdq/files/patch-ab b/print/pdq/files/patch-ab new file mode 100644 index 000000000000..3b85203a2cea --- /dev/null +++ b/print/pdq/files/patch-ab @@ -0,0 +1,88 @@ +--- src/parse_rc.c.orig Sat May 15 01:03:20 1999 ++++ src/parse_rc.c Sat May 15 07:06:17 1999 +@@ -23,7 +23,6 @@ + #include <glob.h> + #include <string.h> + #include <stdlib.h> +-#include <values.h> + + + #include "parse.h" +@@ -35,6 +34,8 @@ + #include "driver.h" + #include "interface.h" + ++#define PRINTRC "/usr/local/etc/printrc" ++ + void try_parse_rc_glob (char *rc_glob, rc_items *rc) { + + glob_t globbuf; +@@ -46,12 +47,8 @@ + i = glob (d, 0, NULL, &globbuf); + free (d); + if (i != 0) { +- if (i == GLOB_NOMATCH) { +- /* Keep on going */ +- } else { +- fprintf (stderr, "Died while globbing %s\n", d); +- my_exit (1); +- } ++ fprintf (stderr, "Died while globbing %s\n", d); ++ my_exit (1); + } else { + /* Globbed something real */ + for (i = 0; i < globbuf.gl_pathc; i++) { +@@ -71,11 +68,7 @@ + + i = glob (d, 0, NULL, &globbuf); + if (i != 0) { +- if (i == GLOB_NOMATCH) { +- fprintf (stderr, "No files match %s\n", d); +- } else { +- fprintf (stderr, "Died while globbing %s\n", d); +- } ++ fprintf (stderr, "Died while globbing %s\n", d); + free (d); + my_exit (1); + } else { +@@ -258,7 +251,7 @@ + int trouble_flag; + + rc_locs = NULL; +- find_rc_glob_locations (type, name, "/etc/printrc", &rc_locs); ++ find_rc_glob_locations (type, name, PRINTRC, &rc_locs); + find_rc_glob_locations (type, name, "~/.printrc", &rc_locs); + + set_flag = 0; +@@ -282,7 +275,7 @@ + } + + if ( (set_flag == 0) || (trouble_flag == 1) ) { +- if (0 != append_to_rc_file ("/etc/printrc", buf) ) { ++ if (0 != append_to_rc_file (PRINTRC, buf) ) { + append_to_rc_file ("~/.printrc", buf); /* Return code not checked. + * What else can we do? + */ +@@ -299,7 +292,7 @@ + int trouble_flag; + + rc_locs = NULL; +- find_rc_glob_locations (type, name, "/etc/printrc", &rc_locs); ++ find_rc_glob_locations (type, name, PRINTRC, &rc_locs); + find_rc_glob_locations (type, name, "~/.printrc", &rc_locs); + + trouble_flag = 0; +@@ -315,11 +308,11 @@ + + /* In this case, buf should have been set to some commands that + * indicate to delete the object. For example, say printer foo is +- * defined in /etc/printrc. Ordinary users cannot delete it, but ++ * defined in /usr/local/etc/printrc. Ordinary users cannot delete it, but + * they may add the command "printer foo delete" to their own rc file. + */ + if (trouble_flag == 1) { +- if (0 != append_to_rc_file ("/etc/printrc", buf) ) { ++ if (0 != append_to_rc_file (PRINTRC, buf) ) { + append_to_rc_file ("~/.printrc", buf); /* Return code not checked. + * What else can we do? + */ diff --git a/print/pdq/files/patch-ad b/print/pdq/files/patch-ad new file mode 100644 index 000000000000..619641bcf84a --- /dev/null +++ b/print/pdq/files/patch-ad @@ -0,0 +1,10 @@ +--- src/util.c.orig Sat May 15 01:34:56 1999 ++++ src/util.c Sat May 15 02:07:16 1999 +@@ -16,6 +16,7 @@ + * + */ + ++#include <stdio.h> + #include <unistd.h> + #include <string.h> + #include <pwd.h> diff --git a/print/pdq/files/patch-af b/print/pdq/files/patch-af new file mode 100644 index 000000000000..532e2726ee9f --- /dev/null +++ b/print/pdq/files/patch-af @@ -0,0 +1,39 @@ +--- src/xpdq_printer.c.orig Sat May 15 07:19:13 1999 ++++ src/xpdq_printer.c Sat May 15 11:43:47 1999 +@@ -29,23 +29,30 @@ + #include "printer.h" + #include "argument.h" + ++#define PRINTRC "/usr/local/etc/printrc" ++ + void xpdq_add_printer (void) { + + pwizard_state *wizard; + dl_list *list; ++ char *error; + + list = first_list_element (rc->driver_list); + if (list == NULL) { +- xpdq_error ("There are no printer drivers defined in\n" +- "/etc/printrc or ~/.printrc. Without printer drivers,\n" +- "the wizard cannot add printers."); ++ error = malloc(256); ++ sprintf (error, "There are no printer drivers defined in\n" ++ "%s or ~/.printrc. Without printer drivers,\n" ++ "the wizard cannot add printers.", PRINTRC); ++ xpdq_error(error); + return; + } + list = first_list_element (rc->interface_list); + if (list == NULL) { +- xpdq_error ("There are no printer interfaces defined in\n" +- "/etc/printrc or ~/.printrc. Without printer interfaces,\n" +- "the wizard cannot add printers."); ++ error = malloc(256); ++ sprintf (error, "There are no printer drivers defined in\n" ++ "%s or ~/.printrc. Without printer drivers,\n" ++ "the wizard cannot add printers.", PRINTRC); ++ xpdq_error(error); + return; + } + wizard = new_pwizard (); diff --git a/print/pdq/files/patch-ag b/print/pdq/files/patch-ag new file mode 100644 index 000000000000..3ce08476c57b --- /dev/null +++ b/print/pdq/files/patch-ag @@ -0,0 +1,34 @@ +--- src/xpdq_wizard.c.orig Sat May 15 11:45:15 1999 ++++ src/xpdq_wizard.c Sat May 15 11:50:44 1999 +@@ -29,6 +29,8 @@ + #include "printer.h" + #include "argument.h" + ++#define PRINTRC "/usr/local/etc/printrc" ++ + pwizard_state *new_pwizard() { + + pwizard_state *wizard; +@@ -315,6 +317,7 @@ + driver *d; + int i, row; + char *dname; ++ char *error; + + panel = gtk_vbox_new (FALSE, 0); + gtk_container_border_width (GTK_CONTAINER (panel), 10); +@@ -348,9 +351,11 @@ + gtk_clist_set_selection_mode (GTK_CLIST(widget), GTK_SELECTION_BROWSE); + list = first_list_element (rc->driver_list); + if (list == NULL) { +- xpdq_error ("This system has no drivers. Please make sure\n" +- "that there are drivers defined in /etc/printrc, ~/.printrc,\n" +- "or in files included by /etc/printrc or ~/.printrc."); ++ error = malloc(256); ++ sprintf(error, "This system has no drivers. Please make sure\n" ++ "that there are drivers defined in %s, ~/.printrc,\n" ++ "or in files included by %s or ~/.printrc.", PRINTRC, PRINTRC); ++ xpdq_error(error); + } + while (list != NULL) { + d = (driver *) list->data; diff --git a/print/pdq/files/patch-ak b/print/pdq/files/patch-ak new file mode 100644 index 000000000000..20e3099ee65a --- /dev/null +++ b/print/pdq/files/patch-ak @@ -0,0 +1,11 @@ +--- lpd/lpd_interface.c.orig Sat May 15 02:26:06 1999 ++++ lpd/lpd_interface.c Sat May 15 02:26:25 1999 +@@ -80,7 +80,7 @@ + + MESSAGE (2, connecting...); + +- if ( connect(sckt, &serv_addr, sizeof(serv_addr)) != 0 ) { ++ if ( connect(sckt, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) != 0 ) { + perror ("connect"); + exit (1); + } diff --git a/print/pdq/pkg-comment b/print/pdq/pkg-comment new file mode 100644 index 000000000000..0aefa4fc8c8f --- /dev/null +++ b/print/pdq/pkg-comment @@ -0,0 +1 @@ +A straightforward, flexible print subsystem. diff --git a/print/pdq/pkg-descr b/print/pdq/pkg-descr new file mode 100644 index 000000000000..ee9e17d3fe33 --- /dev/null +++ b/print/pdq/pkg-descr @@ -0,0 +1,16 @@ +pdq is a straightforward, flexible print subsystem. +It has the following features: +o Modular driver and interface support. +o Jobs can be monitored through completion. +o Job status can be checked after completion. +o Users can only print files of declared types. +o Users can define their own printers. +o Multitasking, with no queues to get clogged. +o Scripts can be embedded in the rc files. +o Custom command-line options. +o Root privileges not required. + +WWW: http://feynman.tam.uiuc.edu/pdq/introduction.html + +- Yin-Jieh Chen +yinjieh@csie.nctu.edu.tw diff --git a/print/pdq/pkg-plist b/print/pdq/pkg-plist new file mode 100644 index 000000000000..25031a893034 --- /dev/null +++ b/print/pdq/pkg-plist @@ -0,0 +1,6 @@ +bin/pdq +bin/xpdq +bin/lpd_cancel +bin/lpd_print +bin/lpd_status +etc/printrc.sample |