OCaml 5.0.0 rebuild
Other changes: - Verify the License is valid SPDX - Fix natdynlink detection - Add patch to fix toolbox build for OCaml 5.x - Convert README to UTF-8 - Use new OCaml macros
This commit is contained in:
parent
81e8f9639f
commit
1a949b42a9
117
ocaml-findlib-toolbox.patch
Normal file
117
ocaml-findlib-toolbox.patch
Normal file
@ -0,0 +1,117 @@
|
||||
--- findlib-1.9.6/src/findlib-toolbox/Makefile.orig 2022-09-24 09:13:16.000000000 -0600
|
||||
+++ findlib-1.9.6/src/findlib-toolbox/Makefile 2023-06-16 08:46:01.965686356 -0600
|
||||
@@ -9,7 +9,7 @@ opt:
|
||||
true
|
||||
|
||||
make_wizard$(EXEC_SUFFIX): make_wizard.ml
|
||||
- ocamlc -o make_wizard$(EXEC_SUFFIX) -I +unix -I +labltk -I ../findlib \
|
||||
+ ocamlc -o make_wizard$(EXEC_SUFFIX) -I +str -I +unix -I +labltk -I ../findlib \
|
||||
unix.cma str.cma labltk.cma findlib.cma make_wizard.ml
|
||||
|
||||
install:
|
||||
--- findlib-1.9.6/src/findlib-toolbox/make_wizard.ml.orig 2022-09-24 09:13:16.000000000 -0600
|
||||
+++ findlib-1.9.6/src/findlib-toolbox/make_wizard.ml 2023-06-16 08:50:49.066603769 -0600
|
||||
@@ -468,23 +468,23 @@ let makemake() =
|
||||
mkquote(metaquote !wiz_package_description);
|
||||
"byte_objects",
|
||||
String.concat " " (List.map
|
||||
- (fun m -> String.uncapitalize m ^ ".cmo")
|
||||
+ (fun m -> String.uncapitalize_ascii m ^ ".cmo")
|
||||
!wiz_objects);
|
||||
"nat_objects",
|
||||
String.concat " " (List.map
|
||||
- (fun m -> String.uncapitalize m ^ ".cmx")
|
||||
+ (fun m -> String.uncapitalize_ascii m ^ ".cmx")
|
||||
!wiz_objects);
|
||||
"byte_executables",
|
||||
String.concat " " byte_execs;
|
||||
"byte_exec_objects",
|
||||
String.concat " " (List.map
|
||||
- (fun m -> String.uncapitalize m ^ ".cmo")
|
||||
+ (fun m -> String.uncapitalize_ascii m ^ ".cmo")
|
||||
byte_exec_modules);
|
||||
"nat_executables",
|
||||
String.concat " " nat_execs;
|
||||
"nat_exec_objects",
|
||||
String.concat " " (List.map
|
||||
- (fun m -> String.uncapitalize m ^ ".cmx")
|
||||
+ (fun m -> String.uncapitalize_ascii m ^ ".cmx")
|
||||
nat_exec_modules);
|
||||
"prereqs",
|
||||
String.concat " " required_packages;
|
||||
@@ -526,7 +526,7 @@ let makemake() =
|
||||
let deptargets =
|
||||
String.concat " " (List.map
|
||||
(fun m ->
|
||||
- let m' = String.uncapitalize m in
|
||||
+ let m' = String.uncapitalize_ascii m in
|
||||
m' ^ ".ml " ^ m' ^ ".mli")
|
||||
!modlist) in
|
||||
write "makemake_exec" ( [ "switches", switches;
|
||||
@@ -543,7 +543,7 @@ let makemake() =
|
||||
if is_byte_exec execname then begin
|
||||
let execobjs =
|
||||
String.concat " " (List.map
|
||||
- (fun m -> String.uncapitalize m ^ ".cmo")
|
||||
+ (fun m -> String.uncapitalize_ascii m ^ ".cmo")
|
||||
!modlist) in
|
||||
write "byte_exec" ( ["execname", execname;
|
||||
"execobjs", execobjs ] @ variables )
|
||||
@@ -555,7 +555,7 @@ let makemake() =
|
||||
if not (is_byte_exec execname) then begin
|
||||
let execobjs =
|
||||
String.concat " " (List.map
|
||||
- (fun m -> String.uncapitalize m ^ ".cmx")
|
||||
+ (fun m -> String.uncapitalize_ascii m ^ ".cmx")
|
||||
!modlist) in
|
||||
write "nat_exec" ( ["execname", execname;
|
||||
"execobjs", execobjs ] @ variables )
|
||||
@@ -1090,7 +1090,7 @@ let pkginfo lb row = (* when the user r
|
||||
let files = Array.to_list(Sys.readdir dir) in
|
||||
List.map
|
||||
(fun name ->
|
||||
- String.capitalize (Filename.chop_suffix name ".cmi"))
|
||||
+ String.capitalize_ascii (Filename.chop_suffix name ".cmi"))
|
||||
(List.filter
|
||||
(fun name ->
|
||||
Filename.check_suffix name ".cmi")
|
||||
@@ -1128,7 +1128,7 @@ let preprocessor_scan_extensions() =
|
||||
not (List.mem pkg plist)
|
||||
)
|
||||
!wiz_camlp4_selected in
|
||||
- List.sort Pervasives.compare (plist @ plist')
|
||||
+ List.sort Stdlib.compare (plist @ plist')
|
||||
;;
|
||||
|
||||
|
||||
@@ -1196,7 +1196,7 @@ add_screen preprocessor_screen;;
|
||||
|
||||
let prerequisites_scan_packages() =
|
||||
(* Find out all packages *)
|
||||
- List.sort Pervasives.compare (Fl_package_base.list_packages())
|
||||
+ List.sort Stdlib.compare (Fl_package_base.list_packages())
|
||||
;;
|
||||
|
||||
|
||||
@@ -1255,10 +1255,10 @@ let buildlib_scan_modules() =
|
||||
let files'' =
|
||||
List.map
|
||||
(fun f ->
|
||||
- String.capitalize (Filename.chop_extension f)
|
||||
+ String.capitalize_ascii (Filename.chop_extension f)
|
||||
)
|
||||
files' in
|
||||
- remove_dups (List.sort Pervasives.compare files'')
|
||||
+ remove_dups (List.sort Stdlib.compare files'')
|
||||
;;
|
||||
|
||||
|
||||
@@ -1353,7 +1353,7 @@ build any.";
|
||||
end
|
||||
else begin
|
||||
wiz_executables :=
|
||||
- List.sort Pervasives.compare (name :: !wiz_executables);
|
||||
+ List.sort Stdlib.compare (name :: !wiz_executables);
|
||||
wiz_exec_objects := (name, ref []) :: !wiz_exec_objects;
|
||||
wiz_exec_native := (name, ref false) :: !wiz_exec_native;
|
||||
!update_listbox();
|
@ -1,30 +1,33 @@
|
||||
%undefine _package_note_flags
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2044028
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2043092#c21
|
||||
# /usr/bin/ld: cannot open linker script file /builddir/build/BUILD/.package_note-ocaml-4.13.1-2.fc36.x86_64.ld: No such file or directory
|
||||
%undefine _package_note_file
|
||||
%ifnarch %{ocaml_native_compiler}
|
||||
# Stripping the binary removes its bytecode payload
|
||||
%global __strip %{_bindir}/true
|
||||
%global debug_package %{nil}
|
||||
%endif
|
||||
|
||||
Name: ocaml-findlib
|
||||
Version: 1.9.6
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: Objective CAML package manager and build helper
|
||||
License: MIT
|
||||
|
||||
URL: http://projects.camlcity.org/projects/findlib.html
|
||||
Source0: http://download.camlcity.org/download/findlib-%{version}.tar.gz
|
||||
|
||||
# Fix the toolbox build with OCaml 5.x
|
||||
Patch0: %{name}-toolbox.patch
|
||||
|
||||
BuildRequires: ocaml >= 4.02.0
|
||||
BuildRequires: ocaml-labltk-devel
|
||||
BuildRequires: ocaml-ocamlbuild-devel
|
||||
#BuildRequires: ocaml-num-devel
|
||||
BuildRequires: ocaml-ocamlbuild
|
||||
BuildRequires: ocaml-compiler-libs
|
||||
BuildRequires: ocaml-ocamldoc
|
||||
BuildRequires: m4, ncurses-devel
|
||||
BuildRequires: gawk
|
||||
BuildRequires: make
|
||||
BuildRequires: python3
|
||||
Requires: ocaml
|
||||
|
||||
%global __ocaml_requires_opts -i Asttypes -i Parsetree
|
||||
# Do not require ocaml-compiler-libs at runtime
|
||||
%global __ocaml_requires_opts -i Asttypes -i Build_path_prefix_map -i Cmi_format -i Env -i Ident -i Identifiable -i Load_path -i Location -i Longident -i Misc -i Outcometree -i Parsetree -i Path -i Primitive -i Shape -i Subst -i Topdirs -i Toploop -i Type_immediacy -i Types -i Warnings
|
||||
|
||||
|
||||
%description
|
||||
@ -44,6 +47,17 @@ developing applications that use %{name}.
|
||||
%prep
|
||||
%autosetup -p1 -n findlib-%{version}
|
||||
|
||||
# Fix character encoding
|
||||
iconv -f ISO8859-1 -t UTF-8 doc/README > doc/README.utf8
|
||||
touch -r doc/README doc/README.utf8
|
||||
mv doc/README.utf8 doc/README
|
||||
|
||||
# Fix the OCaml core man directory
|
||||
sed -i 's,/usr/local/man,%{_mandir},' configure
|
||||
|
||||
# Configure bug? dynlink_subdir is the empty string
|
||||
sed -i 's/\${dynlink_subdir}/dynlink/' configure
|
||||
|
||||
|
||||
%build
|
||||
ocamlc -version
|
||||
@ -56,9 +70,9 @@ cat src/findlib/ocaml_args.ml
|
||||
-sitelib `ocamlc -where` \
|
||||
-mandir %{_mandir} \
|
||||
-with-toolbox
|
||||
make all
|
||||
%make_build all
|
||||
%ifarch %{ocaml_native_compiler}
|
||||
make opt
|
||||
%make_build opt
|
||||
%endif
|
||||
rm doc/guide-html/TIMESTAMP
|
||||
|
||||
@ -72,39 +86,36 @@ make install \
|
||||
OCAMLFIND_BIN=%{_bindir} \
|
||||
OCAMLFIND_MAN=%{_mandir}
|
||||
|
||||
# Remove spurious executable bits
|
||||
chmod 0644 $RPM_BUILD_ROOT%{_mandir}/man{1,5}/*
|
||||
chmod 0644 $RPM_BUILD_ROOT%{_libdir}/ocaml/findlib/*.{cma,cmi,ml,mli,pattern}
|
||||
chmod 0644 $RPM_BUILD_ROOT%{_libdir}/ocaml/findlib/{META,Makefile*}
|
||||
%ifarch %{ocaml_native_compiler}
|
||||
chmod 0644 $RPM_BUILD_ROOT%{_libdir}/ocaml/findlib/*.{a,cmxa}
|
||||
%endif
|
||||
|
||||
%files
|
||||
%ocaml_files
|
||||
sed -i '/ocamlfind\.conf/d' .ofiles
|
||||
|
||||
|
||||
%files -f .ofiles
|
||||
%doc LICENSE doc/README
|
||||
%config(noreplace) %{_sysconfdir}/ocamlfind.conf
|
||||
%{_bindir}/*
|
||||
%{_mandir}/man1/*
|
||||
%{_mandir}/man5/*
|
||||
%{_libdir}/ocaml/*/META
|
||||
%{_libdir}/ocaml/topfind
|
||||
%{_libdir}/ocaml/findlib
|
||||
%ifarch %{ocaml_native_compiler}
|
||||
%exclude %{_libdir}/ocaml/findlib/*.a
|
||||
%exclude %{_libdir}/ocaml/findlib/*.cmxa
|
||||
%endif
|
||||
%exclude %{_libdir}/ocaml/findlib/*.mli
|
||||
%exclude %{_libdir}/ocaml/findlib/Makefile.config
|
||||
%exclude %{_libdir}/ocaml/findlib/make_wizard
|
||||
%exclude %{_libdir}/ocaml/findlib/make_wizard.pattern
|
||||
# Had to disable this in OCaml 4.06, unclear why.
|
||||
#%%{_libdir}/ocaml/num-top
|
||||
|
||||
|
||||
%files devel
|
||||
%files devel -f .ofiles-devel
|
||||
%doc LICENSE doc/README doc/guide-html
|
||||
%ifarch %{ocaml_native_compiler}
|
||||
%{_libdir}/ocaml/findlib/*.a
|
||||
%{_libdir}/ocaml/findlib/*.cmxa
|
||||
%endif
|
||||
%{_libdir}/ocaml/findlib/*.mli
|
||||
%{_libdir}/ocaml/findlib/Makefile.config
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Jul 10 2023 Jerry James <loganjerry@gmail.com> - 1.9.6-3
|
||||
- OCaml 5.0.0 rebuild
|
||||
- Verify the License is valid SPDX
|
||||
- Fix natdynlink detection
|
||||
- Add patch to fix toolbox build for OCaml 5.x
|
||||
- Convert README to UTF-8
|
||||
- Use new OCaml macros
|
||||
|
||||
* Tue Jan 24 2023 Richard W.M. Jones <rjones@redhat.com> - 1.9.6-2
|
||||
- Rebuild OCaml packages for F38
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user