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

Depends clause of control

I have a package which says this:

Depends: ${shlibs:Depends}, g++, ocaml-nox-${F:OCamlABI}

however this is wrong. If the arch supports native
code compiler, there is no dependency on Ocaml at all.
If the arch only supports bytecode, then ocaml_run is required

What I think is needed here is something like:

Depends: ... ${F:OCaml_IF_BYTECODE}

which expands to nothing if the arch supports native code,
or ocaml-nox-${F:OCamlABI} if it doesn't.

After all this is what


does -- it expands to the actual packages required
at run time.

It seems this is handled by:

OCAMLABI = $(shell ocamlc -version)

	dh_gencontrol -- -VF:OCamlABI="$(OCAMLABI)"

in the rules file. 

Would it be possible to use something like:

OCAML_HAS_NATIVE = shell negate "ocamlopt -version"

to detect whether we really need a dependence
on Ocaml? 

I mean .. it certainly is possible, could this technique
be fixed and put in the policy document?

John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net

Reply to: