Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified)) by mollari.NetBSD.org (Postfix) with ESMTPS id BFC401A9217 for ; Sun, 10 Jan 2021 11:13:35 +0000 (UTC) Received: by mail.netbsd.org (Postfix, from userid 605) id 03DB484D23; Sun, 10 Jan 2021 11:13:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 3ABA184D21 for ; Sun, 10 Jan 2021 11:13:34 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id tykNLPXSBp3J for ; Sun, 10 Jan 2021 11:13:33 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 8A60984CE7 for ; Sun, 10 Jan 2021 11:13:33 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 82210FA9D; Sun, 10 Jan 2021 11:13:33 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1610277213143880" MIME-Version: 1.0 Date: Sun, 10 Jan 2021 11:13:33 +0000 From: "Jonathan Perkin" Subject: CVS commit: pkgsrc/lang/ocaml/files To: pkgsrc-changes@NetBSD.org Reply-To: jperkin@netbsd.org X-Mailer: log_accum Message-Id: <20210110111333.82210FA9D@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1610277213143880 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: jperkin Date: Sun Jan 10 11:13:33 UTC 2021 Modified Files: pkgsrc/lang/ocaml/files: wrapper.sh Log Message: ocaml: Try to fix wrapper script. Passing LDFLAGS verbatim no longer works, prefix each of them with -ccopt, this seems to work across more ocaml binaries than -ldopt. Tested across a number of packages that previously failed. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 pkgsrc/lang/ocaml/files/wrapper.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1610277213143880 Content-Disposition: inline Content-Length: 1111 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/lang/ocaml/files/wrapper.sh diff -u pkgsrc/lang/ocaml/files/wrapper.sh:1.3 pkgsrc/lang/ocaml/files/wrapper.sh:1.4 --- pkgsrc/lang/ocaml/files/wrapper.sh:1.3 Mon Feb 29 13:51:28 2016 +++ pkgsrc/lang/ocaml/files/wrapper.sh Sun Jan 10 11:13:33 2021 @@ -1,25 +1,22 @@ #!@SH@ +# +# $NetBSD: wrapper.sh,v 1.4 2021/01/10 11:13:33 jperkin Exp $ -# $NetBSD: wrapper.sh,v 1.3 2016/02/29 13:51:28 jperkin Exp $ - -BINDIR='@OCAML_PREFIX@' CFLAGS='@CFLAGS@' LDFLAGS='@LDFLAGS@' WRAPPEE='@WRAPPEE@' -if echo "$@" | grep ' -c ' >/dev/null || [ "${WRAPPEE}" = "ocamlmklib" ]; then - flags="${CFLAGS}" -else - flags="${CFLAGS} ${LDFLAGS}" -fi - -for f in ${flags} -do - MLFLAGS="${MLFLAGS} -ccopt ${f}" +for flag in ${CFLAGS}; do + cflags="${cflags} -ccopt ${flag}" +done +for flag in ${LDFLAGS}; do + ldflags="${ldflags} -ccopt ${flag}" done -if [ "${WRAPPEE}" = "ocamlmklib" ]; then - MLFLAGS="${MLFLAGS} ${LDFLAGS}" +if echo "$@" | grep ' -c ' >/dev/null; then + MLFLAGS="${cflags}" +else + MLFLAGS="${cflags} ${ldflags}" fi exec "@OCAML_PREFIX@/bin/${WRAPPEE}" ${MLFLAGS} "$@" --_----------=_1610277213143880--