diff options
author | Alexis Ballier <aballier@gentoo.org> | 2016-05-03 20:03:43 +0200 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2016-05-03 20:29:42 +0200 |
commit | ada47650ac0726cd0739f82ef3f1fbb63a1492db (patch) | |
tree | eebdd881cada35dc922ddea32309c81eb20ac10a /dev-ml/core | |
parent | dev-ml/core_kernel: fix build with ocaml 4.03 (diff) | |
download | gentoo-ada47650ac0726cd0739f82ef3f1fbb63a1492db.tar.gz gentoo-ada47650ac0726cd0739f82ef3f1fbb63a1492db.tar.bz2 gentoo-ada47650ac0726cd0739f82ef3f1fbb63a1492db.zip |
dev-ml/core: bump to 113.33.02 and fix build with ocaml 4.03
Package-Manager: portage-2.2.28
Signed-off-by: Alexis Ballier <aballier@gentoo.org>
Diffstat (limited to 'dev-ml/core')
-rw-r--r-- | dev-ml/core/Manifest | 1 | ||||
-rw-r--r-- | dev-ml/core/core-113.33.02.ebuild | 58 | ||||
-rw-r--r-- | dev-ml/core/files/oc43.patch | 279 |
3 files changed, 338 insertions, 0 deletions
diff --git a/dev-ml/core/Manifest b/dev-ml/core/Manifest index 6c39ee5bb48a..817ede8550a2 100644 --- a/dev-ml/core/Manifest +++ b/dev-ml/core/Manifest @@ -2,3 +2,4 @@ DIST core-113.24.00.tar.gz 806394 SHA256 66ab36a4d7b78a4710f992c670777919ae329dc DIST core-113.24.01.tar.gz 806424 SHA256 16470035f9e21e8accdaa3286c3e353f60c485402323644fd231412fccf6d9c6 SHA512 8bfe45a1d0a1973ae7cd317fd6c71d2bb3a6170e432f735e6504586cd4d51b29dec972588478f4abdc7d20d6967ca58afa3ecb5a18871c807437bf8b73e063ec WHIRLPOOL 3bbc8c54140d6277885c37a525af1467ea1c30c7bc4d9dd55738432eca7e4460fed55c7499aad35a46cff324492b0797c40919f926856d6c9d5cc7fd7728705d DIST core-113.24.02.tar.gz 806413 SHA256 c5a4821df9719aa0a6b87b546730de445b698cc86b28046e7b5883cb65f02e29 SHA512 7f2f3e8524704ce7d29d55904f62cbf6c5b932275171b4b03709fcbdb98954cb2cab8427f06c7d6ee5ba396ac58e1077421162d96aa91b8e182f3e0f2d07cac4 WHIRLPOOL decd161a3aeb9573638c8cbec0c126d83f1a3f4eedc9fc06d53c02ff05eef18a7be781cfde05aac730c7683eed186f14f78cf1b80600843a1b3ffceec712604d DIST core-113.33.00.tar.gz 806877 SHA256 cca2511bb16ee5788daf42cdeec90c75698c07a995a0fde5c27373a7993c9a6b SHA512 5ee4e9d6dcc078a518d947d09fc6adfa7f79d299539e79d3b8e3b86c6b3c494144f42b755dfb04165e3af68058c87d6a567f7e94913575d9f371a21f63bdfc9e WHIRLPOOL 50719bf6f72e3ef6f9be477c24e5b9756793c69864c0540ae8508789f95833f0247ee77f86879b44f15ac19d075b25f9bc55e9e049ba51dd9606351dbe74b121 +DIST core-113.33.02.tar.gz 806999 SHA256 42f474e7c0b907bc3cd10defbc2de49547aa8c23bb86e39aa7abcc6ea1ff5c06 SHA512 da498c116dc4844455370c28b4cdab9f3dcc576a99f82ed7795cb7a8e65de01364f048588d4be6ca80b979f379d8bc4b4ab46eee17b557bdb75cac1e585badea WHIRLPOOL cb647f13482d4bef7b83fce35434acdeaa2c5df6ebf999b41ba2c8b5dc6754ddf4939d89239be79e120113570bfdd0e839feb7374d9e25457379bfdd1092a3c0 diff --git a/dev-ml/core/core-113.33.02.ebuild b/dev-ml/core/core-113.33.02.ebuild new file mode 100644 index 000000000000..80e1a0623ff4 --- /dev/null +++ b/dev-ml/core/core-113.33.02.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +OASIS_BUILD_DOCS=1 +OASIS_BUILD_TESTS=1 + +inherit eutils oasis + +MY_P=${P/_/\~} +DESCRIPTION="Jane Street's alternative to the standard library" +HOMEPAGE="http://www.janestreet.com/ocaml" +SRC_URI="http://ocaml.janestreet.com/ocaml-core/${PV%.*}/files/${P}.tar.gz" + +LICENSE="LGPL-2.1-with-linking-exception" +SLOT="0/${PV}" +KEYWORDS="~amd64" +IUSE="" + +RDEPEND=" + >=dev-ml/bin-prot-113.24.00:= + >=dev-ml/core_kernel-113.24.00:= + >=dev-ml/fieldslib-113.24.00:= + dev-ml/ppx_assert:= + dev-ml/ppx_bench:= + dev-ml/ppx_driver:= + dev-ml/ppx_expect:= + dev-ml/ppx_inline_test:= + dev-ml/ppx_jane:= + >=dev-ml/sexplib-113.24.00:= + dev-ml/typerep:= + dev-ml/variantslib:= +" +DEPEND="${RDEPEND}" + +src_prepare() { + has_version '>=dev-lang/ocaml-4.03' && epatch "${FILESDIR}/oc43.patch" +} + +src_configure() { + emake setup.exe + OASIS_SETUP_COMMAND="./setup.exe" oasis_src_configure +} + +src_compile() { + emake +} + +src_install() { + opam-installer -i \ + --prefix="${ED}/usr" \ + --libdir="${D}/$(ocamlc -where)" \ + --docdir="${ED}/usr/share/doc/${PF}" \ + ${PN}.install || die + dodoc CHANGES.md README.md +} diff --git a/dev-ml/core/files/oc43.patch b/dev-ml/core/files/oc43.patch new file mode 100644 index 000000000000..5e44a4438209 --- /dev/null +++ b/dev-ml/core/files/oc43.patch @@ -0,0 +1,279 @@ +diff -uNr core-113.33.02/_oasis core-113.33.02+4.03/_oasis +--- core-113.33.02/_oasis 2016-04-06 11:06:40.000000000 +0200 ++++ core-113.33.02+4.03/_oasis 2016-04-06 12:42:48.000000000 +0200 +@@ -1,8 +1,8 @@ + OASISFormat: 0.4 +-OCamlVersion: >= 4.02.3 ++OCamlVersion: >= 4.03.0 + FindlibVersion: >= 1.3.2 + Name: core +-Version: 113.33.02 ++Version: 113.33.02+4.03 + Synopsis: Industrial strength alternative to OCaml's standard library + Authors: Jane Street Group, LLC <opensource@janestreet.com> + Copyrights: (C) 2008-2016 Jane Street Group LLC <opensource@janestreet.com> +diff -uNr core-113.33.02/opam core-113.33.02+4.03/opam +--- core-113.33.02/opam 2016-04-06 11:12:24.000000000 +0200 ++++ core-113.33.02+4.03/opam 2016-04-06 12:54:27.000000000 +0200 +@@ -26,4 +26,4 @@ + "typerep" + "variantslib" + ] +-available: [ ocaml-version >= "4.02.3" ] ++available: [ ocaml-version >= "4.03.0" ] +diff -uNr core-113.33.02/src/bigstring.ml core-113.33.02+4.03/src/bigstring.ml +--- core-113.33.02/src/bigstring.ml 2016-04-06 11:06:40.000000000 +0200 ++++ core-113.33.02+4.03/src/bigstring.ml 2016-04-06 12:42:48.000000000 +0200 +@@ -29,7 +29,7 @@ + + let length = Array1.dim + +-external is_mmapped : t -> bool = "bigstring_is_mmapped_stub" "noalloc" ++external is_mmapped : t -> bool = "bigstring_is_mmapped_stub" [@@noalloc] + + let init n ~f = + let t = create n in +@@ -168,7 +168,7 @@ + + external unsafe_send_nonblocking_no_sigpipe + : file_descr -> pos : int -> len : int -> t -> Syscall_result.Int.t +- = "bigstring_send_nonblocking_no_sigpipe_stub" "noalloc" ++ = "bigstring_send_nonblocking_no_sigpipe_stub" [@@noalloc] + + let send_nonblocking_no_sigpipe fd ?(pos = 0) ?len bstr = + let len = get_opt_len bstr ~pos len in +diff -uNr core-113.33.02/src/core_sys.ml core-113.33.02+4.03/src/core_sys.ml +--- core-113.33.02/src/core_sys.ml 2016-04-06 11:06:40.000000000 +0200 ++++ core-113.33.02+4.03/src/core_sys.ml 2016-04-06 12:42:48.000000000 +0200 +@@ -83,7 +83,7 @@ + *) + external executing_bytecode + : unit -> unit -> unit -> unit -> unit -> unit -> bool +- = "executing_bytecode" "not_executing_bytecode" "noalloc" ++ = "executing_bytecode" "not_executing_bytecode" [@@noalloc] + + let execution_mode () = + if executing_bytecode () () () () () () then `Bytecode else `Native +@@ -95,7 +95,7 @@ + + + (* returns size, in bits, of an [int] type in C *) +-external c_int_size : unit -> int = "c_int_size" "noalloc" ++external c_int_size : unit -> int = "c_int_size" [@@noalloc] + + let%test _ = let size = c_int_size () in size >= 16 && size <= Sys.word_size + +diff -uNr core-113.33.02/src/core_sys.mli core-113.33.02+4.03/src/core_sys.mli +--- core-113.33.02/src/core_sys.mli 2016-04-06 11:06:40.000000000 +0200 ++++ core-113.33.02+4.03/src/core_sys.mli 2016-04-06 12:42:48.000000000 +0200 +@@ -134,7 +134,7 @@ + (** [c_int_size] returns the number of bits in a C [int]. Note that this can be + different from [word_size]. For example, Linux x86-64 should have + [word_size = 64], but [c_int_size () = 32] *) +-external c_int_size : unit -> int = "c_int_size" "noalloc" ++external c_int_size : unit -> int = "c_int_size" [@@noalloc] + + (** Return the home directory, using the [HOME] environment variable if that is defined, + and if not, using the effective user's information in the Unix password database. *) +diff -uNr core-113.33.02/src/core_unix.ml core-113.33.02+4.03/src/core_unix.ml +--- core-113.33.02/src/core_unix.ml 2016-04-06 11:06:40.000000000 +0200 ++++ core-113.33.02+4.03/src/core_unix.ml 2016-04-06 12:42:48.000000000 +0200 +@@ -393,7 +393,7 @@ + + (* Signal handling *) + +-external abort : unit -> 'a = "unix_abort" "noalloc" ++external abort : unit -> 'a = "unix_abort" [@@noalloc] + + (* User id, group id management *) + +@@ -1160,6 +1160,11 @@ + (fun () -> [("src", atom src); ("dst", atom dst)]) + ;; + ++let src_dst' f ?to_dir ~src ~dst = ++ improve (fun () -> f ?to_dir ~src ~dst) ++ (fun () -> [("src", atom src); ("dst", atom dst)]) ++;; ++ + let unlink = unary_filename Unix.unlink + + let rename = src_dst Unix.rename +@@ -1554,7 +1559,7 @@ + Exit_or_signal.of_unix (Unix.close_process_full (c.C.stdout, c.C.stdin, c.C.stderr)) + ;; + +-let symlink = src_dst Unix.symlink ++let symlink = src_dst' Unix.symlink + let readlink = unary_filename Unix.readlink + + module Select_fds = struct +diff -uNr core-113.33.02/src/core_unix.mli core-113.33.02+4.03/src/core_unix.mli +--- core-113.33.02/src/core_unix.mli 2016-04-06 11:06:40.000000000 +0200 ++++ core-113.33.02+4.03/src/core_unix.mli 2016-04-06 12:42:48.000000000 +0200 +@@ -910,7 +910,7 @@ + + (** [symlink source dest] creates the file [dest] as a symbolic link + to the file [source]. *) +-val symlink : src:string -> dst:string -> unit ++val symlink : ?to_dir:bool -> src:string -> dst:string -> unit + + (** Read the contents of a link. *) + val readlink : string -> string +@@ -2007,7 +2007,7 @@ + caught and the signal handler does not return. If the SIGABRT signal is + blocked or ignored, the abort() function will still override it. + *) +-external abort : unit -> _ = "unix_abort" "noalloc" ++external abort : unit -> _ = "unix_abort" [@@noalloc] + + (** {2 User id, group id} *) + +diff -uNr core-113.33.02/src/iobuf.ml core-113.33.02+4.03/src/iobuf.ml +--- core-113.33.02/src/iobuf.ml 2016-04-06 11:06:40.000000000 +0200 ++++ core-113.33.02+4.03/src/iobuf.ml 2016-04-06 12:42:48.000000000 +0200 +@@ -1094,7 +1094,7 @@ + -> (read_write, seek) t array + -> Recvmmsg_context.ctx + -> Unix.Syscall_result.Int.t +- = "iobuf_recvmmsg_assume_fd_is_nonblocking_stub" "noalloc" ++ = "iobuf_recvmmsg_assume_fd_is_nonblocking_stub" [@@noalloc] + + let recvmmsg_assume_fd_is_nonblocking fd { Recvmmsg_context. iobufs; ctx; _ } = + unsafe_recvmmsg_assume_fd_is_nonblocking fd iobufs ctx +diff -uNr core-113.33.02/src/linux_ext.ml core-113.33.02+4.03/src/linux_ext.ml +--- core-113.33.02/src/linux_ext.ml 2016-04-06 11:06:40.000000000 +0200 ++++ core-113.33.02+4.03/src/linux_ext.ml 2016-04-06 12:42:48.000000000 +0200 +@@ -320,7 +320,7 @@ + -> initial : Int63.t + -> interval : Int63.t + -> Syscall_result.Unit.t +- = "linux_timerfd_settime" "noalloc" ++ = "linux_timerfd_settime" [@@noalloc] + + let%test_unit "unsafe_timerfd_settime returning errno" = + let result = +@@ -683,13 +683,13 @@ + type ready_events = Bigstring.t + + external epoll_sizeof_epoll_event +- : unit -> int = "linux_epoll_sizeof_epoll_event" "noalloc" ++ : unit -> int = "linux_epoll_sizeof_epoll_event" [@@noalloc] + + external epoll_offsetof_readyfd +- : unit -> int = "linux_epoll_offsetof_readyfd" "noalloc" ++ : unit -> int = "linux_epoll_offsetof_readyfd" [@@noalloc] + + external epoll_offsetof_readyflags +- : unit -> int = "linux_epoll_offsetof_readyflags" "noalloc" ++ : unit -> int = "linux_epoll_offsetof_readyflags" [@@noalloc] + + let sizeof_epoll_event = epoll_sizeof_epoll_event () + let offsetof_readyfd = epoll_offsetof_readyfd () +diff -uNr core-113.33.02/src/syslog.ml core-113.33.02+4.03/src/syslog.ml +--- core-113.33.02/src/syslog.ml 2016-04-06 11:06:40.000000000 +0200 ++++ core-113.33.02+4.03/src/syslog.ml 2016-04-06 12:42:48.000000000 +0200 +@@ -57,8 +57,8 @@ + + external core_syslog_openlog : string option -> int -> int -> unit = "core_syslog_openlog" + external core_syslog_syslog : int -> string -> unit = "core_syslog_syslog" +-external core_syslog_closelog : unit -> unit = "core_syslog_closelog" "noalloc" +-external core_syslog_setlogmask : int -> unit = "core_syslog_setlogmask" "noalloc" ++external core_syslog_closelog : unit -> unit = "core_syslog_closelog" [@@noalloc] ++external core_syslog_setlogmask : int -> unit = "core_syslog_setlogmask" [@@noalloc] + + let openlog ?id ?(options = []) ?(facility = Facility.USER) () = + core_syslog_openlog id (Open_option.mask options) (Facility.to_int facility) +diff -uNr core-113.33.02/src/time_stamp_counter.ml core-113.33.02+4.03/src/time_stamp_counter.ml +--- core-113.33.02/src/time_stamp_counter.ml 2016-04-06 11:06:40.000000000 +0200 ++++ core-113.33.02+4.03/src/time_stamp_counter.ml 2016-04-06 12:42:48.000000000 +0200 +@@ -93,7 +93,7 @@ + #if JSC_ARCH_SIXTYFOUR + + (* noalloc on x86_64 only *) +-external now : unit -> tsc = "tsc_get" "noalloc" ++external now : unit -> tsc = "tsc_get" [@@noalloc] + + module Calibrator = struct + +diff -uNr core-113.33.02/src/time_stamp_counter.mli core-113.33.02+4.03/src/time_stamp_counter.mli +--- core-113.33.02/src/time_stamp_counter.mli 2016-04-06 11:06:40.000000000 +0200 ++++ core-113.33.02+4.03/src/time_stamp_counter.mli 2016-04-06 12:42:48.000000000 +0200 +@@ -102,7 +102,7 @@ + end + + #if JSC_ARCH_SIXTYFOUR +-external now : unit -> t = "tsc_get" "noalloc" ++external now : unit -> t = "tsc_get" [@@noalloc] + #else + external now : unit -> t = "tsc_get" + #endif +diff -uNr core-113.33.02/src/unix_stubs.c core-113.33.02+4.03/src/unix_stubs.c +--- core-113.33.02/src/unix_stubs.c 2016-04-06 11:06:40.000000000 +0200 ++++ core-113.33.02+4.03/src/unix_stubs.c 2016-04-06 12:42:48.000000000 +0200 +@@ -213,7 +213,7 @@ + of strings and fill it will strings contained in the string array + [arg]. Pointers stored in the result points directly inside the + OCaml heap. */ +-extern char **cstringvect(value arg); ++extern char **cstringvect(value arg, char* cmdname); + + /* Given v_prog, an O'Caml string value specifying a program name, + v_args, an O'Caml array specifying program arguments (not +@@ -378,7 +378,7 @@ + + /* We don't bother saving/restoring the environment or freeing the + new one since we exit the process in case of error. */ +- environ = cstringvect(v_env); ++ environ = cstringvect(v_env, "ml_create_process"); + + if (Is_block(v_working_dir)) + working_dir = String_val(Field(v_working_dir, 0)); +diff -uNr core-113.33.02/test/bigstring_test.ml core-113.33.02+4.03/test/bigstring_test.ml +--- core-113.33.02/test/bigstring_test.ml 2016-04-06 11:06:40.000000000 +0200 ++++ core-113.33.02+4.03/test/bigstring_test.ml 2016-04-06 12:42:48.000000000 +0200 +@@ -169,7 +169,7 @@ + simple_conversion_test ~n:"single" "1"; + repeat 50 (simple_conversion_test ~n:"random") sg; + ); +- ++(* + "input" >:: + (fun () -> + fd_test really_read_test ~n:"single" (bs_of_s "X"); +@@ -178,6 +178,7 @@ + repeat 100 (fd_test really_read_test ~n:"random big") + (bsg ~size:(fun () -> 100 * png ())); + ); ++*) + + "destruction" >:: + (fun () -> +@@ -209,6 +210,7 @@ + blit_test ~n:"random" ~src_pos ~dst_pos ~len (s1,s2)) + (fun () -> (sg (), sg(),nng (), nng (), nng ())) + ); ++(* + "really write/read pipe" >:: + (fun () -> + let write_read_test = write_read_test Unix.pipe in +@@ -239,6 +241,7 @@ + repeat 500 (output_input_test ~n:"random big") + (bsg ~size:(fun () -> 100 * png ())); + ); ++*) + + "sub" >:: + (fun () -> +diff -uNr core-113.33.02/test/hashtbl/table_new_intf.ml core-113.33.02+4.03/test/hashtbl/table_new_intf.ml +--- core-113.33.02/test/hashtbl/table_new_intf.ml 2016-04-06 11:06:40.000000000 +0200 ++++ core-113.33.02+4.03/test/hashtbl/table_new_intf.ml 2016-04-06 12:42:48.000000000 +0200 +@@ -7,7 +7,7 @@ + compare: 'k -> 'k -> int; + } + +-external hash_param : int -> int -> 'a -> int = "caml_hash_univ_param" "noalloc" ++external hash_param : int -> int -> 'a -> int = "caml_hash_univ_param" [@@noalloc] + + let poly = { + hash = (fun z -> hash_param 10 100 z); |