pkgsrc/lang/moscow_ml/patches/patch-ba
tnn 63b4595c1e Update to Moscow ML version 2.01 (January 2004)
No ChangeLog available, but a recursive diff reveals
a mostly bugfix release.

From Aleksej Saushev in private mail.
2008-04-28 10:16:57 +00:00

32 lines
1.1 KiB
Text

$NetBSD: patch-ba,v 1.1 2008/04/28 10:16:57 tnn Exp $
Fix insecure temporary file handling.
DESTDIR support.
--- launch/Makefile.orig 2000-01-21 13:07:13.000000000 +0300
+++ launch/Makefile 2008-04-27 22:42:28.000000000 +0400
@@ -10,16 +10,16 @@
install:
(echo "#!$(BINDIR)/camlrunm"; \
echo "exit 2"; \
- cat testprog) > /tmp/testscr
- chmod a+x /tmp/testscr
- sh -c 'if sh -c /tmp/testscr 2>/dev/null; \
- then echo "#!$(BINDIR)/camlrunm" > $(LIBDIR)/header; \
- else ${INSTALL_PROGRAM} camlexec$(EXE) $(LIBDIR)/header; \
+ cat testprog) > ./testscr
+ chmod a+x ./testscr
+ sh -c 'if sh -c ./testscr 2>/dev/null; \
+ then echo "#!$(BINDIR)/camlrunm" > $(DESTDIR)$(LIBDIR)/header; \
+ else ${INSTALL_PROGRAM} camlexec$(EXE) $(DESTDIR)$(LIBDIR)/header; \
fi'
- rm -f /tmp/testscr
+ rm -f ./testscr
for script in mosml mosmlc mosmllex; do \
- ${INSTALL_SCRIPT} $$script $(BINDIR)/$$script; \
- chmod a+x $(BINDIR)/$$script; \
+ ${INSTALL_SCRIPT} $$script $(DESTDIR)$(BINDIR)/$$script; \
+ chmod a+x $(DESTDIR)$(BINDIR)/$$script; \
done
mosml: mosml.tpl