Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Ghostscript + GDI
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Miles
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jun 2002
Posts: 97
Location: London, UK

PostPosted: Sun Jun 23, 2002 12:52 am    Post subject: Ghostscript + GDI Reply with quote

I'm trying to compile ghostscript with the GDI driver so it will support my printer (Samsung ML-4500). Rather than just compile it from scratch I'd prefer to integrate it into the ghostscript ebuild script.

The relavent file is:

http://www.linuxprinting.org/download/printing/samsung-gdi/Samsung-SmartGDI-all-GS.tar.gz

Which contains just three files, README, gdevgdi.c and smartgdi-contrib.mak.

The installation instructions say to do the following (in the ghostscript directory):

mv gdevgdi.c src/
cat smartgdi-contrib.mak >> src/contrib.mak

Then run configure with --with-driver=gdi

So I editted the ebuild script for ghostscript-7.05 by adding the file to the SRC_URI variable and the following commands after the other unpack commands:

unpack Samsung-SmartGDI-all-GS.tar.gz

rm README
mv gdevgdi.c ${S}/src/
cat smartgdi-contrib.mak >> ${S}/src/contrib.mak

and added the appropriate flag to configure.

The problem is that it compiles fine but my printer still doesn't work so I'm assuming it failed to include the changed files.

This is the first time I've attempted to edit a ebuild script (I installed Gentoo yesterday) but it looks fairly straight forward.

Does anyone have an idea of where I went wrong?
Back to top
View user's profile Send private message
rommel
Veteran
Veteran


Joined: 19 Apr 2002
Posts: 1145
Location: Williamsburg Virginia

PostPosted: Mon Jun 24, 2002 10:41 pm    Post subject: Reply with quote

i couldnt get my ml-4500 to work with the new ghostscript...i ahd to unmerge and emerge 6.53 ....is this what your trying to fix by compiling in support for it directly?
Back to top
View user's profile Send private message
Miles
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jun 2002
Posts: 97
Location: London, UK

PostPosted: Tue Jun 25, 2002 2:05 am    Post subject: Reply with quote

Yeah, I'm fixing the ghostscript 7.05 to work with the GDI driver.

I've got it working with my ML-4500. I couldn't get the driver I mentioned in my previous post working but I then tried the one for 7.04 and it worked fine.

You can download it at:

http://www.milesbarr.com/ghostscript-gdi.tar.gz

Extract it in /usr/portage/app-text/ghostscript, then apply the patch:
Code:
patch -p0 < ghostscript-7.05.ebuild.diff


Then just emerge ghostscript again and everything should work (hopefully).
Back to top
View user's profile Send private message
rajram56
n00b
n00b


Joined: 23 Jun 2002
Posts: 16
Location: San Diego

PostPosted: Tue Jun 25, 2002 7:30 am    Post subject: does your file work for ML1210 Reply with quote

Hi Miles

I tried what you suggested in the first post.
I am trying to get my ML1210 to print. Modifying the script for 7.05 did not work (gs -h did not list gdi).
Will the file at milesbarr.com work?
What does patch do?
Do I have to undo the changes to the 7.05 script?

I would greatly appreciate your input...

Thanks
Back to top
View user's profile Send private message
Miles
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jun 2002
Posts: 97
Location: London, UK

PostPosted: Tue Jun 25, 2002 1:09 pm    Post subject: Reply with quote

I'm not too sure why the stuff I did in the first post didn't work since it uses the latest drivers.

The patch file I posted on my site definitely does work. It uses the patch file created for 7.04 but there doesn't appear to be any changes to the files it modifies in 7.05. You will have to have the original 7.05 ebuild file for the patch to work.

Just in case you don't have the relavent PPD file you can get it at:
http://www.linuxprinting.org/ppd-o-matic.cgi?driver=gdi&printer=Samsung-ML-1210&.submit=Generate+PPD+file
Back to top
View user's profile Send private message
rajram56
n00b
n00b


Joined: 23 Jun 2002
Posts: 16
Location: San Diego

PostPosted: Tue Jun 25, 2002 8:42 pm    Post subject: patch worked Reply with quote

Thanks for the patch. It worked
Back to top
View user's profile Send private message
rommel
Veteran
Veteran


Joined: 19 Apr 2002
Posts: 1145
Location: Williamsburg Virginia

