Teach the internal dep generator about OCaml
- OCaml seems to have fairly well detectable magic in its files, nice - Dont call the regular find-requires from the scripts now that internal is working
This commit is contained in:
parent
82e7dd7020
commit
15fb8ccb41
|
@ -471,6 +471,8 @@ static const struct rpmfcTokens_s const rpmfcTokens[] = {
|
|||
{ "libtool library ", RPMFC_LIBTOOL|RPMFC_INCLUDE },
|
||||
{ "pkgconfig ", RPMFC_PKGCONFIG|RPMFC_INCLUDE },
|
||||
|
||||
{ "Objective caml ", RPMFC_OCAML|RPMFC_INCLUDE },
|
||||
|
||||
/* XXX .NET executables and libraries. file(1) cannot differ from win32
|
||||
* executables unfortunately :( */
|
||||
{ "Mono/.Net assembly", RPMFC_MONO|RPMFC_INCLUDE },
|
||||
|
@ -770,6 +772,10 @@ static int rpmfcSCRIPT(rpmfc fc)
|
|||
xx = rpmfcHelper(fc, 'P', "mono");
|
||||
if (is_executable)
|
||||
xx = rpmfcHelper(fc, 'R', "mono");
|
||||
} else
|
||||
if (fc->fcolor->vals[fc->ix] & RPMFC_OCAML) {
|
||||
xx = rpmfcHelper(fc, 'P', "ocaml");
|
||||
xx = rpmfcHelper(fc, 'R', "ocaml");
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -1115,7 +1121,7 @@ typedef const struct rpmfcApplyTbl_s {
|
|||
static const struct rpmfcApplyTbl_s const rpmfcApplyTable[] = {
|
||||
{ rpmfcELF, RPMFC_ELF },
|
||||
{ rpmfcSCRIPT, (RPMFC_SCRIPT|RPMFC_BOURNE|
|
||||
RPMFC_PERL|RPMFC_PYTHON|RPMFC_MONO|
|
||||
RPMFC_PERL|RPMFC_PYTHON|RPMFC_MONO|RPMFC_OCAML|
|
||||
RPMFC_PKGCONFIG|RPMFC_LIBTOOL) },
|
||||
{ rpmfcMISC, RPMFC_FONT|RPMFC_TEXT },
|
||||
{ NULL, 0 }
|
||||
|
|
|
@ -33,7 +33,8 @@ enum FCOLOR_e {
|
|||
#define RPMFC_ELF (RPMFC_ELF32|RPMFC_ELF64|RPMFC_ELFMIPSN32)
|
||||
/* (1 << 3) leaks into package headers, reserved */
|
||||
|
||||
/* bits 4-7 unused */
|
||||
/* bits 4-6 unused */
|
||||
RPMFC_OCAML = (1 << 7),
|
||||
RPMFC_PKGCONFIG = (1 << 8),
|
||||
RPMFC_LIBTOOL = (1 << 9),
|
||||
RPMFC_BOURNE = (1 << 10),
|
||||
|
|
|
@ -496,6 +496,9 @@ print (t)\
|
|||
%__pkgconfig_provides %{_rpmconfigdir}/pkgconfigdeps.sh --provides
|
||||
%__pkgconfig_requires %{_rpmconfigdir}/pkgconfigdeps.sh --requires
|
||||
|
||||
%__ocaml_provides %{_rpmconfigdir}/ocaml-find-provides.sh
|
||||
%__ocaml_requires %{_rpmconfigdir}/ocaml-find-requires.sh
|
||||
|
||||
%__fontconfig_provides %{_rpmconfigdir}/fontconfig.prov
|
||||
%__desktop_provides %{_rpmconfigdir}/desktop-file.prov
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ done
|
|||
files=`sed "s/['\"]/\\\&/g"`
|
||||
|
||||
# Use ordinary find-requires first.
|
||||
echo $files | tr [:blank:] '\n' | /usr/lib/rpm/find-requires
|
||||
# echo $files | tr [:blank:] '\n' | /usr/lib/rpm/find-requires
|
||||
|
||||
# Get list of .cmi, .cmo and .cma files.
|
||||
files=`echo $files | tr [:blank:] '\n' | grep '\.cm[ioa]$'`
|
||||
|
|
Loading…
Reference in New Issue