rpm/ocaml-cmxs.diff
Dirk Mueller 257b5b1ec6 - invoke find-lang.sh with bash, it is a bash script (bsc#1195391)
- switch to glibc-locale-base to reduce system installation size
  by ~220MB (bsc#1195390)

- Update OCaml requires/provides generators to ignore cmxs
  new patch: ocaml-cmxs.diff

OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=597
2022-02-01 12:49:10 +00:00

47 lines
1.6 KiB
Diff

Update OCaml requires/provides to ignore cmxs
OCaml cmxs files are static libraries, which can be loaded at runtime
via the Dynlink module. They apparently do not provide any useful
runtime dependency information to be stored into the packages
Provides/Requires list. Therefore just skip them.
Adjust attr, remove extension and ELF magic
Adjust ocamldeps, do nothing with cmxs files.
Fixes: a6fe37c39b39acbcbd014dd1e6d5653ff84254a1
Signed-off-by: Olaf Hering <olaf@aepfle.de>
--- ./fileattrs/ocaml.attr.orig 2021-06-21 12:00:44.587611741 +0000
+++ ./fileattrs/ocaml.attr 2021-12-22 13:54:20.384959876 +0000
@@ -1,5 +1,5 @@
%__ocaml_provides %{_rpmconfigdir}/ocamldeps.sh --provides
%__ocaml_requires %{_rpmconfigdir}/ocamldeps.sh --requires
-%__ocaml_magic ^(ELF|Objective caml|OCaml) .*$
-%__ocaml_path .(cma|cmi|cmo|cmx|cmxa|cmxs)$
+%__ocaml_magic ^(Objective caml|OCaml) .*$
+%__ocaml_path .(cma|cmi|cmo|cmx|cmxa)$
%__ocaml_flags magic_and_path
--- ./scripts/ocamldeps.sh.orig 2021-06-21 12:00:44.650612737 +0000
+++ ./scripts/ocamldeps.sh 2021-12-22 13:54:20.384959876 +0000
@@ -32,6 +32,10 @@
# Implementations imported:
# HASH NAME_FROM_OTHER_MODULE
#
+# cmxs files are recoqnized, but need to be ignored.
+# They contain references of the interfaces and implementations
+# compiled into them.
+#
# The hash may contain just '-', in which case it is ignored.
#
# Output:
@@ -236,7 +240,7 @@ do
*.cmo) parse "${filename}" ;;
*.cmx) parse "${filename}" ;;
*.cmxa) parse "${filename}" ;;
- *.cmxs) parse "${filename}" ;;
+ *.cmxs) ;;
*) continue ;;
esac
done