Diff ocaml-4.11.2-r2 with a ocaml-4.12.1

/usr/portage/dev-lang/ocaml/ocaml-4.12.1.ebuild 2023-10-09 14:52:29.468368350 +0300
1
# Copyright 1999-2023 Gentoo Authors
1
# Copyright 1999-2022 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4 4
EAPI=7
......
11 11

  
12 12
LICENSE="QPL-1.0 LGPL-2"
13 13
SLOT="0/$(ver_cut 1-2)"
14
KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
15
IUSE="emacs flambda latex +ocamlopt spacetime xemacs"
14
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
15
IUSE="emacs flambda latex +ocamlopt xemacs"
16 16

  
17
RDEPEND="sys-libs/binutils-libs:=
18
	spacetime? ( sys-libs/libunwind:= )"
17
RDEPEND="sys-libs/binutils-libs:="
19 18
BDEPEND="${RDEPEND}
20 19
	virtual/pkgconfig"
21 20
PDEPEND="emacs? ( app-emacs/ocaml-mode )
......
24 23
QA_FLAGS_IGNORED='/usr/lib.*/ocaml/bigarray.cmxs'
25 24

  
26 25
PATCHES=(
27
	"${FILESDIR}"/${PN}-4.11.2-glibc-2.34.patch
28
	"${FILESDIR}"/${PN}-4.11.2-cflags.patch
26
	"${FILESDIR}"/${PN}-4.12.0-glibc-2.34.patch
27
	"${FILESDIR}"/${P}-fix-textrel-riscv.patch
29 28
)
30 29

  
31 30
src_prepare() {
......
33 32

  
34 33
	cp "${FILESDIR}"/ocaml.conf "${T}" || die
35 34

  
36
	# Broken until 4.12
37
	# bug #818445
38
	filter-lto
39
	append-flags -fno-strict-aliasing
40

  
41 35
	# OCaml generates textrels on 32-bit arches
42 36
	# We can't do anything about it, but disabling it means that tests
43 37
	# for OCaml-based packages won't fail on unexpected output
......
60 54
		--mandir="${EPREFIX}/usr/share/man"
61 55
		--prefix="${EPREFIX}/usr"
62 56
		$(use_enable flambda)
63
		$(use_enable spacetime)
64 57
	)
65
	econf ${opt[@]}
58

  
59
	econf "${opt[@]}"
66 60
}
67 61

  
68 62
src_compile() {
63
	env -u P emake world
64

  
69 65
	if use ocamlopt ; then
70
		env -u P emake world.opt
71
	else
72
		env -u P emake world
66
		env -u P emake opt
67
		env -u P emake opt.opt
73 68
	fi
74 69
}
75 70

  
76 71
src_test() {
72
	emake -j
73

  
74
	# OCaml tests only work when run sequentially
77 75
	if use ocamlopt ; then
78
		# OCaml tests only work when run sequentially
79
		emake -j1 tests
76
		emake -j1 ocamltest.opt
80 77
	else
81
		ewarn "${PN} was built without 'ocamlopt' USE flag; skipping tests."
78
		emake -j1 ocamltest
79
		#ewarn "${PN} was built without 'ocamlopt' USE flag; skipping tests."
82 80
	fi
81

  
82
	emake -j1 tests
83 83
}
84 84

  
85 85
src_install() {
86 86
	default
87

  
87 88
	dodir /usr/include
88 89
	# Create symlink for header files
89 90
	dosym "../$(get_libdir)/ocaml/caml" /usr/include/caml
90 91
	dodoc Changes README.adoc
92

  
91 93
	# Create envd entry for latex input files
92 94
	if use latex ; then
93 95
		echo "TEXINPUTS=\"${EPREFIX}/usr/$(get_libdir)/ocaml/ocamldoc:\"" > "${T}"/99ocamldoc || die
Thank you!