diff options
author | dholland <dholland@pkgsrc.org> | 2009-04-29 05:15:14 +0000 |
---|---|---|
committer | dholland <dholland@pkgsrc.org> | 2009-04-29 05:15:14 +0000 |
commit | 3e6479e874c8f47ac9e514ff348606ea4afe3876 (patch) | |
tree | 52ac44677cafcc8bc7b5863e52a5448e364d99eb /graphics/radiance | |
parent | db557428ab0bed05cea701f29c852ee680e88293 (diff) | |
download | pkgsrc-3e6479e874c8f47ac9e514ff348606ea4afe3876.tar.gz |
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++.
Diffstat (limited to 'graphics/radiance')
-rw-r--r-- | graphics/radiance/Makefile | 8 | ||||
-rw-r--r-- | graphics/radiance/distinfo | 12 | ||||
-rw-r--r-- | graphics/radiance/patches/patch-aa | 499 | ||||
-rw-r--r-- | graphics/radiance/patches/patch-ac | 75 | ||||
-rw-r--r-- | graphics/radiance/patches/patch-ae | 6 | ||||
-rw-r--r-- | graphics/radiance/patches/patch-ai | 10 | ||||
-rw-r--r-- | graphics/radiance/patches/patch-al | 10 |
7 files changed, 465 insertions, 155 deletions
diff --git a/graphics/radiance/Makefile b/graphics/radiance/Makefile index d03304bd7a6..3ac4733804d 100644 --- a/graphics/radiance/Makefile +++ b/graphics/radiance/Makefile @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.22 2009/03/17 21:40:46 darcy Exp $ +# $NetBSD: Makefile,v 1.23 2009/04/29 05:15:14 dholland Exp $ # DISTNAME= rad3R6P1 PKGNAME= radiance-3.6.1 -PKGREVISION= 3 +PKGREVISION= 4 CATEGORIES= graphics MASTER_SITES= http://www.radiance-online.org/software/non-cvs/ \ http://www.radiance-online.org/software/ @@ -70,8 +70,8 @@ do-configure: ${RM} ${WRKSRC}/lib/.gdb_history do-build: - cd ${WRKSRC} && ${MAKE_ENV} csh ./makeall install - @${RM} -f ${WRKSRC}/radiance/bin/wish* + cd ${WRKSRC} && ${MAKE_ENV} ${SH} ./makeall install + ${RM} -f ${WRKSRC}/radiance/bin/wish* do-install: ${INSTALL_DATA_DIR} ${DESTDIRPREFIX:Q}/radiance diff --git a/graphics/radiance/distinfo b/graphics/radiance/distinfo index 0e76f80e63d..af164bd7753 100644 --- a/graphics/radiance/distinfo +++ b/graphics/radiance/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.9 2007/04/18 18:47:21 joerg Exp $ +$NetBSD: distinfo,v 1.10 2009/04/29 05:15:14 dholland Exp $ SHA1 (rad3R6P1.tar.gz) = 71f46abd1c30be282a93237fa0c162d3bf0b1f99 RMD160 (rad3R6P1.tar.gz) = 3bcf40518a57cdb5455264c83a3e206b67b3d1fa @@ -6,18 +6,18 @@ Size (rad3R6P1.tar.gz) = 7115997 bytes SHA1 (rad3R6P1supp.tar.gz) = 8a13227eae507a7a4947a49b6aa741c95198ed4e RMD160 (rad3R6P1supp.tar.gz) = 9581a9f979044399e528114875c818b1de2f54ae Size (rad3R6P1supp.tar.gz) = 4632166 bytes -SHA1 (patch-aa) = 9a1a89d66d60bb99d00c1cc9f76942126903c80e +SHA1 (patch-aa) = dadffa1ed6199f85cd34b2ed20473d961679870b SHA1 (patch-ab) = 051d127e149280d127619d646dc8981b124e575e -SHA1 (patch-ac) = 2d0eb6a263c4d4c088397a8dbeebc01219c624f1 +SHA1 (patch-ac) = 44ea632411e9db9caa6873588ce44413820eb77b SHA1 (patch-ad) = f3f7c68305964965851c9caeca53f0e534014085 -SHA1 (patch-ae) = eaeba41315973013676bf400e5acff29ff61946a +SHA1 (patch-ae) = 83564e054b3832d5c1096c8cd7f5ba75cf75a0a5 SHA1 (patch-af) = 9a4c265a18a138166c8a041730cd5818430f9186 SHA1 (patch-ag) = e7f8944d96aa51ce8dfdec5abb6d498c3ca193cc SHA1 (patch-ah) = be320a6b9b8b6b2153a31ea9218eb7d41aa43b0e -SHA1 (patch-ai) = 02c6c3109c8e425d394980e1d223169dd6a3e7ae +SHA1 (patch-ai) = 2e48691bea7e189c86c65c646ef71ea854f105bb SHA1 (patch-aj) = 5242f18c523bbebcfdd886fa20501434f07b74c0 SHA1 (patch-ak) = 6cc99ea8f5c06e2234cdc4905631d56982404835 -SHA1 (patch-al) = c215a209fccd3d1d2e64d09018bce87291efc880 +SHA1 (patch-al) = 455a831b05ec0a1627fc77591b0173be5e095072 SHA1 (patch-am) = 705a3f62c5688f593fd5c5a1a71b22e4652b1c77 SHA1 (patch-an) = d0c388a5aaea622b220e3ef4c0f52956ecca5470 SHA1 (patch-ao) = 22e3e8f3b593bca0423390f696324f42e8b52098 diff --git a/graphics/radiance/patches/patch-aa b/graphics/radiance/patches/patch-aa index a988180291c..afccd2427ed 100644 --- a/graphics/radiance/patches/patch-aa +++ b/graphics/radiance/patches/patch-aa @@ -1,64 +1,142 @@ -$NetBSD: patch-aa,v 1.4 2006/02/26 21:26:32 joerg Exp $ +$NetBSD: patch-aa,v 1.5 2009/04/29 05:15:14 dholland Exp $ ---- makeall.orig 2003-12-14 17:24:09.000000000 +0000 -+++ makeall -@@ -36,17 +36,10 @@ You must first answer the following ques +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. + +--- makeall.orig 2003-12-14 12:24:09.000000000 -0500 ++++ makeall 2009-04-29 00:37:35.000000000 -0400 +@@ -3,27 +3,27 @@ + # + # Make all the Radiance programs + # +-if ( $#argv < 1 ) then ++if [ $# -lt 1 ]; then + echo "Usage: makeall install [clean] [make options]" + echo " or: makeall clean" + echo " or: makeall library" + exit 1 +-endif +-if ( "$1" == library ) then +- source installib ++fi ++if [ x"$1" = xlibrary ]; then ++ . installib + cp -f src/*/*.{cal,tab,hex} $ldir + echo "" + echo "Set the environment variable RAYPATH=.:$ldir" + echo 'For C-shell users, put the following into ~/.cshrc' + echo " setenv RAYPATH .:$ldir" +- echo 'For Bourne shell users, put the following into $HOME/profile' ++ echo 'For Bourne shell users, put the following into $HOME/.profile' + echo " RAYPATH=.:$ldir" + echo " export RAYPATH" + echo "" + exit 0 +-endif +-set srcdirs=( common meta cv gen ot rt px hd util cal ) +-if ( "$1" == install ) then ++fi ++srcdirs='common meta cv gen ot rt px hd util cal' ++if [ x"$1" = xinstall ]; then + cat << _EOF_ + + `cat src/rt/VERSION` INSTALLATION +@@ -35,183 +35,166 @@ this script. You can type ^C (followed + You must first answer the following questions. _EOF_ - if ( ! $?EDITOR ) then +-if ( ! $?EDITOR ) then - echo -n "What is your preferred editor [vi]? " - set ans="$<" - if ( "$ans" != "" ) then - setenv EDITOR "$ans" - else - setenv EDITOR vi +- setenv EDITOR vi - endif - endif - again1: +-endif +-again1: -echo -n "Where do you want the executables [/usr/local/bin]? " -set idir=$< -+set idir=@WRKSRC@/radiance/bin - (echo $idir) >/dev/null - if ( $status ) then - goto again1 -@@ -54,19 +47,16 @@ endif - set idir=$idir - if ( "$idir" == "" ) then - set idir=/usr/local/bin +-(echo $idir) >/dev/null +-if ( $status ) then +- goto again1 +-endif +-set idir=$idir +-if ( "$idir" == "" ) then +- set idir=/usr/local/bin -else if ( "$idir" !~ /* ) then - echo "Directory must be relative to root, please reenter" - goto again1 - endif - if ( ! -d $idir ) then +-endif +-if ( ! -d $idir ) then - mkdir $idir -+ mkdir -p $idir - if ( $status ) then +- if ( $status ) then ++if [ x"$EDITOR" = x ]; then ++ EDITOR=vi ++ export EDITOR ++fi ++ ++idir=@WRKSRC@/radiance/bin ++#(echo $idir) >/dev/null ++#if ( $status ) then ++# continue ++#endif ++#set idir=$idir ++#if ( "$idir" == "" ) then ++# set idir=/usr/local/bin ++#endif ++if [ ! -d "$idir" ]; then ++ mkdir -p "$idir" ++ if [ $? != 0 ]; then echo "Cannot create directory, please reenter" - goto again1 - endif - endif +- goto again1 +- endif +-endif -if ( ! -d $idir/dev ) then - mkdir $idir/dev -+if ( ! -d $idir/../dev ) then -+ mkdir -p $idir/../dev - if ( $status ) then +- if ( $status ) then ++ exit 1 ++ fi ++fi ++if [ ! -d "$idir/../dev" ]; then ++ mkdir -p "$idir/../dev" ++ if [ $? != 0 ]; then echo "Cannot create subdirectory, please reenter" - goto again1 -@@ -84,10 +74,6 @@ if ( "`ls -tL $rmake $0 |& head -1`" == - goto gotrmake - endif - set newrmake +- goto again1 +- endif +-endif +-set inpath=0 +-foreach i ( $path ) +- if ( "$i" == "$idir" ) then +- set inpath=1 ++ exit 1 ++ fi ++fi ++inpath=0 ++for i in $(echo $PATH | tr ':' ' '); do ++ if [ "$i" = "$idir" ]; then ++ inpath=1 + break +- endif +-end +-set rmake=$idir/rmake +-if ( "`ls -tL $rmake $0 |& head -1`" == $rmake ) then +- goto gotrmake +-endif +-set newrmake -more src/common/copyright.h -echo -n "Do you understand and accept the terms of this agreement [n]? " -set ans="$<" -if ( "$ans" !~ [yY]* ) exit - set special= - set arch= - set opt= -@@ -95,24 +81,7 @@ set mach= - set compat= - set extras= - set esuffix= +-set special= +-set arch= +-set opt= +-set mach= +-set compat= +-set extras= +-set esuffix= -cat << _EOF_ - -Please select your system type from the following list: @@ -77,75 +155,221 @@ $NetBSD: patch-aa,v 1.4 2006/02/26 21:26:32 joerg Exp $ -_EOF_ -echo -n "Choice? " -set arch="$<" -+set arch=@PKGSRC_ARCH@ - switch ("$arch") - case 1: # SPARC Station - set arch=sun -@@ -163,14 +132,14 @@ case 5: # BSDI BSD/386 - set compat="malloc.o erf.o strcmp.o" - breaksw - case 6: # Linux +-switch ("$arch") +-case 1: # SPARC Station +- set arch=sun +- set mach="-I/usr/openwin/include -L/usr/openwin/lib -DNOSTEREO" +- set opt="-O -DSPEED=80" +- set compat="bmalloc.o strcmp.o getpagesize.o" +- breaksw +-case 2: # HP workstation +- set mach="" +- set opt="-O -DSPEED=80 -Aa -D_HPUX_SOURCE" +- set compat="bmalloc.o getpagesize.o strcmp.o" +- set arch=hpux +- breaksw +-case 3: # Silicon Graphics +- set arch=sgi +- switch (`uname -r`) +- case 3.*: +- set mach="-noprototypes" +- set opt="-O -DSPEED=80" +- set special="sgi" +- set compat="malloc.o strcmp.o" +- breaksw +- case 4.*: +- set mach="" +- set opt="-O2 -DSPEED=100" +- set compat="malloc.o strcmp.o" +- set extras='"MLIB=-lfastm -lm"' +- breaksw +- default: # 5.x or later ++ fi ++done ++rmake=$idir/rmake ++#rmake2=`ls -tL $rmake $0 2>&1 | head -1` ++if [ ! -f "$rmake" -o "$0" -nt "$rmake" ]; then ++ ++newrmake= ++special= ++arch= ++opt= ++mach= ++compat= ++extras= ++esuffix= ++arch=@PKGSRC_ARCH@ ++case "$arch" in ++ 1) # SPARC Station ++ arch=sun ++ mach="-I/usr/openwin/include -L/usr/openwin/lib -DNOSTEREO" ++ opt="-O -DSPEED=80" ++ compat="bmalloc.o strcmp.o getpagesize.o" ++ ;; ++ 2) # HP workstation ++ mach="" ++ opt="-O -DSPEED=80 -Aa -D_HPUX_SOURCE" ++ compat="bmalloc.o getpagesize.o strcmp.o" ++ arch=hpux ++ ;; ++ 3) # Silicon Graphics ++ arch=sgi ++ case `uname -r` in ++ 3.*) ++ mach="-noprototypes" ++ opt="-O -DSPEED=80" ++ special="sgi" ++ compat="malloc.o strcmp.o" ++ ;; ++ 4.*) ++ mach="" ++ opt="-O2 -DSPEED=100" ++ compat="malloc.o strcmp.o" ++ extras='"MLIB=-lfastm -lm"' ++ ;; ++ *) # 5.x or later + ln -s `which wish` $idir/wish4.0 +- set path=($idir $path) +- set mach="-w" +- set opt="-O2 -DSPEED=200" +- set special="ogl" +- set compat="bmalloc.o strcmp.o" +- breaksw +- endsw +- breaksw +-case 4: # AIX +- set opt="-O" +- set compat="bmalloc.o erf.o strcmp.o" +- set arch=PowerPC +- breaksw +-case 5: # BSDI BSD/386 +- set mach="-DBSD -L/usr/X11/lib -I/usr/X11/include" +- set opt="-O -DSPEED=100" +- set arch=IBMPC +- set compat="malloc.o erf.o strcmp.o" +- breaksw +-case 6: # Linux - set mach="-Dlinux -D_FILE_OFFSET_BITS=64 -L/usr/X11R6/lib -I/usr/include/X11 -DNOSTEREO" -+ set mach="-Dlinux -D_FILE_OFFSET_BITS=64 -L${X11BASE}/lib -I${X11BASE}/include -DNOSTEREO" - set opt="-O2 -DSPEED=200" - set arch=IBMPC - set compat="bmalloc.o erf.o getpagesize.o" - set extras=CC=gcc - breaksw - case 7: # MacOS X +- set opt="-O2 -DSPEED=200" +- set arch=IBMPC +- set compat="bmalloc.o erf.o getpagesize.o" +- set extras=CC=gcc +- breaksw +-case 7: # MacOS X - set mach="-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib" -+ set mach="-DBSD -DNOSTEREO -Dfreebsd -I${X11BASE}/include -L${X11BASE}/lib" - set opt="-O2 -DSPEED=200" - set arch=PowerPC - set compat="bmalloc.o" -@@ -178,14 +147,19 @@ case 7: # MacOS X - set special="ogl" - breaksw - case 8: # FreeBSD +- set opt="-O2 -DSPEED=200" +- set arch=PowerPC +- set compat="bmalloc.o" +- set extras="CC=cc CONFIGURE_ARCH=powerpc" +- set special="ogl" +- breaksw +-case 8: # FreeBSD - set mach="-DBSD -DNOSTEREO -Dfreebsd -I/usr/X11R6/include -L/usr/X11R6/lib" -+ set mach="-DBSD -DNOSTEREO -Dfreebsd -I${X11BASE}/include -L${X11BASE}/lib" -+ set opt="-O -DSPEED=200" -+ set compat="bmalloc.o erf.o" -+ set arch=IBMPC -+ breaksw -+case 9: # NetBSD -+ set mach="-DBSD -DNOSTEREO -Dnetbsd -I${X11BASE}/include -L${X11BASE}/lib" - set opt="-O -DSPEED=200" - set compat="bmalloc.o erf.o" +- set opt="-O -DSPEED=200" +- set compat="bmalloc.o erf.o" - set extras="CC=cc" - set arch=IBMPC - breaksw +- set arch=IBMPC +- breaksw -case 9: # Cygwin - set mach="-Dfreebsd -L/usr/lib -L/usr/X11R6/lib -I/usr/include/X11 -I/usr/X11R6/include -DNOSTEREO" -+case 10: # Cygwin -+ set mach="-Dfreebsd -L/usr/lib -L${X11BASE} -I${X11BASE}/include -DNOSTEREO" - set opt="-O2 -DSPEED=200" - set arch=IBMPC - set compat="bmalloc.o erf.o getpagesize.o" -@@ -193,7 +167,7 @@ case 9: # Cygwin - set special="ogl" - set esuffix=".exe" - breaksw +- set opt="-O2 -DSPEED=200" +- set arch=IBMPC +- set compat="bmalloc.o erf.o getpagesize.o" +- set extras="CC=gcc" +- set special="ogl" +- set esuffix=".exe" +- breaksw -case 10: # Other -+case 11: # Other - set opt="-O" - set compat="bmalloc.o erf.o strcmp.o" +- set opt="-O" +- set compat="bmalloc.o erf.o strcmp.o" ++ PATH="${idir}:$PATH" ++ mach="-w" ++ opt="-O2 -DSPEED=200" ++ special="ogl" ++ compat="bmalloc.o strcmp.o" ++ ;; ++ esac ++ ;; ++ 4) # AIX ++ opt="-O" ++ compat="bmalloc.o erf.o strcmp.o" ++ arch=PowerPC ++ ;; ++ 5) # BSDI BSD/386 ++ mach="-DBSD -L/usr/X11/lib -I/usr/X11/include" ++ opt="-O -DSPEED=100" ++ arch=IBMPC ++ compat="malloc.o erf.o strcmp.o" ++ ;; ++ 6) # Linux ++ mach="-Dlinux -D_FILE_OFFSET_BITS=64 -L${X11BASE}/lib -I${X11BASE}/include -DNOSTEREO" ++ opt="-O2 -DSPEED=200" ++ arch=IBMPC ++ compat="bmalloc.o erf.o getpagesize.o" ++ extras=CC=gcc ++ ;; ++ 7) # MacOS X ++ mach="-DBSD -DNOSTEREO -Dfreebsd -I${X11BASE}/include -L${X11BASE}/lib" ++ opt="-O2 -DSPEED=200" ++ arch=PowerPC ++ compat="bmalloc.o" ++ extras="CC=cc CONFIGURE_ARCH=powerpc" ++ special="ogl" ++ ;; ++ 8) # FreeBSD ++ mach="-DBSD -DNOSTEREO -Dfreebsd -I${X11BASE}/include -L${X11BASE}/lib" ++ opt="-O -DSPEED=200" ++ compat="bmalloc.o erf.o" ++ arch=IBMPC ++ ;; ++ 9) # NetBSD ++ mach="-DBSD -DNOSTEREO -Dnetbsd -I${X11BASE}/include -L${X11BASE}/lib" ++ opt="-O -DSPEED=200" ++ compat="bmalloc.o erf.o" ++ arch=IBMPC ++ ;; ++ 10) # Cygwin ++ mach="-Dfreebsd -L/usr/lib -L${X11BASE} -I${X11BASE}/include -DNOSTEREO" ++ opt="-O2 -DSPEED=200" ++ arch=IBMPC ++ compat="bmalloc.o erf.o getpagesize.o" ++ extras="CC=gcc" ++ special="ogl" ++ esuffix=".exe" ++ ;; ++ 11) # Other ++ opt="-O" ++ compat="bmalloc.o erf.o strcmp.o" ++ # XXX echo -n "Are you using the GNU C compiler [n]? " -@@ -202,6 +176,12 @@ case 10: # Other - endif - set arch=other - breaksw -+case 12: # DragonFly -+ set mach="-DBSD -DNOSTEREO -Ddragonfly -I${X11BASE}/include -L${X11BASE}/lib" -+ set opt="-O -DSPEED=200" -+ set compat="bmalloc.o erf.o" -+ set arch=IBMPC -+ breaksw - default: +- if ( "$<" =~ [yY]* ) then +- set extras="CC=gcc" +- endif +- set arch=other +- breaksw +-default: ++ read FOO ++ case "$FOO" in ++ y*|Y*) extras="CC=gcc";; ++ esac ++ arch=other ++ ;; ++ 12) # DragonFly ++ mach="-DBSD -DNOSTEREO -Ddragonfly -I${X11BASE}/include -L${X11BASE}/lib" ++ opt="-O -DSPEED=200" ++ compat="bmalloc.o erf.o" ++ arch=IBMPC ++ ;; ++ *) echo "Illegal choice\!" echo "Installation aborted." -@@ -211,7 +191,7 @@ endsw - source installib + exit 1 +- breaksw +-endsw +-source installib ++ ;; ++esac ++. installib sed 's/[ ]*$//' > $rmake << _EOF_ #!/bin/sh -exec make "SPECIAL=$special" \ @@ -153,8 +377,15 @@ $NetBSD: patch-aa,v 1.4 2006/02/26 21:26:32 joerg Exp $ "OPT=$opt" \ "MACH=$mach" \ ARCH=$arch "COMPAT=$compat" \ -@@ -225,28 +205,16 @@ chmod 644 src/*/Rmakefile src/rt/devtabl - gotrmake: +@@ -222,71 +205,47 @@ exec make "SPECIAL=$special" \ + _EOF_ + chmod 755 $rmake + chmod 644 src/*/Rmakefile src/rt/devtable.c +-gotrmake: ++ ++# matches [ "$0" -nt "$rmake" ] above ++fi ++ echo "Current rmake command is:" cat $rmake -echo -n "Do you want to change it? " @@ -165,27 +396,38 @@ $NetBSD: patch-aa,v 1.4 2006/02/26 21:26:32 joerg Exp $ - if ( `cat $rmake /tmp/rmake$$ | grep OPT= | uniq | wc -l` == 2 ) set newrmake - rm -f /tmp/rmake$$ -endif - if ( ! -d src/lib ) then +-if ( ! -d src/lib ) then ++if [ ! -d src/lib ]; then mkdir src/lib - endif +-endif -if ( $?newrmake ) then - echo 'New rmake command -- running "makeall clean"...' - csh -f $0 clean -endif ++fi cd src echo "Making programs..." - set errs=0 - foreach i ( $srcdirs ) - pushd $i +-set errs=0 +-foreach i ( $srcdirs ) +- pushd $i ++errs=0 ++for i in $srcdirs; do ++ ( ++ cd $i echo "In directory $i..." - $rmake -k $* -+ $rmake $* - @ errs += $status - popd - end -@@ -256,22 +224,6 @@ else - echo "Done." - endif +- @ errs += $status +- popd +-end +-if ( $errs ) then +- echo "There were some errors." +-else +- echo "Done." +-endif ++ $rmake $* || exit 1 ++ ) || exit 1 ++done ++echo "Done." cd .. -if (! $inpath ) then - echo "" @@ -203,6 +445,37 @@ $NetBSD: patch-aa,v 1.4 2006/02/26 21:26:32 joerg Exp $ - echo "IMPORTANT: Execute 'sudo ln -s /tmp /usr/tmp'" - endif -endif - else +-else ++ ++else # [ $1 = install ] ++ cd src - foreach i ( $srcdirs ) +-foreach i ( $srcdirs ) +- pushd $i ++for i in $srcdirs; do ++ ( ++ cd $i + echo "In directory $i..." +- make -f Rmakefile $* +- popd +-end ++ make -f Rmakefile $* || exit 1 ++ ) || exit 1 ++done + cd .. +-foreach i ( $* ) +- if ( "$i" == clean ) then ++for i in "$@"; do ++ if [ x"$i" = xclean ]; then + echo "Removing library archives..." + rm -f src/lib/*.[ao] +- endif +-end ++ fi ++done + echo "Done." +-endif ++ ++fi # [ $1 = install ] ++ + exit 0 diff --git a/graphics/radiance/patches/patch-ac b/graphics/radiance/patches/patch-ac index ff7c27bee1b..9023f49678b 100644 --- a/graphics/radiance/patches/patch-ac +++ b/graphics/radiance/patches/patch-ac @@ -1,40 +1,77 @@ -$NetBSD: patch-ac,v 1.3 2005/02/17 00:38:37 jschauma Exp $ +$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 2005-02-15 11:25:48.000000000 -0500 -@@ -4,19 +4,15 @@ ++++ installib 2009-04-29 00:36:03.000000000 -0400 +@@ -3,41 +3,36 @@ + # # Install library files # - again2: +-again2: -echo -n "Where do you want the library files [/usr/local/lib/ray]? " -set ldir=$< -+set ldir=@WRKSRC@/radiance/lib - (echo $ldir) >/dev/null - if ( $status ) goto again2 - set ldir=$ldir - if ( "$ldir" == "" ) then - set ldir=/usr/local/lib/ray +-(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 +-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 ( $status ) then ++ if [ $? != 0 ]; then echo "Cannot create directory, please reenter" - goto again2 -@@ -33,11 +29,7 @@ - set d1=(`ls -Lid lib`) - set d2=(`ls -Lid $ldir`) - if ($d1[1] != $d2[1]) then +- 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 +-endif ++fi unset d1 d2 diff --git a/graphics/radiance/patches/patch-ae b/graphics/radiance/patches/patch-ae index b063e4774ea..f07f91d0591 100644 --- a/graphics/radiance/patches/patch-ae +++ b/graphics/radiance/patches/patch-ae @@ -1,4 +1,4 @@ -$NetBSD: patch-ae,v 1.3 2005/02/17 00:38:37 jschauma Exp $ +$NetBSD: patch-ae,v 1.4 2009/04/29 05:15:14 dholland Exp $ --- src/common/Rmakefile.orig 2004-10-27 19:36:09.000000000 -0400 +++ src/common/Rmakefile 2005-02-16 18:10:50.000000000 -0500 @@ -14,7 +14,7 @@ $NetBSD: patch-ae,v 1.3 2005/02/17 00:38:37 jschauma Exp $ COMPAT = bmalloc.o erf.o strcmp.o # frexp.o fwrite.o random.o -LIBDIR = /usr/local/lib/ray -+LIBDIR = /src/pkgsrc/graphics/radiance/work.i386/ray/radiance/lib ++LIBDIR = @WRKSRC@/radiance/lib RTOBJ = cone.o face.o free_os.o instance.o readobj.o readoct.o otypes.o \ objset.o octree.o readfargs.o modobject.o getlibpath.o \ @@ -45,7 +45,7 @@ $NetBSD: patch-ae,v 1.3 2005/02/17 00:38:37 jschauma Exp $ getlibpath.o: getlibpath.c - $(CC) $(CFLAGS) -DDEFPATH=\":$(LIBDIR)\" -c getlibpath.c -+ $(CC) $(CFLAGS) -DDEFPATH=\":/usr/pkg/radiance/lib\" -c getlibpath.c ++ $(CC) $(CFLAGS) -DDEFPATH=\":@PREFIX@/radiance/lib\" -c getlibpath.c tmapcolrs.o: tmapcolrs.c $(CC) $(CFLAGS) -DPCOND=\"pcond\" -c tmapcolrs.c diff --git a/graphics/radiance/patches/patch-ai b/graphics/radiance/patches/patch-ai index f9b99c9e8d1..17e7032c11d 100644 --- a/graphics/radiance/patches/patch-ai +++ b/graphics/radiance/patches/patch-ai @@ -1,4 +1,4 @@ -$NetBSD: patch-ai,v 1.3 2005/02/17 00:38:37 jschauma Exp $ +$NetBSD: patch-ai,v 1.4 2009/04/29 05:15:14 dholland Exp $ --- src/meta/Rmakefile.orig 2003-10-21 22:15:07.000000000 -0400 +++ src/meta/Rmakefile 2005-02-16 18:10:01.000000000 -0500 @@ -9,14 +9,14 @@ $NetBSD: patch-ai,v 1.3 2005/02/17 00:38:37 jschauma Exp $ -CC = cc MLIB = -lm -CFLAGS = -DMDIR=\"$(MLIBDIR)/\" $(OPT) $(MACH) -I../common -L../lib -+CFLAGS += -DMDIR=\"/usr/pkg/radiance/lib/meta/\" $(OPT) $(MACH) -I../common -L../lib ${LDFLAGS} ++CFLAGS += -DMDIR=\"@PREFIX@/radiance/lib/meta/\" $(OPT) $(MACH) -I../common -L../lib ${LDFLAGS} -LIBDIR = /usr/local/lib -+LIBDIR = /src/pkgsrc/graphics/radiance/work.i386/ray/radience/work.i386/ray/radiance/lib ++LIBDIR = @WRKSRC@/radiance/lib MLIBDIR = $(LIBDIR)/meta DESTDIR = . -INSTDIR = /usr/local/bin -+INSTDIR = /src/pkgsrc/graphics/radiance/work.i386/ray/radience/work.i386/ray/radiance/bin ++INSTDIR = @WRKSRC@/radiance/bin # target lists common = mfio.o syscalls.o misc.o @@ -29,7 +29,7 @@ $NetBSD: patch-ai,v 1.3 2005/02/17 00:38:37 jschauma Exp $ ../lib/lib4014.a: - cd lib4014; make INSTDIR=../../lib "CFLAGS=$(OPT)" install clean -+ cd lib4014; /usr/bin/make INSTDIR=../../lib install clean ++ cd lib4014; $(MAKE) INSTDIR=../../lib install clean $(DESTDIR)/bgraph: bgraph.o mgvars.o mgraph.o ../lib/libmeta.a $(CC) $(CFLAGS) -o bgraph bgraph.o mgvars.o mgraph.o \ diff --git a/graphics/radiance/patches/patch-al b/graphics/radiance/patches/patch-al index 848ce97760a..46c60b7c8d5 100644 --- a/graphics/radiance/patches/patch-al +++ b/graphics/radiance/patches/patch-al @@ -1,4 +1,4 @@ -$NetBSD: patch-al,v 1.3 2005/02/17 00:38:37 jschauma Exp $ +$NetBSD: patch-al,v 1.4 2009/04/29 05:15:14 dholland Exp $ --- src/rt/Rmakefile.orig 2004-10-27 19:23:48.000000000 -0400 +++ src/rt/Rmakefile 2005-02-16 18:10:40.000000000 -0500 @@ -18,7 +18,7 @@ $NetBSD: patch-al,v 1.3 2005/02/17 00:38:37 jschauma Exp $ # DESTDIR = . -INSTDIR = /usr/local/bin -+INSTDIR = /src/pkgsrc/graphics/radiance/work.i386/ray/radiance/bin ++INSTDIR = @WRKSRC@/radiance/bin INSTALL = cp # @@ -26,8 +26,8 @@ $NetBSD: patch-al,v 1.3 2005/02/17 00:38:37 jschauma Exp $ # -DEVDIR = $(INSTDIR)/dev -LIBDIR = /usr/local/lib/ray -+DEVDIR = /src/pkgsrc/graphics/radiance/work.i386/ray/radiance/dev -+LIBDIR = /src/pkgsrc/graphics/radiance/work.i386/ray/radiance/lib ++DEVDIR = @WRKSRC@/radiance/dev ++LIBDIR = @WRKSRC@/radiance/lib # # Library routines: @@ -61,7 +61,7 @@ $NetBSD: patch-al,v 1.3 2005/02/17 00:38:37 jschauma Exp $ devcomm.o: devcomm.c - $(CC) $(CFLAGS) -DDEVPATH=\"$(DEVDIR)\" -c devcomm.c -+ $(CC) $(CFLAGS) -DDEVPATH=\"/usr/pkg/radiance/dev\" -c devcomm.c ++ $(CC) $(CFLAGS) -DDEVPATH=\"@PREFIX@/radiance/dev\" -c devcomm.c aed.o: aed.c $(CC) $(CFLAGS) -Daed_init=dinit -c aed.c |