[gs-devel] Kick-off of ESP/GPL GhostScript merger: X11 output
device modularization
Till Kamppeter
till.kamppeter at gmail.com
Tue Apr 24 07:57:36 PDT 2007
Hi,
to start the planned merger of ESP and GPL GhostScript I have ported the
feature of modularization of the X11 output device. Before submitting
the patched GhostScript do the SVN repositories I want to present the
patch here.
For what do we need this?
-------------------------
Every Linux distribution ships GhostScript as binary packages. There was
one problem. If the GhostScript has X11 support built-in you can display
PostScript and PDF files on the screen but on an X-less server you have
a lot of disk-space wasting do to the dependency of the GhostScript
package on the X libraries. If you would leave out the X11 support users
are not able to display PostScript and PDF files.
Many years ago distros shipped two GhostScript packages, one with and
one without X. This made maintainability more difficult and wasted CD
space/download volume.
More or less in 2000 at Mandriva a patch was developed to modularize the
X11 and the SVGA output devices so that one got two binary RPMs, one
with the GhostScript core and one with the X11 and SVGA output devices
in a dinamically linkable library. On servers only the GhostScript core
was installed and on desktops both the core and the X11/SVGA output
device libraries. GhostScript auto-detected the presence of the X11/SVGA
output device libraries and if present it listed the appropriate devices
in "gs- h" and allowed to use them. This solved the problem without
wasting any space.
Is this patch stable?
---------------------
This patch I have introduced into ESP GhostScript and there it was for
many years. Due to the complete printer driver spectrum and the "cups"
output device all distros use ESP GhostScript by default and as this
functionality is built by default on Unix/gcc/libdl systems it is
present on all Linux distros. To me there are no known bug reports on
ESP GhostScript, Mandriva, and Ubuntu concerning the X11 device
modularization.
On my port to the current SVN snapshot of GPL GhostScript I have checked
the ESP GhostScript crasher bugs reported to Ubuntu
https://bugs.launchpad.net/ubuntu/+source/gs-esp/
and they do not get introduced into GPL GhostScript by the patch.
Is the functionality of this patch portable?
--------------------------------------------
Unfortunately, it works only on Unix/gcc systems with libdl, but it does
not break compilability of the patched GhostScript, as it uses
conditional compiling.
The new code is only compiled if GS_DEVS_SHARED is set. GS_DEVS_SHARED
is only set in the src/unix-gcc.mak file (so only on Unix/gcc systems).
Adding configurability to the configure script would not be a big problem.
Mike Sweet has kept ESP GhostScript also as portable as possible, as it
is done with GPL GhostScript.
How to get the patch?
---------------------
Download it here:
http://www.linuxprinting.org/download/printing/esp-gpl-ghostscript-merge/ghostscript-8.57-x11-svga-as-shared-library.patch
Apply it with
cd gs
patch -p1 < ../ghostscript-8.15-x11-svga-as-shared-library.patch
and compile as usual.
Tests
-----
I have tested the patch and it works correctly with and without the
X11.so module being present. Crasher bugs (and many of the other bugs,
too) reported to Ubuntu
https://bugs.launchpad.net/ubuntu/+source/gs-esp/
do not get introduced by the patch.
I could upload it to the subversion repositories and we can see by the
regular regression tests whether it does not break anything.
Is there a possibility that I can trigger the regression tests after an
upload to the SVN or do I have to wait for a cron job?
Till
More information about the gs-devel
mailing list