---- FreeWRL-1.00/Makefile.PL.orig 2003-07-24 15:59:15.000000000 +0200
-+++ FreeWRL-1.00/Makefile.PL 2003-08-10 15:38:36.860432824 +0200
-@@ -67,8 +67,6 @@
+--- freewrl-1.19.8/Makefile.PL.orig 2008-01-12 18:27:02.568622000 +0100
++++ freewrl-1.19.8/Makefile.PL 2008-01-12 19:24:10.279956593 +0100
+@@ -108,8 +108,6 @@
+ ## Handle platform-specific compile options for the Javascript engine
+ ## and others specific to FreeWRL.
- my $sitearchjsdir = "\$(SITEARCHEXP)/auto/VRML/JS";
-
--my $jsdir = "js/src";
+-my $jsdir = "js1.5/src";
-my $jsobjdir;
- my $BUILD_OPT;
+ my $noStackProtector = "";
- my $warnings_high = qq{-Wunreachable-code -Wshadow -Wcast-align};
-@@ -79,24 +77,11 @@
my @inc;
- my @libs;
- my @ldflags;
--my @jsinc;
--my @jslibs;
+@@ -119,21 +117,6 @@
+ my @jslibs;
--if ($VRML_CONFIG{PLATFORM} =~ /irix/i) {
-- ##$jsobjdir = "js/src/IRIX646.5";
+-if ($OS eq "IRIX64") {
- $jsobjdir = "$jsdir/IRIX6.5";
--} elsif ($VRML_CONFIG{PLATFORM} =~ /macosx/i) {
-- $jsobjdir = "$jsdir/Darwin6.6";
+-} elsif ($OS eq "Darwin") {
+- $jsobjdir = "$jsdir/Darwin";
+-} elsif ($OS eq "SunOS") {
+- $jsobjdir = "$jsdir/SunOS5.8";
-} else { ## linux used by default
- $jsobjdir = "$jsdir/Linux_All";
-}
-
- if ($VRML_CONFIG{DEBUG} eq "on") {
-- $jsobjdir .= "_DBG.OBJ";
- $BUILD_OPT = 0;
- } else {
-- $jsobjdir .= "_OPT.OBJ";
- $BUILD_OPT = 1;
- }
+-#location of the spidermonkey js engine.
+-$jsobjdir .= "_OPT.OBJ";
+-my $libFreeWRLjspath = "./JS/".$jsobjdir."/libFreeWRLjs.so";
+-
+-#print "the javascript engine should be located at: $libFreeWRLjspath\n";
-@@ -119,9 +104,8 @@
+
+
+@@ -155,11 +138,8 @@
+ print "this system does not use the -fno-stack-protector flag\n";
}
- push @inc, $VRML_CONFIG{FREEWRL_INC},
-- "-I../JS/$jsobjdir", "-IJS/$jsobjdir", "-IJS/$jsdir", "-I../JS/$jsdir -ICFuncs";
--push @libs, $VRML_CONFIG{FREEWRL_LIBS}, "-L../JS/$jsobjdir", "-LJS/$jsobjdir", "-ljs";
+-push @inc, $VRML_CONFIG{FREEWRL_INC}, "-IJS/$jsobjdir", "-IJS/$jsdir", "-ICFuncs -ICFrontEnd ";
+-push @libs, $VRML_CONFIG{FREEWRL_LIBS}, "-LJS/$jsobjdir", "-lFreeWRLjs";
+-if ($OS eq "Darwin") {
-push @ldflags, $VRML_CONFIG{LDFLAGS}, "-LJS/$jsobjdir";
-+ "-I/usr/include/js", "-ICFuncs";
+-}
++push @inc, $VRML_CONFIG{FREEWRL_INC}, "-I/usr/include/js", "-ICFuncs -ICFrontEnd ";
+push @libs, $VRML_CONFIG{FREEWRL_LIBS}, "-ljs";
- $VRML_CONFIG{FREEWRL_CCFLAGS} = join(' ', @ccflags);
- $VRML_CONFIG{FREEWRL_INC} = join(' ', @inc);
-@@ -165,16 +149,6 @@
+ # push build directory, for running standalone
- print STDERR "Checking for the Mozilla JavaScript Reference library and application.\n";
-
--if (-e "JS/$jsobjdir/libjs.a" && -e "JS/$jsobjdir/libjs.so" && -e "JS/$jsobjdir/js") {
-- print STDERR "The Javascript library and application were found.\n";
--} else {
-- print STDERR "The Javascript library and application were not found - make them.\n";
-- chdir("JS/$jsdir");
-- system("make -f Makefile.ref BUILD_OPT=$BUILD_OPT");
-- chdir($pwd);
--}
--
+@@ -314,10 +294,7 @@
+ }
+ if ($OS eq "Linux") {
+ print MK "\tinstall -D libFreeWRLFunc.so \$(DESTDIR)\$(LIB_DIR)/libFreeWRLFunc.so\n";
+- print MK "\tinstall -D $libFreeWRLjspath \$(DESTDIR)\$(LIB_DIR)/libFreeWRLjs.so\n";
-
- use ExtUtils::MakeMaker;
- require './Config.pm';
+ if ($CHCON ne "") {
+- print MK "\t-$CHCON -t texrel_shlib_t \$(DESTDIR)\$(LIB_DIR)/libFreeWRLjs.so\n";
+ print MK "\t-$CHCON -t texrel_shlib_t \$(DESTDIR)\$(LIB_DIR)/libFreeWRLFunc.so\n";
+ }
+ if ($HAVE_UBUNTU eq "NO") {
+@@ -461,11 +438,9 @@
+ }
-@@ -279,23 +253,20 @@
+ sub write_linux_makefile_javascript() {
+- #############################################################################
+- ## make the Javascript libraries if needed
+
+ print MK "Javascript:\n";
+- print MK "\tcd JS/$jsdir; make -f Makefile.ref BUILD_OPT=1 STACKPROT=$noStackProtector; cd $pwd\n";
++ print MK "\n";
+ }
- push(@postamble, join(
- "\n",
-- qq{\# copy fonts, x3d, libjs.so over\n},
-+ qq{\# copy fonts, x3d over\n},
- qq{install ::},
- qq{\tcp -r fonts $vrmlinstdir\n},
- qq{\tcp -r x3d $vrmlinstdir\n},
-- qq{\tcp JS/$jsobjdir/libjs.so $VRML::Config::vrml_config{LIBJS_INST}\n}
- ));
- push(@postamble, join(
- "\n",
- qq{clean ::},
-- qq{\tcd JS/$jsdir && \$(MAKE) -f Makefile.ref BUILD_OPT=$BUILD_OPT clean\n}
- ));
+@@ -556,7 +531,6 @@
+ print MK "\techo \"%files\" >> $specfile\n";
+ print MK "\techo \"%defattr(-,root,root)\" >> $specfile\n";
+ print MK "\techo \"\$(DESTDIR)\$(LIB_DIR)/libFreeWRLFunc.so\" >> $specfile\n";
+- print MK "\techo \"\$(DESTDIR)\$(LIB_DIR)/libFreeWRLjs.so\" >> $specfile\n";
+ print MK "\techo \"\$(DESTDIR)\$(FRONTEND_DIR)/FreeWRL_Message\" >> $specfile\n";
+ print MK "\techo \"\$(DESTDIR)\$(FRONTEND_DIR)/freewrl\" >> $specfile\n";
+ print MK "\techo \"\$(DESTDIR)\$(FRONTEND_DIR)/FreeWRL_SoundServer\" >> $specfile\n";
+@@ -597,19 +571,11 @@
+ print MK " rm -f java/classes/sai/eai/*class\n";
+ print MK " rm -f java/classes/org/web3d/x3d/sai/*class\n";
+ print MK " rm -f java/classes/vrml.jar\n";
+- print MK " rm -rf JS/$jsobjdir\n";
- push(@postamble, join(
- "\n",
- qq{distclean :: realclean},
-- qq{\tcd JS/$jsdir && \$(MAKE) -f Makefile.ref BUILD_OPT=$BUILD_OPT clobber}
- ));
+ if ($OS eq "Darwin") {
+ print MK " rm -f /usr/local/lib/libFreeWRLFunc.dylib\n";
+- print MK " rm -f /usr/local/lib/libFreeWRLjs.dylib\n";
+ }
- return join("\n", @postamble);
+- # remove other JS directories
+- $jsobjdir =~s/src/src\/editline/;
+- print MK " rm -rf JS/$jsobjdir\n";
+- $jsobjdir =~ s/editline/fdlibm/;
+- print MK " rm -rf JS/$jsobjdir\n";
+-
+ print MK "\n#remove installed images\n";
+ print MK "distclean: clean\n";
+ print MK "\trm -f \$(DESTDIR)\$(FRONTEND_DIR)/freewrl\n";
+@@ -617,7 +583,6 @@
+
+ if ($OS eq "Linux") {
+ print MK "\trm -f \$(DESTDIR)\$(LIB_DIR)/libFreeWRLFunc.so\n";
+- print MK "\trm -f \$(DESTDIR)\$(LIB_DIR)/libFreeWRLjs.so\n";
+ if ($HAVE_UBUNTU eq "NO") {
+ # print MK "\t/sbin/ldconfig\n";
+ }