public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/ocaml/files/, dev-lang/ocaml/
Date: Tue, 22 Feb 2022 00:59:04 +0000 (UTC)	[thread overview]
Message-ID: <1645491524.9e8369277b272b15f3dd1159fa18b71ec4431a77.sam@gentoo> (raw)

commit:     9e8369277b272b15f3dd1159fa18b71ec4431a77
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 22 00:58:44 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb 22 00:58:44 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e836927

dev-lang/ocaml: drop 4.05.0-r7, 4.05.0-r8, 4.10.2-r2

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../ocaml/files/ocaml-4.05.0-CVE-2018-9838.patch   |  70 ---------
 dev-lang/ocaml/files/ocaml-4.05.0-gcc10.patch      |  59 --------
 dev-lang/ocaml/files/ocaml-4.10.2-cflags.patch     |  42 ------
 dev-lang/ocaml/ocaml-4.05.0-r7.ebuild              | 155 --------------------
 dev-lang/ocaml/ocaml-4.05.0-r8.ebuild              | 156 ---------------------
 dev-lang/ocaml/ocaml-4.10.2-r2.ebuild              | 105 --------------
 6 files changed, 587 deletions(-)

diff --git a/dev-lang/ocaml/files/ocaml-4.05.0-CVE-2018-9838.patch b/dev-lang/ocaml/files/ocaml-4.05.0-CVE-2018-9838.patch
deleted file mode 100644
index cfe3ff636c25..000000000000
--- a/dev-lang/ocaml/files/ocaml-4.05.0-CVE-2018-9838.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-https://bugs.gentoo.org/755257
-
-Needed for both fixing the CVE + compatibility with Debian for e.g.
-Unison.
-
-From c6ca3afc78b75d7748e4e09e56c6b020418be06e Mon Sep 17 00:00:00 2001
-From: Stephane Glondu <steph@glondu.net>
-Date: Fri, 25 Jan 2019 14:34:23 +0100
-Subject: [PATCH] Fix integer overflows when unmarshaling a bigarray
-
-Malicious or corrupted marshaled data can result in a bigarray
-with impossibly large dimensions that cause overflow when computing
-the in-memory size of the bigarray.  Disaster ensues when the data
-is read in a too small memory area.  This commit checks for overflows
-when computing the in-memory size of the bigarray.
-
-This patch is based on one by Xavier Leroy and has been modified to
-use caml_ba_multov instead of caml_umul_overflow which is unavailable
-in OCaml 4.05.0.
-
-The original commit hash is 85162eee9d4072fa9c2f498f03cd94e357033eec.
-
-Origin: https://github.com/ocaml/ocaml/pull/1718
-Bug: https://github.com/ocaml/ocaml/issues/7765
-Bug-Debian: https://bugs.debian.org/895472
-Bug-CVE: CVE-2018-9838
---- a/otherlibs/bigarray/bigarray_stubs.c
-+++ b/otherlibs/bigarray/bigarray_stubs.c
-@@ -966,22 +966,34 @@ static void caml_ba_deserialize_longarray(void * dest, intnat num_elts)
- uintnat caml_ba_deserialize(void * dst)
- {
-   struct caml_ba_array * b = dst;
--  int i, elt_size;
--  uintnat num_elts;
-+  int i;
-+  uintnat num_elts, size;
-+  int overflow;
- 
-   /* Read back header information */
-   b->num_dims = caml_deserialize_uint_4();
-+  if (b->num_dims < 0 || b->num_dims > CAML_BA_MAX_NUM_DIMS)
-+    caml_deserialize_error("input_value: wrong number of bigarray dimensions");
-   b->flags = caml_deserialize_uint_4() | CAML_BA_MANAGED;
-   b->proxy = NULL;
-   for (i = 0; i < b->num_dims; i++) b->dim[i] = caml_deserialize_uint_4();
--  /* Compute total number of elements */
--  num_elts = caml_ba_num_elts(b);
--  /* Determine element size in bytes */
-+  /* Compute total number of elements.  Watch out for overflows (MPR#7765). */
-+  num_elts = 1;
-+  for (i = 0; i < b->num_dims; i++) {
-+    overflow = 0;
-+    num_elts = caml_ba_multov(num_elts, b->dim[i], &overflow);
-+    if (overflow)
-+      caml_deserialize_error("input_value: size overflow for bigarray");
-+  }
-+  /* Determine array size in bytes.  Watch out for overflows (MPR#7765). */
-   if ((b->flags & CAML_BA_KIND_MASK) > CAML_BA_CHAR)
-     caml_deserialize_error("input_value: bad bigarray kind");
--  elt_size = caml_ba_element_size[b->flags & CAML_BA_KIND_MASK];
-+  overflow = 0;
-+  size = caml_ba_multov(num_elts, caml_ba_element_size[b->flags & CAML_BA_KIND_MASK], &overflow);
-+  if (overflow)
-+    caml_deserialize_error("input_value: size overflow for bigarray");
-   /* Allocate room for data */
--  b->data = malloc(elt_size * num_elts);
-+  b->data = malloc(size);
-   if (b->data == NULL)
-     caml_deserialize_error("input_value: out of memory for bigarray");
-   /* Read data */

diff --git a/dev-lang/ocaml/files/ocaml-4.05.0-gcc10.patch b/dev-lang/ocaml/files/ocaml-4.05.0-gcc10.patch
deleted file mode 100644
index 8b2e99883167..000000000000
--- a/dev-lang/ocaml/files/ocaml-4.05.0-gcc10.patch
+++ /dev/null
@@ -1,59 +0,0 @@
---- a/byterun/caml/intext.h
-+++ b/byterun/caml/intext.h
-@@ -196,7 +196,7 @@
- 
- CAMLextern struct code_fragment * caml_extern_find_code(char *addr);
- 
--struct ext_table caml_code_fragments_table;
-+extern struct ext_table caml_code_fragments_table;
- 
- #endif /* CAML_INTERNALS */
- 
---- a/byterun/caml/major_gc.h
-+++ b/byterun/caml/major_gc.h
-@@ -64,9 +64,9 @@
- extern char *caml_gc_sweep_hp;
- 
- extern int caml_major_window;
--double caml_major_ring[Max_major_window];
--int caml_major_ring_index;
--double caml_major_work_credit;
-+extern double caml_major_ring[Max_major_window];
-+extern int caml_major_ring_index;
-+extern double caml_major_work_credit;
- extern double caml_gc_clock;
- 
- /* [caml_major_gc_hook] is called just between the end of the mark
---- a/byterun/meta.c
-+++ b/byterun/meta.c
-@@ -32,6 +32,8 @@
- #include "caml/prims.h"
- #include "caml/stacks.h"
- 
-+struct ext_table caml_code_fragments_table;
-+
- #ifndef NATIVE_CODE
- 
- CAMLprim value caml_get_global_data(value unit)
---- a/byterun/backtrace.c
-+++ b/byterun/backtrace.c
-@@ -28,7 +28,7 @@
- #include "caml/fail.h"
- 
- /* The table of debug information fragments */
--struct ext_table caml_debug_info;
-+extern struct ext_table caml_debug_info;
- 
- CAMLexport int32_t caml_backtrace_active = 0;
- CAMLexport int32_t caml_backtrace_pos = 0;
---- a/asmrun/startup.c
-+++ b/asmrun/startup.c
-@@ -44,7 +44,7 @@
- #endif
- 
- extern int caml_parser_trace;
--CAMLexport header_t caml_atom_table[256];
-+CAMLextern header_t caml_atom_table[256];
- char * caml_code_area_start, * caml_code_area_end;
- 
- /* Initialize the atom table and the static data and code area limits. */

diff --git a/dev-lang/ocaml/files/ocaml-4.10.2-cflags.patch b/dev-lang/ocaml/files/ocaml-4.10.2-cflags.patch
deleted file mode 100644
index 7adb1ea0768d..000000000000
--- a/dev-lang/ocaml/files/ocaml-4.10.2-cflags.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- a/runtime/Makefile
-+++ b/runtime/Makefile
-@@ -335,7 +335,7 @@
- # (without the extension, which is added by the macro)
- define COMPILE_C_FILE
- $(1).$(O): %.c
--	$$(CC) -c $$(OC_CFLAGS) $$(OC_CPPFLAGS) $$(OUTPUTOBJ)$$@ $$<
-+	$$(CC) -c $$(OC_CFLAGS) $(CFLAGS) $$(OC_CPPFLAGS) $$(OUTPUTOBJ)$$@ $$<
- endef
- 
- object_types := % %_b %_bd %_bi %_bpic %_n %_nd %_ni %_np %_npic
---- a/otherlibs/Makefile.otherlibs.common
-+++ b/otherlibs/Makefile.otherlibs.common
-@@ -138,4 +138,4 @@
- 	$(CAMLOPT) -c $(COMPFLAGS) $(OPTCOMPFLAGS) $<
- 
- .c.$(O):
--	$(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
-+	$(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
---- a/otherlibs/systhreads/Makefile
-+++ b/otherlibs/systhreads/Makefile
-@@ -102,10 +102,10 @@
- st_stubs_n.$(O): OC_CPPFLAGS += $(NATIVE_CPPFLAGS)
- 
- st_stubs_b.$(O): st_stubs.c $(HEADER)
--	$(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
-+	$(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
- 
- st_stubs_n.$(O): st_stubs.c $(HEADER)
--	$(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
-+	$(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
- 
- partialclean:
- 	rm -f *.cm*
---- a/Makefile.common.in
-+++ b/Makefile.common.in
-@@ -79,4 +79,4 @@
- # general (it supports both .o and .obj)
- 
- %.$(O): %.c
--	$(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
-+	$(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<

diff --git a/dev-lang/ocaml/ocaml-4.05.0-r7.ebuild b/dev-lang/ocaml/ocaml-4.05.0-r7.ebuild
deleted file mode 100644
index 8f3bd8015bfc..000000000000
--- a/dev-lang/ocaml/ocaml-4.05.0-r7.ebuild
+++ /dev/null
@@ -1,155 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit flag-o-matic toolchain-funcs
-
-PATCHLEVEL="9"
-MY_P="${P/_/-}"
-DESCRIPTION="Type-inferring functional programming language descended from the ML family"
-HOMEPAGE="https://ocaml.org"
-SRC_URI="https://github.com/ocaml/ocaml/archive/${PV/_/+}.tar.gz -> ${MY_P}.tar.gz
-	mirror://gentoo/${PN}-patches-${PATCHLEVEL}.tar.bz2"
-
-LICENSE="QPL-1.0 LGPL-2"
-# Everytime ocaml is updated to a new version, everything ocaml must be rebuilt,
-# so here we go with the subslot.
-SLOT="0/$(ver_cut 1-2)"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
-IUSE="emacs flambda latex ncurses +ocamlopt spacetime X xemacs"
-
-RDEPEND="
-	sys-libs/binutils-libs:=
-	ncurses? ( sys-libs/ncurses:0= )
-	spacetime? ( sys-libs/libunwind:= )
-	X? ( x11-libs/libX11 )
-	!dev-ml/num"
-BDEPEND="${RDEPEND}
-	virtual/pkgconfig"
-PDEPEND="emacs? ( app-emacs/ocaml-mode )
-	xemacs? ( app-xemacs/ocaml )"
-
-QA_FLAGS_IGNORED='/usr/lib.*/ocaml/raw_spacetime_lib.cmxs'
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-4.04.2-tinfo.patch" #459512
-	"${FILESDIR}"/${P}-gcc10.patch
-)
-
-pkg_setup() {
-	# dev-lang/ocaml creates its own objects but calls gcc for linking, which will
-	# results in relocations if gcc wants to create a PIE executable
-	if gcc-specs-pie ; then
-		append-ldflags -nopie
-		ewarn "Ocaml generates its own native asm, you're using a PIE compiler"
-		ewarn "We have appended -nopie to ocaml build options"
-		ewarn "because linking an executable with pie while the objects are not pic will not work"
-	fi
-}
-
-src_prepare() {
-	EPATCH_SUFFIX="patch" eapply "${WORKDIR}/patches"
-
-	cp "${FILESDIR}"/ocaml.conf "${T}" || die
-
-	default
-}
-
-src_configure() {
-	export LC_ALL=C
-	local myconf=""
-
-	# Causes build failures because it builds some programs with -pg,
-	# bug #270920
-	filter-flags -fomit-frame-pointer
-	# Bug #285993
-	filter-mfpmath sse
-
-	# Broken until 4.12
-	# bug #818445
-	filter-flags '-flto*'
-	append-flags -fno-strict-aliasing
-
-	# -ggdb3 & co makes it behave weirdly, breaks sexplib
-	replace-flags -ggdb* -ggdb
-
-	# OCaml generates textrels on 32-bit arches
-	# We can't do anything about it, but disabling it means that tests
-	# for OCaml-based packages won't fail on unexpected output
-	# bug #773226
-	if use arm || use ppc || use x86 ; then
-		append-ldflags "-Wl,-z,notext"
-	fi
-
-	# It doesn't compile on alpha without this LDFLAGS
-	use alpha && append-ldflags "-Wl,--no-relax"
-
-	use ncurses || myconf="${myconf} -no-curses"
-	use X || myconf="${myconf} -no-graph"
-	use flambda && myconf="${myconf} -flambda"
-	use spacetime && myconf="${myconf} -spacetime"
-
-	# ocaml uses a home-brewn configure script, preventing it to use econf.
-	RAW_LDFLAGS="$(raw-ldflags)" ./configure \
-		--prefix "${EPREFIX}"/usr \
-		--bindir "${EPREFIX}"/usr/bin \
-		--target-bindir "${EPREFIX}"/usr/bin \
-		--libdir "${EPREFIX}"/usr/$(get_libdir)/ocaml \
-		--mandir "${EPREFIX}"/usr/share/man \
-		-target "${CHOST}" \
-		-host "${CBUILD}" \
-		-cc "$(tc-getCC)" \
-		-as "$(tc-getAS)" \
-		-aspp "$(tc-getCC) -c" \
-		-partialld "$(tc-getLD) -r" \
-		--with-pthread ${myconf} || die "configure failed!"
-
-	# http://caml.inria.fr/mantis/view.php?id=4698
-	export CCLINKFLAGS="${LDFLAGS}"
-}
-
-src_compile() {
-	emake world
-
-	# Native code generation can be disabled now
-	if use ocamlopt ; then
-		# bug #279968
-		emake opt
-		emake -j1 opt.opt
-	fi
-}
-
-src_test() {
-	if use ocamlopt ; then
-		emake -j1 tests
-	else
-		ewarn "${PN} was built without 'ocamlopt' USE flag; skipping tests."
-	fi
-}
-
-src_install() {
-	emake BINDIR="${ED}"/usr/bin \
-		LIBDIR="${ED}"/usr/$(get_libdir)/ocaml \
-		MANDIR="${ED}"/usr/share/man \
-		install
-
-	# Symlink the headers to the right place
-	dodir /usr/include
-	# Create symlink for header files
-	dosym "../$(get_libdir)/ocaml/caml" /usr/include/caml
-	dodoc Changes README.adoc
-	# Create envd entry for latex input files
-	if use latex ; then
-		echo "TEXINPUTS=\"${EPREFIX}/usr/$(get_libdir)/ocaml/ocamldoc:\"" > "${T}"/99ocamldoc || die
-		doenvd "${T}/99ocamldoc"
-	fi
-
-	sed -i -e "s:lib:$(get_libdir):" "${T}"/ocaml.conf || die
-
-	# Install ocaml-rebuild portage set
-	insinto /usr/share/portage/config/sets
-	doins "${T}"/ocaml.conf
-}

diff --git a/dev-lang/ocaml/ocaml-4.05.0-r8.ebuild b/dev-lang/ocaml/ocaml-4.05.0-r8.ebuild
deleted file mode 100644
index 58ae1dde82d7..000000000000
--- a/dev-lang/ocaml/ocaml-4.05.0-r8.ebuild
+++ /dev/null
@@ -1,156 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit flag-o-matic toolchain-funcs
-
-PATCHLEVEL="9"
-MY_P="${P/_/-}"
-DESCRIPTION="Type-inferring functional programming language descended from the ML family"
-HOMEPAGE="https://ocaml.org"
-SRC_URI="https://github.com/ocaml/ocaml/archive/${PV/_/+}.tar.gz -> ${MY_P}.tar.gz
-	mirror://gentoo/${PN}-patches-${PATCHLEVEL}.tar.bz2"
-
-LICENSE="QPL-1.0 LGPL-2"
-# Everytime ocaml is updated to a new version, everything ocaml must be rebuilt,
-# so here we go with the subslot.
-SLOT="0/$(ver_cut 1-2)"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
-IUSE="emacs flambda latex ncurses +ocamlopt spacetime X xemacs"
-
-RDEPEND="
-	sys-libs/binutils-libs:=
-	ncurses? ( sys-libs/ncurses:0= )
-	spacetime? ( sys-libs/libunwind:= )
-	X? ( x11-libs/libX11 )
-	!dev-ml/num"
-BDEPEND="${RDEPEND}
-	virtual/pkgconfig"
-PDEPEND="emacs? ( app-emacs/ocaml-mode )
-	xemacs? ( app-xemacs/ocaml )"
-
-QA_FLAGS_IGNORED='/usr/lib.*/ocaml/raw_spacetime_lib.cmxs'
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-4.04.2-tinfo.patch #459512
-	"${FILESDIR}"/${P}-gcc10.patch
-	"${FILESDIR}"/${P}-CVE-2018-9838.patch
-)
-
-pkg_setup() {
-	# dev-lang/ocaml creates its own objects but calls gcc for linking, which will
-	# results in relocations if gcc wants to create a PIE executable
-	if gcc-specs-pie ; then
-		append-ldflags -nopie
-		ewarn "Ocaml generates its own native asm, you're using a PIE compiler"
-		ewarn "We have appended -nopie to ocaml build options"
-		ewarn "because linking an executable with pie while the objects are not pic will not work"
-	fi
-}
-
-src_prepare() {
-	EPATCH_SUFFIX="patch" eapply "${WORKDIR}/patches"
-
-	cp "${FILESDIR}"/ocaml.conf "${T}" || die
-
-	default
-}
-
-src_configure() {
-	export LC_ALL=C
-	local myconf=""
-
-	# Causes build failures because it builds some programs with -pg,
-	# bug #270920
-	filter-flags -fomit-frame-pointer
-	# Bug #285993
-	filter-mfpmath sse
-
-	# Broken until 4.12
-	# bug #818445
-	filter-flags '-flto*'
-	append-flags -fno-strict-aliasing
-
-	# -ggdb3 & co makes it behave weirdly, breaks sexplib
-	replace-flags -ggdb* -ggdb
-
-	# OCaml generates textrels on 32-bit arches
-	# We can't do anything about it, but disabling it means that tests
-	# for OCaml-based packages won't fail on unexpected output
-	# bug #773226
-	if use arm || use ppc || use x86 ; then
-		append-ldflags "-Wl,-z,notext"
-	fi
-
-	# It doesn't compile on alpha without this LDFLAGS
-	use alpha && append-ldflags "-Wl,--no-relax"
-
-	use ncurses || myconf="${myconf} -no-curses"
-	use X || myconf="${myconf} -no-graph"
-	use flambda && myconf="${myconf} -flambda"
-	use spacetime && myconf="${myconf} -spacetime"
-
-	# ocaml uses a home-brewn configure script, preventing it to use econf.
-	RAW_LDFLAGS="$(raw-ldflags)" ./configure \
-		--prefix "${EPREFIX}"/usr \
-		--bindir "${EPREFIX}"/usr/bin \
-		--target-bindir "${EPREFIX}"/usr/bin \
-		--libdir "${EPREFIX}"/usr/$(get_libdir)/ocaml \
-		--mandir "${EPREFIX}"/usr/share/man \
-		-target "${CHOST}" \
-		-host "${CBUILD}" \
-		-cc "$(tc-getCC)" \
-		-as "$(tc-getAS)" \
-		-aspp "$(tc-getCC) -c" \
-		-partialld "$(tc-getLD) -r" \
-		--with-pthread ${myconf} || die "configure failed!"
-
-	# http://caml.inria.fr/mantis/view.php?id=4698
-	export CCLINKFLAGS="${LDFLAGS}"
-}
-
-src_compile() {
-	emake world
-
-	# Native code generation can be disabled now
-	if use ocamlopt ; then
-		# bug #279968
-		emake opt
-		emake -j1 opt.opt
-	fi
-}
-
-src_test() {
-	if use ocamlopt ; then
-		emake -j1 tests
-	else
-		ewarn "${PN} was built without 'ocamlopt' USE flag; skipping tests."
-	fi
-}
-
-src_install() {
-	emake BINDIR="${ED}"/usr/bin \
-		LIBDIR="${ED}"/usr/$(get_libdir)/ocaml \
-		MANDIR="${ED}"/usr/share/man \
-		install
-
-	# Symlink the headers to the right place
-	dodir /usr/include
-	# Create symlink for header files
-	dosym "../$(get_libdir)/ocaml/caml" /usr/include/caml
-	dodoc Changes README.adoc
-	# Create envd entry for latex input files
-	if use latex ; then
-		echo "TEXINPUTS=\"${EPREFIX}/usr/$(get_libdir)/ocaml/ocamldoc:\"" > "${T}"/99ocamldoc || die
-		doenvd "${T}"/99ocamldoc
-	fi
-
-	sed -i -e "s:lib:$(get_libdir):" "${T}"/ocaml.conf || die
-
-	# Install ocaml-rebuild portage set
-	insinto /usr/share/portage/config/sets
-	doins "${T}"/ocaml.conf
-}

diff --git a/dev-lang/ocaml/ocaml-4.10.2-r2.ebuild b/dev-lang/ocaml/ocaml-4.10.2-r2.ebuild
deleted file mode 100644
index fbf4e4c204b6..000000000000
--- a/dev-lang/ocaml/ocaml-4.10.2-r2.ebuild
+++ /dev/null
@@ -1,105 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit flag-o-matic
-
-HOMEPAGE="https://ocaml.org/"
-SRC_URI="https://github.com/ocaml/ocaml/archive/${PV}.tar.gz -> ${P}.tar.gz"
-DESCRIPTION="Programming language supporting functional, imperative & object-oriented styles"
-
-LICENSE="LGPL-2.1"
-SLOT="0/$(ver_cut 1-2)"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
-IUSE="emacs flambda latex +ocamlopt spacetime xemacs"
-
-RDEPEND="sys-libs/binutils-libs:=
-	spacetime? ( sys-libs/libunwind:= )"
-BDEPEND="${RDEPEND}
-	virtual/pkgconfig"
-PDEPEND="emacs? ( app-emacs/ocaml-mode )
-	xemacs? ( app-xemacs/ocaml )"
-
-QA_FLAGS_IGNORED='/usr/lib.*/ocaml/bigarray.cmxs'
-
-PATCHES=(
-	"${FILESDIR}"/${P}-cflags.patch
-)
-
-src_prepare() {
-	default
-
-	cp "${FILESDIR}"/ocaml.conf "${T}" || die
-
-	# Broken until 4.12
-	# bug #818445
-	filter-flags '-flto*'
-	append-flags -fno-strict-aliasing
-
-	# OCaml generates textrels on 32-bit arches
-	# We can't do anything about it, but disabling it means that tests
-	# for OCaml-based packages won't fail on unexpected output
-	# bug #773226
-	if use arm || use ppc || use x86 ; then
-		append-ldflags "-Wl,-z,notext"
-	fi
-
-	# Upstream build ignores LDFLAGS in several places.
-	sed -i -e 's/\(^MKDLL=.*\)/\1 $(LDFLAGS)/' \
-		-e 's/\(^OC_CFLAGS=.*\)/\1 $(LDFLAGS)/' \
-		-e 's/\(^OC_LDFLAGS=.*\)/\1 $(LDFLAGS)/' \
-		Makefile.config.in || die "LDFLAGS fix failed"
-	# ${P} overrides upstream build's own P due to a wrong assignment operator.
-	sed -i -e 's/^P ?=/P =/' stdlib/StdlibModules || die "P fix failed"
-}
-
-src_configure() {
-	local opt=(
-		--bindir="${EPREFIX}/usr/bin"
-		--libdir="${EPREFIX}/usr/$(get_libdir)/ocaml"
-		--mandir="${EPREFIX}/usr/share/man"
-		--prefix="${EPREFIX}/usr"
-		$(use_enable flambda)
-		$(use_enable spacetime)
-	)
-	econf ${opt[@]}
-}
-
-src_compile() {
-	if use ocamlopt ; then
-		emake world.opt
-	else
-		emake world
-	fi
-}
-
-src_test() {
-	if use ocamlopt ; then
-		# OCaml tests only work when run sequentially
-		emake -j1 -C testsuite all
-	else
-		ewarn "${PN} was built without 'ocamlopt' USE flag; skipping tests."
-	fi
-}
-
-src_install() {
-	default
-	dodir /usr/include
-
-	# Create symlink for header files
-	dosym "../$(get_libdir)/ocaml/caml" /usr/include/caml
-	dodoc Changes README.adoc
-
-	# Create envd entry for latex input files
-	if use latex ; then
-		echo "TEXINPUTS=\"${EPREFIX}/usr/$(get_libdir)/ocaml/ocamldoc:\"" > "${T}/99ocamldoc" || die
-		doenvd "${T}"/99ocamldoc
-	fi
-
-	sed -i -e "s:lib:$(get_libdir):" "${T}"/ocaml.conf || die
-
-	# Install ocaml-rebuild portage set
-	insinto /usr/share/portage/config/sets
-	doins "${T}"/ocaml.conf
-}


             reply	other threads:[~2022-02-22  0:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22  0:59 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-03-04  0:59 [gentoo-commits] repo/gentoo:master commit in: dev-lang/ocaml/files/, dev-lang/ocaml/ Sam James
2022-02-22  0:41 Sam James
2022-02-22  0:41 Sam James
2022-01-23 18:13 Alfredo Tupone
2021-06-08  4:59 Sam James
2020-02-05  9:39 Sergei Trofimovich
2019-03-22 10:05 Lars Wendler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1645491524.9e8369277b272b15f3dd1159fa18b71ec4431a77.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox