Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > PocketBook > PocketBook Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 03-28-2012, 02:49 AM   #1
MartinZ
Zealot
MartinZ doesn't litterMartinZ doesn't litter
 
Posts: 110
Karma: 138
Join Date: Mar 2011
Device: PB903, PB603
ghostscript?

Hi folks,

has anyone already tried (or better managed) to build ghostscript on PocketBook?

I would like to use it, to render a postscript file to a bitmap or to screen/framebuffer.

As far as i understood the ghostscript documentation, a build without X11/gtk should be possible, if device X11 is deactivated in the makefile.
Some features could be deactivated as well - for i do not need pdf-functionality and only basic postscript features.

But I fear, that i am not experienced enough to make ghostscript cross-compile for ARM.

Any experience?
MartinZ is offline   Reply With Quote
Old 03-29-2012, 07:46 PM   #2
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 2,986
Karma: 18343081
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
ghostscript looks to be a real pain to build. Maybe you could try building ImageMagick (or GraphicsMagick) instead. It can convert postscript to other formats.
rkomar is offline   Reply With Quote
Advert
Old 03-31-2012, 03:19 PM   #3
bense2k
Member
bense2k knows the difference between 'who' and 'whom'bense2k knows the difference between 'who' and 'whom'bense2k knows the difference between 'who' and 'whom'bense2k knows the difference between 'who' and 'whom'bense2k knows the difference between 'who' and 'whom'bense2k knows the difference between 'who' and 'whom'bense2k knows the difference between 'who' and 'whom'bense2k knows the difference between 'who' and 'whom'bense2k knows the difference between 'who' and 'whom'bense2k knows the difference between 'who' and 'whom'bense2k knows the difference between 'who' and 'whom'
 
Posts: 14
Karma: 10316
Join Date: Feb 2011
Device: Pocketbook pro 602
I was able to build ImageMagick some time ago, but as far as i know ImageMagick needs ghostscript to convert postscript files. I build it with limited features dont remember which formats were integrated.
bense2k is offline   Reply With Quote
Old 03-31-2012, 08:14 PM   #4
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 2,986
Karma: 18343081
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
Quote:
Originally Posted by bense2k View Post
I was able to build ImageMagick some time ago, but as far as i know ImageMagick needs ghostscript to convert postscript files. I build it with limited features dont remember which formats were integrated.
Thanks for that info. I went ahead and tried to build ghostscript myself. I couldn't do it using the cross compilers (it would have taken more effort than I wanted to put into it). I built it under LoneTech's qemu-based ARM system, but found that it wouldn't run on the PocketBook because the libc version was too old on the ereader. Bah!
rkomar is offline   Reply With Quote
Old 04-03-2012, 04:41 PM   #5
MartinZ
Zealot
MartinZ doesn't litterMartinZ doesn't litter
 
Posts: 110
Karma: 138
Join Date: Mar 2011
Device: PB903, PB603
Re: ghostscript

Quote:
I built it under LoneTech's qemu-based ARM system, but found that it wouldn't run on the PocketBook because the libc version was too old on the ereader. Bah!
oh, that doesn't sound too encouraging.
Perhaps I'll try it my self anyhow. But I think of changing the document generating source application inside my project (that i did not write myself), so that it does not generate postscript docs but instead writes directly to the screen.

But anyway - it would be quite useful to get ghostscript running on PB.
MartinZ is offline   Reply With Quote
Advert
Old 04-03-2012, 06:41 PM   #6
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 2,986
Karma: 18343081
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
I got it to build last night, but haven't tested it yet. I downloaded the qemu image file for debian lenny that was linked to in the qemu ARM page. This distro is older than the debian sid file used by LoneTech, so it has a better chance of being compatible with what's on the PB devices. I loaded up the image with development tools, and then built ghostscript in it with the following configuration:

Code:
 $ ./configure --prefix=/mnt/ext1/system --with-fontpath=/ebrmain/fonts/ --with-fontpath=/mnt/ext1/system/fonts/ --without-ijs --disable-dbus --disable-cups --disable-gtk --disable-sse2 --without-libidn --without-libpaper --without-pdftoraster --without-x --without-jbig2dec --without-jasper --without-omni --with-drivers=FILES
After it built, I created a directory in tmp, and did the install there:

Code:
mkdir /tmp/gs
make install DESTDIR=/tmp/gs
I then went in and pruned out the man pages, examples and whatnot that wasn't required, and tarred up everything else. Hopefully, it should just unpack into /mnt/ext1/system on the reader and "just work".

Edit: It worked! I was able to produce a grayscale tiff from a colour postscript file.

Last edited by rkomar; 04-03-2012 at 06:51 PM.
rkomar is offline   Reply With Quote
Old 04-04-2012, 07:12 PM   #7
MartinZ
Zealot
MartinZ doesn't litterMartinZ doesn't litter
 
Posts: 110
Karma: 138
Join Date: Mar 2011
Device: PB903, PB603
postscript build

Quote:
Edit: It worked! I was able to produce a grayscale tiff from a colour postscript file.
wow, rkomar!

This sounds great.
MartinZ is offline   Reply With Quote
Old 04-04-2012, 08:13 PM   #8
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 2,986
Karma: 18343081
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
Yes, it should come in handy when cross-compiling is too difficult. You can also just copy many utility programs from there to the PB (same as for many programs in LoneTech's Debian squeeze/sid image). In the default qemu mode, the host OS is at IP address 10.0.2.2, so you can scp files to and fro inside the guest using that address. That's how I got the ghostscript sources onto the image, and copied off the binary files afterwards. The build process is slow under emulation, but dependable.
rkomar is offline   Reply With Quote
Reply


Forum Jump


All times are GMT -4. The time now is 05:01 AM.


MobileRead.com is a privately owned, operated and funded community.