PostPosted: Tue Jun 25, 2002 9:18 pm    Post subject: Reply with quote

quick question if i might...downloaded the gdi.tar.gz and when i went to extract it it warned that it wouldnt since it would overwrite and exisiting file...is this what i want it to do then apply the patch?

thanks
Back to top
View user's profile Send private message
Miles
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jun 2002
Posts: 97
Location: London, UK

PostPosted: Tue Jun 25, 2002 9:27 pm    Post subject: Reply with quote

Are you talking about the one off linuxprinting.org or the one off my site?

The one off my site shouldn't overwrite anything.

The one off linuxprinting.org does provide a replacement driver so yes you should overwrite it. I didn't actually have any success with intergrating it with ghostscript-7.05 though. Easiest thing to do would be to grab my file and patch the ebuild script.
Back to top
View user's profile Send private message
rommel
Veteran
Veteran


Joined: 19 Apr 2002
Posts: 1145
Location: Williamsburg Virginia

PostPosted: Tue Jun 25, 2002 11:22 pm    Post subject: Reply with quote

right...i got that...well i did what you had posted earlier..i used the link you provided then downloaded the gdi.tar.gz to /usr/portage/apps-text/ghostscript....i was in kde...so i used the left click extract here option and it warned that it couldnt continue for it would overwrite a file if it did...so i am not sure that it would be a good thing or not....a good thing in that it would mess up something and not allow me to apply the patch....does that make any sense?

i would think it was talking about the ghostscript 7.05 ebuild diff file
Back to top
View user's profile Send private message
Miles
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jun 2002
Posts: 97
Location: London, UK

PostPosted: Wed Jun 26, 2002 1:57 am    Post subject: Reply with quote

That's odd :? it shouldn't need to over write anything since I created the diff file myself and the patch file in the files/ directory is also new. There wouldn't be any diff files for ebuild scripts by default because there's no point.

Have you installed anything else into ghostscript? You could try running 'emerge rsync' to make sure you've got the latest version.

It should be safe to overwrite the file since it's not part of the default install, but you can back up the directory and if things go wrong just copy it back.
Back to top
View user's profile Send private message
rommel
Veteran
Veteran


Joined: 19 Apr 2002
Posts: 1145
Location: Williamsburg Virginia

PostPosted: Wed Jun 26, 2002 6:19 am    Post subject: Reply with quote

i think that was the issue then...i installed from a tar 3 stage and then did an emerge --clean rsync and then updated world and the system....and then read this thread...but i am installing gentoo on a uniprocessor system that i am gonna keep as my gentoo machine....the other i am selling and will put windows on it...anyway the amd box is from scratch x86 tar ball so i will unzip and patch it after kde is done building......thanks for all your input and help and i'll let you know if it gives me the same warning...but i think its gonna work on this machine
Back to top
View user's profile Send private message
rommel
Veteran
Veteran


Joined: 19 Apr 2002
Posts: 1145
Location: Williamsburg Virginia

PostPosted: Thu Jul 11, 2002 10:59 pm    Post subject: Reply with quote

hey Miles i was never able to get it to work with the new ghost script...i still have to run 6.53-r2 to use the printer ...how did you get yours working?
Back to top
View user's profile Send private message
Miles
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jun 2002
Posts: 97
Location: London, UK

PostPosted: Fri Jul 12, 2002 12:22 pm    Post subject: Reply with quote

Ignore everything in my first post because it just doesn't work.

The stuff in my second post (third post in this thread) works for me and rajram56. If you've tried the things in the first post restore your backup then apply the patch I wrote.

I haven't had a chance to do wide spread testing of the patch. If you could tell me what error messages are being generated I could work on making a more robust patch. :D
Back to top
View user's profile Send private message
timmy
n00b
n00b


Joined: 24 May 2002
Posts: 56
Location: Bath, UK

PostPosted: Fri Jul 12, 2002 12:25 pm    Post subject: Reply with quote

I'm using the linuxprinting.org Samsung-SmartGDI-all-GS tarball with the most recent version of ghostscript.

  • I edited the ebuild to add --with-driver=ALL,gdi to configure
  • ran ebuild .../ghostscript-7.05-r?.ebuild unpack
  • changed to the build directory and did the 'mv gdevgdi.c src' & 'cat smartgdi-....' thing.
  • ran ebuild .../ghostscript-7.05-r?.ebuild qmerge.

