dev-lang/ocaml: drop 4.09.0-r2

Bug: https://bugs.gentoo.org/804498
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2022-03-04 00:55:27 +00:00
parent 21a48233b6
commit 1eabb8b88d
3 changed files with 0 additions and 190 deletions

View File

@@ -1,65 +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/yacc/Makefile
+++ b/yacc/Makefile
@@ -63,4 +63,4 @@
# also works for .obj files.
%.$(O): %.c
- $(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
+ $(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $<
--- 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/ocamltest/Makefile
+++ b/ocamltest/Makefile
@@ -221,7 +221,7 @@
$(ocamllex) -q $<
%.$(O): %.c
- $(CC) $(OC_CFLAGS) $(OC_CPPFLAGS) -c $<
+ $(CC) $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) -c $<
ocamltest_config.ml: ocamltest_config.ml.in Makefile ../Makefile.config
sed \
--- a/otherlibs/systhreads/Makefile
+++ b/otherlibs/systhreads/Makefile
@@ -93,11 +93,11 @@
# twice, each time with different options).
st_stubs_b.$(O): st_stubs.c $(HEADER)
- $(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) -I$(ROOTDIR)/runtime \
+ $(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) -I$(ROOTDIR)/runtime \
$(SHAREDLIB_CFLAGS) $(OUTPUTOBJ)$@ $<
st_stubs_n.$(O): st_stubs.c $(HEADER)
- $(CC) $(OC_CFLAGS) $(OC_CPPFLAGS) \
+ $(CC) $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) \
-I$(ROOTDIR)/runtime $(SHAREDLIB_CFLAGS) -DNATIVE_CODE \
-DTARGET_$(ARCH) -DMODEL_$(MODEL) -DSYS_$(SYSTEM) \
$(OUTPUTOBJ)$@ -c $<
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -322,7 +322,7 @@
endif
objinfo_helper$(EXE): objinfo_helper.c $(ROOTDIR)/runtime/caml/s.h
- $(CC) $(OC_CFLAGS) $(OC_CPPFLAGS) -I$(ROOTDIR)/runtime $(OUTPUTEXE)$@ \
+ $(CC) $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) -I$(ROOTDIR)/runtime $(OUTPUTEXE)$@ \
$(DEF_SYMBOL_PREFIX) $(LIBBFD_INCLUDE) $< $(LIBBFD_LINK)
OBJINFO=$(ROOTDIR)/compilerlibs/ocamlcommon.cma \

View File

@@ -1,21 +0,0 @@
--- a/runtime/backtrace.c
+++ b/runtime/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/runtime/startup_nat.c
+++ b/runtime/startup_nat.c
@@ -44,7 +44,6 @@
#endif
extern int caml_parser_trace;
-CAMLexport header_t caml_atom_table[256];
char * caml_code_area_start, * caml_code_area_end;
struct ext_table caml_code_fragments_table;

View File

@@ -1,104 +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}"/${PN}-4.09.0-gcc-10.patch
"${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
}