This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Ghostscript packaging for X11, non-X11 versions



Dario Alcocer wrote:

Are there any guidelines or suggestions regarding packaging
source, patches and binaries for programs (like Ghostscript)
that can be built for either Cygwin or Cygwin/XFree86?

Not yet...


Unless I hear a very compelling reason to do otherwise, I'm
planning on releasing three binary packages and a single
source package:

  * A ghostscript-base package, which includes all the
    common files required by both program versions.

  * A ghostscript package, which contains only the non-X11
    version of gs.exe, and a README describing the build
    process.

  * A ghostscript-x11 package, which contains only the X11
    version of gs.exe, possibly renamed to xgs or gsx, and
    a README describing how to build it for XFree86.

  * A source package which contains all the patches for both
    builds and both README files.

Sounds good to me. So, I assume you have to conf/build each version separately -- but are you *sure* the "common" files from both versions are identical, and can be shared in that way?

Also, into which heirarchy are the binaries installed? I'm thinking you should probably do something like this:

for non-x:
prefix = /usr
sysconfdir = /etc

CFLAGS="${MY_CFLAGS}" LDFLAGS="${MY_LDFLAGS}" \
${srcdir}/configure \
--srcdir=${srcdir} --prefix=${prefix} \
--exec-prefix=${prefix} --sysconfdir=${sysconfdir} \
--libdir=${prefix}/lib --includedir=${prefix}/include \
--libexecdir='${sbindir}' --localstatedir=/var \
--datadir='${prefix}/share'

For X:
prefix = /usr/X11R6
sysconfdir = /etc

CFLAGS="${MY_CFLAGS}" LDFLAGS="${MY_LDFLAGS}" \
${srcdir}/configure \
--srcdir=${srcdir} --prefix=${prefix} \
--exec-prefix=${prefix} --sysconfdir=${sysconfdir} \
--libdir=${prefix}/lib --includedir=${prefix}/include \
--libexecdir='${sbindir}' --localstatedir=/var \
--datadir='/usr/share'

That way, all X stuff (libraries, dlls, header files, binaries) go into /usr/X11R6. All non-X stuff goes into /usr. And the shared data files from BOTH go into /usr/share/(ghostscript).

I would go ahead and allow ALL of the scripts and man pages to be duplicated (bdftops, font2c, gslj, etc) into both /usr/bin/|/usr/man and /usr/X11R6/bin|/usr/X11R6/man -- without any renaming.

That way, if a user installs only ghostscript-X and ghostscript-common, they get all of the scripts and "extra" binaries, as compiled/created in X mode. Conversely, someone who installs only ghostscript and ghostscript-common gets them as compiled/created in no-x mode. Plus, The user who installs everything gets them all in both modes, and can use PATH to select their personally preferred default.

(If you'd like to have your postinstall script for ghostscript-X create a symlink from /usr/bin/gsx --> /usr/X11R6/bin/gs.exe that would be fine, too.



I'm picking this packaging method so that both X11 and non-X11
versions can both be installed, without getting into problems
when un-installing one and not the other.

Yep.


I've looked around in the cygwin-apps archives, and I've not
found this discussed with respect to other apps (e.g. rxvt)
that can be built for either Cygwin or Cygwin/XFree86.

True -- because it hasn't really come up. There was some discussion about this issue w.r.t. tcl/tk about a month ago -- but it was all handwaving, because there were no actual X versions of tcl/tk to worry about.

And rxvt isn't really built in two ways -- there's just a SINGLE binary, that can run in one of two modes. Thus, no worries about "the X version goes THERE and the nonX version goes HERE". There's only one version.

--Chuck



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]