And it all works perfectly.

Tim
Back to top
View user's profile Send private message
rommel
Veteran
Veteran


Joined: 19 Apr 2002
Posts: 1145
Location: Williamsburg Virginia

PostPosted: Fri Jul 12, 2002 7:17 pm    Post subject: Reply with quote

Miles does that meant that the patch will not work on the latest version of ghostscript-7.05.3?...or after the patch is applied if ghostscript is updated will it continue to work.

Timmy i have only been using linux since april so an you detail a little better what you did ..if you feel like it

i would like to have the most recent update to ghostscript since its the only thing in the system that appears out of date when i run emerge --update world...but i would also like to have use of my printer even though i dont use it often...thanks

edit:...i tried what timmy had posted...but i got an error when i ran the last string....but i will try it again
Back to top
View user's profile Send private message
rommel
Veteran
Veteran


Joined: 19 Apr 2002
Posts: 1145
Location: Williamsburg Virginia

PostPosted: Fri Jul 12, 2002 8:32 pm    Post subject: Reply with quote

root # ebuild /usr/portage/app-text/ghostscript/ghostscript-7.05.3-r1.ebuild qmerge
>>> md5 ;-) espgs-7.05.3-source.tar.bz2
>>> md5 ;-) gnu-gs-fonts-std-6.0.tar.gz
>>> md5 ;-) gnu-gs-fonts-other-6.0.tar.gz
>>> md5 ;-) lxm3200-0.4.1-gs5.50-src.tar.gz
>>> Merging app-text/ghostscript-7.05.3-r1 to /
Traceback (most recent call last):
File "/usr/sbin/ebuild", line 33, in ?
a=portage.doebuild(pargs[0],x,getroot(),debug=debug)
File "/usr/lib/python2.2/site-packages/portage.py", line 1150, in doebuild
return merge(settings["CATEGORY"],settings["PF"],settings["D"],settings["BUILDDIR"]+"/build-info",myroot)
File "/usr/lib/python2.2/site-packages/portage.py", line 1379, in merge
mylink.merge(pkgloc,infloc,myroot,myebuild)
File "/usr/lib/python2.2/site-packages/portage.py", line 3648, in merge
self.treewalk(mergeroot,myroot,inforoot,myebuild)
File "/usr/lib/python2.2/site-packages/portage.py", line 3330, in treewalk
localcounterfile=open(inforoot+"/COUNTER","w")
IOError: [Errno 2] No such file or directory: '/var/tmp/portage/ghostscript-7.05.3-r1/build-info/COUNTER'


this is the error messege i recieve when i do what timmy did...i am not sure what i am doing wrong...anyone have a clue?
Back to top
View user's profile Send private message
Miles
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jun 2002
Posts: 97
Location: London, UK

PostPosted: Sun Jul 14, 2002 1:23 pm    Post subject: Reply with quote

It looks like Timmy is doing the same thing my altered ebuild script does, basically following the instructions that came with the Samsung driver.

I'm not sure if my patch would work with the latest version, just try to patch it and if it works it works otherwise I'll have to make another patch file. Or you could examine the patch file and make the changes yourself.

Unforunately I'm away from my computer until August so I won't be able to make any alterations until then.
Back to top
View user's profile Send private message
rommel
Veteran
Veteran


Joined: 19 Apr 2002
Posts: 1145
Location: Williamsburg Virginia

PostPosted: Sun Jul 14, 2002 6:47 pm    Post subject: Reply with quote

fair enough....not sure why i am getting the error messege when i do what timmy said...but i will play with both your patch and the other just to see if i can get it to work....i never use the printer hardly and i can from a backup get 6.53 loaded if i want to use it...i would just like to get it to work witht he current version...but looks like this will be an ongoing problem which is not very cool....but newayz thanks for the input
Back to top
View user's profile Send private message
timmy
n00b
n00b


Joined: 24 May 2002
Posts: 56
Location: Bath, UK

PostPosted: Mon Jul 15, 2002 12:14 pm    Post subject: Reply with quote

I'm going to try upgrading to 7.05.3 tonight - I'll make a note of exactly what I did (what I posted previously was from memory), and post it here.

