summaryrefslogtreecommitdiff
path: root/dev-lang/ocaml
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-04-06 22:33:41 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-04-06 22:33:41 +0100
commite68d405c5d712af4387159df07e226217bdda049 (patch)
tree009ab0f3d427f0813e62930d71802cb054c07e30 /dev-lang/ocaml
parent401101f9c8077911929d3f2b60a37098460a5d89 (diff)
gentoo resync : 06.04.2022
Diffstat (limited to 'dev-lang/ocaml')
-rw-r--r--dev-lang/ocaml/Manifest3
-rw-r--r--dev-lang/ocaml/files/ocaml-4.14.0-clang.patch132
-rw-r--r--dev-lang/ocaml/ocaml-4.14.0.ebuild103
3 files changed, 238 insertions, 0 deletions
diff --git a/dev-lang/ocaml/Manifest b/dev-lang/ocaml/Manifest
index 501212afc387..a7d03054c0a5 100644
--- a/dev-lang/ocaml/Manifest
+++ b/dev-lang/ocaml/Manifest
@@ -3,6 +3,7 @@ AUX ocaml-4.11.2-cflags.patch 1416 BLAKE2B 722ffd7944c3dabd753e98bfb885ad283aa5b
AUX ocaml-4.11.2-glibc-2.34.patch 3318 BLAKE2B 96fe61e553e7c67f76df32f2e5532f7a6eae57fb60752c7c49d71baf416ac74a4c7b925ecfd0bd5874a1728b51ca36b82d636bfa6ab30ec5f3df37fbac2a73b9 SHA512 eb54d912338a42a21f736dcd1591f77403b0dff8772059bd7f39a6e83b8a5e89bd5a7a9d4200bacbcaa8ec0450a5a78ecf6645bb5405d45fd1c077cbe1c36f7f
AUX ocaml-4.12.0-glibc-2.34.patch 3411 BLAKE2B d5138feaf6ca1e4a25ee85100013e343f8867bfe22d1c8c26df56fe1a6266b9cf37738f0b5fa6ee6daaaed9c90880529a50ffa1e789766039727dd407d15da51 SHA512 978a300d28bcb4c4d312e5b9f830140b08a282ba850d7c7a3866ca54413a321695d21315fff423d646085d8eed148a3f84567c08a4e09957b4b87010d65ee694
AUX ocaml-4.12.1-fix-textrel-riscv.patch 1784 BLAKE2B 700fca8fe6c30a301bca5a64ed94038923bec1df80e6a75d4afb88ecfc38c9c55f5c163dfb12506f6b3a1e5784e65314385e13b9f45230b9f3b3e7d771c89b2e SHA512 f4f3a4b1f3f9fd823e09338c7c06ce6abc8699a765c0aa442e3b66ae72a83bb6dee744bfc0cb527a1131bbbe0ae5a5fd1d51c4700b62927f1fdf25a47e541e80
+AUX ocaml-4.14.0-clang.patch 4301 BLAKE2B 6a06b6524167b48cb711c75504d9f724caf90f4a808013d93aebd3429344a45e74350f4de405a298986f5b113ccb661b1307e4fc583f3b58dc013ee8e9a8bd52 SHA512 e68f11cae4bbab9fcd5b591f4082c8b15a79427bd76dfe51025b309601f5ff61ee57863cbe1d1a6249fb5d7f17d3e0f3c6e451925d0e130ea88e64b8d8d151dc
AUX ocaml-rebuild.sh 1120 BLAKE2B 6f88a9f2b99fae7f89b884bb08d2c6ad6a0e14d4a8fd06d498037f78c5f6ef040428f9de224b5fe5df4ef64eaed419cda6d8715ea0c0a4c4dad60c5cf75a4147 SHA512 05a3e81e95533135d9895091c21621c73ae82851abd4889d64f035979eb25f8d90b60f469d7ef5e789fd1a4adffd6bbe255e6708c14c24a04f8a423507d19a40
AUX ocaml.conf 177 BLAKE2B da070848d9e3a30ad303c296f55de87c30fd15feee3304ccc1d1f844d83c5a646664cd4d9958375ead2324e25bb88280fdb78f9e4230eeb8cd5825eed6f2f91d SHA512 4f0a48b8101b77d568d8d0a852f2a21fd46b7947c5d3f975ee4cd8a9c37c993d689cf5fb53b54a6b2740cb865051dc50c74c0c373eb697fca800ca143d401aa4
DIST ocaml-4.05.0-patches-1.tar.bz2 4009 BLAKE2B 052c3a6859a942f2993d0b06ab57ca8f7469650c096f20bff7ff7cf5c2842e8d5019d595a4eca0dc1a4e5feda2db8a831a6917b3b6d9f39166c8ae7af1e894e7 SHA512 b349e6613201d9400f736c5b2d0ede01e7e113524cbc6989999a71fb97cb1eb67f90af8c2fbd3fd8abeccf3193e317cdd8258aee328c3e078634385c21558619
@@ -14,6 +15,7 @@ DIST ocaml-4.10.2.tar.gz 4933135 BLAKE2B ec5e92adb23c28a254247182c79ab555fd82603
DIST ocaml-4.11.2.tar.gz 5075323 BLAKE2B bdc503d9a8d0e39dd11060febcd0287657b460e50ed81e55578a3e778af990ca5d4ef9011753eee4e1a144da33eb76c95b1672dc99b76e65a2e107eee472fe06 SHA512 03d8a9f6e130142c121ff2eb3d54f584f1e7c8475f066a5803bb0edd2fa172ca06a56a3ec548b225f5c8b12112d7a68511b1e16f3ade075b5f02610d4247bbb3
DIST ocaml-4.12.1.tar.gz 5181696 BLAKE2B 9d21438e09b1a9680eabb65f5c78d9fe84459592ef7bb797a1933e5383f7b6d5cefffa8cdc184abc102417f5dbc0fca8ef624c9b560f89eaff6537544b5b395f SHA512 e942e5cf5530804690ec45c40936ad2acbb60e11279fc676e0f04181fe1855f84ee5c3cb9c337fc5d01f6ee0e7b2251a6c04f7de56d99c20bb62026dff6c5671
DIST ocaml-4.13.1.tar.gz 5323203 BLAKE2B f1dcb1601ebfa2a37351e3a466a7ca601518c2da403b01aeb182738a54d5887523ab554d747d6591cb09b07b417865e20907f7877117b2d2d069ef6c9edc0fae SHA512 da3434177438c852da53c0fda7bc2519adcda6384d97d45e44137ed0fd384ffb3da61958a7b51296edb3f88f5a5310ca71b6862f6d756aaa4012d1f54e5955f6
+DIST ocaml-4.14.0.tar.gz 5494844 BLAKE2B f2f9142a95722c7fc5fda205ea6b951939f7d285963b8aa14dc157ac10202ef9d00c7590beabdc97ed83548d61e5ef28b60a360f1a492420a54f4e26dfbf89f0 SHA512 3c5e5b9f00bb109dd99b5f7b0078cf8663d4247e548f3e601d6b2a55582e04bb20f6de85005c4cf2f78ae9aaa449f5ca6f2bab2f6ce83eeb3aeb386e3f2fcc32
DIST ocaml-patches-9.tar.bz2 1700 BLAKE2B 4e46b8fb490db28f815414e285f54e251394ea53e1d25c529bbea9f03e426fd19132b1e2c7c2be7d14983fceb4cad073d191b001f6da522fee4226371d4a2eca SHA512 cc19f9104fac69aecc5effa8cb772342e1fb61cdcd38ba0176efe04cf3d710b1c56d5178748f3bd29099af91fa684da432a8ef8d42de76dbd1b6954a255ea6c0
EBUILD ocaml-4.05.0-r9.ebuild 4370 BLAKE2B 22f915f38da08b3f98923f337dbe1a2ae25f2edaf73887f602c0d13047808bff8f5bcde68d7ac214f07da7d68d6c05a2f9520318d1cda041d54e37966b27c605 SHA512 111a2e4d4a18034a2d4580d19e4074fd4d6b60330e0af861062c4196c19027667d18e0361e1e73cdf9d46c31d06d66ce9a7ada36058fca168f634a891cdae861
EBUILD ocaml-4.09.0-r3.ebuild 2794 BLAKE2B 0a7e6b805915602875e3f323f97370a5f9345c2a1a9e30ed545922cfdd31c8d304d2e534b1ead1719b9be33f72c79c8383ca63fa45f2f62084f47c7cfd1e127c SHA512 b87052b9caea618b0024342e614859e68bb30b3426b31df313006a3c655be8b60e47ab9611c609307bacff610f0cc889e68db14e1c78bb820f33bcde8b32f5ee
@@ -21,4 +23,5 @@ EBUILD ocaml-4.10.2-r3.ebuild 2801 BLAKE2B 089f0d19153db72faa63db09fc7ef60b69ea0
EBUILD ocaml-4.11.2-r2.ebuild 2642 BLAKE2B 3639ba3300e16337b2b0d31b4bca1accad472b734003207a7a863de24b7391686a9e18fd6c12ee7775efe40f0c21ae89d652b7c7c40e5e757ea360333d5055df SHA512 5ef88e24a64f6627b599f05fd6e6f9fd4e476f4c7547b00385d3594ceb24a7c15c4b32f055adc8d1ebc101ec0f948b339d4368a573b0b49c931ad061dba0834a
EBUILD ocaml-4.12.1.ebuild 2559 BLAKE2B 50f373f16833ba2783fa3f1758ce0678934b3be58d662b595440f8abf0f0179ea78781835303dadd583cedf412c08cb1799e54276237fae491cdd944615d9f98 SHA512 9f3ce96e0f69f6a11d431255709f0ea11f46bb80f43597d3b026a916191bc6e71671621720184e4d2ddb962dc45360a6d0541c68525720ea89e63b009acf57f8
EBUILD ocaml-4.13.1.ebuild 2522 BLAKE2B 8960f3e3ec99267b9a5673c7ab3765970ecbf1d1cd35500be26b7d0ec5d4e35c2c700b39179c2178f86b9f89fe9772d47f01ea70f925b6bfce048f7a799cbfba SHA512 390b1b201c9a3b9cebf6a17e4820224e7b321390801134a496ba45fe607a9af8b1417eb3d17cf52f41c5a70eef9d463182df392cb264e1243efbce90f7f5a8e7
+EBUILD ocaml-4.14.0.ebuild 2510 BLAKE2B fc5f5310df64c514f47f1f69554012b9234f1694ad76500bc08eeabc5a703d6577d5ddfb59a9d8d25707bf14174b48c767fcc94029fe74f4930d512192d3ae18 SHA512 e68eee424dfb5fe6a4ffa5c7e124213dacd0cdb689e2f2480b3db3da5370414ff4a051d9a52cddba0b9fa02b3cfe256b38d1c8a3feacfca5b7ae9e43905b256a
MISC metadata.xml 776 BLAKE2B e7b13b4bb764cec6df76ede0eb2d492cc705ce51b18a445fa3f9ebaab119fab8cae45a2a9d02c70f38e19f2e2d2c06de648a3a0843a603dd7b68942c7cd00bdb SHA512 92e3afe1c40991d37dc460d6091ff2b15c83740343e5d8dd69344eb61d873fbd66af1b96e70904f7757c06f2b104d1450883cc79877709c779467af64e2ea96e
diff --git a/dev-lang/ocaml/files/ocaml-4.14.0-clang.patch b/dev-lang/ocaml/files/ocaml-4.14.0-clang.patch
new file mode 100644
index 000000000000..cd3c042f2639
--- /dev/null
+++ b/dev-lang/ocaml/files/ocaml-4.14.0-clang.patch
@@ -0,0 +1,132 @@
+commit 28b553622bd0f168411d86ddcfba1adab0d87b92
+Author: Yawar Amin <yawar.amin@gmail.com>
+Date: Mon Nov 15 22:40:43 2021 -0500
+
+ Fix ranlib error
+
+ - Always pass ranlib one file argument at a time to avoid error 'Exactly
+ one archive should be specified'
+ - Call ranlib without cd'ing into the library's directory
+ - Use Makefile functionality to simplify recipes
+
+diff --git a/Makefile b/Makefile
+index c2522c775..2e4e44faa 100644
+--- a/Makefile
++++ b/Makefile
+@@ -549,6 +549,8 @@ else
+ endif
+ $(MAKE) -C tools installopt
+
++LIBRARIES = $(addsuffix .$(A), ocamlcommon ocamlbytecomp ocamloptcomp)
++
+ .PHONY: installoptopt
+ installoptopt:
+ $(INSTALL_PROG) ocamlc.opt$(EXE) "$(INSTALL_BINDIR)"
+@@ -585,8 +587,11 @@ endif
+ ifeq "$(INSTALL_OCAMLNAT)" "true"
+ $(INSTALL_PROG) ocamlnat$(EXE) "$(INSTALL_BINDIR)"
+ endif
+- cd "$(INSTALL_COMPLIBDIR)" && \
+- $(RANLIB) ocamlcommon.$(A) ocamlbytecomp.$(A) ocamloptcomp.$(A)
++# Some versions of ranlib do not support multiple archives
++ for library in $(LIBRARIES); \
++ do \
++ $(RANLIB) "$(INSTALL_COMPLIBDIR)/$$library"; \
++ done
+
+ # Installation of the *.ml sources of compiler-libs
+ .PHONY: install-compiler-sources
+diff --git a/otherlibs/Makefile.otherlibs.common b/otherlibs/Makefile.otherlibs.common
+index 95ff4d58f..6a4451e47 100644
+--- a/otherlibs/Makefile.otherlibs.common
++++ b/otherlibs/Makefile.otherlibs.common
+@@ -95,7 +95,7 @@ install::
+ fi
+ ifneq "$(STUBSLIB)" ""
+ $(INSTALL_DATA) $(STUBSLIB) "$(INSTALL_LIBDIR)/"
+- cd "$(INSTALL_LIBDIR)"; $(RANLIB) lib$(CLIBNAME).$(A)
++ $(RANLIB) "$(INSTALL_LIBDIR)/lib$(CLIBNAME).$(A)"
+ endif
+
+ $(INSTALL_DATA) \
+@@ -104,7 +104,7 @@ endif
+ ifeq "$(INSTALL_SOURCE_ARTIFACTS)" "true"
+ $(INSTALL_DATA) \
+ $(CMIFILES:.cmi=.mli) \
+- $(CMIFILES:.cmi=.cmti) \
++ $(CMIFILES:.cmi=.cmti) \
+ "$(INSTALL_LIBDIR)/"
+ endif
+ if test -n "$(HEADERS)"; then \
+@@ -115,7 +115,7 @@ installopt:
+ $(INSTALL_DATA) \
+ $(CAMLOBJS_NAT) $(LIBNAME).cmxa $(LIBNAME).$(A) \
+ "$(INSTALL_LIBDIR)/"
+- cd "$(INSTALL_LIBDIR)"; $(RANLIB) $(LIBNAME).a
++ $(RANLIB) "$(INSTALL_LIBDIR)/$(LIBNAME).$(A)"
+ if test -f $(LIBNAME).cmxs; then \
+ $(INSTALL_PROG) $(LIBNAME).cmxs "$(INSTALL_LIBDIR)"; \
+ fi
+diff --git a/otherlibs/dynlink/Makefile b/otherlibs/dynlink/Makefile
+index 6b02dc197..dccc45103 100644
+--- a/otherlibs/dynlink/Makefile
++++ b/otherlibs/dynlink/Makefile
+@@ -249,12 +249,12 @@ ifeq "$(INSTALL_SOURCE_ARTIFACTS)" "true"
+ endif
+
+ installopt:
+- if $(NATDYNLINK); then \
+- $(INSTALL_DATA) \
+- $(NATOBJS) dynlink.cmxa dynlink.$(A) \
+- "$(INSTALL_LIBDIR)" && \
+- cd "$(INSTALL_LIBDIR)" && $(RANLIB) dynlink.$(A); \
+- fi
++ifeq "$(NATDYNLINK)" "true"
++ $(INSTALL_DATA) \
++ $(NATOBJS) dynlink.cmxa dynlink.$(A) \
++ "$(INSTALL_LIBDIR)"
++ $(RANLIB) "$(INSTALL_LIBDIR)/dynlink.$(A)"
++endif
+
+ partialclean:
+ rm -f $(extract_crc) *.cm[ioaxt] *.cmti *.cmxa \
+diff --git a/otherlibs/systhreads/Makefile b/otherlibs/systhreads/Makefile
+index 8fc1bdb92..379c530fa 100644
+--- a/otherlibs/systhreads/Makefile
++++ b/otherlibs/systhreads/Makefile
+@@ -121,7 +121,7 @@ install:
+ $(INSTALL_PROG) dllthreads$(EXT_DLL) "$(INSTALL_STUBLIBDIR)"; \
+ fi
+ $(INSTALL_DATA) libthreads.$(A) "$(INSTALL_LIBDIR)"
+- cd "$(INSTALL_LIBDIR)"; $(RANLIB) libthreads.$(A)
++ $(RANLIB) "$(INSTALL_LIBDIR)/libthreads.$(A)"
+ mkdir -p "$(INSTALL_THREADSLIBDIR)"
+ $(INSTALL_DATA) \
+ $(CMIFILES) threads.cma \
+@@ -136,11 +136,11 @@ endif
+
+ installopt:
+ $(INSTALL_DATA) libthreadsnat.$(A) "$(INSTALL_LIBDIR)"
+- cd "$(INSTALL_LIBDIR)"; $(RANLIB) libthreadsnat.$(A)
++ $(RANLIB) "$(INSTALL_LIBDIR)/libthreadsnat.$(A)"
+ $(INSTALL_DATA) \
+ $(THREADS_NCOBJS) threads.cmxa threads.$(A) \
+ "$(INSTALL_THREADSLIBDIR)"
+- cd "$(INSTALL_THREADSLIBDIR)" && $(RANLIB) threads.$(A)
++ $(RANLIB) "$(INSTALL_THREADSLIBDIR)/threads.$(A)"
+
+ %.cmi: %.mli
+ $(CAMLC) -c $(COMPFLAGS) $<
+diff --git a/stdlib/Makefile b/stdlib/Makefile
+index df34bc2d4..32c5dab56 100644
+--- a/stdlib/Makefile
++++ b/stdlib/Makefile
+@@ -105,7 +105,7 @@ installopt-default::
+ $(INSTALL_DATA) \
+ stdlib.cmxa stdlib.$(A) std_exit.$(O) *.cmx \
+ "$(INSTALL_LIBDIR)"
+- cd "$(INSTALL_LIBDIR)"; $(RANLIB) stdlib.$(A)
++ $(RANLIB) "$(INSTALL_LIBDIR)/stdlib.$(A)"
+
+ ifeq "$(UNIX_OR_WIN32)" "unix"
+ HEADERPROGRAM = header
diff --git a/dev-lang/ocaml/ocaml-4.14.0.ebuild b/dev-lang/ocaml/ocaml-4.14.0.ebuild
new file mode 100644
index 000000000000..d54fe96af6c3
--- /dev/null
+++ b/dev-lang/ocaml/ocaml-4.14.0.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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="QPL-1.0 LGPL-2"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
+IUSE="emacs flambda latex +ocamlopt xemacs"
+
+RDEPEND="sys-libs/binutils-libs:="
+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.14.0-clang.patch
+)
+
+src_prepare() {
+ default
+
+ cp "${FILESDIR}"/ocaml.conf "${T}" || die
+
+ # 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"
+}
+
+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)
+ )
+
+ econf "${opt[@]}"
+}
+
+src_compile() {
+ env -u P emake world
+
+ if use ocamlopt ; then
+ env -u P emake opt
+ env -u P emake opt.opt
+ fi
+}
+
+src_test() {
+ emake -j
+
+ # OCaml tests only work when run sequentially
+ if use ocamlopt ; then
+ emake -j1 ocamltest.opt
+ else
+ emake -j1 ocamltest
+ #ewarn "${PN} was built without 'ocamlopt' USE flag; skipping tests."
+ fi
+
+ emake -j1 tests
+}
+
+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
+}