Compare commits
No commits in common. "rawhide" and "f31" have entirely different histories.
19 changed files with 7273 additions and 1024 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -4,5 +4,3 @@
|
|||
/ocaml-*.tar.gz
|
||||
/ocaml-*.tar.xz
|
||||
/ocaml-*-refman.pdf
|
||||
/4.11.0.tar.gz
|
||||
/4.13.1.tar.gz
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
From 04e523e937625bf30d775681c11e00f6dc6fc00a Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 24 Jun 2014 10:00:15 +0100
|
||||
Subject: [PATCH 1/2] Don't add rpaths to libraries.
|
||||
|
||||
---
|
||||
configure.ac | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 3754ad8a39..fb60c7c14c 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1422,8 +1422,6 @@ AS_IF([test x"$enable_shared" != "xno"],
|
||||
[[*-*-openbsd7.[3-9]|*-*-openbsd[89].*]],
|
||||
[mkdll_flags="${mkdll_flags} -Wl,--no-execute-only"])
|
||||
oc_ldflags="$oc_ldflags -Wl,-E"
|
||||
- rpath="-Wl,-rpath,"
|
||||
- mksharedlibrpath="-Wl,-rpath,"
|
||||
natdynlinkopts="-Wl,-E"
|
||||
supports_shared_libraries=true],
|
||||
[mkdll='shared-libs-not-available'])
|
||||
--
|
||||
2.52.0
|
||||
|
||||
141
0001-increment-version-number-after-tagging-4.08.1-rc2.patch
Normal file
141
0001-increment-version-number-after-tagging-4.08.1-rc2.patch
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
From 92c1042e5ba899fca8eed351a7bc210879cdc9d7 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Angeletti <florian.angeletti@inria.fr>
|
||||
Date: Wed, 24 Jul 2019 14:25:14 +0200
|
||||
Subject: [PATCH 1/9] increment version number after tagging 4.08.1+rc2
|
||||
|
||||
---
|
||||
VERSION | 2 +-
|
||||
configure | 26 +++++++++++++-------------
|
||||
ocaml-variants.opam | 2 +-
|
||||
3 files changed, 15 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/VERSION b/VERSION
|
||||
index 9bbc45c85..6be2f109a 100644
|
||||
--- a/VERSION
|
||||
+++ b/VERSION
|
||||
@@ -1,4 +1,4 @@
|
||||
-4.08.1+rc2
|
||||
+4.08.1+dev4-2019-07-24
|
||||
|
||||
# The version string is the first line of this file.
|
||||
# It must be in the format described in stdlib/sys.mli
|
||||
diff --git a/configure b/configure
|
||||
index 450374d2d..0de9771d3 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
-# Generated by GNU Autoconf 2.69 for OCaml 4.08.1+rc2.
|
||||
+# Generated by GNU Autoconf 2.69 for OCaml 4.08.1+dev4-2019-07-24.
|
||||
#
|
||||
# Report bugs to <caml-list@inria.fr>.
|
||||
#
|
||||
@@ -590,8 +590,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='OCaml'
|
||||
PACKAGE_TARNAME='ocaml'
|
||||
-PACKAGE_VERSION='4.08.1+rc2'
|
||||
-PACKAGE_STRING='OCaml 4.08.1+rc2'
|
||||
+PACKAGE_VERSION='4.08.1+dev4-2019-07-24'
|
||||
+PACKAGE_STRING='OCaml 4.08.1+dev4-2019-07-24'
|
||||
PACKAGE_BUGREPORT='caml-list@inria.fr'
|
||||
PACKAGE_URL='http://www.ocaml.org'
|
||||
|
||||
@@ -1430,7 +1430,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
-\`configure' configures OCaml 4.08.1+rc2 to adapt to many kinds of systems.
|
||||
+\`configure' configures OCaml 4.08.1+dev4-2019-07-24 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1501,7 +1501,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
- short | recursive ) echo "Configuration of OCaml 4.08.1+rc2:";;
|
||||
+ short | recursive ) echo "Configuration of OCaml 4.08.1+dev4-2019-07-24:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1657,7 +1657,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
-OCaml configure 4.08.1+rc2
|
||||
+OCaml configure 4.08.1+dev4-2019-07-24
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@@ -2320,7 +2320,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
-It was created by OCaml $as_me 4.08.1+rc2, which was
|
||||
+It was created by OCaml $as_me 4.08.1+dev4-2019-07-24, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -2669,8 +2669,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
|
||||
-{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring OCaml version 4.08.1+rc2" >&5
|
||||
-$as_echo "$as_me: Configuring OCaml version 4.08.1+rc2" >&6;}
|
||||
+{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring OCaml version 4.08.1+dev4-2019-07-24" >&5
|
||||
+$as_echo "$as_me: Configuring OCaml version 4.08.1+dev4-2019-07-24" >&6;}
|
||||
|
||||
# Configuration variables
|
||||
|
||||
@@ -2745,7 +2745,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
|
||||
## Output variables
|
||||
|
||||
|
||||
-VERSION=4.08.1+rc2
|
||||
+VERSION=4.08.1+dev4-2019-07-24
|
||||
|
||||
|
||||
# Note: This is present for the flexdll bootstrap where it exposed as the old
|
||||
@@ -12365,7 +12365,7 @@ case $ocaml_cv_cc_vendor in #(
|
||||
msvc-*) :
|
||||
outputobj=-Fo; CPP="cl -nologo -EP"; gcc_warnings="" ;; #(
|
||||
*) :
|
||||
- outputobj='-o $(EMPTY)'; case 4.08.1+rc2 in #(
|
||||
+ outputobj='-o $(EMPTY)'; case 4.08.1+dev4-2019-07-24 in #(
|
||||
*+dev*) :
|
||||
gcc_warnings="-Wall -Werror" ;; #(
|
||||
*) :
|
||||
@@ -17560,7 +17560,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
-This file was extended by OCaml $as_me 4.08.1+rc2, which was
|
||||
+This file was extended by OCaml $as_me 4.08.1+dev4-2019-07-24, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -17627,7 +17627,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
-OCaml config.status 4.08.1+rc2
|
||||
+OCaml config.status 4.08.1+dev4-2019-07-24
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
diff --git a/ocaml-variants.opam b/ocaml-variants.opam
|
||||
index dcadf49f8..69b727f5c 100644
|
||||
--- a/ocaml-variants.opam
|
||||
+++ b/ocaml-variants.opam
|
||||
@@ -1,5 +1,5 @@
|
||||
opam-version: "2.0"
|
||||
-version: "4.08.1+rc2"
|
||||
+version: "4.08.1+trunk"
|
||||
synopsis: "OCaml development version"
|
||||
depends: [
|
||||
"ocaml" {= "4.08.1" & post}
|
||||
--
|
||||
2.22.0.rc3
|
||||
|
||||
172
0002-Fix-spelling-errors-reported-by-Lintian.patch
Normal file
172
0002-Fix-spelling-errors-reported-by-Lintian.patch
Normal file
|
|
@ -0,0 +1,172 @@
|
|||
From 44306329db8a86a2362b6345bdde69deea4935dc Mon Sep 17 00:00:00 2001
|
||||
From: David Allsopp <david.allsopp@metastack.com>
|
||||
Date: Wed, 24 Jul 2019 14:45:33 +0100
|
||||
Subject: [PATCH 2/9] Fix spelling errors reported by Lintian
|
||||
|
||||
No change entry needed
|
||||
---
|
||||
asmcomp/cmmgen.ml | 4 ++--
|
||||
manual/manual/library/compilerlibs.etex | 2 +-
|
||||
middle_end/inlining_transforms.ml | 2 +-
|
||||
otherlibs/systhreads/event.mli | 4 ++--
|
||||
parsing/ast_iterator.mli | 2 +-
|
||||
parsing/ast_mapper.mli | 2 +-
|
||||
stdlib/bigarray.mli | 2 +-
|
||||
stdlib/filename.mli | 4 ++--
|
||||
stdlib/format.ml | 2 +-
|
||||
testsuite/tests/parsetree/source.ml | 2 +-
|
||||
testsuite/tests/typing-implicit_unpack/implicit_unpack.ml | 2 +-
|
||||
11 files changed, 14 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/asmcomp/cmmgen.ml b/asmcomp/cmmgen.ml
|
||||
index d0490998c..68e36d0d9 100644
|
||||
--- a/asmcomp/cmmgen.ml
|
||||
+++ b/asmcomp/cmmgen.ml
|
||||
@@ -1528,8 +1528,8 @@ end
|
||||
phases, we only share exits *)
|
||||
(* Some specific patterns can lead to switches where several cases
|
||||
point to the same action, but this action is not an exit (see GPR#1370).
|
||||
- The addition of the index in the action array as context allows to
|
||||
- share them correctly without duplication. *)
|
||||
+ The addition of the index in the action array as context allows
|
||||
+ sharing them correctly without duplication. *)
|
||||
module StoreExpForSwitch =
|
||||
Switch.CtxStore
|
||||
(struct
|
||||
diff --git a/manual/manual/library/compilerlibs.etex b/manual/manual/library/compilerlibs.etex
|
||||
index 88abbb823..d49193767 100644
|
||||
--- a/manual/manual/library/compilerlibs.etex
|
||||
+++ b/manual/manual/library/compilerlibs.etex
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
This chapter describes the OCaml front-end, which declares the abstract
|
||||
syntax tree used by the compiler, provides a way to parse, print
|
||||
-and pretty-print OCaml code, and ultimately allows to write abstract
|
||||
+and pretty-print OCaml code, and ultimately allows one to write abstract
|
||||
syntax tree preprocessors invoked via the {\tt -ppx} flag (see chapters~\ref{c:camlc}
|
||||
and~\ref{c:nativecomp}) and plugins invoked via the {\tt -plugin} flag
|
||||
(see chapter~\ref{c:plugins}).
|
||||
diff --git a/middle_end/inlining_transforms.ml b/middle_end/inlining_transforms.ml
|
||||
index b08e62bb0..c46a6cbe6 100755
|
||||
--- a/middle_end/inlining_transforms.ml
|
||||
+++ b/middle_end/inlining_transforms.ml
|
||||
@@ -118,7 +118,7 @@ let inline_by_copying_function_body ~env ~r
|
||||
&& ((not default_inline) || (not default_specialise)) then
|
||||
(* When the function inlined function is a stub, the annotation
|
||||
is reported to the function applications inside the stub.
|
||||
- This allows to report the annotation to the application the
|
||||
+ This allows reporting the annotation to the application the
|
||||
original programmer really intended: the stub is not visible
|
||||
in the source. *)
|
||||
set_inline_attribute_on_all_apply body
|
||||
diff --git a/otherlibs/systhreads/event.mli b/otherlibs/systhreads/event.mli
|
||||
index 83dbe9a17..fd452652c 100644
|
||||
--- a/otherlibs/systhreads/event.mli
|
||||
+++ b/otherlibs/systhreads/event.mli
|
||||
@@ -59,8 +59,8 @@ val wrap_abort : 'a event -> (unit -> unit) -> 'a event
|
||||
|
||||
val guard : (unit -> 'a event) -> 'a event
|
||||
(** [guard fn] returns the event that, when synchronized, computes
|
||||
- [fn()] and behaves as the resulting event. This allows to
|
||||
- compute events with side-effects at the time of the synchronization
|
||||
+ [fn()] and behaves as the resulting event. This enables
|
||||
+ computing events with side-effects at the time of the synchronization
|
||||
operation. *)
|
||||
|
||||
val sync : 'a event -> 'a
|
||||
diff --git a/parsing/ast_iterator.mli b/parsing/ast_iterator.mli
|
||||
index 5dc1c0ec5..26308d20d 100755
|
||||
--- a/parsing/ast_iterator.mli
|
||||
+++ b/parsing/ast_iterator.mli
|
||||
@@ -13,7 +13,7 @@
|
||||
(* *)
|
||||
(**************************************************************************)
|
||||
|
||||
-(** {!iterator} allows to implement AST inspection using open recursion. A
|
||||
+(** {!iterator} enables AST inspection using open recursion. A
|
||||
typical mapper would be based on {!default_iterator}, a trivial iterator,
|
||||
and will fall back on it for handling the syntax it does not modify.
|
||||
|
||||
diff --git a/parsing/ast_mapper.mli b/parsing/ast_mapper.mli
|
||||
index b342ca8a9..80d70fcca 100644
|
||||
--- a/parsing/ast_mapper.mli
|
||||
+++ b/parsing/ast_mapper.mli
|
||||
@@ -21,7 +21,7 @@
|
||||
the -ppx rewriters, handling such details as the serialization format,
|
||||
forwarding of command-line flags, and storing state.
|
||||
|
||||
- {!mapper} allows to implement AST rewriting using open recursion.
|
||||
+ {!mapper} enables AST rewriting using open recursion.
|
||||
A typical mapper would be based on {!default_mapper}, a deep
|
||||
identity mapper, and will fall back on it for handling the syntax it
|
||||
does not modify. For example:
|
||||
diff --git a/stdlib/bigarray.mli b/stdlib/bigarray.mli
|
||||
index 2c1261212..ea26f66f5 100644
|
||||
--- a/stdlib/bigarray.mli
|
||||
+++ b/stdlib/bigarray.mli
|
||||
@@ -133,7 +133,7 @@ type ('a, 'b) kind =
|
||||
of OCaml types with element kinds, and are re-exported below for
|
||||
backward-compatibility reasons.
|
||||
|
||||
- Using a generalized algebraic datatype (GADT) here allows to write
|
||||
+ Using a generalized algebraic datatype (GADT) here allows writing
|
||||
well-typed polymorphic functions whose return type depend on the
|
||||
argument type, such as:
|
||||
|
||||
diff --git a/stdlib/filename.mli b/stdlib/filename.mli
|
||||
index b05ad0d2e..9221c9ef5 100644
|
||||
--- a/stdlib/filename.mli
|
||||
+++ b/stdlib/filename.mli
|
||||
@@ -52,8 +52,8 @@ val check_suffix : string -> string -> bool
|
||||
val chop_suffix : string -> string -> string
|
||||
(** [chop_suffix name suff] removes the suffix [suff] from
|
||||
the filename [name]. The behavior is undefined if [name] does not
|
||||
- end with the suffix [suff]. It is thus recommmended to use
|
||||
- [chop_suffix_opt] instead.
|
||||
+ end with the suffix [suff]. [chop_suffix_opt] is thus recommended
|
||||
+ instead.
|
||||
*)
|
||||
|
||||
val chop_suffix_opt: suffix:string -> string -> string option
|
||||
diff --git a/stdlib/format.ml b/stdlib/format.ml
|
||||
index ae1f3c647..369c50c36 100644
|
||||
--- a/stdlib/format.ml
|
||||
+++ b/stdlib/format.ml
|
||||
@@ -687,7 +687,7 @@ let pp_print_if_newline state () =
|
||||
{ size = Size.zero; token = Pp_if_newline; length = 0 }
|
||||
|
||||
|
||||
-(* Generalized break hint that allows to print strings before/after
|
||||
+(* Generalized break hint that allows printing strings before/after
|
||||
same-line offset (width) or new-line offset *)
|
||||
let pp_print_custom_break state ~fits ~breaks =
|
||||
let before, width, after = fits in
|
||||
diff --git a/testsuite/tests/parsetree/source.ml b/testsuite/tests/parsetree/source.ml
|
||||
index c67012e18..a183f4482 100644
|
||||
--- a/testsuite/tests/parsetree/source.ml
|
||||
+++ b/testsuite/tests/parsetree/source.ml
|
||||
@@ -3072,7 +3072,7 @@ Error: Types marked with the immediate attribute must be
|
||||
non-pointer types like int or bool
|
||||
|}];;
|
||||
(*
|
||||
- Implicit unpack allows to omit the signature in (val ...) expressions.
|
||||
+ Implicit unpack allows the signature in (val ...) expressions to be omitted.
|
||||
|
||||
It also adds (module M : S) and (module M) patterns, relying on
|
||||
implicit (val ...) for the implementation. Such patterns can only
|
||||
diff --git a/testsuite/tests/typing-implicit_unpack/implicit_unpack.ml b/testsuite/tests/typing-implicit_unpack/implicit_unpack.ml
|
||||
index a6b4d697c..e503ee736 100644
|
||||
--- a/testsuite/tests/typing-implicit_unpack/implicit_unpack.ml
|
||||
+++ b/testsuite/tests/typing-implicit_unpack/implicit_unpack.ml
|
||||
@@ -3,7 +3,7 @@
|
||||
*)
|
||||
|
||||
(*
|
||||
- Implicit unpack allows to omit the signature in (val ...) expressions.
|
||||
+ Implicit unpack allows the signature in (val ...) expressions to be omitted.
|
||||
|
||||
It also adds (module M : S) and (module M) patterns, relying on
|
||||
implicit (val ...) for the implementation. Such patterns can only
|
||||
--
|
||||
2.22.0.rc3
|
||||
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
From ef549c9a97838331877b139f407269db2a0fc691 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 29 May 2012 20:44:18 +0100
|
||||
Subject: [PATCH 2/2] configure: Allow user defined C compiler flags.
|
||||
|
||||
---
|
||||
configure.ac | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index fb60c7c14c..f6a493ccf5 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3243,7 +3243,7 @@ AC_CONFIG_COMMANDS_PRE([
|
||||
[mkexedebugflag="${mkexe_ldflags_prefix}${mkexedebugflag}"])
|
||||
mkdll_ldflags=""
|
||||
AS_IF([test -n "${LDFLAGS}"],
|
||||
- [for flag in ${LDFLAGS}; do
|
||||
+ [for flag in "${LDFLAGS}"; do
|
||||
mkdll_ldflags="${mkdll_ldflags} ${mkexe_ldflags_prefix}${flag}"
|
||||
done
|
||||
mkdll_ldflags_exp="$mkdll_ldflags"])
|
||||
--
|
||||
2.52.0
|
||||
|
||||
40
0003-Fix-language-of-some-error-messages-in-ocamldoc.patch
Normal file
40
0003-Fix-language-of-some-error-messages-in-ocamldoc.patch
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
From 655519a3653a8e5b90e0fd862f9c5e20465ab7d0 Mon Sep 17 00:00:00 2001
|
||||
From: Stephane Glondu <steph@glondu.net>
|
||||
Date: Thu, 25 Jul 2019 09:08:03 +0200
|
||||
Subject: [PATCH 3/9] Fix language of some error messages in ocamldoc
|
||||
|
||||
No change entry needed
|
||||
---
|
||||
ocamldoc/odoc_sig.ml | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/ocamldoc/odoc_sig.ml b/ocamldoc/odoc_sig.ml
|
||||
index fb2eac671..e413c11a6 100644
|
||||
--- a/ocamldoc/odoc_sig.ml
|
||||
+++ b/ocamldoc/odoc_sig.ml
|
||||
@@ -1740,11 +1740,11 @@ module Analyser =
|
||||
)
|
||||
else
|
||||
(
|
||||
- raise (Failure "Parsetree.Pcty_arrow (parse_label, _, pclass_type), labels differents")
|
||||
+ raise (Failure "Parsetree.Pcty_arrow (parse_label, _, pclass_type), different labels")
|
||||
)
|
||||
|
||||
| _ ->
|
||||
- raise (Failure "analyse_class_kind pas de correspondance dans le match")
|
||||
+ raise (Failure "analyse_class_kind: match failure")
|
||||
|
||||
(** Analyse of a Parsetree.class_type and a Types.class_type to return a class_type_kind.*)
|
||||
and analyse_class_type_kind env current_class_name last_pos parse_class_type sig_class_type =
|
||||
@@ -1799,7 +1799,7 @@ module Analyser =
|
||||
([], k)
|
||||
*)
|
||||
| _ ->
|
||||
- raise (Failure "analyse_class_type_kind pas de correspondance dans le match")
|
||||
+ raise (Failure "analyse_class_type_kind: match failure")
|
||||
|
||||
let analyse_signature source_file input_file
|
||||
(ast : Parsetree.signature) (signat : Types.signature) =
|
||||
--
|
||||
2.22.0.rc3
|
||||
|
||||
27
0004-Don-t-add-rpaths-to-libraries.patch
Normal file
27
0004-Don-t-add-rpaths-to-libraries.patch
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
From 9378a6a792cd1e2f6861483a2a73122b8c5296dd Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 24 Jun 2014 10:00:15 +0100
|
||||
Subject: [PATCH 4/9] Don't add rpaths to libraries.
|
||||
|
||||
---
|
||||
tools/Makefile | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tools/Makefile b/tools/Makefile
|
||||
index ee0e0be4c..7c96b6405 100644
|
||||
--- a/tools/Makefile
|
||||
+++ b/tools/Makefile
|
||||
@@ -153,8 +153,8 @@ $(call byte_and_opt,ocamlmklib,ocamlmklibconfig.cmo config.cmo \
|
||||
ocamlmklibconfig.ml: $(ROOTDIR)/Makefile.config Makefile
|
||||
(echo 'let bindir = "$(BINDIR)"'; \
|
||||
echo 'let supports_shared_libraries = $(SUPPORTS_SHARED_LIBRARIES)';\
|
||||
- echo 'let default_rpath = "$(RPATH)"'; \
|
||||
- echo 'let mksharedlibrpath = "$(MKSHAREDLIBRPATH)"'; \
|
||||
+ echo 'let default_rpath = ""'; \
|
||||
+ echo 'let mksharedlibrpath = ""'; \
|
||||
echo 'let toolpref = "$(TOOLPREF)"';) \
|
||||
> ocamlmklibconfig.ml
|
||||
|
||||
--
|
||||
2.22.0.rc3
|
||||
|
||||
27
0005-configure-Allow-user-defined-C-compiler-flags.patch
Normal file
27
0005-configure-Allow-user-defined-C-compiler-flags.patch
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
From 4af3619375230488b370e5b3d5a8f48cef688607 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 29 May 2012 20:44:18 +0100
|
||||
Subject: [PATCH 5/9] configure: Allow user defined C compiler flags.
|
||||
|
||||
---
|
||||
configure.ac | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 5bb061162..6e37ff6c0 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -553,6 +553,10 @@ AS_CASE([$host],
|
||||
internal_cflags="$gcc_warnings"],
|
||||
[common_cflags="-O"])])
|
||||
|
||||
+# Allow CFLAGS and LDFLAGS to be added.
|
||||
+common_cflags="$common_cflags $CFLAGS"
|
||||
+oc_ldflags="$oc_ldflags $LDFLAGS"
|
||||
+
|
||||
internal_cppflags="-DCAML_NAME_SPACE $internal_cppflags"
|
||||
|
||||
# Enable SSE2 on x86 mingw to avoid using 80-bit registers.
|
||||
--
|
||||
2.22.0.rc3
|
||||
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
From 84381bccf6293903392d3d045bfb66b10b3e3bc3 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Fri, 26 Apr 2019 16:16:29 +0100
|
||||
Subject: [PATCH 6/9] configure: Remove incorrect assumption about
|
||||
cross-compiling.
|
||||
|
||||
See https://github.com/ocaml/ocaml/issues/8647#issuecomment-487094390
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 6e37ff6c0..3c287fbd0 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -958,7 +958,7 @@ AS_CASE([$host],
|
||||
[*-*-mingw32|*-pc-windows], [asppprofflags=''],
|
||||
[asppprofflags='-DPROFILING'])
|
||||
|
||||
-AS_IF([test -n "$host_alias"], [toolpref="${host}-"], [toolpref=""])
|
||||
+#AS_IF([test -n "$host_alias"], [toolpref="${host}-"], [toolpref=""])
|
||||
|
||||
# We first compute default values for as and aspp
|
||||
# If values have been given by the user then they take precedence over
|
||||
--
|
||||
2.22.0.rc3
|
||||
|
||||
6598
0007-Add-RISC-V-backend.patch
Normal file
6598
0007-Add-RISC-V-backend.patch
Normal file
File diff suppressed because it is too large
Load diff
40
0008-riscv-Emit-debug-info.patch
Normal file
40
0008-riscv-Emit-debug-info.patch
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
From e238841a2e41f4473dcc40a06a7ac1b9ad1c0357 Mon Sep 17 00:00:00 2001
|
||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||
Date: Tue, 5 Jun 2018 19:48:08 +0000
|
||||
Subject: [PATCH 8/9] riscv: Emit debug info.
|
||||
|
||||
---
|
||||
asmcomp/riscv/emit.mlp | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/asmcomp/riscv/emit.mlp b/asmcomp/riscv/emit.mlp
|
||||
index 88ea9f884..cc05aefe4 100644
|
||||
--- a/asmcomp/riscv/emit.mlp
|
||||
+++ b/asmcomp/riscv/emit.mlp
|
||||
@@ -261,6 +261,7 @@ let tailrec_entry_point = ref 0
|
||||
(* Output the assembly code for an instruction *)
|
||||
|
||||
let emit_instr i =
|
||||
+ emit_debug_info i.dbg;
|
||||
match i.desc with
|
||||
Lend -> ()
|
||||
| Lprologue ->
|
||||
@@ -556,6 +557,7 @@ let fundecl fundecl =
|
||||
` {emit_string code_space}\n`;
|
||||
` .align 2\n`;
|
||||
`{emit_symbol fundecl.fun_name}:\n`;
|
||||
+ emit_debug_info fundecl.fun_dbg;
|
||||
emit_all fundecl.fun_body;
|
||||
List.iter emit_call_gc !call_gc_sites;
|
||||
List.iter emit_call_bound_error !bound_error_sites;
|
||||
@@ -615,6 +617,7 @@ let data l =
|
||||
|
||||
let begin_assembly() =
|
||||
` .file \"\"\n`; (* PR#7073 *)
|
||||
+ reset_debug_info ();
|
||||
(* Emit the beginning of the segments *)
|
||||
let lbl_begin = Compilenv.make_symbol (Some "data_begin") in
|
||||
` {emit_string data_space}\n`;
|
||||
--
|
||||
2.22.0.rc3
|
||||
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
From 9217fab965cbde2a47dd91acb6e6452844d288ba Mon Sep 17 00:00:00 2001
|
||||
From: Stephen Dolan <sdolan@janestreet.com>
|
||||
Date: Mon, 29 Jul 2019 14:12:56 +0100
|
||||
Subject: [PATCH 9/9] Use the autoconf- or system-provided off_t rather than
|
||||
redetecting.
|
||||
|
||||
Hopefully fixes #8841
|
||||
---
|
||||
configure | 2 --
|
||||
configure.ac | 1 -
|
||||
runtime/caml/io.h | 4 +---
|
||||
3 files changed, 1 insertion(+), 6 deletions(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 33a0aa526..a43846117 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -12787,8 +12787,6 @@ _ACEOF
|
||||
|
||||
fi
|
||||
|
||||
-$as_echo "#define HAS_OFF_T 1" >>confdefs.h
|
||||
-
|
||||
|
||||
# Checks for structures
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 5731e0f98..38ff1235f 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -674,7 +674,6 @@ AC_CHECK_HEADER([sys/select.h], [AC_DEFINE([HAS_SYS_SELECT_H])], [],
|
||||
|
||||
## off_t
|
||||
AC_TYPE_OFF_T
|
||||
-AC_DEFINE([HAS_OFF_T])
|
||||
|
||||
# Checks for structures
|
||||
|
||||
diff --git a/runtime/caml/io.h b/runtime/caml/io.h
|
||||
index 87de679e5..2d961f956 100644
|
||||
--- a/runtime/caml/io.h
|
||||
+++ b/runtime/caml/io.h
|
||||
@@ -29,11 +29,9 @@
|
||||
|
||||
#if defined(_WIN32)
|
||||
typedef __int64 file_offset;
|
||||
-#elif defined(HAS_OFF_T)
|
||||
+#else
|
||||
#include <sys/types.h>
|
||||
typedef off_t file_offset;
|
||||
-#else
|
||||
-typedef long file_offset;
|
||||
#endif
|
||||
|
||||
struct channel {
|
||||
--
|
||||
2.22.0.rc3
|
||||
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-*
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
# Make %files lists from an installed tree of files.
|
||||
# Options:
|
||||
# -s: separate packaging; every subdirectory of %%{ocamldir}, except stublibs,
|
||||
# is placed in its own package. This option requires the existence of opam
|
||||
# *.install files in the build tree.
|
||||
# -n: suppress creation of a devel subpackage.
|
||||
%ocaml_files(sn) %{python3} /usr/lib/rpm/redhat/ocaml_files.py %{-s} %{-n} %{buildroot} %{ocamldir}
|
||||
|
||||
# Internal macro holding the common parts of ocaml_install and dune_install
|
||||
%ocaml_install_common(sn) %{expand:
|
||||
rm -rf %{buildroot}%{_prefix}/doc
|
||||
mlis=$(find %{buildroot}%{_libdir}/ocaml -name '*.mli')
|
||||
rm -f ${mlis//.mli/.ml}
|
||||
%ocaml_files %{-s} %{-n}}
|
||||
|
||||
# Install files listed in opam *.install files.
|
||||
# Options:
|
||||
# -s: separate packaging; every subdirectory of %%{ocamldir}, except stublibs,
|
||||
# is placed in its own package.
|
||||
# -n: suppress creation of a devel subpackage.
|
||||
%ocaml_install(sn) %{expand:
|
||||
%{python3} /usr/lib/rpm/redhat/ocaml_files.py -i %{-s} %{-n} %{buildroot} %{ocamldir}
|
||||
%ocaml_install_common %{-s} %{-n}}
|
||||
|
||||
# Add smp_mflags to arguments if no -j release option is given.
|
||||
# Add --release to arguments if no -p or --release option is given.
|
||||
# Add --verbose to arguments if it is not given.
|
||||
%dune_add_flags(-) %{lua:
|
||||
has_j = false
|
||||
has_p = false
|
||||
has_v = false
|
||||
for _, flag in pairs(arg) do
|
||||
if flag:find("^-j") then
|
||||
has_j = true
|
||||
elseif flag:find("^-p") or flag:find("^--release)") then
|
||||
has_p = true
|
||||
elseif flag:find("^--verbose") then
|
||||
has_v = true
|
||||
end
|
||||
end
|
||||
if not has_j then
|
||||
table.insert(arg, 1, rpm.expand("%{?_smp_mflags}"))
|
||||
end
|
||||
if not has_p then
|
||||
table.insert(arg, 1, "--release")
|
||||
end
|
||||
if not has_v then
|
||||
table.insert(arg, 1, "--verbose")
|
||||
end
|
||||
print(table.concat(arg, " "))
|
||||
}
|
||||
|
||||
# Build with dune
|
||||
%dune_build(-) dune build %{dune_add_flags %*}
|
||||
|
||||
# Run tests with dune
|
||||
%dune_check(-) dune runtest %{dune_add_flags %*}
|
||||
|
||||
# Install with dune
|
||||
# Options:
|
||||
# -s: separate packaging; every subdirectory of %%{ocamldir}, except stublibs,
|
||||
# is placed in its own package.
|
||||
# -n: suppress creation of a devel subpackage.
|
||||
%dune_install(sn) %{expand:
|
||||
dune install --destdir=%{buildroot} %{dune_add_flags %*}
|
||||
if [ -d _build/default/_doc/_html ]; then
|
||||
find _build/default/_doc/_html -name .dune-keep -delete
|
||||
fi
|
||||
%ocaml_install_common %{-s} %{-n}}
|
||||
566
ocaml.spec
566
ocaml.spec
|
|
@ -1,6 +1,3 @@
|
|||
# Don't add -Wl,-dT,<build dir>
|
||||
%undefine _package_note_flags
|
||||
|
||||
# OCaml has a bytecode backend that works on anything with a C
|
||||
# compiler, and a native code backend available on a subset of
|
||||
# architectures. A further subset of architectures support native
|
||||
|
|
@ -18,39 +15,31 @@
|
|||
%global natdynlink 0
|
||||
%endif
|
||||
|
||||
%global giturl https://github.com/ocaml/ocaml
|
||||
|
||||
# i686 support was dropped in OCaml 5 / Fedora 39.
|
||||
ExcludeArch: %{ix86}
|
||||
|
||||
# These are all the architectures that the tests run on. The tests
|
||||
# take a long time to run, so don't run them on slow machines.
|
||||
%global test_arches %{arm64} %{power64} %{riscv64} s390x %{x86_64}
|
||||
%global test_arches aarch64 %{power64} x86_64
|
||||
# These are the architectures for which the tests must pass otherwise
|
||||
# the build will fail.
|
||||
#global test_arches_required aarch64 ppc64le x86_64
|
||||
#%global test_arches_required aarch64 ppc64le x86_64
|
||||
%global test_arches_required NONE
|
||||
|
||||
# Architectures where parallel builds fail.
|
||||
#global no_parallel_build_arches aarch64
|
||||
#%global no_parallel_build_arches aarch64
|
||||
|
||||
#global rcver +git
|
||||
%global rcver %{nil}
|
||||
#%global rcver %{nil}
|
||||
%global rcver +rc2
|
||||
|
||||
Name: ocaml
|
||||
Version: 5.5.0
|
||||
Release: 2%{?dist}
|
||||
Version: 4.08.1
|
||||
Release: 0.rc2.1%{?dist}
|
||||
|
||||
Summary: OCaml compiler and programming environment
|
||||
|
||||
License: LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception
|
||||
License: QPL and (LGPLv2+ with exceptions)
|
||||
|
||||
URL: https://www.ocaml.org
|
||||
VCS: git:%{giturl}.git
|
||||
URL: http://www.ocaml.org
|
||||
|
||||
Source0: %{giturl}/archive/%{version}%{rcver}/%{name}-%{version}%{rcver}.tar.gz
|
||||
Source1: macros.ocaml-rpm
|
||||
Source2: ocaml_files.py
|
||||
Source0: http://caml.inria.fr/pub/distrib/ocaml-4.08/ocaml-%{version}%{rcver}.tar.xz
|
||||
|
||||
# IMPORTANT NOTE:
|
||||
#
|
||||
|
|
@ -61,55 +50,62 @@ Source2: ocaml_files.py
|
|||
#
|
||||
# https://pagure.io/fedora-ocaml
|
||||
#
|
||||
# Current branch: fedora-45-5.4.1
|
||||
# Current branch: fedora-31-4.08.1
|
||||
#
|
||||
# ALTERNATIVELY add a patch to the end of the list (leaving the
|
||||
# existing patches unchanged) adding a comment to note that it should
|
||||
# be incorporated into the git repo at a later time.
|
||||
#
|
||||
|
||||
# Fedora-specific patches
|
||||
Patch: 0001-Don-t-add-rpaths-to-libraries.patch
|
||||
Patch: 0002-configure-Allow-user-defined-C-compiler-flags.patch
|
||||
Patch0001: 0001-increment-version-number-after-tagging-4.08.1-rc2.patch
|
||||
Patch0002: 0002-Fix-spelling-errors-reported-by-Lintian.patch
|
||||
Patch0003: 0003-Fix-language-of-some-error-messages-in-ocamldoc.patch
|
||||
# Fedora-specific downstream patches.
|
||||
Patch0004: 0004-Don-t-add-rpaths-to-libraries.patch
|
||||
Patch0005: 0005-configure-Allow-user-defined-C-compiler-flags.patch
|
||||
Patch0006: 0006-configure-Remove-incorrect-assumption-about-cross-co.patch
|
||||
# Out of tree patch for RISC-V support.
|
||||
# https://github.com/nojb/riscv-ocaml
|
||||
Patch0007: 0007-Add-RISC-V-backend.patch
|
||||
Patch0008: 0008-riscv-Emit-debug-info.patch
|
||||
# Fix for https://github.com/ocaml/ocaml/issues/8841
|
||||
Patch0009: 0009-Use-the-autoconf-or-system-provided-off_t-rather-tha.patch
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: git-core
|
||||
BuildRequires: gcc
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: binutils-devel
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: gdbm-devel
|
||||
BuildRequires: gawk
|
||||
BuildRequires: perl-interpreter
|
||||
BuildRequires: annobin-annocheck
|
||||
BuildRequires: pkgconfig(libzstd)
|
||||
BuildRequires: util-linux
|
||||
BuildRequires: libICE-devel
|
||||
BuildRequires: libSM-devel
|
||||
BuildRequires: libX11-devel
|
||||
BuildRequires: libXaw-devel
|
||||
BuildRequires: libXext-devel
|
||||
BuildRequires: libXft-devel
|
||||
BuildRequires: libXmu-devel
|
||||
BuildRequires: libXrender-devel
|
||||
BuildRequires: libXt-devel
|
||||
BuildRequires: chrpath
|
||||
|
||||
# Documentation requirements
|
||||
BuildRequires: asciidoc
|
||||
|
||||
# ocamlopt runs gcc to link binaries. Because Fedora includes
|
||||
# hardening flags automatically, redhat-rpm-config is also required.
|
||||
# Compressed marshaling requires libzstd-devel.
|
||||
Requires: gcc
|
||||
Requires: redhat-rpm-config
|
||||
Requires: libzstd-devel%{?_isa}
|
||||
|
||||
# Because we pass -c flag to ocaml-find-requires (to avoid circular
|
||||
# dependencies) we also have to explicitly depend on the right version
|
||||
# of ocaml-runtime.
|
||||
Requires: ocaml-runtime%{?_isa} = %{version}-%{release}
|
||||
Requires: ocaml-runtime = %{version}-%{release}
|
||||
|
||||
# Force ocaml-srpm-macros to be at the latest version, both for builds
|
||||
# and installs, since OCaml 5.2 has a different set of native code
|
||||
# generators than previous versions.
|
||||
BuildRequires: ocaml-srpm-macros >= 10
|
||||
Requires: ocaml-srpm-macros >= 10
|
||||
# Bundles an MD5 implementation in byterun/md5.{c,h}
|
||||
Provides: bundled(md5-plumb)
|
||||
|
||||
Provides: ocaml(compiler) = %{version}
|
||||
|
||||
%if %{native_compiler}
|
||||
%global __ocaml_requires_opts -c -f '%{buildroot}%{_bindir}/ocamlrun %{buildroot}%{_bindir}/ocamlobjinfo.byte' -i Dynlink_cmo_format -i Dynlink_cmxs_format
|
||||
%else
|
||||
%global __ocaml_requires_opts -c -f '%{buildroot}%{_bindir}/ocamlrun %{buildroot}%{_bindir}/ocamlobjinfo.byte' -i Backend_intf -i Inlining_decision_intf -i Simplify_boxed_integer_ops_intf
|
||||
%endif
|
||||
%global __ocaml_requires_opts -c -f '%{buildroot}%{_bindir}/ocamlrun %{buildroot}%{_bindir}/ocamlobjinfo.byte'
|
||||
%global __ocaml_provides_opts -f '%{buildroot}%{_bindir}/ocamlrun %{buildroot}%{_bindir}/ocamlobjinfo.byte'
|
||||
|
||||
|
||||
%description
|
||||
OCaml is a high-level, strongly-typed, functional and object-oriented
|
||||
programming language from the ML family of languages.
|
||||
|
|
@ -121,16 +117,10 @@ and a comprehensive library.
|
|||
|
||||
|
||||
%package runtime
|
||||
# LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception: the project as a whole
|
||||
# LicenseRef-Fedora-Public-Domain: the MD5 implementation in runtime/caml/md5.h
|
||||
# and runtime/md5.c
|
||||
License: LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception AND LicenseRef-Fedora-Public-Domain
|
||||
Summary: OCaml runtime environment
|
||||
Requires: util-linux
|
||||
Provides: ocaml(runtime) = %{version}
|
||||
|
||||
# Bundles an MD5 implementation in runtime/caml/md5.h and runtime/md5.c
|
||||
Provides: bundled(md5-plumb)
|
||||
|
||||
%description runtime
|
||||
OCaml is a high-level, strongly-typed, functional and object-oriented
|
||||
programming language from the ML family of languages.
|
||||
|
|
@ -141,19 +131,25 @@ bytecode.
|
|||
|
||||
%package source
|
||||
Summary: Source code for OCaml libraries
|
||||
Requires: ocaml%{?_isa} = %{version}-%{release}
|
||||
Requires: ocaml = %{version}-%{release}
|
||||
|
||||
%description source
|
||||
Source code for OCaml libraries.
|
||||
|
||||
|
||||
%package x11
|
||||
Summary: X11 support for OCaml
|
||||
Requires: ocaml-runtime = %{version}-%{release}
|
||||
Requires: libX11-devel
|
||||
|
||||
%description x11
|
||||
X11 support for OCaml.
|
||||
|
||||
|
||||
%package ocamldoc
|
||||
# LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception: the project as a whole
|
||||
# LicenseRef-Fedora-Public-Domain: ocamldoc/ocamldoc.sty
|
||||
License: LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception AND LicenseRef-Fedora-Public-Domain
|
||||
Summary: Documentation generator for OCaml
|
||||
Requires: ocaml%{?_isa} = %{version}-%{release}
|
||||
Provides: ocamldoc = %{version}
|
||||
Requires: ocaml = %{version}-%{release}
|
||||
Provides: ocamldoc
|
||||
|
||||
%description ocamldoc
|
||||
Documentation generator for OCaml.
|
||||
|
|
@ -161,7 +157,6 @@ Documentation generator for OCaml.
|
|||
|
||||
%package docs
|
||||
Summary: Documentation for OCaml
|
||||
BuildArch: noarch
|
||||
Requires: ocaml = %{version}-%{release}
|
||||
|
||||
|
||||
|
|
@ -174,7 +169,7 @@ This package contains man pages.
|
|||
|
||||
%package compiler-libs
|
||||
Summary: Compiler libraries for OCaml
|
||||
Requires: ocaml%{?_isa} = %{version}-%{release}
|
||||
Requires: ocaml = %{version}-%{release}
|
||||
|
||||
|
||||
%description compiler-libs
|
||||
|
|
@ -187,253 +182,184 @@ Note that this exposes internal details of the OCaml compiler which
|
|||
may not be portable between versions.
|
||||
|
||||
|
||||
%package rpm-macros
|
||||
# LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception: the project as a whole
|
||||
# BSD-3-Clause: ocaml_files.py
|
||||
License: LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception AND BSD-3-Clause
|
||||
Summary: RPM macros for building OCaml packages
|
||||
BuildArch: noarch
|
||||
Requires: ocaml = %{version}-%{release}
|
||||
Requires: python3
|
||||
|
||||
|
||||
%description rpm-macros
|
||||
This package contains macros that are useful for building OCaml RPMs.
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -S git -n %{name}-%{version}%{rcver}
|
||||
%setup -q -T -b 0 -n %{name}-%{version}%{rcver}
|
||||
%autopatch -p1
|
||||
# Patches touch configure.ac, so rebuild it:
|
||||
autoconf --force
|
||||
|
||||
|
||||
%build
|
||||
%ifnarch %{no_parallel_build_arches}
|
||||
make="%make_build"
|
||||
make="make %{?_smp_mflags}"
|
||||
%else
|
||||
unset MAKEFLAGS
|
||||
make=make
|
||||
%endif
|
||||
|
||||
# Set ocamlmklib default flags to include Fedora linker flags
|
||||
sed -i '/ld_opts/s|\[\]|["%{build_ldflags}"]|' tools/ocamlmklib.ml
|
||||
|
||||
# Expose a dependency on the math library
|
||||
sed -i '/^EXTRACAMLFLAGS=/aLINKOPTS=-cclib -lm' otherlibs/unix/Makefile
|
||||
|
||||
# Don't use %%configure macro because it sets --build, --host which
|
||||
# breaks some incorrect assumptions made by OCaml's configure.ac
|
||||
#
|
||||
# See also:
|
||||
# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/2O4HBOK6PTQZAFAVIRDVMZGG2PYB2QHM/
|
||||
# https://github.com/ocaml/ocaml/issues/8647
|
||||
#
|
||||
# We set --libdir to the unusual directory because we want OCaml to
|
||||
# install its libraries and other files into a subdirectory.
|
||||
#
|
||||
# OC_CFLAGS/OC_LDFLAGS control what flags OCaml passes to the linker
|
||||
# when doing final linking of OCaml binaries. Setting these is
|
||||
# necessary to ensure that generated binaries have Fedora hardening
|
||||
# features.
|
||||
./configure \
|
||||
--prefix=%{_prefix} \
|
||||
--sysconfdir=%{_sysconfdir} \
|
||||
--mandir=%{_mandir} \
|
||||
# Force --host because of:
|
||||
# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/2O4HBOK6PTQZAFAVIRDVMZGG2PYB2QHM/
|
||||
%configure \
|
||||
--libdir=%{_libdir}/ocaml \
|
||||
--enable-flambda \
|
||||
%if %{native_compiler}
|
||||
--enable-native-compiler \
|
||||
--enable-native-toplevel \
|
||||
%else
|
||||
--disable-native-compiler \
|
||||
--disable-native-toplevel \
|
||||
%endif
|
||||
%ifarch %{x86_64} %{arm64}
|
||||
%if 0%{?_include_frame_pointers}
|
||||
--enable-frame-pointers \
|
||||
%endif
|
||||
%endif
|
||||
%ifarch %{test_arches}
|
||||
--enable-ocamltest \
|
||||
%else
|
||||
--disable-ocamltest \
|
||||
%endif
|
||||
OC_CFLAGS='%{build_cflags}' \
|
||||
OC_LDFLAGS='%{build_ldflags}' \
|
||||
%{nil}
|
||||
--host=`./config/gnu/config.guess`
|
||||
$make world
|
||||
%if %{native_compiler}
|
||||
$make opt
|
||||
$make opt.opt
|
||||
%endif
|
||||
|
||||
# Build the README and fix up references to other doc files
|
||||
asciidoc -d book README.adoc
|
||||
for fil in CONTRIBUTING.md HACKING.adoc INSTALL.adoc README.win32.adoc; do
|
||||
sed -e "s,\"$fil\",\"https://github.com/ocaml/ocaml/blob/trunk/$fil\"," \
|
||||
-i README.html
|
||||
done
|
||||
|
||||
|
||||
%check
|
||||
%ifarch %{ocaml_native_compiler}
|
||||
# For information only, compile a binary and dump the annocheck data
|
||||
# from it. Useful so we know if hardening is being enabled, but don't
|
||||
# fail because not every hardening feature can be enabled here.
|
||||
echo 'print_endline "hello, world"' > hello.ml
|
||||
./ocamlopt.opt -verbose -I stdlib hello.ml -o hello ||:
|
||||
annocheck -v hello ||:
|
||||
%endif
|
||||
|
||||
%ifarch %{test_arches}
|
||||
cd testsuite
|
||||
|
||||
%ifarch %{test_arches_required}
|
||||
make -j1 tests
|
||||
make -j1 all
|
||||
%else
|
||||
make -j1 tests ||:
|
||||
make -j1 all ||:
|
||||
%endif
|
||||
%endif
|
||||
|
||||
|
||||
%install
|
||||
%make_install
|
||||
|
||||
# OCaml 5.5.0 uses relative paths in ld.conf by default to support relocatable
|
||||
# OCaml, which we don't need. Overwrite ld.conf with the absolute path.
|
||||
echo %{_libdir}/ocaml/stublibs > $RPM_BUILD_ROOT%{_libdir}/ocaml/ld.conf
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
perl -pi -e "s|^$RPM_BUILD_ROOT||" $RPM_BUILD_ROOT%{_libdir}/ocaml/ld.conf
|
||||
|
||||
echo %{version} > $RPM_BUILD_ROOT%{_libdir}/ocaml/fedora-ocaml-release
|
||||
|
||||
# Remove the installed documentation. We will install it using %%doc
|
||||
rm -rf $RPM_BUILD_ROOT%{_docdir}/ocaml
|
||||
# Remove rpaths from stublibs .so files.
|
||||
chrpath --delete $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs/*.so
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{rpmmacrodir}
|
||||
install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{rpmmacrodir}/macros.ocaml-rpm
|
||||
find $RPM_BUILD_ROOT -name .ignore -delete
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_rpmconfigdir}/redhat
|
||||
install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_rpmconfigdir}/redhat
|
||||
# Remove .cmt and .cmti files, for now. We could package them later.
|
||||
# See also: http://www.ocamlpro.com/blog/2012/08/20/ocamlpro-and-4.00.0.html
|
||||
find $RPM_BUILD_ROOT \( -name '*.cmt' -o -name '*.cmti' \) -a -delete
|
||||
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%doc LICENSE
|
||||
%{_bindir}/ocaml
|
||||
|
||||
%{_bindir}/ocamlcmt
|
||||
%{_bindir}/ocamlcp
|
||||
%{_bindir}/ocamldebug
|
||||
%{_bindir}/ocamlmklib
|
||||
%{_bindir}/ocamlmktop
|
||||
%{_bindir}/ocamlprof
|
||||
%{_bindir}/ocaml-instr-graph
|
||||
%{_bindir}/ocaml-instr-report
|
||||
%{_bindir}/ocamlyacc
|
||||
|
||||
# symlink to either .byte or .opt version
|
||||
%{_bindir}/ocamlc
|
||||
%{_bindir}/ocamlcp
|
||||
%{_bindir}/ocamldep
|
||||
%{_bindir}/ocamllex
|
||||
%{_bindir}/ocamlmklib
|
||||
%{_bindir}/ocamlmktop
|
||||
%{_bindir}/ocamlobjinfo
|
||||
%{_bindir}/ocamloptp
|
||||
%{_bindir}/ocamlprof
|
||||
|
||||
# bytecode versions
|
||||
%{_bindir}/ocamlc.byte
|
||||
%{_bindir}/ocamlcp.byte
|
||||
%{_bindir}/ocamldep.byte
|
||||
%{_bindir}/ocamllex.byte
|
||||
%{_bindir}/ocamlmklib.byte
|
||||
%{_bindir}/ocamlmktop.byte
|
||||
%{_bindir}/ocamlobjinfo.byte
|
||||
%{_bindir}/ocamloptp.byte
|
||||
%{_bindir}/ocamlprof.byte
|
||||
|
||||
%if %{native_compiler}
|
||||
# native code versions
|
||||
%{_bindir}/ocamlc.opt
|
||||
%{_bindir}/ocamlcp.opt
|
||||
%{_bindir}/ocamldep.opt
|
||||
%{_bindir}/ocamllex.opt
|
||||
%{_bindir}/ocamlmklib.opt
|
||||
%{_bindir}/ocamlmktop.opt
|
||||
%{_bindir}/ocamlobjinfo.opt
|
||||
%{_bindir}/ocamloptp.opt
|
||||
%{_bindir}/ocamlprof.opt
|
||||
%endif
|
||||
|
||||
%if %{native_compiler}
|
||||
%{_bindir}/ocamlnat
|
||||
%{_bindir}/ocamlopt
|
||||
%{_bindir}/ocamlopt.byte
|
||||
%{_bindir}/ocamlopt.opt
|
||||
%{_bindir}/ocamloptp
|
||||
%endif
|
||||
|
||||
#%{_libdir}/ocaml/addlabels
|
||||
#%{_libdir}/ocaml/scrapelabels
|
||||
%{_libdir}/ocaml/camlheader
|
||||
%{_libdir}/ocaml/camlheader_ur
|
||||
%{_libdir}/ocaml/expunge
|
||||
%{_libdir}/ocaml/extract_crc
|
||||
%{_libdir}/ocaml/ld.conf
|
||||
%{_libdir}/ocaml/Makefile.config
|
||||
|
||||
%{_libdir}/ocaml/*.a
|
||||
%if %{natdynlink}
|
||||
%{_libdir}/ocaml/*.cmxs
|
||||
%endif
|
||||
%if %{native_compiler}
|
||||
%{_libdir}/ocaml/*.cmxa
|
||||
%{_libdir}/ocaml/*.cmx
|
||||
%{_libdir}/ocaml/*.o
|
||||
%{_libdir}/ocaml/libasmrun_shared.so
|
||||
%endif
|
||||
%{_libdir}/ocaml/*.mli
|
||||
%{_libdir}/ocaml/sys.ml.in
|
||||
|
||||
%{_libdir}/ocaml/{dynlink,runtime_events,str,threads,unix}/*.mli
|
||||
%{_libdir}/ocaml/libcamlrun_shared.so
|
||||
%{_libdir}/ocaml/objinfo_helper
|
||||
%{_libdir}/ocaml/vmthreads/*.mli
|
||||
%{_libdir}/ocaml/vmthreads/*.a
|
||||
%{_libdir}/ocaml/threads/*.mli
|
||||
%if %{native_compiler}
|
||||
%{_libdir}/ocaml/{dynlink,runtime_events,str,threads,unix}/*.a
|
||||
%{_libdir}/ocaml/{dynlink,runtime_events,str,threads,unix}/*.cmxa
|
||||
%{_libdir}/ocaml/{dynlink,profiling,runtime_events,str,threads,unix}/*.cmx
|
||||
%{_libdir}/ocaml/profiling/*.o
|
||||
%{_libdir}/ocaml/threads/*.a
|
||||
%{_libdir}/ocaml/threads/*.cmxa
|
||||
%{_libdir}/ocaml/threads/*.cmx
|
||||
%endif
|
||||
%if %{natdynlink}
|
||||
%{_libdir}/ocaml/{runtime_events,str,unix}/*.cmxs
|
||||
%endif
|
||||
|
||||
# headers
|
||||
%{_libdir}/ocaml/caml
|
||||
%exclude %{_libdir}/ocaml/graphicsX11.mli
|
||||
|
||||
|
||||
%files runtime
|
||||
%doc README.html Changes
|
||||
%license LICENSE
|
||||
%doc README.adoc LICENSE Changes
|
||||
%{_bindir}/ocamlrun
|
||||
%{_bindir}/*ocamlrun-a100
|
||||
%{_bindir}/ocamlrund
|
||||
%{_bindir}/*ocamlrund-a100
|
||||
%{_bindir}/ocamlruni
|
||||
%{_bindir}/*ocamlruni-a100
|
||||
%dir %{_libdir}/ocaml
|
||||
%{_libdir}/ocaml/libasmrun*.so
|
||||
%{_libdir}/ocaml/libcamlrun*.so
|
||||
%{_libdir}/ocaml/VERSION
|
||||
%{_libdir}/ocaml/*.cmo
|
||||
%{_libdir}/ocaml/*.cmi
|
||||
%{_libdir}/ocaml/*.cma
|
||||
%{_libdir}/ocaml/ld.conf
|
||||
%{_libdir}/ocaml/stublibs
|
||||
%dir %{_libdir}/ocaml/dynlink
|
||||
%{_libdir}/ocaml/dynlink/META
|
||||
%{_libdir}/ocaml/dynlink/*.cmi
|
||||
%{_libdir}/ocaml/dynlink/*.cma
|
||||
%dir %{_libdir}/ocaml/profiling
|
||||
%{_libdir}/ocaml/profiling/*.cmo
|
||||
%{_libdir}/ocaml/profiling/*.cmi
|
||||
%dir %{_libdir}/ocaml/runtime_events
|
||||
%{_libdir}/ocaml/runtime_events/META
|
||||
%{_libdir}/ocaml/runtime_events/*.cmi
|
||||
%{_libdir}/ocaml/runtime_events/*.cma
|
||||
%{_libdir}/ocaml/runtime-launch-info
|
||||
%{_libdir}/ocaml/stdlib
|
||||
%dir %{_libdir}/ocaml/str
|
||||
%{_libdir}/ocaml/str/META
|
||||
%{_libdir}/ocaml/str/*.cmi
|
||||
%{_libdir}/ocaml/str/*.cma
|
||||
%{_libdir}/ocaml/target_camlheaderd
|
||||
%{_libdir}/ocaml/target_camlheaderi
|
||||
%dir %{_libdir}/ocaml/vmthreads
|
||||
%{_libdir}/ocaml/vmthreads/*.cmi
|
||||
%{_libdir}/ocaml/vmthreads/*.cma
|
||||
%dir %{_libdir}/ocaml/threads
|
||||
%{_libdir}/ocaml/threads/META
|
||||
%{_libdir}/ocaml/threads/*.cmi
|
||||
%{_libdir}/ocaml/threads/*.cma
|
||||
%dir %{_libdir}/ocaml/unix
|
||||
%{_libdir}/ocaml/unix/META
|
||||
%{_libdir}/ocaml/unix/*.cmi
|
||||
%{_libdir}/ocaml/unix/*.cma
|
||||
%{_libdir}/ocaml/fedora-ocaml-release
|
||||
%exclude %{_libdir}/ocaml/graphicsX11.cmi
|
||||
|
||||
|
||||
%files source
|
||||
%license LICENSE
|
||||
%doc LICENSE
|
||||
%{_libdir}/ocaml/*.ml
|
||||
%{_libdir}/ocaml/*.cmt*
|
||||
%{_libdir}/ocaml/*/*.cmt*
|
||||
|
||||
|
||||
%files x11
|
||||
%doc LICENSE
|
||||
%{_libdir}/ocaml/graphicsX11.cmi
|
||||
%{_libdir}/ocaml/graphicsX11.mli
|
||||
|
||||
|
||||
%files ocamldoc
|
||||
%license LICENSE
|
||||
%doc LICENSE
|
||||
%doc ocamldoc/Changes.txt
|
||||
%{_bindir}/ocamldoc*
|
||||
%{_libdir}/ocaml/ocamldoc
|
||||
|
|
@ -445,229 +371,21 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_rpmconfigdir}/redhat
|
|||
|
||||
|
||||
%files compiler-libs
|
||||
%license LICENSE
|
||||
%{_libdir}/ocaml/compiler-libs
|
||||
|
||||
|
||||
%files rpm-macros
|
||||
%{rpmmacrodir}/macros.ocaml-rpm
|
||||
%{_rpmconfigdir}/redhat/ocaml_files.py
|
||||
%doc LICENSE
|
||||
%dir %{_libdir}/ocaml/compiler-libs
|
||||
%{_libdir}/ocaml/compiler-libs/*.mli
|
||||
%{_libdir}/ocaml/compiler-libs/*.cmi
|
||||
%{_libdir}/ocaml/compiler-libs/*.cmo
|
||||
%{_libdir}/ocaml/compiler-libs/*.cma
|
||||
%if %{native_compiler}
|
||||
%{_libdir}/ocaml/compiler-libs/*.a
|
||||
%{_libdir}/ocaml/compiler-libs/*.cmxa
|
||||
%{_libdir}/ocaml/compiler-libs/*.cmx
|
||||
%{_libdir}/ocaml/compiler-libs/*.o
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 5.5.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
|
||||
|
||||
* Tue Jun 23 2026 Jerry James <loganjerry@gmail.com> - 5.5.0-1
|
||||
- New upstream version 5.5.0 (RHBZ#2442622)
|
||||
- Drop upstreamed fix for arm64 frame pointers
|
||||
- Reenable LTO
|
||||
- Move ld.conf, libasmrun, and libcamlrun to ocaml-runtime
|
||||
- Drop hardlink dependency; rpm now does this by default
|
||||
- Drop unused utilx-linux dependency
|
||||
|
||||
* Thu Feb 26 2026 Richard W.M. Jones <rjones@redhat.com> - 5.4.1-4
|
||||
- Backport fix for arm64 frame pointers
|
||||
|
||||
* Fri Feb 20 2026 Richard W.M. Jones <rjones@redhat.com> - 5.4.1-1
|
||||
- New upstream version 5.4.1 (RHBZ#2440356)
|
||||
|
||||
* Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 5.4.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
|
||||
|
||||
* Mon Oct 13 2025 Richard W.M. Jones <rjones@redhat.com> - 5.4.0-1
|
||||
- New upstream version 5.4.0 (RHBZ#2368289)
|
||||
|
||||
* Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Sun Jun 22 2025 Yaakov Selkowitz <yselkowi@redhat.com> - 5.3.0-3
|
||||
- Fix RPM macros for Python 3.14
|
||||
|
||||
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 5.3.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Thu Jan 9 2025 Jerry James <loganjerry@gmail.com> - 5.3.0-1
|
||||
- New upstream version 5.3.0
|
||||
- Drop upstreamed patches
|
||||
- BR git-core instead of git
|
||||
|
||||
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Wed Jun 19 2024 Richard W.M. Jones <rjones@redhat.com> - 5.2.0-2
|
||||
- Add fix for ppc64le code generation issue found after 5.2.0 was released
|
||||
|
||||
* Thu May 23 2024 Jerry James <loganjerry@gmail.com> - 5.2.0-1
|
||||
- New upstream version 5.2.0 (RHBZ#2269805)
|
||||
- Drop upstreamed frame pointer and s390x patches
|
||||
|
||||
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.1-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Mon Dec 18 2023 Richard W.M. Jones <rjones@redhat.com> - 5.1.1-2
|
||||
- Add s390x code generation fix
|
||||
https://github.com/ocaml/ocaml/issues/12829
|
||||
|
||||
* Mon Dec 11 2023 Richard W.M. Jones <rjones@redhat.com> - 5.1.1-1
|
||||
- New upstream version 5.1.1 (RHBZ#2239227)
|
||||
|
||||
* Tue Nov 14 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 5.1.0-5
|
||||
- Drop unused BR parallel
|
||||
|
||||
* Fri Oct 06 2023 Richard W.M. Jones <rjones@redhat.com> - 5.1.0-4
|
||||
- Use BR ocaml-srpm-macros to force latest to be built against
|
||||
|
||||
* Thu Oct 05 2023 Richard W.M. Jones <rjones@redhat.com> - 5.1.0-3
|
||||
- Rebuild against updated ocaml-srpm-macros
|
||||
|
||||
* Thu Oct 5 2023 Richard W.M. Jones <rjones@redhat.com> - 5.1.0-2
|
||||
- Add upstream patch added after 5.1.0
|
||||
|
||||
* Wed Oct 4 2023 Jerry James <loganjerry@gmail.com> - 5.1.0-1
|
||||
- Version 5.1.0
|
||||
- Add LicenseRef-Fedora-Public-Domain to the runtime License field
|
||||
- New ocaml-rpm-macros subpackage
|
||||
- Depend on libzstd-devel for compressed marshaling
|
||||
- Disable LTO
|
||||
|
||||
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Wed Jul 12 2023 Richard W.M. Jones <rjones@redhat.com> - 5.0.0-3
|
||||
- Force ocaml-srpm-macros to be the latest version.
|
||||
|
||||
* Wed Jun 14 2023 Jerry James <loganjerry@gmail.com> - 5.0.0-2
|
||||
- Version 5.0.0
|
||||
- Convert License tag to SPDX
|
||||
- Ship HTML documentation instead of asciidoc source
|
||||
- Set ocamlmklib default flags to the Fedora linker flags
|
||||
- Enable frame pointers on x86_64
|
||||
|
||||
* Mon Jan 23 2023 Richard W.M. Jones <rjones@redhat.com> - 4.14.0-5
|
||||
- Rebuild OCaml packages for F38
|
||||
|
||||
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.14.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Mon Sep 5 2022 Richard W.M. Jones <rjones@redhat.com> - 4.14.0-3
|
||||
- Include more upstream patches from 4.14 branch
|
||||
|
||||
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.14.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Sat Jun 18 2022 Richard W.M. Jones <rjones@redhat.com> - 4.14.0-1
|
||||
- New upstream version 4.14.0
|
||||
|
||||
* Thu Jun 9 2022 Jerry James <loganjerry@gmail.com> - 4.13.1-4
|
||||
- Fix the Source0 URL
|
||||
- chrpath is no longer needed
|
||||
- Use the %%license macro
|
||||
- Build the test binaries so the tests will run
|
||||
|
||||
* Fri Feb 04 2022 Richard W.M. Jones <rjones@redhat.com> - 4.13.1-4
|
||||
- Rebuild 4.13.1 to remove package notes
|
||||
|
||||
* Wed Jan 26 2022 Richard W.M. Jones <rjones@redhat.com> - 4.13.1-3
|
||||
- Disable package note misfeature
|
||||
- Remove duplicate flags from mkexe
|
||||
|
||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.13.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Mon Oct 04 2021 Richard W.M. Jones <rjones@redhat.com> - 4.13.1-1
|
||||
- New upstream version 4.13.1
|
||||
|
||||
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.12.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Wed Jun 23 2021 Richard W.M. Jones <rjones@redhat.com> - 4.12.0-2
|
||||
- Move to final version of upstream patch for non-constant SIGSTKSZ
|
||||
|
||||
* Sun Feb 28 2021 Richard W.M. Jones <rjones@redhat.com> - 4.12.0-1
|
||||
- OCaml 4.12.0 release (RHBZ#1893381).
|
||||
- Workaround for glibc non-constant SIGSTKSZ
|
||||
(https://github.com/ocaml/ocaml/issues/10250)
|
||||
- Package *.cmt and *.cmti files.
|
||||
- Remove objinfo_helper since it is no longer built.
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.11.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Tue Sep 01 2020 Richard W.M. Jones <rjones@redhat.com> - 4.11.1-1
|
||||
- OCaml 4.11.1 release (RHBZ#1870368#c26).
|
||||
|
||||
* Fri Aug 21 2020 Richard W.M. Jones <rjones@redhat.com> - 4.11.0-1
|
||||
- OCaml 4.11.0 release (RHBZ#1870368).
|
||||
|
||||
* Tue Aug 04 2020 Richard W.M. Jones <rjones@redhat.com> - 4.11.0-0.9.dev2
|
||||
- Bump and rebuild to fix DWARF versioning issues.
|
||||
- Enable LTO again.
|
||||
|
||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.11.0-0.7.dev2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Tue Jul 14 2020 Tom Stellard <tstellar@redhat.com> - 4.11.0-0.6.dev2
|
||||
- Use make macros
|
||||
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
|
||||
|
||||
* Wed Jul 01 2020 Jeff Law <law@redhat.com> - 4.11.0-0.5.dev2.fc33
|
||||
- Disable LTO
|
||||
|
||||
* Mon May 04 2020 Richard W.M. Jones <rjones@redhat.com> - 4.11.0-0.4.dev2.fc33
|
||||
- Move to OCaml 4.11.0+dev2-2020-04-22.
|
||||
- Backport upstream RISC-V backend from 4.12 + fixes.
|
||||
- Enable tests on riscv64.
|
||||
- Disable ocaml-instr-* tools on riscv64.
|
||||
|
||||
* Tue Apr 21 2020 Richard W.M. Jones <rjones@redhat.com> - 4.11.0-0.3.pre.fc33
|
||||
- Add fixes for various issues found in the previous build.
|
||||
|
||||
* Fri Apr 17 2020 Richard W.M. Jones <rjones@redhat.com> - 4.11.0-0.2.pre.fc33
|
||||
- Move to OCaml 4.11.0 pre-release with support for RISC-V.
|
||||
|
||||
* Sat Apr 11 2020 Richard W.M. Jones <rjones@redhat.com> - 4.10.0-4.fc33
|
||||
- Fix RISC-V backend.
|
||||
|
||||
* Thu Apr 02 2020 Richard W.M. Jones <rjones@redhat.com> - 4.10.0-3.fc33
|
||||
- Update all OCaml dependencies for RPM 4.16.
|
||||
|
||||
* Thu Feb 27 2020 Richard W.M. Jones <rjones@redhat.com> - 4.10.0-2.fc33
|
||||
- Add dist tag.
|
||||
|
||||
* Tue Feb 25 2020 Richard W.M. Jones <rjones@redhat.com> - 4.10.0-1
|
||||
- OCaml 4.10.0 final.
|
||||
|
||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.10.0-0.beta1.0.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Sat Jan 18 2020 Richard W.M. Jones <rjones@redhat.com> - 4.10.0-0.beta1
|
||||
- OCaml 4.10.0+beta1.
|
||||
|
||||
* Tue Jan 07 2020 Richard W.M. Jones <rjones@redhat.com> - 4.09.0-13
|
||||
- Bump release and rebuild.
|
||||
|
||||
* Tue Jan 07 2020 Richard W.M. Jones <rjones@redhat.com> - 4.09.0-4
|
||||
- OCaml 4.09.0 for riscv64
|
||||
|
||||
* Tue Dec 10 2019 Richard W.M. Jones <rjones@redhat.com> - 4.09.0-3
|
||||
- Require redhat-rpm-config to get hardening flags when linking.
|
||||
|
||||
* Thu Dec 05 2019 Richard W.M. Jones <rjones@redhat.com> - 4.09.0-2
|
||||
- OCaml 4.09.0 final.
|
||||
- Use autosetup, remove old setup line.
|
||||
- Remove ocamloptp binaries.
|
||||
- Rename target_camlheader[di] -> camlheader[di] files.
|
||||
- Remove vmthreads - old threading library which is no longer built.
|
||||
- Remove x11 subpackage which is obsolete.
|
||||
- Further fixes to CFLAGS and annobin.
|
||||
|
||||
* Fri Aug 16 2019 Richard W.M. Jones <rjones@redhat.com> - 4.08.1-1
|
||||
- OCaml 4.08.1 final.
|
||||
|
||||
* Tue Jul 30 2019 Richard W.M. Jones <rjones@redhat.com> - 4.08.1-0.rc2.1
|
||||
- OCaml 4.08.1+rc2.
|
||||
- Include fix for miscompilation of off_t on 32 bit architectures.
|
||||
|
|
|
|||
451
ocaml_files.py
451
ocaml_files.py
|
|
@ -1,451 +0,0 @@
|
|||
# Copyright 2022-3, Jerry James
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name of Red Hat nor the names of its
|
||||
# contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import shutil
|
||||
import string
|
||||
import sys
|
||||
from collections.abc import Iterable, Iterator
|
||||
from enum import Enum, auto
|
||||
from typing import Callable, final
|
||||
|
||||
# Version of this script
|
||||
version=2
|
||||
|
||||
#
|
||||
# BUILDROOT CATEGORIZATION
|
||||
#
|
||||
|
||||
# Directories to ignore when generating %dir entries
|
||||
root_dirs: set[str] = {
|
||||
'/',
|
||||
'/etc',
|
||||
'/usr',
|
||||
'/usr/bin',
|
||||
'/usr/lib',
|
||||
'/usr/lib/ocaml',
|
||||
'/usr/lib/ocaml/caml',
|
||||
'/usr/lib/ocaml/stublibs',
|
||||
'/usr/lib/ocaml/threads',
|
||||
'/usr/lib64',
|
||||
'/usr/lib64/ocaml',
|
||||
'/usr/lib64/ocaml/caml',
|
||||
'/usr/lib64/ocaml/stublibs',
|
||||
'/usr/lib64/ocaml/threads',
|
||||
'/usr/libexec',
|
||||
'/usr/sbin',
|
||||
'/usr/share',
|
||||
'/usr/share/doc'
|
||||
}
|
||||
|
||||
def find_buildroot_toplevel(buildroot: str) -> list[str]:
|
||||
"""Find toplevel files and directories in the buildroot.
|
||||
|
||||
:param str buildroot: path to the buildroot
|
||||
:return: a list of toplevel files and directories in the buildroot
|
||||
"""
|
||||
bfiles: list[str] = []
|
||||
for path, dirs, files in os.walk(buildroot):
|
||||
for i in range(len(dirs) - 1, -1, -1):
|
||||
d = os.path.join(path, dirs[i])[len(buildroot):]
|
||||
if d not in root_dirs and not d.startswith('/usr/share/man'):
|
||||
bfiles.append(d)
|
||||
del dirs[i]
|
||||
for f in files:
|
||||
realfile = os.path.join(path, f)[len(buildroot):]
|
||||
if realfile.startswith('/usr/share/man'):
|
||||
bfiles.append(realfile + '*')
|
||||
else:
|
||||
bfiles.append(realfile)
|
||||
return bfiles
|
||||
|
||||
# File suffixes that go into a devel subpackage
|
||||
dev_suffixes: set[str] = {
|
||||
'a', 'cmo', 'cmt', 'cmti', 'cmx', 'cmxa', 'h', 'idl', 'ml', 'mli', 'o'
|
||||
}
|
||||
|
||||
def is_devel_file(filname: str) -> bool:
|
||||
"""Determine whether a file belongs to a devel subpackage.
|
||||
|
||||
:param str filname: the filename to check
|
||||
:return: True if the file belongs to a devel subpackage, else False
|
||||
"""
|
||||
return (filname == 'dune-package' or filname == 'opam' or
|
||||
(os.path.splitext(filname)[1][1:] in dev_suffixes
|
||||
and not filname.endswith('_top_init.ml')))
|
||||
|
||||
def find_buildroot_all(buildroot: str, devel: bool, add_star: bool) -> list[set[str]]:
|
||||
"""Find all files and directories in the buildroot and optionally
|
||||
categorize them as 'main' or 'devel'.
|
||||
|
||||
:param Namespace args: parsed command line arguments
|
||||
:param bool devel: True to split into 'main' and 'devel', False otherwise
|
||||
:param bool add_star: True to add a star to man page filenames
|
||||
:return: a list of files and directories, in this order: main files,
|
||||
main directories, devel files, and devel directories
|
||||
"""
|
||||
bfiles: list[set[str]] = [set(), set(), set()]
|
||||
bdirs: set[str] = set()
|
||||
for path, dirs, files in os.walk(buildroot):
|
||||
for d in dirs:
|
||||
realdir = os.path.join(path, d)[len(buildroot):]
|
||||
if realdir not in root_dirs and not realdir.startswith('/usr/share/man'):
|
||||
bdirs.add(realdir)
|
||||
for f in files:
|
||||
realfile = os.path.join(path, f)[len(buildroot):]
|
||||
if devel and is_devel_file(os.path.basename(realfile)):
|
||||
bfiles[2].add(realfile)
|
||||
else:
|
||||
if add_star and realfile.startswith('/usr/share/man'):
|
||||
bfiles[0].add(realfile + '*')
|
||||
else:
|
||||
bfiles[0].add(realfile)
|
||||
parentdir = os.path.dirname(realfile)
|
||||
if parentdir in bdirs:
|
||||
bfiles[1].add(parentdir)
|
||||
bdirs.remove(parentdir)
|
||||
# Catch intermediate directories, as in ocaml-mtime
|
||||
parentdir = os.path.dirname(parentdir)
|
||||
if parentdir in bdirs:
|
||||
bfiles[1].add(parentdir)
|
||||
bdirs.remove(parentdir)
|
||||
bfiles.append(bdirs)
|
||||
return bfiles
|
||||
|
||||
#
|
||||
# INSTALL FILE LEXER AND PARSER
|
||||
#
|
||||
|
||||
class TokenType(Enum):
|
||||
"""The types of tokens that can appear in an opam *.install file."""
|
||||
ERROR = auto()
|
||||
COLON = auto()
|
||||
LBRACE = auto()
|
||||
RBRACE = auto()
|
||||
LBRACK = auto()
|
||||
RBRACK = auto()
|
||||
STRING = auto()
|
||||
FIELD = auto()
|
||||
|
||||
@final
|
||||
class InstallFileLexer(Iterator[tuple[TokenType, str]]):
|
||||
"""Convert an opam *.install file into a sequence of tokens."""
|
||||
__slots__ = ['index', 'text']
|
||||
|
||||
def __init__(self, filname: str) -> None:
|
||||
"""Create an opam *.install file lexer.
|
||||
|
||||
:param str filname: the name of the file to read from
|
||||
"""
|
||||
self.index = 0
|
||||
with open(filname, 'r') as f:
|
||||
# Limit reads to 4 MB in case this file is bogus.
|
||||
# Most install files are under 4K.
|
||||
self.text = f.read(4194304)
|
||||
|
||||
def skip_whitespace(self) -> None:
|
||||
"""Skip over whitespace in the input."""
|
||||
while self.index < len(self.text) and \
|
||||
(self.text[self.index] == '#' or
|
||||
self.text[self.index] in string.whitespace):
|
||||
if self.text[self.index] == '#':
|
||||
while (self.index < len(self.text) and
|
||||
self.text[self.index] != '\n' and
|
||||
self.text[self.index] != '\r'):
|
||||
self.index += 1
|
||||
else:
|
||||
self.index += 1
|
||||
|
||||
def __next__(self) -> tuple[TokenType, str]:
|
||||
"""Get the next token from the opam *.install file.
|
||||
|
||||
:return: a pair containing the type and text of the next token
|
||||
"""
|
||||
self.skip_whitespace()
|
||||
if self.index < len(self.text):
|
||||
ch = self.text[self.index]
|
||||
if ch == ':':
|
||||
self.index += 1
|
||||
return (TokenType.COLON, ch)
|
||||
if ch == '{':
|
||||
self.index += 1
|
||||
return (TokenType.LBRACE, ch)
|
||||
if ch == '}':
|
||||
self.index += 1
|
||||
return (TokenType.RBRACE, ch)
|
||||
if ch == '[':
|
||||
self.index += 1
|
||||
return (TokenType.LBRACK, ch)
|
||||
if ch == ']':
|
||||
self.index += 1
|
||||
return (TokenType.RBRACK, ch)
|
||||
if ch == '"':
|
||||
start = self.index + 1
|
||||
end = start
|
||||
while end < len(self.text) and self.text[end] != '"':
|
||||
end += 2 if self.text[end] == '\\' else 1
|
||||
self.index = end + 1
|
||||
return (TokenType.STRING, self.text[start:end])
|
||||
if ch in string.ascii_letters:
|
||||
start = self.index
|
||||
end = start + 1
|
||||
while (end < len(self.text) and
|
||||
(self.text[end] == '_' or
|
||||
self.text[end] in string.ascii_letters)):
|
||||
end += 1
|
||||
self.index = end
|
||||
return (TokenType.FIELD, self.text[start:end])
|
||||
return (TokenType.ERROR, ch)
|
||||
else:
|
||||
raise StopIteration
|
||||
|
||||
@final
|
||||
class InstallFileParser(Iterable[tuple[str, bool, str, str]]):
|
||||
"""Parse opam *.install files."""
|
||||
|
||||
__slots__ = ['pkgname', 'lexer', 'libdir']
|
||||
|
||||
def __init__(self, filname: str, libdir: str) -> None:
|
||||
"""Initialize an OCaml .install file parser.
|
||||
|
||||
:param str filname: name of the .install file to parse
|
||||
:param str libdir: the OCaml library directory
|
||||
"""
|
||||
self.pkgname = os.path.splitext(os.path.basename(filname))[0]
|
||||
self.lexer = InstallFileLexer(filname)
|
||||
self.libdir = libdir
|
||||
|
||||
def __iter__(self) -> Iterator[tuple[str, bool, str, str]]:
|
||||
"""Parse a .install file.
|
||||
If there are any parse errors, we assume this file is not really an
|
||||
opam .install file and abandon the parse.
|
||||
"""
|
||||
# Map opam installer names to directories
|
||||
opammap: dict[str, str] = {
|
||||
'lib': os.path.join(self.libdir, self.pkgname),
|
||||
'lib_root': self.libdir,
|
||||
'libexec': os.path.join(self.libdir, self.pkgname),
|
||||
'libexec_root': self.libdir,
|
||||
'bin': '/usr/bin',
|
||||
'sbin': '/usr/sbin',
|
||||
'toplevel': os.path.join(self.libdir, 'toplevel'),
|
||||
'share': os.path.join('/usr/share', self.pkgname),
|
||||
'share_root': '/usr/share',
|
||||
'etc': os.path.join('/etc', self.pkgname),
|
||||
'doc': os.path.join('/usr/doc', self.pkgname),
|
||||
'stublibs': os.path.join(self.libdir, 'stublibs'),
|
||||
'man': '/usr/share/man'
|
||||
}
|
||||
|
||||
# Parse the file
|
||||
try:
|
||||
toktyp, token = next(self.lexer)
|
||||
while toktyp == TokenType.FIELD:
|
||||
libname = token
|
||||
toktyp, token = next(self.lexer)
|
||||
if toktyp != TokenType.COLON:
|
||||
return
|
||||
|
||||
toktyp, token = next(self.lexer)
|
||||
if toktyp != TokenType.LBRACK:
|
||||
return
|
||||
|
||||
directory = opammap.get(libname)
|
||||
if not directory:
|
||||
return
|
||||
|
||||
toktyp, token = next(self.lexer)
|
||||
while toktyp == TokenType.STRING:
|
||||
source = token
|
||||
optional = source[0] == '?'
|
||||
if optional:
|
||||
source = source[1:]
|
||||
nexttp, nexttk = next(self.lexer)
|
||||
if nexttp == TokenType.LBRACE:
|
||||
nexttp, nexttk = next(self.lexer)
|
||||
if nexttp == TokenType.STRING:
|
||||
filname = os.path.join(directory, nexttk)
|
||||
bracetp, bractk = next(self.lexer)
|
||||
if bracetp != TokenType.RBRACE:
|
||||
return
|
||||
nexttp, nexttk = next(self.lexer)
|
||||
else:
|
||||
return
|
||||
elif libname == 'man':
|
||||
index = token.rfind('.')
|
||||
if index < 0:
|
||||
return
|
||||
mandir = os.path.join(directory, 'man' + token[index+1:])
|
||||
filname = os.path.join(mandir, os.path.basename(token))
|
||||
else:
|
||||
filname = os.path.join(directory, os.path.basename(token))
|
||||
toktyp, token = nexttp, nexttk
|
||||
yield (self.pkgname, optional, source, filname)
|
||||
|
||||
if toktyp != TokenType.RBRACK:
|
||||
return
|
||||
toktyp, token = next(self.lexer)
|
||||
except StopIteration:
|
||||
return
|
||||
|
||||
def install_files(buildroot: str, libdir: str) -> None:
|
||||
"""Install the files listed in opam .install files in the buildroot.
|
||||
|
||||
For some projects, there are install files in both the project root
|
||||
directory and somewhere under "_build", so be careful not to parse the same
|
||||
install file twice.
|
||||
|
||||
:param str buildroot: path to the buildroot
|
||||
:param str libdir: the OCaml library directory
|
||||
"""
|
||||
install_files = set()
|
||||
for path, dirs, files in os.walk('.'):
|
||||
for f in files:
|
||||
if f.endswith('.install') and f not in install_files:
|
||||
install_files.add(f)
|
||||
parser = InstallFileParser(os.path.join(path, f), libdir)
|
||||
for _, optional, source, filname in parser:
|
||||
if not optional or os.path.exists(source):
|
||||
installpath = os.path.join(buildroot, filname[1:])
|
||||
os.makedirs(os.path.dirname(installpath), exist_ok=True)
|
||||
shutil.copy2(source, installpath)
|
||||
|
||||
def get_package_map(buildroot: str, libdir: str, devel: bool) -> dict[str, set[str]]:
|
||||
"""Create a map from package names to installed files from the opam .install
|
||||
files in the buildroot.
|
||||
|
||||
For some projects, there are install files in both the project root
|
||||
directory and somewhere under "_build", so be careful not to parse the same
|
||||
install file twice."""
|
||||
|
||||
pmap: dict[str, set[str]] = dict()
|
||||
install_files = set()
|
||||
|
||||
def add_pkg(pkgname: str, filname: str) -> None:
|
||||
"""Add a mapping from a package name to a filename.
|
||||
|
||||
:param str pkgname: the package that acts as the map key
|
||||
:param str filname: the filename to add to the package set
|
||||
"""
|
||||
if pkgname not in pmap:
|
||||
pmap[pkgname] = set()
|
||||
pmap[pkgname].add(filname)
|
||||
|
||||
installed = find_buildroot_all(buildroot, devel, False)
|
||||
for path, dirs, files in os.walk('.'):
|
||||
for f in files:
|
||||
if f.endswith('.install') and f not in install_files:
|
||||
install_files.add(f)
|
||||
parser = InstallFileParser(os.path.join(path, f), libdir)
|
||||
for pkgname, _, _, filname in parser:
|
||||
if filname in installed[0]:
|
||||
if filname.startswith('/usr/share/man'):
|
||||
add_pkg(pkgname, filname + '*')
|
||||
else:
|
||||
add_pkg(pkgname, filname)
|
||||
dirname = os.path.dirname(filname)
|
||||
if dirname in installed[1]:
|
||||
add_pkg(pkgname, '%dir ' + dirname)
|
||||
installed[1].remove(dirname)
|
||||
elif filname in installed[2]:
|
||||
if filname.startswith('/usr/share/man'):
|
||||
add_pkg(pkgname + '-devel', filname + '*')
|
||||
else:
|
||||
add_pkg(pkgname + '-devel', filname)
|
||||
dirname = os.path.dirname(filname)
|
||||
if dirname in installed[3]:
|
||||
add_pkg(pkgname + '-devel', '%dir ' + dirname)
|
||||
installed[3].remove(dirname)
|
||||
return pmap
|
||||
|
||||
#
|
||||
# MAIN INTERFACE
|
||||
#
|
||||
|
||||
def ocaml_files(no_devel: bool, separate: bool, install: bool, buildroot: str,
|
||||
libdir: str) -> None:
|
||||
"""Generate %files lists from an installed buildroot.
|
||||
|
||||
:param bool no_devel: False to split files into a main package and a devel
|
||||
package
|
||||
:param bool separate: True to place each OCaml module in an RPM package
|
||||
:param bool install: True to install files, False to generate %files
|
||||
:param str buildroot: the installed buildroot
|
||||
:param str libdir: the OCaml library directory
|
||||
"""
|
||||
if install:
|
||||
install_files(buildroot, libdir)
|
||||
elif separate:
|
||||
pkgmap = get_package_map(buildroot, libdir, not no_devel)
|
||||
for pkg in pkgmap:
|
||||
with open('.ofiles-' + pkg, 'w') as f:
|
||||
for entry in pkgmap[pkg]:
|
||||
f.write(entry + '\n')
|
||||
elif no_devel:
|
||||
with open('.ofiles', 'w') as f:
|
||||
for entry in find_buildroot_toplevel(buildroot):
|
||||
f.write(entry + '\n')
|
||||
else:
|
||||
files = find_buildroot_all(buildroot, True, True)
|
||||
with open('.ofiles', 'w') as f:
|
||||
for entry in files[0]:
|
||||
f.write(entry + '\n')
|
||||
for entry in files[1]:
|
||||
f.write('%dir ' + entry + '\n')
|
||||
with open('.ofiles-devel', 'w') as f:
|
||||
for entry in files[2]:
|
||||
f.write(entry + '\n')
|
||||
for entry in files[3]:
|
||||
f.write('%dir ' + entry + '\n')
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description='Support for building OCaml RPM packages')
|
||||
parser.add_argument('-i', '--install',
|
||||
action='store_true',
|
||||
default=False,
|
||||
help='install files instead of generating %%files')
|
||||
parser.add_argument('-n', '--no-devel',
|
||||
action='store_true',
|
||||
default=False,
|
||||
help='suppress creation of a devel subpackage')
|
||||
parser.add_argument('-s', '--separate',
|
||||
action='store_true',
|
||||
default=False,
|
||||
help='separate packaging. Each OCaml module is in a distinct RPM package. All modules are in a single RPM package by default.')
|
||||
parser.add_argument('-v', '--version',
|
||||
action='version',
|
||||
version=f'%(prog)s {str(version)}')
|
||||
parser.add_argument('buildroot', help='RPM build root')
|
||||
parser.add_argument('libdir', help='OCaml library directory')
|
||||
args = parser.parse_args()
|
||||
ocaml_files(args.no_devel,
|
||||
args.separate,
|
||||
args.install,
|
||||
args.buildroot,
|
||||
args.libdir)
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (ocaml-5.5.0.tar.gz) = bf13c18cd1fc7b2e5e9623024ea8623710f646ff2fbc0f59dab70e4d4318ed8623bdcc3ec59ce37af07af2b767f520dea23fb474c26297b3e858b6c8e080b4e6
|
||||
SHA512 (ocaml-4.08.1+rc2.tar.xz) = 74d5929e75ec4dd6cd69250005a18cede7e8036301dc05660aee99330f1ba4013575df1f9fe03dc7e913de3719215122b71681f0fad6f571a5feecb594c1e460
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/bash -
|
||||
set -e
|
||||
set -x
|
||||
|
||||
# Compile a trivial program and run it.
|
||||
echo 'print_endline "hello, world"' > hello.ml
|
||||
ocamlc.opt hello.ml -o hello
|
||||
./hello
|
||||
ocamlopt.opt hello.ml -o hello
|
||||
./hello
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-basic
|
||||
tags:
|
||||
- classic
|
||||
required_packages:
|
||||
- ocaml
|
||||
tests:
|
||||
- simple:
|
||||
dir: .
|
||||
run: ./basic-test.sh
|
||||
Loading…
Add table
Add a link
Reference in a new issue