[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

findlib 1.x's features (includes shining new METAs for lablg*)



Gerd released a fixed findlib (1.0.2), I've just upload the package.

This version of findlib ships two new features that are of interest for
debian:

1) subpackages, i.e. the possibility to define arbitrarly nested findlib
   packages in the same META file. Subpackages are accessed via dot
   notation (e.g. "p1.p2.p3")

2) additions, i.e. the possibility to append values to a findlib
   variable inside a META file (e.g. 'archive += "foo.cma"')

Used together these two features permit us to minimize the number of
predicates in the META files we distribute. Predicates are indeed good
only to express conditions that are global for the compilation process
(e.g. byte/native, multi-threaded/single-threaded, ...), but are bad(TM)
to express per package conditions as we used it in lablgtk for example
(predicates: "init", "gnome", ...). Used in this way predicates soon or
later will clash.

I attach three shining new META for lablgtk, lablgtk2 and lablgl. Using
them, to link a source file which uses gtkgl and need gtk intialization
one will simply do:

  ocamlfind ocamlc -linkpkg -package "lablgtk2.gtkgl lablgtk2.init" foo.ml

Another advantage is in the writing of META files themselves, now we
could add as many subpackages as we wish (if needed :) avoiding
exponential explosion of the META file in the number of predicates.

If nobody complains I'm here asking Sven to update the corresponding
debian packages so that they include these METAs. I've done some test on
them, but some more will be appreciated.

Cheers.

PS the new META for lablgtk2 will also add support for gnomecanvas and
   rsvg which is missing in the META currently in unstable

-- 
^Stefano Zacchiroli - Computer Science PhD student @ Uny Bologna, Italy$
^zack@{cs.unibo.it,debian.org,bononia.it} -- http://www.bononia.it/zack$
^Frequentando il mio maestro mi ero reso conto [.] che la logica poteva$
^servire a molto a condizione di entrarci dentro e poi di uscirne -Adso$
version="1.00"
directory="+lablgl"
archive(byte) = "lablgl.cma"
archive(native) = "lablgl.cmxa"

package "togl" (
  requires = "lablgl"
  archive(byte) = "togl.cma"
  archive(native) = "togl.cmxa"
)

package "glut" (
  requires = "lablgl"
  archive(byte) = "lablglut.cma"
  archive(native) = "lablglut.cmxa"
)
version="2.2.0"
requires(mt) = "threads"
requires(mt,mt_vm) = "threads.vm"
requires(mt,mt_posix) = "threads.posix"
directory="+lablgtk2"
archive(byte) = "lablgtk.cma"
archive(native) = "lablgtk.cmxa"
archive(byte,mt) += "gtkThread.cmo"
archive(native,mt) += "gtkThread.cmx"

package "init" (
  requires = "lablgtk2"
  archive(byte) = "gtkInit.cmo"
  archive(native) = "gtkInit.cmx"
)

package "glade" (
  requires = "lablgtk2"
  archive(byte)	= "lablglade.cma"
  archive(native) = "lablglade.cmxa"
)

package "gnomecanvas" (
  requires = "lablgtk2"
  archive(byte)	= "lablgnomecanvas.cma"
  archive(native) = "lablgnomecanvas.cmxa"
)

package "gtkgl" (
  requires = "lablgtk2 lablgl"
  archive(byte)	= "lablgtkgl.cma"
  archive(native) = "lablgtkgl.cmxa"
)

package "rsvg" (
  requires = "lablgtk2"
  archive(byte)	= "lablrsvg.cma"
  archive(native) = "labrsvg.cmxa"
)
version="1.2.5"
requires(mt) = "threads"
requires(mt,mt_vm) = "threads.vm"
requires(mt,mt_posix) = "threads.posix"
directory="+lablgtk"
archive(byte) = "lablgtk.cma"
archive(native) = "lablgtk.cmxa"
archive(byte,mt) += "gtkThread.cmo"
archive(native,mt) += "gtkThread.cmx"

package "init" (
  requires = "lablgtk"
  archive(byte) = "gtkInit.cmo"
  archive(native) = "gtkInit.cmx"
)

package "glade" (
  requires = "lablgtk"
  archive(byte)	= "lablglade.cma"
  archive(native) = "lablglade.cmxa"
)

package "gnome" (
  requires = "lablgtk"
  archive(byte)	= "lablgnome.cma"
  archive(native) = "lablgnome.cmxa"
)

package "gtkgl" (
  requires = "lablgtk lablgl"
  archive(byte)	= "lablgtkgl.cma"
  archive(native) = "lablgtkgl.cmxa"
)

Attachment: signature.asc
Description: Digital signature


Reply to: