I got myself a new printer, and I couldn't find a good driver for it in ports. But it seems that the source for pips-lite is available. Has anybody tried to port this?
Making all in filter-l2
/bin/sh ../../libtool --tag=CC --mode=link gcc
-CUPS_FILTER_PATH=\"/usr/local/local/libexec/cups/filter\"
-I../../lib-l2 -I../../src/filter-l2/ -g -O2
-Wall -o pipslitel2-filter analyze.o animate.o annotate.o attribute.o blob.o channel.o
color.o colorspace.o command.o composite.o compress.o constitute.o decorate.o delegate.o deprecate.o
display.o draw.o effect.o enhance.o error.o fx.o gem.o image.o list.o locale.o log.o magic.o
magick.o magick_endian.o map.o memory.o module.o monitor.o montage.o operator.o paint.o
pixel_cache.o pixel_iterator.o PreRvIcccm.o profile.o quantize.o registry.o render.o resize.o
resource.o segment.o semaphore.o shear.o signature.o static.o sun.o tempfile.o timer.o transform.o
tsd.o type.o unix_port.o utility.o version.o widget.o xwindow.o l2filter.o ../../lib-l2/liblitel2.la
-lcups -lm -lcupsimage -lcups -ljpeg -lm -lpthread
gcc -DCUPS_FILTER_PATH=\"/usr/local/local/libexec/cups/filter\" -I../../lib-l2 -I../../src/filter-l2/ -g
-O2 -Wall -o .libs/pipslitel2-filter analyze.o animate.o annotate.o attribute.o blob.o channel.o color.o
colorspace.o command.o composite.o compress.o constitute.o decorate.o delegate.o deprecate.o display.o
draw.o effect.o enhance.o error.o fx.o gem.o image.o list.o locale.o log.o magic.o magick.o
magick_endian.o map.o memory.o module.o monitor.o montage.o operator.o paint.o pixel_cache.o
pixel_iterator.o PreRvIcccm.o profile.o quantize.o registry.o render.o resize.o resource.o segment.o
semaphore.o shear.o signature.o static.o sun.o tempfile.o timer.o transform.o tsd.o type.o unix_port.o
utility.o version.o widget.o xwindow.o l2filter.o ../../lib-l2/.libs/liblitel2.so -lcupsimage -lcups
-ljpeg -lm -lpthread -Wl,--rpath -Wl, /usr/local/lib
/usr/bin/ld: cannot find -lcupsimage
*** Error code 1
Stop in /usr/home/tingo/work/pipslite/src/filter-l2.
*** Error code 1
Stop in /usr/home/tingo/work/pipslite/src.
*** Error code 1
Stop in /usr/home/tingo/work/pipslite.
*** Error code 1
Stop in /usr/home/tingo/work/pipslite.
# cups-config
:root@kg-v2# cups-config --ldflags
-Wl,-R/usr/local/lib -L/usr/local/lib
tingo@kg-v2$ grep CUPS_LDFLAGS ./src/filter-l2/Makefile
CUPS_LDFLAGS = -Wl,-R/usr/local/lib -L/usr/local/lib
root@kg-v2# portversion -v | grep cups
cups-base-1.4.6_4 = up-to-date with port
cups-client-1.4.6 = up-to-date with port
cups-image-1.4.6 = up-to-date with port
cups-pstoraster-8.15.4_6 = up-to-date with port
$ ./configure --with-libintl-prefix=/usr/local LIBS=-lintl LDFLAGS=-L/usr/local/lib
$ make clean; make
gcc -DHAVE_CONFIG_H -I. -I.. -I../src/filter-l2/magick -DCONFIG_FILE_PATH=\"/usr/local/etc/pipslite/pipslitedrc\" -I/usr/local/include
-g -O2 -Wall -MT cbtd_setup.o -MD -MP -MF .deps/cbtd_setup.Tpo -c -o cbtd_setup.o cbtd_setup.c
cbtd_setup.c: In function 'is_searching_printer':
cbtd_setup.c:70: error: '_IOC_READ' undeclared (first use in this function)
cbtd_setup.c:70: error: (Each undeclared identifier is reported only once
cbtd_setup.c:70: error: for each function it appears in.)
*** Error code 1
Stop in /usr/home/tingo/work/pipslite/daemon.
*** Error code 1
Stop in /usr/home/tingo/work/pipslite/daemon.
*** Error code 1
Stop in /usr/home/tingo/work/pipslite.
*** Error code 1
Stop in /usr/home/tingo/work/pipslite.
That's the idea, I just need to get it to compile first. Hopefully I will have some time to work on it this week.wblock said:Make a port, using one of the other CUPS filter ports as a template.
--- daemon/cbtd_setup.c.orig 2011-05-31 18:56:45.813178092 +0200
+++ daemon/cbtd_setup.c 2011-05-31 18:57:29.557178284 +0200
@@ -31,6 +31,7 @@
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/ioccom.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <unistd.h>
@@ -67,7 +68,7 @@
memset(deviceid, 0x00, DEVICEID_LENGTH);
/* GET_DEVICE_ID = 1 */
- int iostatus = ioctl(fd, _IOC(_IOC_READ, 'P', 1, DEVICEID_LENGTH), deviceid);
+ int iostatus = ioctl(fd, _IOC(IOC_OUT, 'P', 1, DEVICEID_LENGTH), deviceid);
if (iostatus == 0) {
if (strstr(deviceid + 2, printer)) {
result = 0; /* found */
tingo said:That's the idea, I just need to get it to compile first. Hopefully I will have some time to work on it this week.
acheron said:I was able to compile it with the following patch:
gcc -g -O2 -Wall -o pipslited cbtd.o cbtd_comserv.o cbtd_datatrans.o cbtd_setup.o cbtd_signal.o cbtd_thread.o cbtd_wrapper.o ecbteg.o
daemon_osfunc.o -L/usr/local/lib -lpthread /usr/local/lib/libintl.so /usr/local/lib/libiconv.so -Wl,--rpath -Wl,/usr/local/lib -Wl,
--rpath -Wl,/usr/local/lib
sed "s,%model_name%,lite,; s,%default_devpath%,/dev/usb/lp0," > pipslitedrc
gcc -DHAVE_CONFIG_H -I. -I.. -I../src/filter-l2/magick -I../src -I../status-monitor -D_THREAD_SAFE -D_REENTRANT -I/usr/local/include/gtk-2.0
-I/usr/local/lib/gtk-2.0/include -I/usr/local/include/atk-1.0 -I/usr/local/include/cairo -I/usr/local/include/gdk-pixbuf-2.0
-I/usr/local/include/pango-1.0 -I/usr/local/include/gio-unix-2.0/ -I/usr/local/include -I/usr/local/include/glib-2.0
-I/usr/local/lib/glib-2.0/include -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/local/include/drm
-I/usr/local/include -DPRTOPT_PATH=\"/usr/local/var/cache/pipslite/prtOpt.csv\" -DPAPER_PATH=\"/usr/local/share/pipslite/paper_list.csv\"
-DCACHEDIR_PATH=\"/usr/local/var/cache/pipslite/\" -DPPDINSTALL_SH=\"/usr/local/lib/pipslite/scripts/install-ppd.sh\" -g -O2 -Wall
-MT utility.o -MD -MP -MF .deps/utility.Tpo -c -o utility.o utility.c
utility.c: In function 'list_create_index':
utility.c:328: error: '__compar_fn_t' undeclared (first use in this function)
utility.c:328: error: (Each undeclared identifier is reported only once
utility.c:328: error: for each function it appears in.)
utility.c:328: error: expected ')' before 'list_handle'
utility.c: In function 'list_find_item':
utility.c:363: error: '__compar_fn_t' undeclared (first use in this function)
utility.c:363: error: expected ')' before 'list_handle'
gmake[2]: *** [utility.o] Error 1
gmake[2]: Leaving directory `/usr/home/tingo/work/pipslite/makeinstall'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/home/tingo/work/pipslite'
gmake: *** [all] Error 2
wblock said:I meant that copying one of the existing ports may show how to get this one to compile on FreeBSD.
tingo@kg-v2$ pwd
/home/tingo/work/pipslite
tingo@kg-v2$ find . -type f -perm +a=x -print
./debian/rules
./src/filter-l2/.libs/pipslitel2-filter
./src/filter-l2/pipslitel2-filter
./src/pipslitelp
./src/pipslite-wrapper
./src/pipslite-filter
./makeinstall/pipslite-install
./config.guess
./status-monitor/pipslitestm
./missing
./lib/.libs/liblite.so.1
./mkinstalldirs
./depcomp
./daemon/pipslited
./install-sh
./config.sub
./configure
./lib-l2/.libs/liblitel2.so.1
./libtool
./config.status
su; gmake install
root@kg-v2# cp -pv /usr/local/local/libexec/cups/filter/p* /usr/local/libexec/cups/filter
/usr/local/local/libexec/cups/filter/pipslitel2-filter -> /usr/local/libexec/cups/filter/pipslitel2-filter
/usr/local/local/libexec/cups/filter/pipslite-wrapper -> /usr/local/libexec/cups/filter/pipslite-wrapper
/usr/local/local/libexec/cups/filter/pipslite-filter -> /usr/local/libexec/cups/filter/pipslite-filter
root@kg-v2#
$ lpr -P printer filename.pdf
stopped
"/usr/local/libexec/cups/filter/pstoraster failed"