Update of /cvsroot/aimmath/AIM/WEB-INF/maple
In directory sc8-pr-cvs1:/tmp/cvs-serv16928/WEB-INF/maple
Modified Files:
AutoConf.mpl OS0.mpl OS0_OSX.mpl
Log Message:
Changes for OS X contributed by Jon. Installation instructions to follow.
Index: AutoConf.mpl
===================================================================
RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/AutoConf.mpl,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** AutoConf.mpl 10 Sep 2003 16:00:26 -0000 1.4
--- AutoConf.mpl 13 Sep 2003 21:05:28 -0000 1.5
***************
*** 182,186 ****
q("Checking the path for executables like *%s%s ...",os_pathsep,r):
progdir,prog := op(util_splitfilename(r)):
! if os_os = "Linux" then
d := util_striptrailspaces(os_system0("which %a",prog)):
if util_endswith(d,r) then
--- 182,186 ----
q("Checking the path for executables like *%s%s ...",os_pathsep,r):
progdir,prog := op(util_splitfilename(r)):
! if os_os = "Linux" or os_os = "OS X" then
d := util_striptrailspaces(os_system0("which %a",prog)):
if util_endswith(d,r) then
***************
*** 275,279 ****
elif l = "Path" then
q("Checking the path for executables like *%s%s ...",os_pathsep,r):
! if os_os = "Linux" then
d := util_striptrailspaces(os_system0("which %a",r)):
if os_fileexists(d) then
--- 275,279 ----
elif l = "Path" then
q("Checking the path for executables like *%s%s ...",os_pathsep,r):
! if os_os = "Linux" or os_os = "OS X" then
d := util_striptrailspaces(os_system0("which %a",r)):
if os_fileexists(d) then
***************
*** 346,349 ****
--- 346,350 ----
# Defaults: Linux: /usr/java/jdk*, /usr/local/jdk*
# DOS: c:\java\jdk*, c:\jdk*
+ # OS X: /Library/Java/Home
# double parent of java executable (try 'where', or PATH)
#
***************
*** 361,364 ****
--- 362,377 ----
"Check" = "bin/java"
):
+ # start JB
+ elif os_os = "OS X" then
+ Config['JavaHome'] :=
+ look_for_dir(
+ "Java",
+ "Conf" = 'JavaHome',
+ "Env" = "JAVA_HOME",
+ "Def" = ["/Library/Java","Home"],
+ "Path" = "bin/java",
+ "Check" = "bin/java"
+ ):
+ # end JB
else
Config['JavaHome'] :=
***************
*** 404,407 ****
--- 417,434 ----
"Check" = "bin/catalina.sh"
):
+ # begin JB
+ elif os_os = "OS X" then
+ Config['CatalinaHome'] :=
+ look_for_dir(
+ "Tomcat",
+ "Conf" = 'CatalinaHome',
+ "Env" = "CATALINA_HOME",
+ "Def" = ["/usr/local","tomcat"],
+ "Def" = ["/usr/local","jakarta-tomcat"],
+ "Def" = ["/usr/local","jakarta-tomcat-*"],
+ cd,
+ "Check" = "bin/catalina.sh"
+ ):
+ # end JB
else
Config['CatalinaHome'] :=
***************
*** 437,440 ****
--- 464,483 ----
"Check" = ["-c quit;","Waterloo"]
):
+ # start JB
+ elif os_os = "OS X" then
+ Config['MapleProgram'] :=
+ look_for_prog(
+ "Maple",
+ "Conf" = 'MapleProgram',
+ "Def" = "/bin/maple",
+ "Def" = "/Applications/\"Maple\ 9.app\"/Contents/MacOS/bin/maple",
+ "Def" = "/usr/bin/maple",
+ "Def" = "/usr/local/bin/maple",
+ "Def" = "/usr/local/maple/bin/maple",
+ "Def" = "/usr/local/maple_su/bin/maple",
+ "Path" = "maple",
+ "Check" = ["-c quit;","Waterloo"]
+ ):
+ # end JB
else
Config['MapleProgram'] :=
***************
*** 463,467 ****
# Look for the Kill Program
! if os_os = "Linux" then
Config['KillProgram'] :="/bin/kill";
os_osname(look_for_prog(
--- 506,510 ----
# Look for the Kill Program
! if os_os = "Linux" or os_os = "OS X" then
Config['KillProgram'] :="/bin/kill";
os_osname(look_for_prog(
***************
*** 494,498 ****
# Look for email program
! if os_os = "Linux" then
Config['SendmailProgram'] :=
look_for_prog(
--- 537,541 ----
# Look for email program
! if os_os = "Linux" or os_os = "OS X" then
Config['SendmailProgram'] :=
look_for_prog(
***************
*** 518,522 ****
# Look for upload directory
! if os_os = "Linux" then
Config['TempDir'] :=
look_for_dir(
--- 561,565 ----
# Look for upload directory
! if os_os = "Linux" or os_os = "OS X" then
Config['TempDir'] :=
look_for_dir(
***************
*** 550,554 ****
q("The host name was set manually to %a\n",Config['HostName']):
else
! if os_os = "Linux" then
hostname := traperror(ssystem("hostname --fqdn")):
if hostname = lasterror then
--- 593,597 ----
q("The host name was set manually to %a\n",Config['HostName']):
else
! if os_os = "Linux" or os_os = "OS X" then
hostname := traperror(ssystem("hostname --fqdn")):
if hostname = lasterror then
***************
*** 642,646 ****
! if os_os = "Linux" then
timezone := traperror(util_striptrailspaces(os_system("date +%%Z")));
if timezone = lasterror then timezone := NULL: fi:
--- 685,689 ----
! if os_os = "Linux" or os_os = "OS X" then
timezone := traperror(util_striptrailspaces(os_system("date +%%Z")));
if timezone = lasterror then timezone := NULL: fi:
***************
*** 753,757 ****
# Look for TtH
! if os_os = "Linux" then
Config['TtHProgram'] :=
look_for_prog(
--- 796,800 ----
# Look for TtH
! if os_os = "Linux" or os_os = "OS X" then
Config['TtHProgram'] :=
look_for_prog(
Index: OS0.mpl
===================================================================
RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/OS0.mpl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** OS0.mpl 25 Aug 2003 21:47:18 -0000 1.3
--- OS0.mpl 13 Sep 2003 21:05:28 -0000 1.4
***************
*** 19,22 ****
--- 19,25 ----
os_osmsg := "Operating system is Linux":
os_os := "Linux":
+ elif searchtext("OSX",os_mapleversion) > 0 then
+ os_osmsg := "Operating system is Mac OS X":
+ os_os := "OS X":
elif searchtext("Unix",os_mapleversion) > 0 then
os_osmsg :=
***************
*** 75,78 ****
--- 78,85 ----
if os_os = "Linux" then
read("OS0_Linux.mpl"):
+ # start JB
+ elif os_os = "OS X" then
+ read("OS0_OSX.mpl"):
+ # end JB
else
read("OS0_DOS.mpl"):
Index: OS0_OSX.mpl
===================================================================
RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/OS0_OSX.mpl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** OS0_OSX.mpl 25 Aug 2003 21:47:18 -0000 1.3
--- OS0_OSX.mpl 13 Sep 2003 21:05:28 -0000 1.4
***************
*** 5,10 ****
# This file, contributed by Jon Breitenbucher, is intended as a
! # substitute for OS0_Linux for use under Mac OSX. It is not yet fully
! # integrated into the AIM distribution.
os_driveletter := "":
--- 5,9 ----
# This file, contributed by Jon Breitenbucher, is intended as a
! # substitute for OS0_Linux for use under Mac OS X.
os_driveletter := "":
***************
*** 16,19 ****
--- 15,26 ----
end:
+ # List files in a directory, one per line, but do not list subdirectories
+ os_listfilesonly :=
+ proc(dir::string)
+ subs("" = NULL,
+ [util_linesplit(
+ os_system(cat("ls-F -1 ",os_osname(dir)," | sed 's#.*/##'")))]);
+ end:
+
# Remove a directory and all contents recursively
os_removedirectory :=
***************
*** 101,105 ****
os_filemodificationtime :=
proc(file::string)
! op(sscanf(os_system0("date -r %a +%%s",file),%d)):
end:
--- 108,112 ----
os_filemodificationtime :=
proc(file::string)
! op(sscanf(os_system0("filetest -M %a",file),%d)):
end:
***************
*** 131,132 ****
--- 138,141 ----
NULL;
end:
+
+ os_pathsep := "/":
|