From c66f0555cd14de4d5bee0659598e8148723fd01e Mon Sep 17 00:00:00 2001
From: Clifford Wolf <clifford@clifford.at>
Date: Thu, 20 May 2004 12:33:10 +0000
Subject: [PATCH] Clifford Wolf: 	Fixed ocaml (yet another "head -1")

[2004052014331003849] (https://www.rocklinux.net/submaster)



git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@3053 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc
---
 package/mathieu/ocaml/head1.patch | 59 +++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)
 create mode 100644 package/mathieu/ocaml/head1.patch

diff --git a/package/mathieu/ocaml/head1.patch b/package/mathieu/ocaml/head1.patch
new file mode 100644
index 000000000..c33637877
--- /dev/null
+++ b/package/mathieu/ocaml/head1.patch
@@ -0,0 +1,59 @@
+--- ./camlp4/tools/conv.sh	2002-07-23 16:11:49.000000000 +0200
++++ /tmp/tmp.vfnXD18380	2004-05-20 14:24:03.000000000 +0200
+@@ -11,7 +11,7 @@
+         shift
+ done
+ 
+-set - `head -1 $FILE`
++set - `head -n 1 $FILE`
+ if test "$2" = "camlp4r" -o "$2" = "camlp4"; then
+         COMM="$OTOP/boot/ocamlrun $DIR/../boot/$2 -nolib -I $DIR/../boot $INCL $DIR/../etc/pr_o.cmo"
+         shift; shift
+--- ./camlp4/tools/camlp4_comm.sh	2003-07-10 14:28:35.000000000 +0200
++++ /tmp/tmp.vfnXD18380	2004-05-20 14:24:03.000000000 +0200
+@@ -13,9 +13,9 @@
+         shift
+ done
+ 
+-head -1 $FILE >/dev/null || exit 1
++head -n 1 $FILE >/dev/null || exit 1
+ 
+-set - `head -1 $FILE`
++set - `head -n 1 $FILE`
+ if test "$2" = "camlp4r" -o "$2" = "camlp4"; then
+         COMM="ocamlrun$EXE ../boot/$2$EXE -nolib -I ../boot"
+         if test "`basename $OTOP`" != "ocaml_stuff"; then
+--- ./camlp4/tools/apply.sh	2002-07-23 16:11:49.000000000 +0200
++++ /tmp/tmp.vfnXD18380	2004-05-20 14:24:03.000000000 +0200
+@@ -11,9 +11,9 @@
+         shift
+ done
+ 
+-head -1 $FILE >/dev/null || exit 1
++head -n 1 $FILE >/dev/null || exit 1
+ 
+-set - `head -1 $FILE`
++set - `head -n 1 $FILE`
+ if test "$2" = "camlp4r" -o "$2" = "camlp4"; then
+         COMM="../boot/$2 -nolib -I ../boot -I ../etc"
+         shift; shift
+--- ./config/gnu/config.guess	2001-06-25 16:37:26.000000000 +0200
++++ /tmp/tmp.vfnXD18380	2004-05-20 14:24:03.000000000 +0200
+@@ -314,7 +314,7 @@
+ 	echo m68k-sun-sunos${UNAME_RELEASE}
+ 	exit 0 ;;
+     sun*:*:4.2BSD:*)
+-	UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
++	UNAME_RELEASE=`(head -n 1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ 	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ 	case "`/bin/arch`" in
+ 	    sun3)
+@@ -496,7 +496,7 @@
+ 	fi
+ 	exit 0 ;;
+     *:AIX:*:[45])
+-	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
++	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -n 1 | awk '{ print $1 }'`
+ 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ 		IBM_ARCH=rs6000
+ 	else