Diff ocaml-4.10.2-r3 with a ocaml-4.11.2-r2

/usr/portage/dev-lang/ocaml/ocaml-4.11.2-r2.ebuild 2023-10-09 14:52:29.468368350 +0300
5 5

  
6 6
inherit flag-o-matic
7 7

  
8
DESCRIPTION="Programming language supporting functional, imperative & object-oriented styles"
9 8
HOMEPAGE="https://ocaml.org/"
10
SRC_URI="https://github.com/ocaml/ocaml/archive/${PV}.tar.gz -> ${P}.tar.gz
11
	https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-patches-1.tar.bz2"
9
SRC_URI="https://github.com/ocaml/ocaml/archive/${PV}.tar.gz -> ${P}.tar.gz"
10
DESCRIPTION="Programming language supporting functional, imperative & object-oriented styles"
12 11

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

  
18 17
RDEPEND="sys-libs/binutils-libs:=
......
22 21
PDEPEND="emacs? ( app-emacs/ocaml-mode )
23 22
	xemacs? ( app-xemacs/ocaml )"
24 23

  
25
QA_FLAGS_IGNORED='usr/lib.*/ocaml/bigarray.cmxs'
24
QA_FLAGS_IGNORED='/usr/lib.*/ocaml/bigarray.cmxs'
26 25

  
27 26
PATCHES=(
28
	"${WORKDIR}"/${P}-patches-1/
27
	"${FILESDIR}"/${PN}-4.11.2-glibc-2.34.patch
28
	"${FILESDIR}"/${PN}-4.11.2-cflags.patch
29 29
)
30 30

  
31 31
src_prepare() {
......
51 51
		-e 's/\(^OC_CFLAGS=.*\)/\1 $(LDFLAGS)/' \
52 52
		-e 's/\(^OC_LDFLAGS=.*\)/\1 $(LDFLAGS)/' \
53 53
		Makefile.config.in || die "LDFLAGS fix failed"
54
	# ${P} overrides upstream build's own P due to a wrong assignment operator.
55
	sed -i -e 's/^P ?=/P =/' stdlib/StdlibModules || die "P fix failed"
56 54
}
57 55

  
58 56
src_configure() {
......
64 62
		$(use_enable flambda)
65 63
		$(use_enable spacetime)
66 64
	)
67

  
68
	econf "${opt[@]}"
65
	econf ${opt[@]}
69 66
}
70 67

  
71 68
src_compile() {
72 69
	if use ocamlopt ; then
73
		emake world.opt
70
		env -u P emake world.opt
74 71
	else
75
		emake world
72
		env -u P emake world
76 73
	fi
77 74
}
78 75

  
79 76
src_test() {
80 77
	if use ocamlopt ; then
81 78
		# OCaml tests only work when run sequentially
82
		emake -j1 -C testsuite all
79
		emake -j1 tests
83 80
	else
84 81
		ewarn "${PN} was built without 'ocamlopt' USE flag; skipping tests."
85 82
	fi
......
88 85
src_install() {
89 86
	default
90 87
	dodir /usr/include
91

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

  
96 91
	# Create envd entry for latex input files
97 92
	if use latex ; then
98
		echo "TEXINPUTS=\"${EPREFIX}/usr/$(get_libdir)/ocaml/ocamldoc:\"" > "${T}/99ocamldoc" || die
93
		echo "TEXINPUTS=\"${EPREFIX}/usr/$(get_libdir)/ocaml/ocamldoc:\"" > "${T}"/99ocamldoc || die
99 94
		doenvd "${T}"/99ocamldoc
100 95
	fi
101 96

  
Thank you!