pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/ocaml/files



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.

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} "$@"



Home | Main Index | Thread Index | Old Index