OCaml 5.0.0 rebuild

Other changes:
- Add patch to fix linking on bytecode-only architectures
- Update deprecated %patchN usage
- Use %license macro
This commit is contained in:
Jerry James 2023-07-10 22:50:52 -06:00
parent 28f5329fbb
commit 423f9604a5
2 changed files with 48 additions and 5 deletions

View File

@ -0,0 +1,28 @@
--- virt-top-1.1.1/configure.orig 2021-11-03 14:18:26.000000000 -0600
+++ virt-top-1.1.1/configure 2023-07-10 12:31:15.525435684 -0600
@@ -5357,7 +5357,7 @@ else
OCAMLOPT="$ac_cv_prog_OCAMLOPT"
fi
- OCAMLBEST=byte
+ OCAMLBEST=ocamlc
if test "$OCAMLOPT" = "no"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find ocamlopt; bytecode compilation only." >&5
$as_echo "$as_me: WARNING: Cannot find ocamlopt; bytecode compilation only." >&2;}
--- virt-top-1.1.1/ocaml-link.sh.in.orig 2021-11-03 06:00:07.000000000 -0600
+++ virt-top-1.1.1/ocaml-link.sh.in 2023-07-10 12:31:41.012064849 -0600
@@ -49,10 +49,12 @@ if [ x"${V:-@AM_DEFAULT_VERBOSITY@}" = x
echo "$@" \
@OCAML_RUNTIME_VARIANT_PIC_OPTION@ \
-linkpkg \
- -cclib "'@LDFLAGS@ $cclib'"
+ -cclib "'@LDFLAGS@ $cclib'" \
+ -output-complete-exe
fi
# NB -cclib must come last.
exec "$@" \
@OCAML_RUNTIME_VARIANT_PIC_OPTION@ \
-linkpkg \
- -cclib "@LDFLAGS@ $cclib"
+ -cclib "@LDFLAGS@ $cclib" \
+ -output-complete-exe

View File

@ -1,7 +1,6 @@
%undefine _package_note_flags
Name: virt-top Name: virt-top
Version: 1.1.1 Version: 1.1.1
Release: 10%{?dist} Release: 11%{?dist}
Summary: Utility like top(1) for displaying virtualization stats Summary: Utility like top(1) for displaying virtualization stats
License: GPL-2.0-or-later License: GPL-2.0-or-later
@ -28,6 +27,9 @@ Patch1: virt-top-1.0.9-processcsv-documentation.patch
# Fix "Input/output error" in journal (RHBZ#2148798) # Fix "Input/output error" in journal (RHBZ#2148798)
Patch2: 0001-virt-top-fix-to-explicitly-disconnect-from-libvirtd.patch Patch2: 0001-virt-top-fix-to-explicitly-disconnect-from-libvirtd.patch
# Fix linking problems on bytecode-only architectures
Patch3: virt-top-1.1.1-ocaml-bytecode.patch
BuildRequires: gcc BuildRequires: gcc
BuildRequires: make BuildRequires: make
BuildRequires: ocaml >= 3.10.2 BuildRequires: ocaml >= 3.10.2
@ -65,9 +67,15 @@ different virtualization systems.
%setup -q %setup -q
%if 0%{?rhel} >= 6 %if 0%{?rhel} >= 6
%patch1 -p1 %patch -P1 -p1
%endif %endif
%patch2 -p1 %patch -P2 -p1
%ifnarch %{ocaml_native_compiler}
%patch -P3 -p1
%endif
# "ocamlfind byte" has been removed as an alias
sed -i 's/\(OCAMLBEST=\)byte/\1ocamlc/' configure
%build %build
@ -106,7 +114,8 @@ install -m 0644 processcsv.py.1 $RPM_BUILD_ROOT%{_mandir}/man1/
%files -f %{name}.lang %files -f %{name}.lang
%doc COPYING README TODO %doc README TODO
%license COPYING
%{_bindir}/virt-top %{_bindir}/virt-top
%{_mandir}/man1/virt-top.1* %{_mandir}/man1/virt-top.1*
%if 0%{?rhel} >= 6 %if 0%{?rhel} >= 6
@ -116,6 +125,12 @@ install -m 0644 processcsv.py.1 $RPM_BUILD_ROOT%{_mandir}/man1/
%changelog %changelog
* Mon Jul 10 2023 Jerry James <loganjerry@gmail.com> - 1.1.1-11
- OCaml 5.0.0 rebuild
- Add patch to fix linking on bytecode-only architectures
- Update deprecated %%patchN usage
- Use %%license macro
* Mon Jun 05 2023 Richard W.M. Jones <rjones@redhat.com> - 1.1.1-10 * Mon Jun 05 2023 Richard W.M. Jones <rjones@redhat.com> - 1.1.1-10
- Migrated to SPDX license - Migrated to SPDX license