pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/ocaml/files ocaml: Try to fix wrapper script.
details: https://anonhg.NetBSD.org/pkgsrc/rev/6d454ad43725
branches: trunk
changeset: 444538:6d454ad43725
user: jperkin <jperkin%pkgsrc.org@localhost>
date: Sun Jan 10 11:13:33 2021 +0000
description:
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.
diffstat:
lang/ocaml/files/wrapper.sh | 25 +++++++++++--------------
1 files changed, 11 insertions(+), 14 deletions(-)
diffs (40 lines):
diff -r 531a7f12c4dd -r 6d454ad43725 lang/ocaml/files/wrapper.sh
--- a/lang/ocaml/files/wrapper.sh Sun Jan 10 11:11:57 2021 +0000
+++ b/lang/ocaml/files/wrapper.sh Sun Jan 10 11:13:33 2021 +0000
@@ -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} "$@"
Home |
Main Index |
Thread Index |
Old Index