Cheers,
Tim
Back to top
View user's profile Send private message
timmy
n00b
n00b


Joined: 24 May 2002
Posts: 56
Location: Bath, UK

PostPosted: Mon Jul 15, 2002 5:33 pm    Post subject: ghostscript-7.05.3-r1 + gdi Reply with quote

What I did was:

  • emerge --clean rsync
  • edited /usr/portage/app-text/ghostscript/ghostscript-7.05.3-r1.ebuild, and added the following line to the ./configure command: '--with-drivers=ALL,gdi \'
  • ebuild /usr/portage/app-text/ghostscript/ghostscript-7.05.3-r1.ebuild unpack
  • cd /var/tmp/portage/ghostscript-7.05.3-r1/work/espgs-7.05.3/
  • tar xvfz /path/to/Samsung-SmartGDI-all-GS.tar.gz
  • mv gdevgdi.c src
  • cat smartgdi-contrib.mak >> src/contrib.mak
  • cd
  • ebuild /usr/portage/app-text/ghostscript/ghostscript-7.05.3-r1.ebuild compile
  • ebuild /usr/portage/app-text/ghostscript/ghostscript-7.05.3-r1.ebuild install
  • ebuild /usr/portage/app-text/ghostscript/ghostscript-7.05.3-r1.ebuild merge
  • ebuild /usr/portage/app-text/ghostscript/ghostscript-7.05.3-r1.ebuild clean

It all seems to work here.
Tim
Back to top
View user's profile Send private message
timmy
n00b
n00b


Joined: 24 May 2002
Posts: 56
Location: Bath, UK

PostPosted: Mon Jul 15, 2002 5:49 pm    Post subject: Reply with quote

rommel wrote:
root # ebuild /usr/portage/app-text/ghostscript/ghostscript-7.05.3-r1.ebuild qmerge
>>> md5 ;-) espgs-7.05.3-source.tar.bz2
>>> md5 ;-) gnu-gs-fonts-std-6.0.tar.gz
>>> md5 ;-) gnu-gs-fonts-other-6.0.tar.gz
>>> md5 ;-) lxm3200-0.4.1-gs5.50-src.tar.gz
>>> Merging app-text/ghostscript-7.05.3-r1 to /
Traceback (most recent call last):
File "/usr/sbin/ebuild", line 33, in ?
a=portage.doebuild(pargs[0],x,getroot(),debug=debug)
File "/usr/lib/python2.2/site-packages/portage.py", line 1150, in doebuild
return merge(settings["CATEGORY"],settings["PF"],settings["D"],settings["BUILDDIR"]+"/build-info",myroot)
File "/usr/lib/python2.2/site-packages/portage.py", line 1379, in merge
mylink.merge(pkgloc,infloc,myroot,myebuild)
File "/usr/lib/python2.2/site-packages/portage.py", line 3648, in merge
self.treewalk(mergeroot,myroot,inforoot,myebuild)
File "/usr/lib/python2.2/site-packages/portage.py", line 3330, in treewalk
localcounterfile=open(inforoot+"/COUNTER","w")
IOError: [Errno 2] No such file or directory: '/var/tmp/portage/ghostscript-7.05.3-r1/build-info/COUNTER'


this is the error messege i recieve when i do what timmy did...i am not sure what i am doing wrong...anyone have a clue?

Sorry, my mistake. qmerge doesn't work - you needed to use merge instead - see the above posting.

Tim
Back to top
View user's profile Send private message
rommel
Veteran
Veteran


Joined: 19 Apr 2002
Posts: 1145
Location: Williamsburg Virginia

PostPosted: Tue Jul 16, 2002 1:05 am    Post subject: Reply with quote

awsome....thanks for your post timmy.....i'll give it a go right after the Open Office update finishes compiling.

EDIT: thank you timmy.....that worked perfectly for me too....thanks for taking the time to repost the steps you took to get it working....Miles thanks for your help and input too.

ciao

rommel
Back to top
View user's profile Send private message
rommel
Veteran
Veteran


Joined: 19 Apr 2002
Posts: 1145
Location: Williamsburg Virginia

PostPosted: Wed Jul 17, 2002 5:41 am    Post subject: Reply with quote

good news ... when 7.05.4 is released the gdi will be included so this will no longer be an issue hopefully...but again thanks for all your help
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum