diff options
Diffstat (limited to 'print/pips800/files')
-rw-r--r-- | print/pips800/files/ekpd.sh | 68 | ||||
-rw-r--r-- | print/pips800/files/extra-patch-2.6.2 | 109 | ||||
-rw-r--r-- | print/pips800/files/extra-patch-2.6.2-common | 215 | ||||
-rw-r--r-- | print/pips800/files/extra-patch-2.6.2-dtrfilter | 31 | ||||
-rw-r--r-- | print/pips800/files/extra-patch-2.6.2-lpr | 233 | ||||
-rw-r--r-- | print/pips800/files/filter13.rev | 15 | ||||
-rw-r--r-- | print/pips800/files/pips.sh | 28 | ||||
-rw-r--r-- | print/pips800/files/readme_for_zh | 32 | ||||
-rw-r--r-- | print/pips800/files/setup | 8 |
9 files changed, 649 insertions, 90 deletions
diff --git a/print/pips800/files/ekpd.sh b/print/pips800/files/ekpd.sh index d9f52a25966c..6c7b25186701 100644 --- a/print/pips800/files/ekpd.sh +++ b/print/pips800/files/ekpd.sh @@ -1,48 +1,38 @@ #!/bin/sh # -# ekpd - -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=/usr/local/libexec/ekpd -LOCK=/var/ekpd/lpr_lock +# $FreeBSD$ +# -NAME=ekpd +# PROVIDE: ekpd +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: FreeBSD shutdown -[ -f $DAEMON ] || exit 0 +# Define these ekpd_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/ekpd +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# +ekpd_enable=${ekpd_enable:-"NO"} # Enable ekpd +ekpd_flags=${ekpd_flags:-""} # Flags to ekpd program -OLDMASK=`umask` -umask 000 +. %%RC_SUBR%% -case "$1" in +name="ekpd" +rcvar=`set_rcvar` +command="%%PREFIX%%/libexec/pips/printer/ekpd" +start_precmd="ekpd_prestart" - start) - if [ -x $DAEMON ]; then - echo -n "Starting $NAME:" - [ ! -d /var/ekpd ] && mkdir -p /var/ekpd && chmod 1777 /var/ekpd - [ ! -e /var/ekpd/ekplp0 ] && rm -f /var/ekpd/ekplp0 && \ +ekpd_prestart() { + OLDMASK=`umask` + umask 000 + [ ! -d /var/ekpd ] && mkdir -p /var/ekpd && chmod 1777 /var/ekpd + [ ! -e /var/ekpd/ekplp0 ] && rm -f /var/ekpd/ekplp0 && \ mkfifo -m 666 /var/ekpd/ekplp0 - $DAEMON 2>/dev/null - echo - fi - ;; - - stop) - echo -n "Stopping ekpd:" - killall ${NAME} 2>/dev/null - echo - ;; - - restart) - $0 stop - sleep 2 - $0 start - ;; - - *) - echo "Usage: ekpd { start | stop | restart }" >&2 - exit 1 - ;; -esac + umask $OLDMASK +} -umask $OLDMASK -exit 0 +load_rc_config $name +run_rc_command "$1" diff --git a/print/pips800/files/extra-patch-2.6.2 b/print/pips800/files/extra-patch-2.6.2 new file mode 100644 index 000000000000..23abbabb4ddb --- /dev/null +++ b/print/pips800/files/extra-patch-2.6.2 @@ -0,0 +1,109 @@ +Index: ekpd/cbtd.c +diff -u -p ekpd/cbtd.c.orig ekpd/cbtd.c +--- ekpd/cbtd.c.orig Tue Jun 24 15:22:12 2003 ++++ ekpd/cbtd.c Tue Aug 24 19:41:40 2004 +@@ -293,3 +293,14 @@ end_epson_cbt (P_CBTD_INFO p_info) + + return err; + } ++ ++#ifdef __FreeBSD__ ++ ++void ++__assert_fail(const char *assertion, const char *file, unsigned int line, ++ const char *function) ++{ ++ abort(); ++} ++ ++#endif +Index: ekpd/cbtd_comserv.c +diff -u -p ekpd/cbtd_comserv.c.orig ekpd/cbtd_comserv.c +--- ekpd/cbtd_comserv.c.orig Tue Jun 24 15:22:12 2003 ++++ ekpd/cbtd_comserv.c Tue Aug 24 23:37:04 2004 +@@ -591,9 +591,16 @@ servsock_open (int port) + fd = socket (AF_INET, SOCK_STREAM, 0); + if (fd < 0) return -1; + ++ memset(&addr, 0, sizeof(addr)); + addr.sin_family = AF_INET; + addr.sin_addr.s_addr = htonl (INADDR_ANY); + addr.sin_port = htons (port); ++#ifdef __FreeBSD__ ++ addr.sin_len = sizeof(addr); ++#endif ++#if !defined(MSG_NOSIGNAL) && defined(SO_NOSIGPIPE) ++ setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &opt, sizeof(opt)); ++#endif + bind (fd, (struct sockaddr *)&addr, sizeof (addr)); + setsockopt (fd, SOL_SOCKET, SO_REUSEADDR, (char *)&opt, sizeof(int)); + listen (fd, 5); +@@ -611,7 +618,11 @@ sock_read (int fd, char* buf, int read_s + + for (i = 0; i < SOCK_ACCSESS_WAIT_MAX; i++) + { ++#ifndef MSG_NOSIGNAL ++ size = recv (fd, buf, read_size, MSG_DONTWAIT); ++#else + size = recv (fd, buf, read_size, MSG_NOSIGNAL | MSG_DONTWAIT); ++#endif + if (size == read_size) + { + return 0; +@@ -641,7 +652,11 @@ sock_write (int fd, char* buf, int write + + for (i = 0; i < SOCK_ACCSESS_WAIT_MAX; i++) + { ++#ifndef MSG_NOSIGNAL ++ size = send (fd, buf, write_size, MSG_DONTWAIT); ++#else + size = send (fd, buf, write_size, MSG_NOSIGNAL | MSG_DONTWAIT); ++#endif + if (size == write_size) + { + fsync (fd); +Index: src/pfpng.c +diff -u -p src/pfpng.c.orig src/pfpng.c +--- src/pfpng.c.orig Tue Jun 24 15:41:46 2003 ++++ src/pfpng.c Tue Aug 24 19:41:41 2004 +@@ -57,6 +57,8 @@ lib_png_sig_cmp *dl_png_s + void * + open_png_library (void) + { ++ if (dl_handle_libpng) ++ return (void *)dl_handle_libpng; + dl_handle_libpng = dlopen ("libpng.so", RTLD_LAZY); + if (dl_handle_libpng) + { +@@ -116,8 +118,12 @@ open_png_library (void) + void + close_png_library (void) + { +- if (dl_handle_libpng) ++#if 0 ++ if (dl_handle_libpng) { + dlclose (dl_handle_libpng); ++ dl_handle_libpng = NULL; ++ } ++#endif + + return; + } +Index: src/pipsCom.c +diff -u -p src/pipsCom.c.orig src/pipsCom.c +--- src/pipsCom.c.orig Tue Jun 24 15:41:46 2003 ++++ src/pipsCom.c Tue Aug 24 23:38:06 2004 +@@ -56,9 +56,13 @@ connect_server (char *host) + if (!servinfo) return -1; + + sockfd = socket (AF_INET, SOCK_STREAM, 0); ++ memset(&address, 0, sizeof(address)); + address.sin_family = AF_INET; + address.sin_addr = *(struct in_addr *)*hostinfo->h_addr_list; + address.sin_port = servinfo->s_port; ++#ifdef __FreeBSD__ ++ address.sin_len = sizeof(address); ++#endif + + len = sizeof (address); + if (connect (sockfd, (struct sockaddr *)&address, len) == -1) diff --git a/print/pips800/files/extra-patch-2.6.2-common b/print/pips800/files/extra-patch-2.6.2-common new file mode 100644 index 000000000000..431b4982e7a3 --- /dev/null +++ b/print/pips800/files/extra-patch-2.6.2-common @@ -0,0 +1,215 @@ +Index: ekpnavi/ekpcom.c +diff -u -p ekpnavi/ekpcom.c.orig ekpnavi/ekpcom.c +--- ekpnavi/ekpcom.c.orig Wed Jul 30 23:06:39 2003 ++++ ekpnavi/ekpcom.c Tue Aug 24 23:37:45 2004 +@@ -42,15 +42,25 @@ sock_open (void) + { + int sockfd, len; + struct sockaddr_in address; ++#ifndef MSG_NOSIGNAL ++ const int on = 1; ++#endif + + if (server_sock_fd >= 0) + return 0; + + /* ソケットオープン */ + sockfd = socket (AF_INET, SOCK_STREAM, 0); ++#if !defined(MSG_NOSIGNAL) && defined(SO_NOSIGPIPE) ++ setsockopt(sockfd, SOL_SOCKET, SO_NOSIGPIPE, &on, sizeof(on)); ++#endif ++ memset(&address, 0, sizeof(address)); + address.sin_family = AF_INET; + address.sin_addr.s_addr = htonl (INADDR_ANY); + address.sin_port = htons (35586); ++#ifdef __FreeBSD__ ++ address.sin_len = sizeof(address); ++#endif + len = sizeof (address); + if (connect (sockfd, (struct sockaddr *)&address, len)) + { +@@ -92,7 +102,11 @@ sock_write (char* buf, int* lp_wsize) + packet[4] = size % 0xFF; + memcpy (packet + Header_Size, buf, size); + ++#ifndef MSG_NOSIGNAL ++ size = send (server_sock_fd, packet, size + Header_Size, 0); ++#else + size = send (server_sock_fd, packet, size + Header_Size, MSG_NOSIGNAL); ++#endif + + if (size < 0) + return -1; +@@ -116,7 +130,11 @@ sock_read (char* buf, int* lp_rsize) + if (size <= 0) + return 0; + ++#ifndef MSG_NOSIGNAL ++ dsize = recv (server_sock_fd, packet, size, 0); ++#else + dsize = recv (server_sock_fd, packet, size, MSG_NOSIGNAL); ++#endif + + if (dsize < 0) + return -1; +Index: ekpstm/ekpcom.c +diff -u -p ekpstm/ekpcom.c.orig ekpstm/ekpcom.c +--- ekpstm/ekpcom.c.orig Thu Jul 31 15:01:39 2003 ++++ ekpstm/ekpcom.c Tue Aug 24 23:37:56 2004 +@@ -42,15 +42,25 @@ sock_open (void) + { + int sockfd, len; + struct sockaddr_in address; ++#ifndef MSG_NOSIGNAL ++ const int on = 1; ++#endif + + if (server_sock_fd >= 0) + return 0; + + /* ソケットオープン */ + sockfd = socket (AF_INET, SOCK_STREAM, 0); ++#if !defined(MSG_NOSIGNAL) && defined(SO_NOSIGPIPE) ++ setsockopt(sockfd, SOL_SOCKET, SO_NOSIGPIPE, &on, sizeof(on)); ++#endif ++ memset(&address, 0, sizeof(address)); + address.sin_family = AF_INET; + address.sin_addr.s_addr = htonl (INADDR_ANY); + address.sin_port = htons (35586); ++#ifdef __FreeBSD__ ++ address.sin_len = sizeof(address); ++#endif + len = sizeof (address); + if (connect (sockfd, (struct sockaddr *)&address, len)) + { +@@ -92,7 +102,11 @@ sock_write (char* buf, int* lp_wsize) + packet[4] = size % 0xFF; + memcpy (packet + Header_Size, buf, size); + ++#ifndef MSG_NOSIGNAL ++ size = send (server_sock_fd, packet, size + Header_Size, 0); ++#else + size = send (server_sock_fd, packet, size + Header_Size, MSG_NOSIGNAL); ++#endif + + if (size < 0) + return -1; +@@ -116,7 +130,11 @@ sock_read (char* buf, int* lp_rsize) + if (size <= 0) + return 0; + ++#ifndef MSG_NOSIGNAL ++ dsize = recv (server_sock_fd, packet, size, 0); ++#else + dsize = recv (server_sock_fd, packet, size, MSG_NOSIGNAL); ++#endif + + if (dsize < 0) + return -1; +Index: ekpstm/main.c +diff -u -p ekpstm/main.c.orig ekpstm/main.c +--- ekpstm/main.c.orig Thu Jul 31 15:01:39 2003 ++++ ekpstm/main.c Tue Aug 24 19:41:40 2004 +@@ -69,6 +69,7 @@ main (int argc, char *argv[]) + break; + + default: ++ break; + } + } + +Index: src/Makefile.in +diff -u src/Makefile.in.orig src/Makefile.in +--- src/Makefile.in.orig Fri Oct 24 16:12:54 2003 ++++ src/Makefile.in Tue Aug 24 19:41:40 2004 +@@ -131,7 +131,7 @@ + # CUPS + AM_CFLAGS = -DGS_PATH=\"gs\" -DLOCALEDIR=\"$(datadir)/locale\" -DPRINTER_MODEL="\"$(MODEL_FULL)\"" -D$(MODEL_L) -DLIBPATH=\"$(libdir)/lib$(MODEL).so\" -DRSC_PATH=\"$(sysconfdir)/pipsrc\" -DSPOOL_NAME=\"$(MODEL)\" -DLOCALE_PATH=\"$(datadir)/locale\" -DNAVI_PATH=\"$(bindir)/ekpnavi\" -DDATA_PATH=\"$(pkgdatadir)\" -DRULED_PATH=\"$(pkgdatadir)/BID.PRN\" -DPATCH_PATH=\"$(pkgdatadir)/PATCH.PRN\" -DBAND_PATH=\"$(pkgdatadir)/BAND.PRN\" -DCUT_PATH=\"$(pkgdatadir)/CUT.PRN\" -D_LPR_DIRECT -fsigned-char -DCUPS_FILTER_PATH=\"$(cupsfilterdir)\" + +-INCLUDES = @GTK_CFLAGS@ ++INCLUDES = @GTK_CFLAGS@ $(INCLTDL) + + libcutils_la_SOURCES = str.c str.h err.c err.h csv.c csv.h mem.c mem.h def.h + +@@ -146,12 +146,12 @@ + rastertopips_SOURCES = rastertopips.c + + +-pipstoprinter_LDFLAGS = @LIBLTDL@ @CUPS_LIBS@ libcutils.la ++pipstoprinter_LDFLAGS = @LIBLTDL@ @CUPS_LIBS@ -lintl libcutils.la + + pipstoprinter_SOURCES = pipstoprinter.c libprtX.h debug.c debug.h ekpcom.c ekpcom.h getstat.c getstat.h + + +-ekplp_LDFLAGS = @CUPS_LIBS@ libcutils.la ++ekplp_LDFLAGS = @CUPS_LIBS@ -lintl libcutils.la + + ekplp_SOURCES = ekplp.c + +Index: src/ekpcom.c +diff -u -p src/ekpcom.c.orig src/ekpcom.c +--- src/ekpcom.c.orig Wed Jul 30 22:11:04 2003 ++++ src/ekpcom.c Tue Aug 24 23:37:59 2004 +@@ -52,15 +52,25 @@ sock_open (void) + { + int sockfd, len; + struct sockaddr_in address; ++#ifndef MSG_NOSIGNAL ++ const int on = 1; ++#endif + + if (server_sock_fd >= 0) + return 0; + + /* Socket open */ + sockfd = socket (AF_INET, SOCK_STREAM, 0); ++#if !defined(MSG_NOSIGNAL) && defined(SO_NOSIGPIPE) ++ setsockopt(sockfd, SOL_SOCKET, SO_NOSIGPIPE, &on, sizeof(on)); ++#endif ++ memset(&address, 0, sizeof(address)); + address.sin_family = AF_INET; + address.sin_addr.s_addr = htonl (INADDR_ANY); + address.sin_port = htons (PORT_NUMBER); ++#ifdef __FreeBSD__ ++ address.sin_len = sizeof(address); ++#endif + len = sizeof (address); + if (connect (sockfd, (struct sockaddr *)&address, len)) + { +@@ -102,7 +112,11 @@ sock_write (char* buf, int* lp_wsize) + packet[4] = size % 0xFF; + memcpy (packet + Header_Size, buf, size); + ++#ifndef MSG_NOSIGNAL ++ size = send (server_sock_fd, packet, size + Header_Size, 0); ++#else + size = send (server_sock_fd, packet, size + Header_Size, MSG_NOSIGNAL); ++#endif + + if (size < 0) + return -1; +@@ -126,7 +140,11 @@ sock_read (char* buf, int* lp_rsize) + if (size <= 0) + return 0; + ++#ifndef MSG_NOSIGNAL ++ dsize = recv (server_sock_fd, packet, size, 0); ++#else + dsize = recv (server_sock_fd, packet, size, MSG_NOSIGNAL); ++#endif + + if (dsize < 0) + return -1; +Index: src/rastertopips.c +diff -u -p src/rastertopips.c.orig src/rastertopips.c +--- src/rastertopips.c.orig Thu Sep 4 13:34:25 2003 ++++ src/rastertopips.c Tue Aug 24 19:41:41 2004 +@@ -32,6 +32,8 @@ + #include <string.h> + #include <ctype.h> + ++#define NAME_MAX 41 ++ + #define WIDTH_BYTES(bits) (((bits) + 31) / 32 * 4) + + typedef struct rtp_filter_option { diff --git a/print/pips800/files/extra-patch-2.6.2-dtrfilter b/print/pips800/files/extra-patch-2.6.2-dtrfilter new file mode 100644 index 000000000000..107dc52c2ec7 --- /dev/null +++ b/print/pips800/files/extra-patch-2.6.2-dtrfilter @@ -0,0 +1,31 @@ +Index: dtrfilter/main.c +diff -u -p dtrfilter/main.c.orig dtrfilter/main.c +--- dtrfilter/main.c.orig Tue Jun 24 15:25:32 2003 ++++ dtrfilter/main.c Tue Aug 24 19:41:40 2004 +@@ -148,3 +148,26 @@ dtr_fatal (char* msg) + exit (1); + } + ++#if defined(__FreeBSD__) && __GNUC__ > 2 ++ ++int __rethrow = 0; ++ ++void * ++__builtin_new(size_t sz /* XXX: ,std::nothrow_t& nothrow */) ++{ ++ void *p; ++ ++ if (sz == 0) ++ sz = 1; ++ p = malloc(sz); ++ /* XXX: ERROR HANDLER is not available */ ++ return p; ++} ++void ++__builtin_delete(void *ptr) ++{ ++ if (ptr) ++ free(ptr); ++} ++ ++#endif diff --git a/print/pips800/files/extra-patch-2.6.2-lpr b/print/pips800/files/extra-patch-2.6.2-lpr new file mode 100644 index 000000000000..57f9993dc55e --- /dev/null +++ b/print/pips800/files/extra-patch-2.6.2-lpr @@ -0,0 +1,233 @@ +Index: ekpnavi/Makefile.in +diff -u ekpnavi/Makefile.in.orig ekpnavi/Makefile.in +--- ekpnavi/Makefile.in.orig Fri Dec 20 00:09:56 2002 ++++ ekpnavi/Makefile.in Wed Aug 25 18:57:41 2004 +@@ -232,7 +232,7 @@ + if test ! -s Makefile; then \ + ./configure --prefix=$(prefix) ;\ + fi ;\ +- make ++ $(MAKE) + + clean-local: + if test -d $(srcdir)/$(EKPNAVI_PKGNAME); then \ +@@ -243,7 +243,7 @@ + install-exec-local: + if test -d $(srcdir)/$(EKPNAVI_PKGNAME); then \ + cd $(srcdir)/$(EKPNAVI_PKGNAME) ;\ +- make install ;\ ++ $(MAKE) install ;\ + fi + + $(EKPNAVI_PKGNAME).tar.gz: +Index: ekpnavi/ekpnavi-1.1.2/src/ekpcom.c +diff -u -p ekpnavi/ekpnavi-1.1.2/src/ekpcom.c.orig ekpnavi/ekpnavi-1.1.2/src/ekpcom.c +--- ekpnavi/ekpnavi-1.1.2/src/ekpcom.c.orig Wed Jul 30 23:06:39 2003 ++++ ekpnavi/ekpnavi-1.1.2/src/ekpcom.c Tue Aug 24 23:37:45 2004 +@@ -42,15 +42,25 @@ sock_open (void) + { + int sockfd, len; + struct sockaddr_in address; ++#ifndef MSG_NOSIGNAL ++ const int on = 1; ++#endif + + if (server_sock_fd >= 0) + return 0; + + /* ソケットオープン */ + sockfd = socket (AF_INET, SOCK_STREAM, 0); ++#if !defined(MSG_NOSIGNAL) && defined(SO_NOSIGPIPE) ++ setsockopt(sockfd, SOL_SOCKET, SO_NOSIGPIPE, &on, sizeof(on)); ++#endif ++ memset(&address, 0, sizeof(address)); + address.sin_family = AF_INET; + address.sin_addr.s_addr = htonl (INADDR_ANY); + address.sin_port = htons (35586); ++#ifdef __FreeBSD__ ++ address.sin_len = sizeof(address); ++#endif + len = sizeof (address); + if (connect (sockfd, (struct sockaddr *)&address, len)) + { +@@ -92,7 +102,11 @@ sock_write (char* buf, int* lp_wsize) + packet[4] = size % 0xFF; + memcpy (packet + Header_Size, buf, size); + ++#ifndef MSG_NOSIGNAL ++ size = send (server_sock_fd, packet, size + Header_Size, 0); ++#else + size = send (server_sock_fd, packet, size + Header_Size, MSG_NOSIGNAL); ++#endif + + if (size < 0) + return -1; +@@ -116,7 +130,11 @@ sock_read (char* buf, int* lp_rsize) + if (size <= 0) + return 0; + ++#ifndef MSG_NOSIGNAL ++ dsize = recv (server_sock_fd, packet, size, 0); ++#else + dsize = recv (server_sock_fd, packet, size, MSG_NOSIGNAL); ++#endif + + if (dsize < 0) + return -1; ++ #ifdef __FreeBSD__ ++ address.sin_len = sizeof(address); ++ #endif +Index: ekpstm/Makefile.in +diff -u ekpstm/Makefile.in.orig ekpstm/Makefile.in +--- ekpstm/Makefile.in.orig Fri Dec 20 00:09:56 2002 ++++ ekpstm/Makefile.in Wed Aug 25 18:55:20 2004 +@@ -213,7 +213,7 @@ + ./configure --prefix=$(prefix) ;\ + fi ;\ + fi ;\ +- make ++ $(MAKE) + + clean-local: + if test -d $(srcdir)/$(EKPSTM_PKGNAME); then \ +@@ -224,7 +224,7 @@ + install-exec-local: + if test -d $(srcdir)/$(EKPSTM_PKGNAME); then \ + cd $(srcdir)/$(EKPSTM_PKGNAME) ;\ +- make install ;\ ++ $(MAKE) install ;\ + fi + + #dist-hook: +Index: ekpstm/ekpstm-1.0.2/src/ekpcom.c +diff -u -p ekpstm/ekpstm-1.0.2/src/ekpcom.c.orig ekpstm/ekpstm-1.0.2/src/ekpcom.c +--- ekpstm/ekpstm-1.0.2/src/ekpcom.c.orig Sat Oct 19 13:01:51 2002 ++++ ekpstm/ekpstm-1.0.2/src/ekpcom.c Wed Aug 25 18:34:15 2004 +@@ -52,14 +52,24 @@ sock_open (void) + { + int sockfd, len; + struct sockaddr_in address; ++#ifndef MSG_NOSIGNAL ++ const int on = 1; ++#endif + + if (server_sock_fd >= 0) + return 0; + + sockfd = socket (AF_INET, SOCK_STREAM, 0); ++#if !defined(MSG_NOSIGNAL) && defined(SO_NOSIGPIPE) ++ setsockopt(sockfd, SOL_SOCKET, SO_NOSIGPIPE, &on, sizeof(on)); ++#endif ++ memset(&address, 0, sizeof(address)); + address.sin_family = AF_INET; + address.sin_addr.s_addr = htonl (INADDR_ANY); + address.sin_port = htons (35586); /* did hard coding in port number (35586) */ ++#ifdef __FreeBSD__ ++ address.sin_len = sizeof(address); ++#endif + len = sizeof (address); + if (connect (sockfd, (struct sockaddr *)&address, len)) + { +@@ -114,7 +124,11 @@ sock_write (char* buf, int* lp_wsize) + packet[4] = size % 0xFF; /* date size (lower) */ + memcpy (packet + Header_Size, buf, size); /* date */ + ++#ifndef MSG_NOSIGNAL ++ size = send (server_sock_fd, packet, size + Header_Size, 0); ++#else + size = send (server_sock_fd, packet, size + Header_Size, MSG_NOSIGNAL); ++#endif + + if (size < 0) + return -1; +@@ -144,7 +158,11 @@ sock_read (char* buf, int* lp_rsize) + if (size <= 0) + return 0; + ++#ifndef MSG_NOSIGNAL ++ dsize = recv (server_sock_fd, packet, size, 0); ++#else + dsize = recv (server_sock_fd, packet, size, MSG_NOSIGNAL); ++#endif + + if (dsize < 0) + return -1; +Index: ekpstm/ekpstm-1.0.2/src/main.c +diff -u -p ekpstm/ekpstm-1.0.2/src/main.c.orig ekpstm/ekpstm-1.0.2/src/main.c +--- ekpstm/ekpstm-1.0.2/src/main.c.orig Thu Jul 31 15:01:39 2003 ++++ ekpstm/ekpstm-1.0.2/src/main.c Tue Aug 24 19:41:40 2004 +@@ -69,6 +69,7 @@ main (int argc, char *argv[]) + break; + + default: ++ break; + } + } + +Index: src/Makefile.in +diff -u src/Makefile.in.orig src/Makefile.in +--- src/Makefile.in.orig Fri Dec 20 00:09:54 2002 ++++ src/Makefile.in Wed Aug 25 18:31:51 2004 +@@ -104,7 +104,7 @@ + MODEL_L = $(shell echo $(MODEL) | tr [:lower:] [:upper:]) + CFLAGS = -DGS_PATH=\"gs\" -DLOCALEDIR=\"$(datadir)/locale\" -DPRINTER_MODEL="\"$(MODEL_FULL)\"" -D$(MODEL_L) -DLIBPATH=\"$(libdir)/lib$(MODEL).so\" -DRSC_PATH=\"$(sysconfdir)/pipsrc\" -DSPOOL_NAME=\"$(MODEL)\" -DLOCALE_PATH=\"$(datadir)/locale\" -DNAVI_PATH=\"$(bindir)/ekpnavi\" -DDATA_PATH=\"$(pkgdatadir)\" -DRULED_PATH=\"$(pkgdatadir)/BID.PRN\" -DPATCH_PATH=\"$(pkgdatadir)/PATCH.PRN\" -DBAND_PATH=\"$(pkgdatadir)/BAND.PRN\" -DCUT_PATH=\"$(pkgdatadir)/CUT.PRN\" -D_LPR_DIRECT @CFLAGS@ -fsigned-char + +-INCLUDES = @GTK_CFLAGS@ ++INCLUDES = @GTK_CFLAGS@ $(INCLTDL) + + FILTER_RESOURCE = opt$(MODEL_L).rsc + +Index: src/ekpcom.c +diff -u -p src/ekpcom.c.orig src/ekpcom.c +--- src/ekpcom.c.orig Sat Oct 19 16:56:12 2002 ++++ src/ekpcom.c Wed Aug 25 18:40:11 2004 +@@ -51,15 +51,25 @@ sock_open (void) + { + int sockfd, len; + struct sockaddr_in address; ++#ifndef MSG_NOSIGNAL ++ const int on = 1; ++#endif + + if (server_sock_fd >= 0) + return 0; + + /* ソケットオープン */ + sockfd = socket (AF_INET, SOCK_STREAM, 0); ++#if !defined(MSG_NOSIGNAL) && defined(SO_NOSIGPIPE) ++ setsockopt(sockfd, SOL_SOCKET, SO_NOSIGPIPE, &on, sizeof(on)); ++#endif ++ memset(&address, 0, sizeof(address)); + address.sin_family = AF_INET; + address.sin_addr.s_addr = htonl (INADDR_ANY); + address.sin_port = htons (35586); ++#ifdef __FreeBSD__ ++ address.sin_len = sizeof(address); ++#endif + len = sizeof (address); + if (connect (sockfd, (struct sockaddr *)&address, len)) + { +@@ -101,7 +111,11 @@ sock_write (char* buf, int* lp_wsize) + packet[4] = size % 0xFF; + memcpy (packet + Header_Size, buf, size); + ++#ifndef MSG_NOSIGNAL ++ size = send (server_sock_fd, packet, size + Header_Size, 0); ++#else + size = send (server_sock_fd, packet, size + Header_Size, MSG_NOSIGNAL); ++#endif + + if (size < 0) + return -1; +@@ -125,7 +139,11 @@ sock_read (char* buf, int* lp_rsize) + if (size <= 0) + return 0; + ++#ifndef MSG_NOSIGNAL ++ dsize = recv (server_sock_fd, packet, size, 0); ++#else + dsize = recv (server_sock_fd, packet, size, MSG_NOSIGNAL); ++#endif + + if (dsize < 0) + return -1; diff --git a/print/pips800/files/filter13.rev b/print/pips800/files/filter13.rev deleted file mode 100644 index 7a5cdc9c487b..000000000000 --- a/print/pips800/files/filter13.rev +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -PATH=${PATH}:/usr/bin:/usr/local/bin - -GSCONF=/usr/local/EPKowa/PM800C/gsconfig800 -PIPS=/usr/local/bin/pips800 - -TMP=/tmp/pips.$$ - -trap "rm -rf $TMP; exit" 0 2 3 4 6 7 8 10 11 12 13 15 -psselect -r > $TMP -# To support printing via USB port for Ver. 1.3 (only pips3300) -perl -e 'print "\000\000\000\033\001\@EJL\ 1284.4\n\@EJL \n\033\@"' -${GSCONF} < $TMP | ${PIPS} -ui C -rm -rf $TMP diff --git a/print/pips800/files/pips.sh b/print/pips800/files/pips.sh new file mode 100644 index 000000000000..81e79446bf70 --- /dev/null +++ b/print/pips800/files/pips.sh @@ -0,0 +1,28 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: pips +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: FreeBSD shutdown + +# Define these pips_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/pips +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# +pips_enable=${pips_enable:-"YES"} # Enable pips + +. %%RC_SUBR%% + +name="pips" +rcvar=`set_rcvar` +start_cmd="/sbin/ldconfig -m %%PREFIX%%/lib/pips" +stop_cmd=":" + +load_rc_config $name +run_rc_command "$1" diff --git a/print/pips800/files/readme_for_zh b/print/pips800/files/readme_for_zh deleted file mode 100644 index 6c7ff5ff49ff..000000000000 --- a/print/pips800/files/readme_for_zh +++ /dev/null @@ -1,32 +0,0 @@ -Notice for "env LANG=zh_CN pips800" and "env LANG=zh_TW.Big5 pips800" - -(1) Installing zh-linux-gtk and zh-cle_base leads not to work well -commands with the other locales. So this port depends on yet another -linux_locale for Chinese: chinese/linux_locale. - -(2) You add the following two files by hand: - -[/compat/linux/etc/gtk/gtkrc.zh_CN.GB2312] -style "default" { - fontset = "-adobe-helvetica-medium-r-normal--14-100-100-100-p-76-iso8859-1,\ - -*-*-medium-*-*--16-*-*-*-*-*-gb2312.1980-*" -} -class "GtkWidget" style "default" - - -[/compat/linux/etc/gtk/gtkrc.zh_TW.Big5] -style "default" { - fontset = "-adobe-helvetica-medium-r-normal--14-100-100-100-p-76-iso8859-1,\ - -*-*-medium-*-*-*-16-*-*-*-*-*-big5-*" -} -class "GtkWidget" style "default" - -and make a symlink by the next command: - -# ln -s gtkrc.zh_CN.GB2312 /compat/linux/etc/gtk/gtkrc.zh_CN - -(3) You have to install suitable fonts for zh_TW.Big5, -e.g. zh-cmexfonts. - -(4) But "env LANG=zh_CN pips800" dose not work well even if you do the -above (1) through (3). diff --git a/print/pips800/files/setup b/print/pips800/files/setup index 7388c31c101b..488d05be101c 100644 --- a/print/pips800/files/setup +++ b/print/pips800/files/setup @@ -6,13 +6,13 @@ ### in pips900-2.1.i386.tgz ### by taoka -SCRIPT_PATH=%%PREFIX%%/libexec/pips%%PRTYPE%%/scripts +SCRIPT_PATH=%%PREFIX%%/libexec/pips/%%PRT_MODEL%%/scripts PRT_MODEL=%%PRT_MODEL%% PIPS_COMMAND=pips%%PRTYPE%% -PIPS_FILTER_PATH=%%PREFIX%%/libexec/%%BASE_NAME%%/filter%%PRTYPE%%.rev +PIPS_FILTER_PATH=%%PREFIX%%/libexec/pips/%%PRT_MODEL%%/filter%%PRTYPE%%.rev -SETUP_PATH=%%PREFIX%%/libexec/pips%%PRTYPE%%/setup -EKPDRC=%%LINUXBASE%%/etc/ekpdrc +SETUP_PATH=%%PREFIX%%/libexec/pips/%%PRT_MODEL%%/setup +EKPDRC=%%PREFIX%%/etc/ekpdrc VERSION=%%VERSION%% DEF_PRT_PATH=/dev/ulpt0 WITH_EKPD=%%WITH_EKPD%% |