diff options
Diffstat (limited to 'dev-lang/ocaml')
19 files changed, 979 insertions, 351 deletions
diff --git a/dev-lang/ocaml/Manifest b/dev-lang/ocaml/Manifest index 84240dde1f1b..b24d4629ee2c 100644 --- a/dev-lang/ocaml/Manifest +++ b/dev-lang/ocaml/Manifest @@ -1,8 +1,10 @@ -DIST ocaml-4.04.2.tar.gz 4061873 BLAKE2B 756936592c7e0c87da27f154f07850eb3e4b2ed46ff3b36ff57541375840cd56b170dbe646ef6682f63d4e15ae209d3c125581803641f07403e9eb838c265519 SHA512 8b6a0319307cbb7451594d2f7c63851299d3e7d6ae7879e7525373304f9fd5a9b01d503ecd313a12a3cae24a4a7cb909f7aeebbb70efaa5277137189ea4558cb -DIST ocaml-4.05.0.tar.gz 4431750 BLAKE2B c2ab003a13e0a581ebd0e1c96eeb8a9baea9bfe6bee08823b0e4541819201ec109f1846e13fc1aefa51a001eefbb8f73320ba854d41975fc68cef41bc75b1ecc SHA512 9a060ae4b741e1687277403e5bdb8f6eda2e2ebf6c45f7c0149b66ea1213cb26d13febfbb3f11c12543e244cfdd053b786b09c4145e2348e5d89a7206f7de225 +DIST ocaml-4.09.0-patches-1.tar.bz2 3300 BLAKE2B ef710ea5ed5a243ae684f68b7f203ba454192c9f8f19c32697d336bf18cf2a0e8ea08df232b0fd8e2475a000758a5ba95b3794096ec7d0d1b292a715ab3de86f SHA512 94096b99fd58b32232e418c5736203f08ab3c1558154ed00d4290730bd4db849bc60dfae6160f344acce63bbb8eaceecee25cf836bb73fa419d7bbf4eac433f1 DIST ocaml-4.09.0.tar.gz 4838748 BLAKE2B 80f29d535c64bf2371b480217723ed20b2b21cfd93ce31366a7b91e7ddffdf68db4e88d085288b7e21efee567a13f42ecff24c3a0115507b006acf844239cefd SHA512 dc0271e591bf929b751705835790949a9d741e12d085c8b207c3689b5838a02ea8de80da8b2605d2e6744f2f541b0d1694ffafff9509e99ce01f3a391f6ef2ae -DIST ocaml-4.10.0.tar.gz 4927867 BLAKE2B 71b8448a10bf3049e3b005dfbb2030d479e69e4c2ef00055f1dacd38eff838b0a5c18b4883d899b5eb4cbd05bb7ca35867010794ed25682ad51b2fe19ef2114d SHA512 f39269d572b3f7755f7881b7a9fdfe5253e49d847835ae2a8695f67e3309fc1e925523d66ecbe1fb8bc0cc3b5602e077ce7feac4926aab571383766442265179 +DIST ocaml-4.10.2-patches-1.tar.bz2 3180 BLAKE2B 474471e10c4525e4da730fcf8602fddf5209f7d8eb15bd76894ed2bc22213a6e61aa7f52b1b67dff6c8bf04eac7d759ada28f1783c83a075cc65e7e5caadc715 SHA512 1456f90c0c833461eb9d1c140ba1a7358aa9351f6303e83b0e19bb8688dcb17bdad211f4cec1281a47180bbdddcfdbf44367b47a6b301d2ea41fa9d926bd03a5 DIST ocaml-4.10.2.tar.gz 4933135 BLAKE2B ec5e92adb23c28a254247182c79ab555fd82603e02f24799049b8057abf869d18234302408c8ae89b9997a2b210ed6965e45c2c03e4f0cab34262ad3f6ebb528 SHA512 1dd827da07f01e815fd74dd7ee84db0900f24782f8f7fd426e2d71b9fb03c7b8045f22e018120a0446c362315751365d1bd8c1724edef2b182394e76eb0a07b2 -DIST ocaml-4.11.1.tar.gz 5069552 BLAKE2B a731d4b60d7965c860dda5c9dfb26b968320760501ff3cac908b8cd96e34391c417e16077cdf753b27b85a79857451e6ff0b566a9158178026a0e6bd5240aac4 SHA512 93fa8b2ff71d5f645e3ed72913205e7d35aa523cfa87d1939d77e796495b94c2fdb4a429ea65330cdeecfb0a36f7ab053b15090d9baa151b58e5331148dc8150 -DIST ocaml-patches-8.tar.bz2 1803 BLAKE2B 5e76a198c2f5ca9f231d4e80499d784cf061ec79bf6b5e3aac917e1260d1f2b927f0f8015d39c01ce4fd481d32a5d211c31e081a7ab87ba1e7c7d5def95bc0fb SHA512 fc477fbb5bdec60a3c4d3dfa110119bb579560ac0e0e57e30e076da72643bda6359c06fd3745fd3436c5d611dbbd888ec2921e9d1920f4929df633c35a797411 -DIST ocaml-patches-9.tar.bz2 1700 BLAKE2B 4e46b8fb490db28f815414e285f54e251394ea53e1d25c529bbea9f03e426fd19132b1e2c7c2be7d14983fceb4cad073d191b001f6da522fee4226371d4a2eca SHA512 cc19f9104fac69aecc5effa8cb772342e1fb61cdcd38ba0176efe04cf3d710b1c56d5178748f3bd29099af91fa684da432a8ef8d42de76dbd1b6954a255ea6c0 +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-4.14.1.tar.gz 5498436 BLAKE2B 6113283ab0f7ac39ade1f35a02c203a6956f8f4efa4f174daf53483c1d874613195c2705ca02760f0ff4abd9b37c91f8dec59c010ac8ae8731790cdd6f429673 SHA512 6340e145c7d11a1ee9fa1699fc6a8a6785f14ff9c05dca708cf278194642ec9b7c562d744d8b38e5dab74b88fa3a5760035e214f5f8fab8b233a344b035db8fb +DIST ocaml-4.14.2.tar.gz 5505119 BLAKE2B 518c2a69ee32e1c141b574a9800a64efc445381eb2808985b5dbb9d5ec54228aa25042a1c410307c3556488ba12a751980396b0d9a01e60a1ea84ac5b52e6dd6 SHA512 61bfa7961aae02458210f10865a5703f7a50a9be2452379e820cf2dfac2c6037da553c31835145e50a776880bdeb2ec78cd7a3147d65f418e7b3e593534e8a04 diff --git a/dev-lang/ocaml/files/ocaml-4.04.2-tinfo.patch b/dev-lang/ocaml/files/ocaml-4.04.2-tinfo.patch deleted file mode 100644 index ceeb82991098..000000000000 --- a/dev-lang/ocaml/files/ocaml-4.04.2-tinfo.patch +++ /dev/null @@ -1,13 +0,0 @@ -https://bugs.gentoo.org/459512 - ---- ocaml-4.04.2/configure -+++ ocaml-4.04.2/configure -@@ -1095,7 +1095,7 @@ - # For the terminfo module - - if test "$with_curses" = "yes"; then -- for libs in "" "-lcurses" "-ltermcap" "-lcurses -ltermcap" "-lncurses"; do -+ for libs in "" "-ltinfo" "-lcurses" "-ltermcap" "-lcurses -ltermcap" "-lncurses"; do - if sh ./hasgot $libs tgetent tgetstr tgetnum tputs; then - inf "termcap functions found (with libraries '$libs')" - echo "#define HAS_TERMCAP" >> s.h diff --git a/dev-lang/ocaml/files/ocaml-4.09.0-gcc-10.patch b/dev-lang/ocaml/files/ocaml-4.09.0-gcc-10.patch deleted file mode 100644 index e25d55a5f668..000000000000 --- a/dev-lang/ocaml/files/ocaml-4.09.0-gcc-10.patch +++ /dev/null @@ -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; - diff --git a/dev-lang/ocaml/files/ocaml-4.11.2-cflags.patch b/dev-lang/ocaml/files/ocaml-4.11.2-cflags.patch new file mode 100644 index 000000000000..7adb1ea0768d --- /dev/null +++ b/dev-lang/ocaml/files/ocaml-4.11.2-cflags.patch @@ -0,0 +1,42 @@ +--- 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/files/ocaml-4.11.2-glibc-2.34.patch b/dev-lang/ocaml/files/ocaml-4.11.2-glibc-2.34.patch new file mode 100644 index 000000000000..22cbb806e6ea --- /dev/null +++ b/dev-lang/ocaml/files/ocaml-4.11.2-glibc-2.34.patch @@ -0,0 +1,91 @@ +https://gitlab.com/redhat/centos-stream/rpms/ocaml/-/raw/c9s/0006-Dynamically-allocate-the-alternate-signal-stack-1026.patch +https://bugs.gentoo.org/804498 + +From 24a9db7784ddfcf0af2d2be2f51616ed960ae7e8 Mon Sep 17 00:00:00 2001 +From: Xavier Leroy <xavierleroy@users.noreply.github.com> +Date: Fri, 5 Mar 2021 19:14:07 +0100 +Subject: [PATCH 6/6] Dynamically allocate the alternate signal stack (#10266) + +In Glibc 2.34 and later, SIGSTKSZ may not be a compile-time constant. +It is no longer possible to statically allocate the alternate signal +stack for the main thread, as we've been doing for the last 25 years. + +This commit implements dynamic allocation of the alternate signal stack +even for the main thread. It reuses the code already in place to allocate +the alternate signal stack for other threads. + +Fixes: #10250. +(cherry picked from commit fc9534746bf5d08a4c109f22e344cf49d5d46d54) +--- a/runtime/caml/signals.h ++++ b/runtime/caml/signals.h +@@ -82,7 +82,7 @@ void caml_set_action_pending (void); + value caml_do_pending_actions_exn (void); + value caml_process_pending_actions_with_root (value extra_root); // raises + int caml_set_signal_action(int signo, int action); +-void caml_setup_stack_overflow_detection(void); ++CAMLextern int caml_setup_stack_overflow_detection(void); + + CAMLextern void (*caml_enter_blocking_section_hook)(void); + CAMLextern void (*caml_leave_blocking_section_hook)(void); +--- a/runtime/signals_byt.c ++++ b/runtime/signals_byt.c +@@ -86,4 +86,4 @@ int caml_set_signal_action(int signo, int action) + return 0; + } + +-void caml_setup_stack_overflow_detection(void) {} ++CAMLexport int caml_setup_stack_overflow_detection(void) { return 0; } +--- a/runtime/signals_nat.c ++++ b/runtime/signals_nat.c +@@ -195,8 +195,6 @@ DECLARE_SIGNAL_HANDLER(trap_handler) + #error "CONTEXT_SP is required if HAS_STACK_OVERFLOW_DETECTION is defined" + #endif + +-static char sig_alt_stack[SIGSTKSZ]; +- + /* Code compiled with ocamlopt never accesses more than + EXTRA_STACK bytes below the stack pointer. */ + #define EXTRA_STACK 256 +@@ -282,28 +280,33 @@ void caml_init_signals(void) + #endif + + #ifdef HAS_STACK_OVERFLOW_DETECTION +- { +- stack_t stk; ++ if (caml_setup_stack_overflow_detection() != -1) { + struct sigaction act; +- stk.ss_sp = sig_alt_stack; +- stk.ss_size = SIGSTKSZ; +- stk.ss_flags = 0; + SET_SIGACT(act, segv_handler); + act.sa_flags |= SA_ONSTACK | SA_NODEFER; + sigemptyset(&act.sa_mask); +- if (sigaltstack(&stk, NULL) == 0) { sigaction(SIGSEGV, &act, NULL); } ++ sigaction(SIGSEGV, &act, NULL); + } + #endif + } + +-void caml_setup_stack_overflow_detection(void) ++/* Allocate and select an alternate stack for handling signals, ++ especially SIGSEGV signals. ++ Each thread needs its own alternate stack. ++ The alternate stack used to be statically-allocated for the main thread, ++ but this is incompatible with Glibc 2.34 and newer, where SIGSTKSZ ++ may not be a compile-time constant (issue #10250). */ ++ ++CAMLexport int caml_setup_stack_overflow_detection(void) + { + #ifdef HAS_STACK_OVERFLOW_DETECTION + stack_t stk; + stk.ss_sp = malloc(SIGSTKSZ); ++ if (stk.ss_sp == NULL) return -1; + stk.ss_size = SIGSTKSZ; + stk.ss_flags = 0; +- if (stk.ss_sp) +- sigaltstack(&stk, NULL); ++ return sigaltstack(&stk, NULL); ++#else ++ return 0; + #endif + } diff --git a/dev-lang/ocaml/files/ocaml-4.12.0-glibc-2.34.patch b/dev-lang/ocaml/files/ocaml-4.12.0-glibc-2.34.patch new file mode 100644 index 000000000000..486b44846a86 --- /dev/null +++ b/dev-lang/ocaml/files/ocaml-4.12.0-glibc-2.34.patch @@ -0,0 +1,91 @@ +https://src.fedoraproject.org/rpms/ocaml/blob/129153b85109944bf0b2922949f77ef8f32b39a1/f/0004-Dynamically-allocate-the-alternate-signal-stack-1026.patch +https://bugs.gentoo.org/816765 + +From 3104d92743614f8f52039e0520116af4179880a5 Mon Sep 17 00:00:00 2001 +From: Xavier Leroy <xavierleroy@users.noreply.github.com> +Date: Fri, 5 Mar 2021 19:14:07 +0100 +Subject: [PATCH 4/4] Dynamically allocate the alternate signal stack (#10266) + +In Glibc 2.34 and later, SIGSTKSZ may not be a compile-time constant. +It is no longer possible to statically allocate the alternate signal +stack for the main thread, as we've been doing for the last 25 years. + +This commit implements dynamic allocation of the alternate signal stack +even for the main thread. It reuses the code already in place to allocate +the alternate signal stack for other threads. + +Fixes: #10250. +(cherry picked from commit fc9534746bf5d08a4c109f22e344cf49d5d46d54) +--- a/runtime/caml/signals.h ++++ b/runtime/caml/signals.h +@@ -87,7 +87,7 @@ value caml_do_pending_actions_exn (void); + value caml_process_pending_actions_with_root (value extra_root); // raises + value caml_process_pending_actions_with_root_exn (value extra_root); + int caml_set_signal_action(int signo, int action); +-CAMLextern void caml_setup_stack_overflow_detection(void); ++CAMLextern int caml_setup_stack_overflow_detection(void); + + CAMLextern void (*caml_enter_blocking_section_hook)(void); + CAMLextern void (*caml_leave_blocking_section_hook)(void); +--- a/runtime/signals_byt.c ++++ b/runtime/signals_byt.c +@@ -81,4 +81,4 @@ int caml_set_signal_action(int signo, int action) + return 0; + } + +-CAMLexport void caml_setup_stack_overflow_detection(void) {} ++CAMLexport int caml_setup_stack_overflow_detection(void) { return 0; } +--- a/runtime/signals_nat.c ++++ b/runtime/signals_nat.c +@@ -181,8 +181,6 @@ DECLARE_SIGNAL_HANDLER(trap_handler) + #error "CONTEXT_SP is required if HAS_STACK_OVERFLOW_DETECTION is defined" + #endif + +-static char sig_alt_stack[SIGSTKSZ]; +- + /* Code compiled with ocamlopt never accesses more than + EXTRA_STACK bytes below the stack pointer. */ + #define EXTRA_STACK 256 +@@ -276,28 +274,33 @@ void caml_init_signals(void) + #endif + + #ifdef HAS_STACK_OVERFLOW_DETECTION +- { +- stack_t stk; ++ if (caml_setup_stack_overflow_detection() != -1) { + struct sigaction act; +- stk.ss_sp = sig_alt_stack; +- stk.ss_size = SIGSTKSZ; +- stk.ss_flags = 0; + SET_SIGACT(act, segv_handler); + act.sa_flags |= SA_ONSTACK | SA_NODEFER; + sigemptyset(&act.sa_mask); +- if (sigaltstack(&stk, NULL) == 0) { sigaction(SIGSEGV, &act, NULL); } ++ sigaction(SIGSEGV, &act, NULL); + } + #endif + } + +-CAMLexport void caml_setup_stack_overflow_detection(void) ++/* Allocate and select an alternate stack for handling signals, ++ especially SIGSEGV signals. ++ Each thread needs its own alternate stack. ++ The alternate stack used to be statically-allocated for the main thread, ++ but this is incompatible with Glibc 2.34 and newer, where SIGSTKSZ ++ may not be a compile-time constant (issue #10250). */ ++ ++CAMLexport int caml_setup_stack_overflow_detection(void) + { + #ifdef HAS_STACK_OVERFLOW_DETECTION + stack_t stk; + stk.ss_sp = malloc(SIGSTKSZ); ++ if (stk.ss_sp == NULL) return -1; + stk.ss_size = SIGSTKSZ; + stk.ss_flags = 0; +- if (stk.ss_sp) +- sigaltstack(&stk, NULL); ++ return sigaltstack(&stk, NULL); ++#else ++ return 0; + #endif + } diff --git a/dev-lang/ocaml/files/ocaml-4.12.1-fix-textrel-riscv.patch b/dev-lang/ocaml/files/ocaml-4.12.1-fix-textrel-riscv.patch new file mode 100644 index 000000000000..5ba8582d3a65 --- /dev/null +++ b/dev-lang/ocaml/files/ocaml-4.12.1-fix-textrel-riscv.patch @@ -0,0 +1,46 @@ +From ddf99786f8229c8282905af5c7c74360d4f2fbd0 Mon Sep 17 00:00:00 2001 +From: Alex Fan <alex.fan.q@gmail.com> +Date: Tue, 22 Feb 2022 19:28:30 +1100 +Subject: [PATCH] riscv: Generate frametable in data section to improve code + relocatability (#11042) + +Similar to what PowerPC and System-Z have done in commit 24980d3fd9848e281761ef2b8fe383e71261789b + +With this commit ocamlopt produces .so shared libraries and PIE relocatable +executables that contain no relocations in the text segment. + +Upstream status: merged in 4.14 and 5.x +--- + Changes | 5 +++++ + asmcomp/riscv/emit.mlp | 2 +- + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/Changes b/Changes +index 4898e9d69fc..2bec76daac6 100644 +--- a/Changes ++++ b/Changes +@@ -477,6 +477,11 @@ OCaml 4.14.0 + - #10907, #10959: Wrong type inferred from existential types + (Jacques Garrigue and Gabriel Scherer, report by @dyzsr, review by Leo White) + ++- #10688: Move frame descriptor table from `rodata` to `data` section on ++ RISC-V. Improves support for building DLLs and PIEs. In particular, this ++ applies to all binaries in distributions that build PIEs by default (eg ++ Gentoo and Alpine). ++ (Alex Fan, review by Gabriel Scherer) + + OCaml 4.13 maintenance branch + ----------------------------- +diff --git a/asmcomp/riscv/emit.mlp b/asmcomp/riscv/emit.mlp +index 474a3c6857a..b36aa0ea38c 100644 +--- a/asmcomp/riscv/emit.mlp ++++ b/asmcomp/riscv/emit.mlp +@@ -645,7 +645,7 @@ let end_assembly() = + `{emit_symbol lbl_end}:\n`; + ` .quad 0\n`; + (* Emit the frame descriptors *) +- ` {emit_string rodata_space}\n`; ++ ` {emit_string data_space}\n`; (* not rodata because relocations inside *) + let lbl = Compilenv.make_symbol (Some "frametable") in + declare_global_data lbl; + `{emit_symbol lbl}:\n`; 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/metadata.xml b/dev-lang/ocaml/metadata.xml index d0ecd9cc9290..7fa4e02cc246 100644 --- a/dev-lang/ocaml/metadata.xml +++ b/dev-lang/ocaml/metadata.xml @@ -1,14 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> <email>ml@gentoo.org</email> <name>ML</name> </maintainer> - <maintainer type="person"> - <email>gienah@gentoo.org</email> - <name>Mark Wright</name> - </maintainer> <use> <flag name="flambda">Enables the Flambda optimizer: A new intermediate representation (introduced in ocaml 4.03) in the depths of the compiler designed to allow for better inlining.</flag> <flag name="spacetime">Enables the Spacetime memory profiler. See https://caml.inria.fr/pub/docs/manual-ocaml/spacetime.html for more information.</flag> diff --git a/dev-lang/ocaml/ocaml-4.04.2-r1.ebuild b/dev-lang/ocaml/ocaml-4.04.2-r1.ebuild deleted file mode 100644 index 72014ebdabdb..000000000000 --- a/dev-lang/ocaml/ocaml-4.04.2-r1.ebuild +++ /dev/null @@ -1,128 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -inherit flag-o-matic eutils multilib versionator toolchain-funcs - -PATCHLEVEL="8" -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/${PV}" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 x86 ~amd64-linux ~x86-linux" -IUSE="emacs flambda latex ncurses +ocamlopt X xemacs" - -RDEPEND=" - sys-libs/binutils-libs:= - ncurses? ( sys-libs/ncurses:0= ) - X? ( x11-libs/libX11 )" -DEPEND="${RDEPEND} - virtual/pkgconfig" - -PDEPEND="emacs? ( app-emacs/ocaml-mode ) - xemacs? ( app-xemacs/ocaml )" - -S="${WORKDIR}/${MY_P}" -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" epatch "${WORKDIR}/patches" - epatch "${FILESDIR}/${PN}-4.04.2-tinfo.patch" #459512 -} - -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 - - # -ggdb3 & co makes it behave weirdly, breaks sexplib - replace-flags -ggdb* -ggdb - - # 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" - - # 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 opt.opt - fi -} - -src_test() { - if use ocamlopt ; then - emake -j1 tests - else - ewarn "${PN} testsuite requires ocamlopt useflag" - 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 - dosym /usr/$(get_libdir)/ocaml/caml /usr/include/caml - - dodoc Changes README.adoc - - # Create and envd entry for latex input files - if use latex ; then - echo "TEXINPUTS=${EPREFIX}/usr/$(get_libdir)/ocaml/ocamldoc:" > "${T}"/99ocamldoc - doenvd "${T}"/99ocamldoc - fi - - # Install ocaml-rebuild portage set - insinto /usr/share/portage/config/sets - doins "${FILESDIR}/ocaml.conf" -} diff --git a/dev-lang/ocaml/ocaml-4.05.0-r1.ebuild b/dev-lang/ocaml/ocaml-4.05.0-r1.ebuild deleted file mode 100644 index f1e64c43cdab..000000000000 --- a/dev-lang/ocaml/ocaml-4.05.0-r1.ebuild +++ /dev/null @@ -1,130 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -inherit flag-o-matic eutils multilib versionator 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/${PV}" -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 )" -DEPEND="${RDEPEND} - virtual/pkgconfig" - -PDEPEND="emacs? ( app-emacs/ocaml-mode ) - xemacs? ( app-xemacs/ocaml )" - -S="${WORKDIR}/${MY_P}" -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" epatch "${WORKDIR}/patches" - epatch "${FILESDIR}/${PN}-4.04.2-tinfo.patch" #459512 -} - -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 - - # -ggdb3 & co makes it behave weirdly, breaks sexplib - replace-flags -ggdb* -ggdb - - # 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} testsuite requires ocamlopt useflag" - 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 - dosym /usr/$(get_libdir)/ocaml/caml /usr/include/caml - - dodoc Changes README.adoc - - # Create and envd entry for latex input files - if use latex ; then - echo "TEXINPUTS=${EPREFIX}/usr/$(get_libdir)/ocaml/ocamldoc:" > "${T}"/99ocamldoc - doenvd "${T}"/99ocamldoc - fi - - # Install ocaml-rebuild portage set - insinto /usr/share/portage/config/sets - doins "${FILESDIR}/ocaml.conf" -} diff --git a/dev-lang/ocaml/ocaml-4.10.2.ebuild b/dev-lang/ocaml/ocaml-4.09.0-r3.ebuild index f29e4ae72201..e77d3241e08f 100644 --- a/dev-lang/ocaml/ocaml-4.10.2.ebuild +++ b/dev-lang/ocaml/ocaml-4.09.0-r3.ebuild @@ -1,15 +1,18 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -HOMEPAGE="https://ocaml.org/" -SRC_URI="https://github.com/ocaml/ocaml/archive/${PV}.tar.gz -> ${P}.tar.gz" +inherit flag-o-matic + DESCRIPTION="Programming language supporting functional, imperative & object-oriented styles" +HOMEPAGE="https://ocaml.org/" +SRC_URI="https://github.com/ocaml/ocaml/archive/${PV}.tar.gz -> ${P}.tar.gz + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-patches-1.tar.bz2" LICENSE="LGPL-2.1" -SLOT="0/${PV}" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos" IUSE="emacs flambda latex +ocamlopt spacetime xemacs" RDEPEND="sys-libs/binutils-libs:= @@ -19,8 +22,30 @@ BDEPEND="${RDEPEND} PDEPEND="emacs? ( app-emacs/ocaml-mode ) xemacs? ( app-xemacs/ocaml )" +QA_FLAGS_IGNORED='usr/lib.*/ocaml/bigarray.cmxs' + +PATCHES=( + "${WORKDIR}"/${P}-patches-1/ +) + src_prepare() { default + + cp "${FILESDIR}"/ocaml.conf "${T}" || die + + # Broken until 4.12 + # bug #818445 + filter-lto + 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)/' \ @@ -39,7 +64,8 @@ src_configure() { $(use_enable flambda) $(use_enable spacetime) ) - econf ${opt[@]} + + econf "${opt[@]}" } src_compile() { @@ -62,18 +88,18 @@ src_test() { 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" - doenvd "${T}/99ocamldoc" + 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 "${FILESDIR}/ocaml.conf" + doins "${T}"/ocaml.conf } diff --git a/dev-lang/ocaml/ocaml-4.09.0.ebuild b/dev-lang/ocaml/ocaml-4.10.2-r3.ebuild index 181f30b8fef2..2f80ff02a1ee 100644 --- a/dev-lang/ocaml/ocaml-4.09.0.ebuild +++ b/dev-lang/ocaml/ocaml-4.10.2-r3.ebuild @@ -1,15 +1,18 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -HOMEPAGE="https://ocaml.org/" -SRC_URI="https://github.com/ocaml/ocaml/archive/${PV}.tar.gz -> ${P}.tar.gz" +inherit flag-o-matic + DESCRIPTION="Programming language supporting functional, imperative & object-oriented styles" +HOMEPAGE="https://ocaml.org/" +SRC_URI="https://github.com/ocaml/ocaml/archive/${PV}.tar.gz -> ${P}.tar.gz + https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}-patches-1.tar.bz2" LICENSE="LGPL-2.1" -SLOT="0/${PV}" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos" IUSE="emacs flambda latex +ocamlopt spacetime xemacs" RDEPEND="sys-libs/binutils-libs:= @@ -19,10 +22,30 @@ BDEPEND="${RDEPEND} PDEPEND="emacs? ( app-emacs/ocaml-mode ) xemacs? ( app-xemacs/ocaml )" -PATCHES=("${FILESDIR}"/${PN}-4.09.0-gcc-10.patch) +QA_FLAGS_IGNORED='usr/lib.*/ocaml/bigarray.cmxs' + +PATCHES=( + "${WORKDIR}"/${P}-patches-1/ +) src_prepare() { default + + cp "${FILESDIR}"/ocaml.conf "${T}" || die + + # Broken until 4.12 + # bug #818445 + filter-lto + 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)/' \ @@ -41,7 +64,8 @@ src_configure() { $(use_enable flambda) $(use_enable spacetime) ) - econf ${opt[@]} + + econf "${opt[@]}" } src_compile() { @@ -64,15 +88,20 @@ src_test() { 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" - doenvd "${T}/99ocamldoc" + 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 "${FILESDIR}/ocaml.conf" + doins "${T}"/ocaml.conf } diff --git a/dev-lang/ocaml/ocaml-4.11.1.ebuild b/dev-lang/ocaml/ocaml-4.11.2-r2.ebuild index 280d813184b1..489cf0a32fef 100644 --- a/dev-lang/ocaml/ocaml-4.11.1.ebuild +++ b/dev-lang/ocaml/ocaml-4.11.2-r2.ebuild @@ -1,15 +1,17 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 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="QPL-1.0 LGPL-2" -SLOT="0/${PV}" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos" IUSE="emacs flambda latex +ocamlopt spacetime xemacs" RDEPEND="sys-libs/binutils-libs:= @@ -19,8 +21,31 @@ BDEPEND="${RDEPEND} PDEPEND="emacs? ( app-emacs/ocaml-mode ) xemacs? ( app-xemacs/ocaml )" +QA_FLAGS_IGNORED='/usr/lib.*/ocaml/bigarray.cmxs' + +PATCHES=( + "${FILESDIR}"/${PN}-4.11.2-glibc-2.34.patch + "${FILESDIR}"/${PN}-4.11.2-cflags.patch +) + src_prepare() { default + + cp "${FILESDIR}"/ocaml.conf "${T}" || die + + # Broken until 4.12 + # bug #818445 + filter-lto + 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)/' \ @@ -65,10 +90,13 @@ src_install() { 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" - doenvd "${T}/99ocamldoc" + 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 "${FILESDIR}/ocaml.conf" + doins "${T}"/ocaml.conf } diff --git a/dev-lang/ocaml/ocaml-4.12.1.ebuild b/dev-lang/ocaml/ocaml-4.12.1.ebuild new file mode 100644 index 000000000000..9294aeacdc06 --- /dev/null +++ b/dev-lang/ocaml/ocaml-4.12.1.ebuild @@ -0,0 +1,104 @@ +# 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="QPL-1.0 LGPL-2" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" +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.12.0-glibc-2.34.patch + "${FILESDIR}"/${P}-fix-textrel-riscv.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 +} diff --git a/dev-lang/ocaml/ocaml-4.13.1.ebuild b/dev-lang/ocaml/ocaml-4.13.1.ebuild new file mode 100644 index 000000000000..73ab996ee176 --- /dev/null +++ b/dev-lang/ocaml/ocaml-4.13.1.ebuild @@ -0,0 +1,103 @@ +# 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="QPL-1.0 LGPL-2" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" +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.12.1-fix-textrel-riscv.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 +} diff --git a/dev-lang/ocaml/ocaml-4.14.0-r1.ebuild b/dev-lang/ocaml/ocaml-4.14.0-r1.ebuild new file mode 100644 index 000000000000..83dfc2f12fc2 --- /dev/null +++ b/dev-lang/ocaml/ocaml-4.14.0-r1.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2023 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="amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos" +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() { + filter-lto #bug 870349 + 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 +} diff --git a/dev-lang/ocaml/ocaml-4.10.0.ebuild b/dev-lang/ocaml/ocaml-4.14.1.ebuild index 903534e88c81..fe9b42d885eb 100644 --- a/dev-lang/ocaml/ocaml-4.10.0.ebuild +++ b/dev-lang/ocaml/ocaml-4.14.1.ebuild @@ -1,78 +1,100 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +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="LGPL-2.1" +LICENSE="QPL-1.0 LGPL-2" SLOT="0/${PV}" -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" +KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="emacs flambda latex +ocamlopt xemacs" -RDEPEND="sys-libs/binutils-libs:= - spacetime? ( sys-libs/libunwind:= )" +RDEPEND="sys-libs/binutils-libs:=" BDEPEND="${RDEPEND} virtual/pkgconfig" PDEPEND="emacs? ( app-emacs/ocaml-mode ) xemacs? ( app-xemacs/ocaml )" -#PATCHES=("${FILESDIR}"/${PN}-4.10.0-gcc-10.patch) +QA_FLAGS_IGNORED='/usr/lib.*/ocaml/bigarray.cmxs' 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" - # ${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() { + filter-lto #bug 870349 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[@]} + + econf "${opt[@]}" } src_compile() { + env -u P emake world + if use ocamlopt ; then - emake world.opt - else - emake world + 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 - # OCaml tests only work when run sequentially - emake -j1 -C testsuite all + emake -j1 ocamltest.opt else - ewarn "${PN} was built without 'ocamlopt' USE flag; skipping tests." + 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" - doenvd "${T}/99ocamldoc" + 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 "${FILESDIR}/ocaml.conf" + doins "${T}"/ocaml.conf } diff --git a/dev-lang/ocaml/ocaml-4.14.2.ebuild b/dev-lang/ocaml/ocaml-4.14.2.ebuild new file mode 100644 index 000000000000..bb61347421c2 --- /dev/null +++ b/dev-lang/ocaml/ocaml-4.14.2.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic + +DESCRIPTION="Programming language supporting functional, imperative & object-oriented styles" +HOMEPAGE="https://ocaml.org/" +SRC_URI="https://github.com/ocaml/ocaml/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="QPL-1.0 LGPL-2" +SLOT="0/${PV}" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" +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' + +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() { + filter-lto #bug 870349 + 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() { + # OCaml generates textrels on 32-bit arches + if use arm || use ppc || use x86 ; then + export QA_TEXTRELS='.*' + fi + 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 +} |