Subject: pkg/13902: please add Samsung GDI driver to ghostscript package (includes partial patch)
To: None <gnats-bugs@gnats.netbsd.org>
From: None <tls@rek.tjls.com>
List: netbsd-bugs
Date: 09/08/2001 17:16:19
>Number:         13902
>Category:       pkg
>Synopsis:       Samsung makes two very inexpensive 600dpi lasers, the ML-85 and ML-4500.  There's a GhostScript 5.5 driver available; I've tweaked it for 6.0.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Sep 08 14:17:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Thor Lancelot Simon
>Release:        pkgsrc of 2001-09-08
>Organization:
very little
>Environment:
System: NetBSD rekusant.sr.tjls.com 1.5X NetBSD 1.5X (REKUSANT) #44: Fri Sep 7 14:50:57 EDT 2001 root@rekusant.sr.tjls.com:/lfs/src/sys/arch/i386/compile/REKUSANT i386
Architecture: i386
Machine: i386
>Description:
	Samsung makes two very inexpensive 600dpi lasers, the ML-85 and
	ML-4500.  There's a GhostScript 5.5 driver available, but it's not
	quite a drop-in for GhostScript 6.0.  I've tweaked the driver and
	its Makefile fragment, but I don't quite grasp how our ghostscript
	package works, so it's probably simplest if someone else adds it to
	our package build.
>How-To-Repeat:
	Try to use a Samsung ML-4500 with GhostScript.  Note that there's
	no driver.
>Fix:
The original Samsung driver is available at 
http://www.linuxprinting.org/download/printing/samsung-gdi-driver.tar.gz 
but it requires a few small changes to work with 6.01.  First off, it has
a use of the obsolete _ds type modifier, which is no longer in any GS header
file.  Easy to fix, just delete it.  Second, its Makefile fragments are for
the old 5.5 GS build framework.  Third, it includes a GS header file that
includes the generated GS "arch.h" header file, but for some reason the
generated header files aren't in the include path with our package build;
I tried to fix this and got lost in .buildlink confusion.  This is probably
easy for an experienced pkgsrc person to fix (I cheated and copied arch.h
to somewhere where it'd be found). :-)

I'm not going to cut-and-paste in the whole driver source file; that would
be silly.  Just grab it and whack the one instance of _ds from the C source.
Here are adjusted Makefile fragments:

For contrib.mak (I actually had this in devs.mak, but our package seems to
put everything in contrib.mak...)

### ---------------- The Samsung SmartGDI laser printer devices --------- ###
### Note : this driver is used by Samsung SmartGDI compatible printers.   ###
###        
GDIMONO=gdevgdi.$(OBJ) $(HPPCL)

gdevgdi.$(OBJ): $(GLSRC)gdevgdi.c $(PDEVH) $(gdevpcl_h)
$(DD)gdi.dev: $(GDIMONO) $(GLD)page.dev
	$(SETPDEV) $(DD)gdi $(GDIMONO)

And for unix-gcc.mak, add $(DD)gdi.dev to our inserted driver list.

>Release-Note:
>Audit-Trail:
>Unformatted: