From owner-svn-ports-all@FreeBSD.ORG Wed Mar 26 17:53:06 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 32701A68; Wed, 26 Mar 2014 17:53:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D40A301; Wed, 26 Mar 2014 17:53:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2QHr6Oq008944; Wed, 26 Mar 2014 17:53:06 GMT (envelope-from marino@svn.freebsd.org) Received: (from marino@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2QHr2j8008916; Wed, 26 Mar 2014 17:53:02 GMT (envelope-from marino@svn.freebsd.org) Message-Id: <201403261753.s2QHr2j8008916@svn.freebsd.org> From: John Marino Date: Wed, 26 Mar 2014 17:53:02 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r349274 - in head/devel/omake: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Mar 2014 17:53:06 -0000 Author: marino Date: Wed Mar 26 17:53:01 2014 New Revision: 349274 URL: http://svnweb.freebsd.org/changeset/ports/349274 QAT: https://qat.redports.org/buildarchive/r349274/ Log: ocaml update 3/4: devel/omake major tweaks, stage support Two dozen patches were brought in from NetBSD via dports , and this port was staged too. Most of the patches are upstream fixes as Omake has been updated in repo but without a new release. In any case an update was required because it broke after Ocaml was updated to version 4.00. Urged by: portmgr (bapt) Added: head/devel/omake/files/patch-lib_build_OCaml.om (contents, props changed) head/devel/omake/files/patch-src_build_omake_rule.ml (contents, props changed) head/devel/omake/files/patch-src_builtin_omake__builtin__target.ml (contents, props changed) head/devel/omake/files/patch-src_clib_omake__shell__sys.c (contents, props changed) head/devel/omake/files/patch-src_clib_readline.c (contents, props changed) head/devel/omake/files/patch-src_env_omake__env.ml (contents, props changed) head/devel/omake/files/patch-src_ir_omake__value__type.ml (contents, props changed) head/devel/omake/files/patch-src_libmojave-external_cutil_fam__pseudo.h (contents, props changed) head/devel/omake/files/patch-src_libmojave-external_cutil_lm__channel.c (contents, props changed) head/devel/omake/files/patch-src_libmojave-external_cutil_lm__ctype.c (contents, props changed) head/devel/omake/files/patch-src_libmojave-external_cutil_lm__notify.c (contents, props changed) head/devel/omake/files/patch-src_libmojave-external_cutil_lm__printf.c (contents, props changed) head/devel/omake/files/patch-src_libmojave-external_cutil_lm__terminfo.c (contents, props changed) head/devel/omake/files/patch-src_libmojave-external_cutil_lm__termsize.c (contents, props changed) head/devel/omake/files/patch-src_libmojave-external_cutil_lm__uname__ext.c (contents, props changed) head/devel/omake/files/patch-src_libmojave-external_cutil_lm__unix__cutil.c (contents, props changed) head/devel/omake/files/patch-src_libmojave-external_stdlib_lm__debug.ml (contents, props changed) head/devel/omake/files/patch-src_libmojave-external_stdlib_lm__string__util.ml (contents, props changed) head/devel/omake/files/patch-src_libmojave-external_unix_lm__notify.ml (contents, props changed) head/devel/omake/files/patch-src_libmojave-external_util_lm__channel.ml (contents, props changed) head/devel/omake/files/patch-src_libmojave-external_util_lm__filename__util.ml (contents, props changed) head/devel/omake/files/patch-src_libmojave-external_util_lm__glob.ml (contents, props changed) head/devel/omake/files/patch-src_libmojave-external_util_lm__lexer.ml (contents, props changed) head/devel/omake/files/patch-src_libmojave-external_util_lm__parser.ml (contents, props changed) Deleted: head/devel/omake/files/patch-doc_info_omake-doc.info Modified: head/devel/omake/Makefile head/devel/omake/files/patch-OMakefile Modified: head/devel/omake/Makefile ============================================================================== --- head/devel/omake/Makefile Wed Mar 26 17:51:23 2014 (r349273) +++ head/devel/omake/Makefile Wed Mar 26 17:53:01 2014 (r349274) @@ -3,6 +3,7 @@ PORTNAME= omake DISTVERSION= 0.9.8.6-0.rc1 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= http://main.metaprl.org/download/omake/ @@ -13,11 +14,11 @@ WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVER USE_OCAML= yes NO_OCAML_RUNDEPENDS=yes USES= ncurses readline +MAKE_ENV+= INSTALL_ROOT=${STAGEDIR} MAKE_JOBS_UNSAFE= yes INFO= omake-doc -NO_STAGE= yes .include .if ${ARCH} == "powerpc" @@ -55,13 +56,13 @@ bench: build @cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE_ARGS} boot/omake bench post-install: - @(cd ${WRKSRC}/doc/info \ - && ${INSTALL_DATA} omake-doc.info ${PREFIX}/${INFO_PATH}) - @(cd ${WRKSRC}/doc/info \ - && ${INSTALL_DATA} omake-doc.info-* ${PREFIX}/${INFO_PATH}) + @(cd ${WRKSRC}/doc/info && ${INSTALL_DATA} omake-doc.info \ + ${STAGEDIR}${PREFIX}/${INFO_PATH}) + @(cd ${WRKSRC}/doc/info && ${INSTALL_DATA} omake-doc.info-* \ + ${STAGEDIR}${PREFIX}/${INFO_PATH}) .if ${PORT_OPTIONS:MDOCS} - @${MKDIR} ${DOCSDIR} - @(cd ${WRKSRC}/doc/html && ${COPYTREE_SHARE} . ${DOCSDIR}) + @${MKDIR} ${STAGEDIR}${DOCSDIR} + @(cd ${WRKSRC}/doc/html && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}) .endif .include Modified: head/devel/omake/files/patch-OMakefile ============================================================================== --- head/devel/omake/files/patch-OMakefile Wed Mar 26 17:51:23 2014 (r349273) +++ head/devel/omake/files/patch-OMakefile Wed Mar 26 17:53:01 2014 (r349274) @@ -1,19 +1,15 @@ ---- OMakefile.orig 2010-10-26 20:42:37.000000000 -0400 -+++ OMakefile 2013-04-03 16:50:13.000000000 -0400 -@@ -33,7 +33,6 @@ - # - # Extra options for the C compiler - # -- CFLAGS += -g -O2 -Wall -Werror -Wno-unused - - # - # We never need threads on Unix -@@ -57,7 +56,7 @@ +$NetBSD: patch-aa,v 1.2 2010/12/17 09:40:14 wiz Exp $ + +From upstream SVN. + +--- OMakefile.orig 2010-10-27 00:42:37.000000000 +0000 ++++ OMakefile +@@ -57,7 +57,7 @@ if $(not $(defined CAMLLIB)) # # OCaml options # -OCAMLFLAGS[] += -w Ae$(if $(OCAML_ACCEPTS_Z_WARNING), z) -+OCAMLFLAGS[] += -w Aer-29$(if $(OCAML_ACCEPTS_Z_WARNING), z) ++OCAMLFLAGS[] += -w Ae$(if $(OCAML_ACCEPTS_Z_WARNING), z-9-29) if $(THREADS_ENABLED) OCAMLFLAGS += -thread export Added: head/devel/omake/files/patch-lib_build_OCaml.om ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/omake/files/patch-lib_build_OCaml.om Wed Mar 26 17:53:01 2014 (r349274) @@ -0,0 +1,19 @@ +$NetBSD: patch-lib_build_OCaml.om,v 1.1 2012/11/23 22:55:22 marino Exp $ + +Omake will break in over a dozen places on gcc 4.7.x if warnings are +treated as errors. All valid but unreferenced functions and constants +are warned about in gcc 4.7, and the alternative to removing the +warn-error flag is to remove all these unreferenced functions and +constants via patches. + +--- lib/build/OCaml.om.orig 2008-03-05 01:07:25.000000000 +0000 ++++ lib/build/OCaml.om +@@ -176,7 +176,7 @@ public.PREFIXED_OCAMLPACKS =\ + # + declare OCAMLDEPFLAGS + public.OCAMLPPFLAGS = +-public.OCAMLFLAGS = -warn-error A ++public.OCAMLFLAGS = + public.OCAMLCFLAGS = -g + public.OCAMLOPTFLAGS = + public.OCAMLCPPFLAGS = Added: head/devel/omake/files/patch-src_build_omake_rule.ml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/omake/files/patch-src_build_omake_rule.ml Wed Mar 26 17:53:01 2014 (r349274) @@ -0,0 +1,25 @@ +$NetBSD: patch-ac,v 1.1 2010/12/17 09:40:14 wiz Exp $ + +From upstream SVN. + +--- src/build/omake_rule.ml.orig 2010-10-07 19:59:08.000000000 +0000 ++++ src/build/omake_rule.ml +@@ -768,7 +768,7 @@ let lazy_command venv pos command = + let fv = free_vars_exp_list el in + CommandSection (eval_string_exp venv pos s, fv, el) + | ShellExp (loc, s) -> +- CommandValue (loc, ValStringExp (venv_get_env venv, s)) ++ CommandValue (loc, venv_get_env venv, s) + | _ -> + let fv = free_vars_exp command in + CommandSection (ValData "eval", fv, [command]) +@@ -1121,7 +1121,8 @@ and eval_rule venv loc target sources sl + let commands = ([], CommandEval e) :: commands in + let fv = free_vars_union fv fv' in + commands, fv +- | CommandValue (loc, v) -> ++ | CommandValue (loc, env, s) -> ++ let v = ValStringExp (env, s) in + let commands = + try + let flags, pipe = pipe_of_value venv find_alias options pos loc v in Added: head/devel/omake/files/patch-src_builtin_omake__builtin__target.ml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/omake/files/patch-src_builtin_omake__builtin__target.ml Wed Mar 26 17:53:01 2014 (r349274) @@ -0,0 +1,17 @@ +$NetBSD: patch-ad,v 1.1 2010/12/17 09:40:14 wiz Exp $ + +From upstream SVN. + +--- src/builtin/omake_builtin_target.ml.orig 2008-01-15 19:57:00.000000000 +0000 ++++ src/builtin/omake_builtin_target.ml +@@ -221,8 +221,8 @@ let split_command venv (values1, lines1) + match line with + CommandSection (_, _, e) -> + ValBody (e, ExportNone) +- | CommandValue (_, v) -> +- v ++ | CommandValue (_, exp, v) -> ++ ValStringExp(exp,v) + in + v :: lines) lines1 lines2 + in Added: head/devel/omake/files/patch-src_clib_omake__shell__sys.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/omake/files/patch-src_clib_omake__shell__sys.c Wed Mar 26 17:53:01 2014 (r349274) @@ -0,0 +1,177 @@ +$NetBSD: patch-ae,v 1.1 2010/12/17 09:40:14 wiz Exp $ + +From upstream SVN. + +--- src/clib/omake_shell_sys.c.orig 2007-12-01 21:32:13.000000000 +0000 ++++ src/clib/omake_shell_sys.c +@@ -551,7 +551,7 @@ value omake_shell_sys_suspend(value v_pg + fflush(stderr); + #endif + if(process_group_map(suspend_process, Int_val(v_pgrp)) < 0) +- failwith("omake_shell_sys_suspend"); ++ caml_failwith("omake_shell_sys_suspend"); + CAMLreturn(Val_unit); + } + +@@ -563,7 +563,7 @@ value omake_shell_sys_resume(value v_pgr + fflush(stderr); + #endif + if(process_group_map(resume_process, Int_val(v_pgrp)) < 0) +- failwith("omake_shell_sys_resume"); ++ caml_failwith("omake_shell_sys_resume"); + CAMLreturn(Val_unit); + } + +@@ -575,7 +575,7 @@ value omake_shell_sys_kill(value v_pgrp) + fflush(stderr); + #endif + if(process_group_map(kill_process, Int_val(v_pgrp)) < 0) +- failwith("omake_shell_sys_kill"); ++ caml_failwith("omake_shell_sys_kill"); + CAMLreturn(Val_unit); + } + +@@ -600,14 +600,14 @@ value omake_shell_sys_create_thread_pid( + /* Allocate the process data */ + processp = (Process *) malloc(sizeof(Process)); + if(processp == 0) +- failwith("omake_shell_sys_create_thread_pid: out of memory"); ++ caml_failwith("omake_shell_sys_create_thread_pid: out of memory"); + memset(processp, 0, sizeof(Process)); + + /* Create an event for waiting on the thread */ + event = CreateEvent(NULL, FALSE, FALSE, NULL); + if(event == NULL) { + free(processp); +- failwith("omake_shell_sys_create_thread_pid: can't create event"); ++ caml_failwith("omake_shell_sys_create_thread_pid: can't create event"); + } + + pgrp = Int_val(v_pgrp); +@@ -645,7 +645,7 @@ value omake_shell_sys_init_thread_pid(va + break; + } + if(processp == 0) +- raise_not_found(); ++ caml_raise_not_found(); + + /* Process has terminated */ + processp->thread = GetCurrentThreadId(); +@@ -679,7 +679,7 @@ value omake_shell_sys_release_thread_pid + break; + } + if(processp == 0) +- raise_not_found(); ++ caml_raise_not_found(); + + /* Process has terminated */ + processp->changed = 1; +@@ -771,7 +771,7 @@ value omake_shell_sys_wait(value v_pgrp, + goto done; + else { + if(ncount == MAXIMUM_WAIT_OBJECTS) +- invalid_argument("omake_shell_sys_wait: too many processes"); ++ caml_invalid_argument("omake_shell_sys_wait: too many processes"); + processes[ncount] = processp->pid; + handles[ncount] = processp->handle; + ncount++; +@@ -787,11 +787,11 @@ value omake_shell_sys_wait(value v_pgrp, + /* Wait for an event */ + while(1) { + /* Perform the wait */ +- enter_blocking_section(); ++ caml_enter_blocking_section(); + index = WaitForMultipleObjects(ncount, handles, FALSE, timeout); + if(index == WAIT_FAILED) + code = GetLastError(); +- leave_blocking_section(); ++ caml_leave_blocking_section(); + + /* See if something has changed */ + if(index == WAIT_OBJECT_0) { +@@ -810,7 +810,7 @@ value omake_shell_sys_wait(value v_pgrp, + else if(index >= WAIT_ABANDONED_0 + 1 && index < WAIT_ABANDONED_0 + ncount) + index -= WAIT_ABANDONED_0; + else +- raise_not_found(); ++ caml_raise_not_found(); + + /* Adjust process */ + pid = processes[index]; +@@ -863,7 +863,7 @@ value omake_shell_sys_wait(value v_pgrp, + break; + case STATUS_RUNNING: + default: +- invalid_argument("wait_process: process is running"); ++ caml_invalid_argument("wait_process: process is running"); + break; + } + +@@ -908,7 +908,7 @@ value omake_shell_sys_create_process(val + strp = String_val(Field(v_envp, i)); + length = strlen(strp); + if(index + length + 2 > SIZEOF_ENVIRONMENT) +- failwith("omake_shell_sys_create_process: environment is too big"); ++ caml_failwith("omake_shell_sys_create_process: environment is too big"); + strcpy(env + index, strp); + index += length + 1; + } +@@ -919,7 +919,7 @@ value omake_shell_sys_create_process(val + v_argvp = Field(v_info, CREATE_PROCESS_ARGV); + count = Wosize_val(v_argvp); + if(count == 0) +- invalid_argument("omake_shell_sys_create_process: command line is empty"); ++ caml_invalid_argument("omake_shell_sys_create_process: command line is empty"); + index = 0; + for(i = 0; i != count; i++) { + /* Win32 doesn't deal well when the command name differs from the executable */ +@@ -930,7 +930,7 @@ value omake_shell_sys_create_process(val + length = strlen(argp); + white = string_escape_length(argp); + if(index + length + white + 4 >= SIZEOF_COMMAND) +- failwith("omake_shell_sys_create_process: command line is too long"); ++ caml_failwith("omake_shell_sys_create_process: command line is too long"); + if(index) + argv[index++] = ' '; + if(white) +@@ -1019,13 +1019,13 @@ value omake_shell_sys_create_process(val + if ((bufLen < 1) || (bufLen > 1024)) { + if (lpMsgBuf != NULL) + LocalFree( lpMsgBuf ); +- failwith("omake_shell_sys_create_process: process creation failed"); ++ caml_failwith("omake_shell_sys_create_process: process creation failed"); + } else { + char err[2048]; + sprintf(err, "omake_shell_sys_create_process: process creation failed: %s", (char *)lpMsgBuf); + if (lpMsgBuf != NULL) + LocalFree( lpMsgBuf ); +- failwith(err); ++ caml_failwith(err); + } + } + CloseHandle(process.hThread); +@@ -1034,7 +1034,7 @@ value omake_shell_sys_create_process(val + processp = (Process *) malloc(sizeof(Process)); + if(processp == 0) { + CloseHandle(process.hProcess); +- failwith("omake_shell_sys_create_process: out of memory"); ++ caml_failwith("omake_shell_sys_create_process: out of memory"); + } + memset(processp, 0, sizeof(Process)); + processp->pid = pid; +@@ -1129,13 +1129,13 @@ value omake_shell_sys_init(value v_unit) + /* Allocate a struct for the current process */ + processp = (Process *) malloc(sizeof(Process)); + if(processp == 0) +- failwith("Omake_shell_csys.create_state: out of memory"); ++ caml_failwith("Omake_shell_csys.create_state: out of memory"); + memset(processp, 0, sizeof(Process)); + + /* Allocate the state */ + state = (ShellState *) malloc(sizeof(ShellState)); + if(state == 0) +- failwith("Omake_shell_csys.create_state: out of memory"); ++ caml_failwith("Omake_shell_csys.create_state: out of memory"); + memset(state, 0, sizeof(ShellState)); + state->pid_counter = INIT_PID; + state->changed = CreateEvent(NULL, FALSE, FALSE, NULL); Added: head/devel/omake/files/patch-src_clib_readline.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/omake/files/patch-src_clib_readline.c Wed Mar 26 17:53:01 2014 (r349274) @@ -0,0 +1,127 @@ +$NetBSD: patch-af,v 1.1 2010/12/17 09:40:14 wiz Exp $ + +From upstream SVN. + +--- src/clib/readline.c.orig 2007-05-15 19:03:03.000000000 +0000 ++++ src/clib/readline.c +@@ -134,7 +134,7 @@ static char **readline_completion(char * + CAMLreturnT(char **, 0); + + /* The callback returns an array of strings */ +- request = copy_string(text); ++ request = caml_copy_string(text); + response = caml_callback(*callbackp, request); + + /* Copy the array of strings */ +@@ -726,9 +726,9 @@ static ProcessCode processor(ReadLine *r + + /* Input loop */ + while(1) { +- enter_blocking_section(); ++ caml_enter_blocking_section(); + status = ReadConsoleInput(readp->console_in, input, INPUT_COUNT, &count); +- leave_blocking_section(); ++ caml_leave_blocking_section(); + if(status == 0) { + print_error("ReadConsoleInput"); + return CODE_EOF; +@@ -766,11 +766,11 @@ static void readline_cooked(ReadLine *re + { + char *s; + +- enter_blocking_section(); ++ caml_enter_blocking_section(); + s = fgets(readp->current.buffer, LINE_MAX, stdin); +- leave_blocking_section(); ++ caml_leave_blocking_section(); + if(s == 0) +- raise_end_of_file(); ++ caml_raise_end_of_file(); + readp->current.length = strlen(readp->current.buffer); + } + +@@ -1053,7 +1053,7 @@ value omake_readline(value v_prompt) + + /* Copy it to a string */ + linep = &readp->current; +- v_str = alloc_string(linep->length); ++ v_str = caml_alloc_string(linep->length); + memcpy(String_val(v_str), linep->buffer, linep->length); + + /* Reset the current buffer */ +@@ -1105,7 +1105,7 @@ value omake_readline_init(value v_unit) + c_stdin = GetStdHandle(STD_INPUT_HANDLE); + c_stdout = GetStdHandle(STD_OUTPUT_HANDLE); + if(c_stdin == INVALID_HANDLE_VALUE || c_stdout == INVALID_HANDLE_VALUE) +- failwith("omake_readline_init: no standard channels"); ++ caml_failwith("omake_readline_init: no standard channels"); + + /* Check if it is a console */ + is_console = 1; +@@ -1179,18 +1179,18 @@ static ReadLine *AllocReadLine(int is_co + /* Allocate */ + readp = (ReadLine *) malloc(sizeof(ReadLine)); + if(readp == NULL) +- failwith("AllocReadLine: out of memory"); ++ caml_failwith("AllocReadLine: out of memory"); + memset(readp, 0, sizeof(ReadLine)); + + /* Initialize */ + readp->buffer = malloc(LINE_MAX); + if (readp->buffer == NULL) +- failwith("AllocReadLine: out of memory"); ++ caml_failwith("AllocReadLine: out of memory"); + readp->buffer_size = LINE_MAX; + + readp->prompt = malloc(MAX_PROMPT_LENGTH); + if (readp->prompt == NULL) +- failwith("AllocReadLine: out of memory"); ++ caml_failwith("AllocReadLine: out of memory"); + readp->prompt_size = MAX_PROMPT_LENGTH; + + readp->console_in = console_in; +@@ -1262,7 +1262,7 @@ static void readline_raw(ReadLine *readp + if(length >= readp->buffer_size) { + char *new_buffer = malloc(length + 1); + if(new_buffer == NULL) +- failwith("readline_raw: out of memory"); ++ caml_failwith("readline_raw: out of memory"); + free(readp->buffer); + readp->buffer = new_buffer; + readp->buffer_size = length + 1; +@@ -1307,7 +1307,7 @@ static void do_readline(ReadLine *readp, + readp->prompt = malloc(new_size); + if (readp->prompt == NULL) { + readp->prompt = old_prompt; +- failwith("do_readline: out of memory"); ++ caml_failwith("do_readline: out of memory"); + } else { + memcpy(readp->prompt, old_prompt, i); + free(old_prompt); +@@ -1545,7 +1545,7 @@ value omake_readline(value v_prompt) + do_readline(readp, String_val(v_prompt)); + + /* Copy it to the buffer */ +- v_str = alloc_string(readp->length); ++ v_str = caml_alloc_string(readp->length); + memcpy(String_val(v_str), readp->buffer, readp->length); + + /* Reset the current buffer */ +@@ -1609,7 +1609,7 @@ value omake_rl_prompt_wrappers(value v_u + CAMLlocal2(s1, s2); + s1 = caml_copy_string(begin); + s2 = caml_copy_string(end); +- buf = alloc_tuple(2); ++ buf = caml_alloc_tuple(2); + Field(buf, 0) = s1; + Field(buf, 1) = s2; + } +@@ -1617,7 +1617,7 @@ value omake_rl_prompt_wrappers(value v_u + { + CAMLlocal1(emptystr); + emptystr = caml_copy_string(""); +- buf = alloc_tuple(2); ++ buf = caml_alloc_tuple(2); + Field(buf, 0) = emptystr; + Field(buf, 1) = emptystr; + } Added: head/devel/omake/files/patch-src_env_omake__env.ml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/omake/files/patch-src_env_omake__env.ml Wed Mar 26 17:53:01 2014 (r349274) @@ -0,0 +1,45 @@ +$NetBSD: patch-ag,v 1.1 2010/12/17 09:40:14 wiz Exp $ + +From upstream SVN. + +--- src/env/omake_env.ml.orig 2008-01-15 19:57:00.000000000 +0000 ++++ src/env/omake_env.ml +@@ -404,8 +404,8 @@ let rec pp_print_command buf command = + match command with + CommandSection (arg, fv, e) -> + fprintf buf "@[section %a@ %a@]" pp_print_value arg pp_print_exp_list e +- | CommandValue (_, v) -> +- pp_print_value buf v ++ | CommandValue (_, _, v) -> ++ pp_print_string_exp buf v + + and pp_print_commands buf commands = + List.iter (fun command -> fprintf buf "@ %a" pp_print_command command) commands +@@ -1928,6 +1928,14 @@ let venv_save_explicit_rules venv loc er + let venv_add_wild_match venv v = + venv_add_var venv wild_var v + ++let command_add_wild venv wild command = ++ match command with ++ CommandSection _ -> ++ command ++ | CommandValue(loc, env, s) -> ++ let env = venv_get_env (venv_add_wild_match (venv_with_env venv env) wild) in ++ CommandValue(loc, env, s) ++ + (* + * This is the standard way to add results of a pattern match. + *) +@@ -2699,8 +2707,10 @@ let venv_find_implicit_rules_inner venv + let scanner_args = List.map (subst_source venv target_dir subst) irule.irule_scanners in + let scanners = node_set_of_list scanner_args in + let core = wild_core subst in +- let venv = venv_add_wild_match venv (ValData core) in +- let commands = make_command_info venv source_args irule.irule_values irule.irule_body in ++ let core_val = ValData core in ++ let venv = venv_add_wild_match venv core_val in ++ let commands = List.map (command_add_wild venv core_val) irule.irule_body in ++ let commands = make_command_info venv source_args irule.irule_values commands in + let effects = + List.fold_left (fun effects pattern -> + let effect = wild_subst_in subst pattern in Added: head/devel/omake/files/patch-src_ir_omake__value__type.ml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/omake/files/patch-src_ir_omake__value__type.ml Wed Mar 26 17:53:01 2014 (r349274) @@ -0,0 +1,15 @@ +$NetBSD: patch-ah,v 1.1 2010/12/17 09:40:14 wiz Exp $ + +From upstream SVN. + +--- src/ir/omake_value_type.ml.orig 2010-10-07 19:59:08.000000000 +0000 ++++ src/ir/omake_value_type.ml +@@ -162,7 +162,7 @@ type path = + *) + type command = + CommandSection of value * free_vars * exp list (* Name of the section, its free variables, and the expression *) +- | CommandValue of loc * value ++ | CommandValue of loc * env * string_exp + + (* + * Kinds of rules. Added: head/devel/omake/files/patch-src_libmojave-external_cutil_fam__pseudo.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/omake/files/patch-src_libmojave-external_cutil_fam__pseudo.h Wed Mar 26 17:53:01 2014 (r349274) @@ -0,0 +1,15 @@ +$NetBSD: patch-src_libmojave-external_cutil_fam__pseudo.h,v 1.1 2012/11/16 00:46:04 joerg Exp $ + +--- src/libmojave-external/cutil/fam_pseudo.h.orig 2012-11-08 22:16:13.000000000 +0000 ++++ src/libmojave-external/cutil/fam_pseudo.h +@@ -43,7 +43,10 @@ + /* + * Maximum file name length. + */ ++#include ++#ifndef NAME_MAX + #define NAME_MAX 1024 ++#endif + + /* + * Possible events. Added: head/devel/omake/files/patch-src_libmojave-external_cutil_lm__channel.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/omake/files/patch-src_libmojave-external_cutil_lm__channel.c Wed Mar 26 17:53:01 2014 (r349274) @@ -0,0 +1,24 @@ +$NetBSD: patch-ai,v 1.1 2010/12/17 09:40:14 wiz Exp $ + +From upstream SVN. + +--- src/libmojave-external/cutil/lm_channel.c.orig 2006-07-15 17:23:37.000000000 +0000 ++++ src/libmojave-external/cutil/lm_channel.c +@@ -57,7 +57,7 @@ value omake_shell_peek_pipe(value v_fd) + &total, // Total number of bytes available + NULL); // Number of bytes in the next message + if(status == 0) +- failwith("Not a pipe"); ++ caml_failwith("Not a pipe"); + return total ? Val_int(1) : Val_int(0); + } + +@@ -83,7 +83,7 @@ value omake_shell_pipe_kind(value v_fd) + + value omake_shell_peek_pipe(value v_fd) + { +- failwith("omake_shell_peek_pipe: not available on Unix systems"); ++ caml_failwith("omake_shell_peek_pipe: not available on Unix systems"); + return Val_unit; + } + Added: head/devel/omake/files/patch-src_libmojave-external_cutil_lm__ctype.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/omake/files/patch-src_libmojave-external_cutil_lm__ctype.c Wed Mar 26 17:53:01 2014 (r349274) @@ -0,0 +1,15 @@ +$NetBSD: patch-aj,v 1.1 2010/12/17 09:40:14 wiz Exp $ + +From upstream SVN. + +--- src/libmojave-external/cutil/lm_ctype.c.orig 2006-12-01 21:13:14.000000000 +0000 ++++ src/libmojave-external/cutil/lm_ctype.c +@@ -59,7 +59,7 @@ static value get_chars(int (*f)(int)) + if(f(i)) + *p++ = (char) i; + } +- s = alloc_string(p - buf); ++ s = caml_alloc_string(p - buf); + memcpy(String_val(s), buf, p - buf); + return s; + } Added: head/devel/omake/files/patch-src_libmojave-external_cutil_lm__notify.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/omake/files/patch-src_libmojave-external_cutil_lm__notify.c Wed Mar 26 17:53:01 2014 (r349274) @@ -0,0 +1,90 @@ +$NetBSD: patch-ak,v 1.1 2010/12/17 09:40:14 wiz Exp $ + +From upstream SVN. + +--- src/libmojave-external/cutil/lm_notify.c.orig 2007-07-27 17:58:13.000000000 +0000 ++++ src/libmojave-external/cutil/lm_notify.c +@@ -74,13 +74,13 @@ typedef struct { + + #define CheckCode(fmt, expr) \ + do { \ +- enter_blocking_section(); \ ++ caml_enter_blocking_section(); \ + code = expr; \ +- leave_blocking_section(); \ ++ caml_leave_blocking_section(); \ + if(code < 0) { \ + char buffer[256]; \ + ErrFmt(buffer, fmt); \ +- failwith(buffer); \ ++ caml_failwith(buffer); \ + } \ + } while(0) + +@@ -145,11 +145,11 @@ value om_notify_open(value v_unit) + FAMInfo *info; + int code; + +- v = alloc_custom(&fam_connection_ops, sizeof(FAMInfo), 0, 1); ++ v = caml_alloc_custom(&fam_connection_ops, sizeof(FAMInfo), 0, 1); + info = FAMInfo_val(v); + fc = malloc(sizeof(FAMConnection)); + if(fc == 0) +- invalid_argument("om_notify_open: out of memory"); ++ caml_invalid_argument("om_notify_open: out of memory"); + info->fc = fc; + CheckCode("om_notify_open", FAMOpen(fc)); + #ifdef HAVE_FAMNOEXISTS +@@ -180,7 +180,7 @@ value om_notify_fd(value v_fc) + fc = FAMConnection_val(v_fc); + return Val_int(fc->id); + #else /* FAM_PSEUDO && !FAM_INOTIFY */ +- failwith("No file descriptors in pseudo-FAM"); ++ caml_failwith("No file descriptors in pseudo-FAM"); + return Val_unit; + #endif /* FAM_INOTIFY */ + #else /* FAM_PSEUDO */ +@@ -209,7 +209,7 @@ value om_notify_monitor_directory(value + #ifdef WIN32 + CheckCode("om_notify_monitor_directory", FAMMonitorDirectoryTree(fc, name, &request, 0)); + #else /* WIN32 */ +- failwith("om_notify_monitor_directory: recursive monitoring is not allowed"); ++ caml_failwith("om_notify_monitor_directory: recursive monitoring is not allowed"); + #endif /* !WIN32 */ + } + else +@@ -294,13 +294,13 @@ value om_notify_next_event(value v_fc) + CheckCode("om_notify_next_event", FAMNextEvent(fc, &event)); + code = event.code; + if(code < 1 || code > 10) +- failwith("om_notify_next_event: code out of bounds"); ++ caml_failwith("om_notify_next_event: code out of bounds"); + + /* Allocate the string name */ +- v_name = copy_string(event.filename); ++ v_name = caml_copy_string(event.filename); + + /* Allocate the tuple */ +- v_tuple = alloc_tuple(3); ++ v_tuple = caml_alloc_tuple(3); + Field(v_tuple, 0) = Val_int(event.fr.reqnum); + Field(v_tuple, 1) = v_name; + Field(v_tuple, 2) = Val_int(code - 1); +@@ -330,7 +330,7 @@ value om_notify_open(value v_unit) + */ + value om_notify_fd(value v_fc) + { +- invalid_argument("FAM not enabled"); ++ caml_invalid_argument("FAM not enabled"); + return Val_unit; + } + +@@ -389,7 +389,7 @@ value om_notify_pending(value v_fc) + */ + value om_notify_next_event(value v_fc) + { +- invalid_argument("FAM not enabled"); ++ caml_invalid_argument("FAM not enabled"); + return Val_unit; + } + Added: head/devel/omake/files/patch-src_libmojave-external_cutil_lm__printf.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/omake/files/patch-src_libmojave-external_cutil_lm__printf.c Wed Mar 26 17:53:01 2014 (r349274) @@ -0,0 +1,96 @@ +$NetBSD: patch-al,v 1.1 2010/12/17 09:40:14 wiz Exp $ + +From upstream SVN. + +--- src/libmojave-external/cutil/lm_printf.c.orig 2009-02-06 16:41:21.000000000 +0000 ++++ src/libmojave-external/cutil/lm_printf.c +@@ -61,12 +61,12 @@ value ml_print_char(value v_fmt, value v + char c = (char) Int_val(v_char); + #ifdef HAVE_SNPRINTF + if(snprintf(buffer, sizeof(buffer), fmt, c) < 0) +- failwith("ml_print_char"); ++ caml_failwith("ml_print_char"); + #else + if(sprintf(buffer, fmt, c) < 0) +- failwith("ml_print_char"); ++ caml_failwith("ml_print_char"); + #endif +- return copy_string(buffer); ++ return caml_copy_string(buffer); + } + + /* +@@ -79,12 +79,12 @@ value ml_print_int(value v_fmt, value v_ + int i = Int_val(v_int); + #ifdef HAVE_SNPRINTF + if(snprintf(buffer, sizeof(buffer), fmt, i) < 0) +- failwith("ml_print_int"); ++ caml_failwith("ml_print_int"); + #else + if(sprintf(buffer, fmt, i) < 0) +- failwith("ml_print_int"); ++ caml_failwith("ml_print_int"); + #endif +- return copy_string(buffer); ++ return caml_copy_string(buffer); + } + + +@@ -98,12 +98,12 @@ value ml_print_float(value v_fmt, value + double x = Double_val(v_float); + #ifdef HAVE_SNPRINTF + if(snprintf(buffer, sizeof(buffer), fmt, x) < 0) +- failwith("ml_print_float"); ++ caml_failwith("ml_print_float"); + #else + if(sprintf(buffer, fmt, x) < 0) +- failwith("ml_print_float"); ++ caml_failwith("ml_print_float"); + #endif +- return copy_string(buffer); ++ return caml_copy_string(buffer); + } + + /* +@@ -132,7 +132,7 @@ value ml_print_string(value v_fmt, value + size = len * 2; + bufp = malloc(size); + if(bufp == 0) +- failwith("ml_print_string"); ++ caml_failwith("ml_print_string"); + } + + #ifdef HAVE_SNPRINTF +@@ -143,9 +143,9 @@ value ml_print_string(value v_fmt, value + if(code < 0) { + if(bufp != buffer) + free(bufp); +- failwith("ml_print_string"); ++ caml_failwith("ml_print_string"); + } +- v_result = copy_string(bufp); ++ v_result = caml_copy_string(bufp); + if(bufp != buffer) + free(bufp); + return v_result; +@@ -180,7 +180,7 @@ value ml_print_string2(value v_width, va + size = len * 2; + bufp = malloc(size); + if(bufp == 0) +- failwith("ml_print_string"); ++ caml_failwith("ml_print_string"); + } + + #ifdef HAVE_SNPRINTF +@@ -191,9 +191,9 @@ value ml_print_string2(value v_width, va + if(code < 0) { + if(bufp != buffer) + free(bufp); +- failwith("ml_print_string"); ++ caml_failwith("ml_print_string"); + } +- v_result = copy_string(bufp); ++ v_result = caml_copy_string(bufp); + if(bufp != buffer) + free(bufp); + return v_result; Added: head/devel/omake/files/patch-src_libmojave-external_cutil_lm__terminfo.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/omake/files/patch-src_libmojave-external_cutil_lm__terminfo.c Wed Mar 26 17:53:01 2014 (r349274) @@ -0,0 +1,18 @@ +$NetBSD: patch-am,v 1.1 2010/12/17 09:40:14 wiz Exp $ + +From upstream SVN. + +--- src/libmojave-external/cutil/lm_terminfo.c.orig 2007-05-15 19:03:32.000000000 +0000 ++++ src/libmojave-external/cutil/lm_terminfo.c +@@ -75,9 +75,9 @@ value caml_tgetstr(value id) { + + /* Note that tigetstr will return either 0 or -1 on error. */ + if(termdata == NULL || termdata == (char *)(-1)) { +- result = copy_string(""); ++ result = caml_copy_string(""); + } else { +- result = copy_string(termdata); ++ result = caml_copy_string(termdata); + /* apparently we're not supposed to free termdata here */ + /* TEMP: I cannot find specs on this! */ + //free(termdata); Added: head/devel/omake/files/patch-src_libmojave-external_cutil_lm__termsize.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/omake/files/patch-src_libmojave-external_cutil_lm__termsize.c Wed Mar 26 17:53:01 2014 (r349274) @@ -0,0 +1,33 @@ +$NetBSD: patch-an,v 1.1 2010/12/17 09:40:14 wiz Exp $ + +From upstream SVN. + +--- src/libmojave-external/cutil/lm_termsize.c.orig 2008-03-19 00:44:12.000000000 +0000 ++++ src/libmojave-external/cutil/lm_termsize.c +@@ -45,7 +45,7 @@ value caml_term_size(value arg) + CAMLlocal1(buf); + + /* Return a pair of numbers */ +- buf = alloc_small(2, 0); ++ buf = caml_alloc_small(2, 0); + + /* Get the terminal size, return None on failure */ + #ifdef WIN32 +@@ -53,7 +53,7 @@ value caml_term_size(value arg) + HANDLE fd = *(HANDLE *)Data_custom_val(arg); + CONSOLE_SCREEN_BUFFER_INFO ConsoleInfo; + if (! GetConsoleScreenBufferInfo(fd, &ConsoleInfo)) +- failwith("lm_termsize.c: caml_term_size: GetConsoleScreenBufferInfo failed"); ++ caml_failwith("lm_termsize.c: caml_term_size: GetConsoleScreenBufferInfo failed"); + + Field(buf, 0) = Val_int(ConsoleInfo.dwSize.Y); + Field(buf, 1) = Val_int(ConsoleInfo.dwSize.X); +@@ -65,7 +65,7 @@ value caml_term_size(value arg) + struct winsize ws; + + if(ioctl(fd, TIOCGWINSZ, &ws) < 0) +- failwith("lm_termsize.c: caml_term_size: not a terminal"); ++ caml_failwith("lm_termsize.c: caml_term_size: not a terminal"); + + /* Return the pair of numbers */ + Field(buf, 0) = Val_int(ws.ws_row); Added: head/devel/omake/files/patch-src_libmojave-external_cutil_lm__uname__ext.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/omake/files/patch-src_libmojave-external_cutil_lm__uname__ext.c Wed Mar 26 17:53:01 2014 (r349274) @@ -0,0 +1,35 @@ +$NetBSD: patch-ao,v 1.1 2010/12/17 09:40:14 wiz Exp $ + +From upstream SVN. + +--- src/libmojave-external/cutil/lm_uname_ext.c.orig 2006-12-08 19:21:40.000000000 +0000 ++++ src/libmojave-external/cutil/lm_uname_ext.c +@@ -147,21 +147,21 @@ value lm_uname(value x) + + /* Get sysinfo */ + if(uname(&name) < 0) +- failwith("uname"); ++ caml_failwith("uname"); + + /* Copy data */ +- result = alloc_tuple(5); ++ result = caml_alloc_tuple(5); + Field(result, 0) = Val_unit; + Field(result, 1) = Val_unit; + Field(result, 2) = Val_unit; + Field(result, 3) = Val_unit; + Field(result, 4) = Val_unit; + +- Field(result, 0) = copy_string(name.sysname); +- Field(result, 1) = copy_string(name.nodename); +- Field(result, 2) = copy_string(name.release); +- Field(result, 3) = copy_string(name.version); +- Field(result, 4) = copy_string(name.machine); ++ Field(result, 0) = caml_copy_string(name.sysname); ++ Field(result, 1) = caml_copy_string(name.nodename); ++ Field(result, 2) = caml_copy_string(name.release); ++ Field(result, 3) = caml_copy_string(name.version); ++ Field(result, 4) = caml_copy_string(name.machine); + + /* Return it */ + CAMLreturn(result); Added: head/devel/omake/files/patch-src_libmojave-external_cutil_lm__unix__cutil.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/omake/files/patch-src_libmojave-external_cutil_lm__unix__cutil.c Wed Mar 26 17:53:01 2014 (r349274) @@ -0,0 +1,117 @@ +$NetBSD: patch-ap,v 1.1 2010/12/17 09:40:14 wiz Exp $ + +From upstream SVN. + +--- src/libmojave-external/cutil/lm_unix_cutil.c.orig 2007-07-18 17:42:32.000000000 +0000 ++++ src/libmojave-external/cutil/lm_unix_cutil.c +@@ -87,9 +87,9 @@ value home_win32(value v_unit) + TCHAR path[MAX_PATH]; + + if(SUCCEEDED(CompatSHGetFolderPath(NULL, CSIDL_LOCAL_APPDATA | CSIDL_FLAG_CREATE, NULL, 0, path))) +- CAMLreturn(copy_string(path)); ++ CAMLreturn(caml_copy_string(path)); + +- failwith("home_win32"); ++ caml_failwith("home_win32"); + return Val_unit; + } + +@@ -138,7 +138,7 @@ value lockf_win32(value v_fd, value v_ki + flags = LOCKFILE_FAIL_IMMEDIATELY; + break; + default: +- invalid_argument("lockf_win32"); ++ caml_invalid_argument("lockf_win32"); + break; + } + +@@ -147,11 +147,11 @@ value lockf_win32(value v_fd, value v_ki + overlapped.Offset = pos; + + /* Perform the lock */ +- enter_blocking_section(); ++ caml_enter_blocking_section(); + code = LockFileEx(fd, flags, 0, len, 0, &overlapped); + if(code == 0) + error = GetLastError(); +- leave_blocking_section(); ++ caml_leave_blocking_section(); + + /* Fail if the lock was not successful */ + if(code == 0) { +@@ -165,14 +165,14 @@ value lockf_win32(value v_fd, value v_ki + * XXX: HACK: this exception is being caught + * Do not change the string w/o changing the wrapper code. + */ +- failwith("lockf_win32: already locked"); ++ caml_failwith("lockf_win32: already locked"); + break; + case ERROR_POSSIBLE_DEADLOCK: + /* + * XXX: HACK: this exception is being caught + * Do not change the string w/o changing the wrapper code. + */ +- failwith("lockf_win32: possible deadlock"); ++ caml_failwith("lockf_win32: possible deadlock"); + break; + default: + FormatMessage( +@@ -187,7 +187,7 @@ value lockf_win32(value v_fd, value v_ki + sprintf(szBuf, "lockf_win32 failed with error %d: %s", error, lpMsgBuf); + LocalFree(lpMsgBuf); + +- failwith(szBuf); ++ caml_failwith(szBuf); + break; + } + } +@@ -289,7 +289,7 @@ value caml_registry_find(value v_hkey, v + #endif + + /* Got the value */ +- return copy_string(buffer); ++ return caml_copy_string(buffer); + } + + #else /* WIN32 */ +@@ -381,9 +381,9 @@ value lm_flock(value v_fd, value v_op) + op = Int_val(v_op); + #if defined(FLOCK_ENABLED) + cmd = flock_of_flock[op]; +- enter_blocking_section(); ++ caml_enter_blocking_section(); + code = flock(fd, cmd); +- leave_blocking_section(); ++ caml_leave_blocking_section(); + #elif defined(FCNTL_ENABLED) + { + struct flock info; +@@ -392,9 +392,9 @@ value lm_flock(value v_fd, value v_op) + info.l_whence = SEEK_SET; + info.l_start = 0; + info.l_len = FLOCK_LEN; +- enter_blocking_section(); ++ caml_enter_blocking_section(); + code = fcntl(fd, cmd, &info); +- leave_blocking_section(); ++ caml_leave_blocking_section(); + } + #elif defined(LOCKF_ENABLED) + cmd = lockf_of_flock[op]; +@@ -457,12 +457,12 @@ value lm_getpwents(value v_unit) + Store_field(entry, 2, Val_int(entryp->pw_uid)); + Store_field(entry, 3, Val_int(entryp->pw_gid)); + #ifdef __BEOS__ +- Store_field(entry, 4, copy_string("")); ++ Store_field(entry, 4, caml_copy_string("")); + #else +- Store_field(entry, 4, copy_string(entryp->pw_gecos)); ++ Store_field(entry, 4, caml_copy_string(entryp->pw_gecos)); + #endif +- Store_field(entry, 5, copy_string(entryp->pw_dir)); +- Store_field(entry, 6, copy_string(entryp->pw_shell)); ++ Store_field(entry, 5, caml_copy_string(entryp->pw_dir)); ++ Store_field(entry, 6, caml_copy_string(entryp->pw_shell)); + cons = caml_alloc_tuple(2); + Store_field(cons, 0, entry); + Store_field(cons, 1, users); Added: head/devel/omake/files/patch-src_libmojave-external_stdlib_lm__debug.ml ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/omake/files/patch-src_libmojave-external_stdlib_lm__debug.ml Wed Mar 26 17:53:01 2014 (r349274) @@ -0,0 +1,58 @@ +$NetBSD: patch-aq,v 1.1 2010/12/17 09:40:14 wiz Exp $ + +From upstream SVN. + +--- src/libmojave-external/stdlib/lm_debug.ml.orig 2006-08-03 22:51:52.000000000 +0000 ++++ src/libmojave-external/stdlib/lm_debug.ml +@@ -173,11 +173,10 @@ let create_debug + *) *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***