## fix-hardcoded-raypaths.dpatch by Bernd Zeimetz <bernd@bzed.de>
##
## DP: grep -lr '/usr/local/lib/ray' * | grep -v Rmakefile | xargs sed -i 's,/usr/local/lib/ray,/usr/share/radiance,g'
## DP: We don't install to /usr/local, fixing the locations where possible
@DPATCH@
--- a/README
+++ b/README
@@ -67,7 +67,7 @@ distribution). As you develop auxiliary
useful to add in your own library directory before the system directory.
An example setting such as this would go in a user's .login file:
- setenv RAYPATH .:${HOME}/mylib:/usr/local/lib/ray
+ setenv RAYPATH .:${HOME}/mylib:/usr/share/radiance
After installing the software, you may want to start by scanning the
troff input documentation contained in "doc/ray.1", which is also formatted
--- a/doc/man/cat1/arch2rad.1
+++ b/doc/man/cat1/arch2rad.1
@@ -63,10 +63,10 @@ DDEESSCCRRIIPPTTIIOONN
If neither the _-_m nor the _-_n options are not used, _a_r_c_h_2_r_a_d uses the
- default mapping file "/usr/local/lib/ray/lib/arch.map". This file sim-
+ default mapping file "/usr/share/radiance/lib/arch.map". This file sim-
ply assigns materials based on color, using the identifiers "c0"
through "c255". Appropriate materials for these identifiers are con-
- tained in "/usr/local/lib/ray/lib/arch.mat".
+ tained in "/usr/share/radiance/lib/arch.mat".
The _-_n option may be used to produce a list of qualifiers from which to
construct a mapping for the given Architrion file. If the _-_m option is
@@ -121,11 +121,11 @@ EEXXAAMMPPLLEE
To create an octree directly from an Architrion file using the default
mapping and materials:
- oconv source.rad /usr/local/lib/ray/lib/arch.mat '\!arch2rad build-
+ oconv source.rad /usr/share/radiance/lib/arch.mat '\!arch2rad build-
ing.txt' > building.oct
FFIILLEESS
- /usr/local/lib/ray/lib/arch.map /usr/local/lib/ray/lib/arch.mat
+ /usr/share/radiance/lib/arch.map /usr/share/radiance/lib/arch.mat
AAUUTTHHOORR
Greg Ward
--- a/doc/man/cat1/gensky.1
+++ b/doc/man/cat1/gensky.1
@@ -151,7 +151,7 @@ EEXXAAMMPPLLEE
gensky -ang 23 -40 -s
FFIILLEESS
- /usr/local/lib/ray/skybright.cal
+ /usr/share/radiance/skybright.cal
AAUUTTHHOORR
Greg Ward
--- a/doc/man/cat1/ies2rad.1
+++ b/doc/man/cat1/ies2rad.1
@@ -130,9 +130,9 @@ EEXXAAMMPPLLEE
ies2rad -di -t default -m .85 fluor01.ies
To convert three IES files of various types to tenths of a foot and put
- them in the library "/usr/local/lib/ray" subdirectory "source/ies":
+ them in the library "/usr/share/radiance" subdirectory "source/ies":
- ies2rad -df/10 -l /usr/local/lib/ray -p source/ies ies01 ies02 ies03
+ ies2rad -df/10 -l /usr/share/radiance -p source/ies ies01 ies02 ies03
To convert a single file and give the output a different name:
--- a/doc/man/man1/arch2rad.1
+++ b/doc/man/man1/arch2rad.1
@@ -94,11 +94,11 @@ nor the
.I \-n
options are not used,
.I arch2rad
-uses the default mapping file "/usr/local/lib/ray/lib/arch.map".
+uses the default mapping file "/usr/share/radiance/lib/arch.map".
This file simply assigns materials based on color, using the
identifiers "c0" through "c255".
Appropriate materials for these identifiers are contained
-in "/usr/local/lib/ray/lib/arch.mat".
+in "/usr/share/radiance/lib/arch.mat".
.PP
The
.I \-n
@@ -162,10 +162,10 @@ arch2rad \-m building.map building.txt >
To create an octree directly from an Architrion file using the default
mapping and materials:
.IP "" .2i
-oconv source.rad /usr/local/lib/ray/lib/arch.mat '\\!arch2rad building.txt' > building.oct
+oconv source.rad /usr/share/radiance/lib/arch.mat '\\!arch2rad building.txt' > building.oct
.SH FILES
-/usr/local/lib/ray/lib/arch.map
-/usr/local/lib/ray/lib/arch.mat
+/usr/share/radiance/lib/arch.map
+/usr/share/radiance/lib/arch.mat
.SH AUTHOR
Greg Ward
.SH "SEE ALSO"
--- a/doc/man/man1/gensky.1
+++ b/doc/man/man1/gensky.1
@@ -223,7 +223,7 @@ without the sun description:
.IP "" .2i
gensky \-ang 23 \-40 \-s
.SH FILES
-/usr/local/lib/ray/skybright.cal
+/usr/share/radiance/skybright.cal
.SH AUTHOR
Greg Ward
.SH "SEE ALSO"
--- a/doc/man/man1/ies2rad.1
+++ b/doc/man/man1/ies2rad.1
@@ -181,9 +181,9 @@ creating the files "fluor01.rad" and "fl
ies2rad \-di \-t default \-m .85 fluor01.ies
.PP
To convert three IES files of various types to tenths of a foot and put
-them in the library "/usr/local/lib/ray" subdirectory "source/ies":
+them in the library "/usr/share/radiance" subdirectory "source/ies":
.IP "" .2i
-ies2rad \-df/10 \-l /usr/local/lib/ray \-p source/ies ies01 ies02 ies03
+ies2rad \-df/10 \-l /usr/share/radiance \-p source/ies ies01 ies02 ies03
.PP
To convert a single file and give the output a different name:
.IP "" .2i
--- a/doc/notes/translators
+++ b/doc/notes/translators
@@ -114,12 +114,12 @@ based on some set of default paramters.
color alone to assign materials "c0" through "c255".) To accompany the
default mapping, there should be a default materials file with
corresponding definitions. These files should be placed in the
-Radiance library directory under "lib" (ie. "/usr/local/lib/ray/lib").
+Radiance library directory under "lib" (ie. "/usr/share/radiance/lib").
To just look at an Architrion building, a user might issue the following
commands:
- oconv '\!gensky 6 15 12' /usr/local/lib/ray/lib/arch.mat \
+ oconv '\!gensky 6 15 12' /usr/share/radiance/lib/arch.mat \
'\!arch2rad model.txt' > model.oct
rvu -av 3 3 3 -vp -20 -20 5 -vd 1 1 0 model.oct
--- a/installib
+++ b/installib
@@ -4,13 +4,13 @@
# Install library files
#
again2:
-echo -n "Where do you want the library files [/usr/local/lib/ray]? "
+echo -n "Where do you want the library files [/usr/share/radiance]? "
set ldir=$<
(echo $ldir) >/dev/null
if ( $status ) goto again2
set ldir=$ldir
if ( "$ldir" == "" ) then
- set ldir=/usr/local/lib/ray
+ set ldir=/usr/share/radiance
else if ( "$ldir" !~ /* ) then
echo "Directory must be relative to root, please reenter"
goto again2
--- a/src/common/paths.h
+++ b/src/common/paths.h
@@ -102,7 +102,7 @@
#define TEMPLEN 17
#define ULIBVAR "RAYPATH"
#ifndef DEFPATH
- #define DEFPATH ":/usr/local/lib/ray"
+ #define DEFPATH ":/usr/share/radiance"
#endif
#define fixargv0(a0) (a0)
--- a/src/cv/arch2rad.c
+++ b/src/cv/arch2rad.c
@@ -14,7 +14,7 @@ static const char RCSid[] = "$Id: arch2r
#include "rtio.h"
#include "trans.h"
-#define DEFMAPFILE "/usr/local/lib/ray/lib/arch.map"
+#define DEFMAPFILE "/usr/share/radiance/lib/arch.map"
/* qualifiers */
#define Q_COL 0
--- a/src/util/debugcal.csh
+++ b/src/util/debugcal.csh
@@ -13,7 +13,7 @@ if ( $#argv < 2 ) then
exit 1
endif
if ( ! $?RAYPATH ) then
- set RAYPATH=.:/usr/local/lib/ray
+ set RAYPATH=.:/usr/share/radiance
endif
set initfile=
foreach d (`echo $RAYPATH | sed 's/:/ /g'`)
--- a/src/util/trad.wsh
+++ b/src/util/trad.wsh
@@ -6,7 +6,7 @@
# Insert our autoload directory (may require local system modification)
-set radlib /usr/local/lib/ray/tcl
+set radlib /usr/share/radiance/tcl
set helplib $radlib
set auto_path [linsert $auto_path 0 $radlib]