pkgsrc/graphics/radiance/patches/patch-ac
dholland 68a16da69a Rewrite csh scripts in sh, by request of agc. Closes PR 37581.
While here, clean up a lot of pkglint; it appears that the manual
substitutions in the makefile got rolled into several of the patches
at some point. Various problems remain (e.g. the build system runs
/usr/bin/make explicitly in a number of places; plus the manual
substitutions should be tidied away) but this should cover the most
serious ones.

PKGREVISION++.
2009-04-29 05:15:14 +00:00

77 lines
1.8 KiB
Text

$NetBSD: patch-ac,v 1.4 2009/04/29 05:15:14 dholland Exp $
Make this script run non-interactively.
csh programming considered harmful.
note that this is now a sh script, but I can't patch the #! line
because there's an rcsid in the way.
--- installib.orig 2003-10-31 12:11:57.000000000 -0500
+++ installib 2009-04-29 00:36:03.000000000 -0400
@@ -3,41 +3,36 @@
#
# Install library files
#
-again2:
-echo -n "Where do you want the library files [/usr/local/lib/ray]? "
-set ldir=$<
-(echo $ldir) >/dev/null
-if ( $status ) goto again2
-set ldir=$ldir
-if ( "$ldir" == "" ) then
- set ldir=/usr/local/lib/ray
-else if ( "$ldir" !~ /* ) then
- echo "Directory must be relative to root, please reenter"
- goto again2
-endif
-if ( ! -d $ldir ) then
- mkdir $ldir
- if ( $status ) then
+
+
+
+
+ldir=@WRKSRC@/radiance/lib
+#(echo $ldir) >/dev/null
+#if ( $status ) goto again2
+#set ldir=$ldir
+#if ( "$ldir" == "" ) then
+# set ldir=/usr/local/lib/ray
+#endif
+if [ ! -d $ldir ]; then
+ mkdir -p $ldir
+ if [ $? != 0 ]; then
echo "Cannot create directory, please reenter"
- goto again2
- endif
-endif
-if (! -d lib) then
+ exit 1
+ fi
+fi
+if [ ! -d lib ]; then
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
echo "You forgot to install the auxiliary files overlay."
echo "Download rad3R6supp.tar.gz from http://www.radiance-online.org"
echo "and run 'installib' later manually, or ^C now."
echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
- exit
+ exit 1
-endif
+fi
-set d1=(`ls -Lid lib`)
-set d2=(`ls -Lid $ldir`)
-if ($d1[1] != $d2[1]) then
- echo -n "Install library files now [n]? "
- if ( "$<" =~ [yY]* ) then
+d1=`ls -Lid lib | awk '{ print $1 }'`
+d2=`ls -Lid $ldir | awk '{ print $1 }'`
+if [ $d1 != $d2 ]; then
echo -n "Copying library files to $ldir... "
(cd lib ; tar -cf - *) | (cd $ldir ; tar -xf -)
- echo "Done."
- endif
-endif
+fi
unset d1 d2