From 25116e28dc8fe5ba257de6cbf44f4bf6d81597a97d30cb08d94473ab42f8f159 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Wed, 27 Oct 2021 07:44:40 +0000 Subject: [PATCH] change baserev from f31ae615e9e9acbfcd84c10cf00a7268 to 68e6f30502940dcbefff8532cc8bc873 OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-rpm-macros?expand=0&rev=65 --- ocaml-ocaml.rpm.prov_req.attr.sh | 6 +++++- ocaml-rpm-macros.changes | 9 +++++++++ ocaml-rpm-macros.spec | 22 ++++++++++++++++++---- 3 files changed, 32 insertions(+), 5 deletions(-) diff --git a/ocaml-ocaml.rpm.prov_req.attr.sh b/ocaml-ocaml.rpm.prov_req.attr.sh index e152c76..fb9d5de 100644 --- a/ocaml-ocaml.rpm.prov_req.attr.sh +++ b/ocaml-ocaml.rpm.prov_req.attr.sh @@ -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 diff --git a/ocaml-rpm-macros.changes b/ocaml-rpm-macros.changes index 103afca..e944d4e 100644 --- a/ocaml-rpm-macros.changes +++ b/ocaml-rpm-macros.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Oct 27 07:31:27 UTC 2021 - ohering@suse.de + +- Move cmxs files into the main package + Applications like Coq may load them at runtime. +- Ignore dependencies for cmxs files +- Restore dummy ocaml_native_compiler to allow quilt setup with + old packages + ------------------------------------------------------------------- Sat Sep 11 12:34:56 UTC 2021 - ohering@suse.de diff --git a/ocaml-rpm-macros.spec b/ocaml-rpm-macros.spec index 99286a2..864add7 100644 --- a/ocaml-rpm-macros.spec +++ b/ocaml-rpm-macros.spec @@ -17,7 +17,7 @@ Name: ocaml-rpm-macros -Version: 20210911 +Version: 20211027 Release: 0 Summary: RPM macros for building OCaml source packages License: GPL-2.0-only @@ -73,8 +73,8 @@ then tee %{buildroot}${file_attr} <<_EOF_ %%__${tag}_provides ${attr_sh} --provides %%__${tag}_requires ${attr_sh} --requires -%%__${tag}_magic ^(ELF|Objective caml|OCaml) .*$ -%%__${tag}_path .(cma|cmi|cmo|cmx|cmxa|cmxs)$ +%%__${tag}_magic ^(Objective caml|OCaml) .*$ +%%__${tag}_path .(cma|cmi|cmo|cmx|cmxa)$ %%__${tag}_flags magic_and_path _EOF_ echo "${file_attr}" >> files.fileattrs @@ -128,6 +128,10 @@ tee %{buildroot}%{_rpmmacrodir}/macros.%{name} <<'_EOF_' %%{nil} %%_find_debuginfo_dwz_opts %%{nil} +# Compatibility for quilt setup and old packages +%%ocaml_native_compiler 1 +%%suse_ocaml_native_compiler 1 + # Create file list for base pkg and base-devel pkg # Files with known extensions or names are written to 'files' or 'files.devel' # Other unknown files are shown on stdout @@ -173,6 +177,7 @@ tee %{buildroot}%{_rpmmacrodir}/macros.%{name} <<'_EOF_' find %%{buildroot}%%{ocaml_standard_library} ! -type d | awk\\\ -v "buildroot=%%{buildroot}"\\\ -v "ocaml_standard_library=%%{ocaml_standard_library}"\\\ + -v "out_files_main=%%{name}.files"\\\ -v "out_files_devel=%%{name}.files.devel"\\\ -v "out_files_ldconf=%%{name}.files.ldsoconf"\\\ -v "out_files_unhandled=%%{name}.files.unhandled"\\\ @@ -224,6 +229,15 @@ tee %{buildroot}%{_rpmmacrodir}/macros.%{name} <<'_EOF_' }\ next\ }\ + function files_main(line) {\ + _split(line)\ + print file_path >> out_files_main\ + print "%%dir " dirname >> out_files_main\ + if (parent_dir != "") {\ + print "%%dir " parent_dir >> out_files_main\ + }\ + next\ + }\ function files_unhandled(line) {\ _split(line)\ print file_path >> out_files_unhandled\ @@ -279,7 +293,7 @@ tee %{buildroot}%{_rpmmacrodir}/macros.%{name} <<'_EOF_' }\ # ELF shared library with native code\ /\\/[^/]+\\.cmxs$/{\ - files_devel($0)\ + files_main($0)\ }\ # Some helper binary\ /\\/[^/]+\\.exe$/{\