############################################################################
# Netscape/Mozilla installation
@@ -27,9 +27,9 @@
- # will be installed to.
# NETSCAPE_PLUGINS is used to determine where the plugin will
# be installed if this is your browser.
+
- NETSCAPE_INST => '/usr/lib/mozilla-1.0.1',
- NETSCAPE_CLASSES => '/usr/lib/mozilla-1.0.1',
- NETSCAPE_PLUGINS => '/usr/lib/mozilla-1.0.1/plugins',
############################################################################
# Mozilla development plugin installation
-@@ -39,16 +39,16 @@
- # MOZILLA_INST => '/usr/lib/mozilla-1.0.0',
+@@ -39,17 +39,17 @@
# MOZILLA_PLUGINS => '/usr/lib/mozilla-1.0.0/plugins',
# MOZILLA_INC => '/usr/include/mozilla-1.0.0',
+
- MOZILLA_INST => '',
- MOZILLA_PLUGINS => '',
- MOZILLA_INC => '',
+ MOZILLA_INC => '/usr/include/mozilla',
############################################################################
- # Java installation (Sun's Java 2 SDK Standard Edition 1.3.1)
+ # Java installation (Sun's Java 2 SDK Standard Edition 1.4.0)
# If Java is not installed, leave JAVA_INST empty e.g.
# JAVA_INST => ''
+
- JAVA_INST => '/usr/java/j2sdk1.4.0',
- JAVA_INC => '-I/usr/java/j2sdk1.4.0/include -I/usr/java/j2sdk1.4.0/include/linux',
+ JAVA_INST => '/usr/lib/java',
-diff -urN freewrl-0.34.orig/Plugin/mozilla/Makefile freewrl-0.34/Plugin/mozilla/Makefile
---- freewrl-0.34.orig/Plugin/mozilla/Makefile Thu Sep 19 21:47:02 2002
-+++ freewrl-0.34/Plugin/mozilla/Makefile Sun Oct 13 16:49:50 2002
+--- FreeWRL-1.00/Plugin/mozilla/Makefile.orig 2003-08-10 14:41:33.000000000 +0200
++++ FreeWRL-1.00/Plugin/mozilla/Makefile 2003-08-11 20:36:01.638817672 +0200
@@ -18,13 +18,13 @@
ifndef ${MOZILLA_INST}
endif
-@@ -118,6 +118,8 @@
+@@ -118,6 +118,7 @@
INC:=\
-Iinclude\
+ -I/usr/include/nspr\
-+ -I/usr/include/gtk-1.2\
-I${PLUGIN_GLUE_DIR}/CFuncs\
-I${MOZILLA_INC}/plugin\
-I${MOZILLA_INC}/xpcom\
-@@ -151,7 +153,6 @@
+@@ -132,11 +131,8 @@
+
+ INC+=\
+ -I/usr/X11R6/include\
+- -I/usr/include\
+- -I/usr/include/gtk-1.2\
+- -I/usr/include/glib-1.2\
+- -I/usr/lib/glib/include\
+- -include include/config-rhlinux72-i686.h ## for platform defines
++ `$(GTK_CONFIG) --cflags` \
++ -include /usr/include/mozilla/mozilla-config.h ## for platform defines
+
+ endif
+
+@@ -151,7 +152,6 @@
${OPTIMIZER}\
${INC}\
-pedantic\
-fno-exceptions\
-pthread\
-pipe\
+@@ -214,13 +210,10 @@
+ -L/usr/X11R6/lib\
+ -lgtkxtbin\
+ -lXt\
+- -lgtk\
+- -lgdk\
+ -lXi\
+ -lXext\
+ -lX11\
+- -lglib
+-
++ `$(GTK_CONFIG) --libs`
+ endif
+
+ ## -lgtkembedmoz\
+--- FreeWRL-1.00/Plugin/mozilla/source/npFreeWRLInstance.cpp.orig 2003-08-10 14:41:33.000000000 +0200
++++ FreeWRL-1.00/Plugin/mozilla/source/npFreeWRLInstance.cpp 2003-08-11 20:33:17.972698704 +0200
+@@ -195,29 +195,29 @@
+ // add MacOS code later
+
+ // handle signals...
+- if (signal(SIGIO, (__sighandler_t) &npFreeWRLInstance::signalHandler) == SIG_ERR) {
++ if (signal(SIGIO, (__sighandler_t) &npFreeWRLInstance_signalHandler) == SIG_ERR) {
+ std::cerr << "signal with SIGIO failed." << endl;
+ return FALSE;
+ }
+
+- if (signal(SIGPIPE, (__sighandler_t) &npFreeWRLInstance::signalHandler) == SIG_ERR) {
++ if (signal(SIGPIPE, (__sighandler_t) &npFreeWRLInstance_signalHandler) == SIG_ERR) {
+ std::cerr << "signal with SIGPIPE failed." << endl;
+ return FALSE;
+ }
+
+ #if _DEBUG
+- if (signal(SIGBUS, (__sighandler_t) &npFreeWRLInstance::signalHandler) == SIG_ERR) {
++ if (signal(SIGBUS, (__sighandler_t) &npFreeWRLInstance_signalHandler) == SIG_ERR) {
+ std::cerr << "signal with SIGPIPE failed." << endl;
+ return FALSE;
+ }
+ #endif // _DEBUG
+
+- if (signal(SIGHUP, (__sighandler_t) &npFreeWRLInstance::signalHandler) == SIG_ERR) {
++ if (signal(SIGHUP, (__sighandler_t) &npFreeWRLInstance_signalHandler) == SIG_ERR) {
+ std::cerr << "signal with SIGHUP failed." << endl;
+ return FALSE;
+ }
+
+- if (signal(SIGUSR2, (__sighandler_t) &npFreeWRLInstance::signalHandler) == SIG_ERR) {
++ if (signal(SIGUSR2, (__sighandler_t) &npFreeWRLInstance_signalHandler) == SIG_ERR) {
+ std::cerr << "signal with SIGUSR2 failed." << endl;
+ return FALSE;
+ }
+@@ -839,7 +839,7 @@
+ }
+
+ void
+-npFreeWRLInstance::signalHandler(int signo)
++npFreeWRLInstance_signalHandler(int signo)
+ {
+ #if _DEBUG
+ std::cerr << "npFreeWRLInstance signalHandler signal number = "
+@@ -851,7 +851,7 @@
+ #if _DEBUG
+ std::cerr << "\tplugin caught SIGIO!" << endl;
+ #endif // _DEBUG
+- if (receiveUrl(socketDesc, &lastRequest) != NPERR_NO_ERROR) {
++/* if (receiveUrl(socketDesc, &lastRequest) != NPERR_NO_ERROR) {
+ std::cerr << "receiveUrl returned with error!" << endl;
+ } else {
+ if (NPN_GetURL((NPP) lastRequest.instance,
+@@ -859,7 +859,7 @@
+ NULL) != NO_ERROR) {
+ fprintf(stderr, "NPN_GetURL failed.\n");
+ }
+- }
++ } -- socketDesc and lastRequest inaccessible here */
+ break;
+ #if _DEBUG
+ case SIGBUS:
+--- FreeWRL-1.00/Plugin/mozilla/include/npFreeWRLInstance.h.orig 2003-07-24 15:59:15.000000000 +0200
++++ FreeWRL-1.00/Plugin/mozilla/include/npFreeWRLInstance.h 2003-08-10 16:12:44.000000000 +0200
+@@ -66,6 +66,7 @@
+
+ // from mozilla plugin sdk and samples - plugin.h
+
++void npFreeWRLInstance_signalHandler(int signo);
+ class npFreeWRLInstance : public npInstanceBase
+ {
+ public:
+@@ -130,7 +131,6 @@
+ void getVersion(char **aVersion);
+ void showVersion();
+ void clear();
+- void signalHandler(int signo);
+ PlatformInfo * getPlatformInfo();
+
+ private:
---- FreeWRL-0.37/JS/Makefile.PL.orig Fri Dec 20 19:00:04 2002
-+++ FreeWRL-0.37/JS/Makefile.PL Thu Jan 23 23:09:31 2003
-@@ -30,20 +30,6 @@
- ## Check for required Javascript libraries,
- ## if they don't exist, make them.
+--- 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 @@
--$SRCDIR="js/src";
+ my $sitearchjsdir = "\$(SITEARCHEXP)/auto/VRML/JS";
+
+-my $jsdir = "js/src";
+-my $jsobjdir;
+ my $BUILD_OPT;
+
+ my $warnings_high = qq{-Wunreachable-code -Wshadow -Wcast-align};
+@@ -79,24 +77,11 @@
+ my @inc;
+ my @libs;
+ my @ldflags;
+-my @jsinc;
+-my @jslibs;
+
+
+-if ($VRML_CONFIG{PLATFORM} =~ /irix/i) {
+- ##$jsobjdir = "js/src/IRIX646.5";
+- $jsobjdir = "$jsdir/IRIX6.5";
+-} elsif ($VRML_CONFIG{PLATFORM} =~ /macosx/i) {
+- $jsobjdir = "$jsdir/Darwin6.6";
+-} else { ## linux used by default
+- $jsobjdir = "$jsdir/Linux_All";
+-}
-
--print "Checking for the Mozilla JavaScript Reference library and application.\n";
--if (-e "$SRCDIR/Linux_All_OPT.OBJ/libjs.a"
-- && -e "$SRCDIR/Linux_All_OPT.OBJ/libjs.so"
-- && -e "$SRCDIR/Linux_All_OPT.OBJ/js") {
-- print "The Javascript library and application were found.\n";
+ if ($VRML_CONFIG{DEBUG} eq "on") {
+- $jsobjdir .= "_DBG.OBJ";
+ $BUILD_OPT = 0;
+ } else {
+- $jsobjdir .= "_OPT.OBJ";
+ $BUILD_OPT = 1;
+ }
+
+@@ -119,9 +104,8 @@
+ }
+
+ 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 @ldflags, $VRML_CONFIG{LDFLAGS}, "-LJS/$jsobjdir";
++ "-I/usr/include/js", "-ICFuncs";
++push @libs, $VRML_CONFIG{FREEWRL_LIBS}, "-ljs";
+
+ $VRML_CONFIG{FREEWRL_CCFLAGS} = join(' ', @ccflags);
+ $VRML_CONFIG{FREEWRL_INC} = join(' ', @inc);
+@@ -165,16 +149,6 @@
+
+ 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 "The Javascript library and application were not found - make them.\n";
-- chdir("$SRCDIR");
-- system("make -f Makefile.ref BUILD_OPT=1");
+- 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);
-}
+-
-
use ExtUtils::MakeMaker;
+ require './Config.pm';
+
+@@ -279,23 +253,20 @@
+
+ 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}
+ ));
- ## get rid of -W eventually
---- FreeWRL-0.37/vrml.conf.orig Thu Jan 23 22:58:15 2003
-+++ FreeWRL-0.37/vrml.conf Thu Jan 23 23:10:54 2003
-@@ -28,8 +28,8 @@
+ push(@postamble, join(
+ "\n",
+ qq{clean ::},
+- qq{\tcd JS/$jsdir && \$(MAKE) -f Makefile.ref BUILD_OPT=$BUILD_OPT clean\n}
+ ));
- ############################################################################
- # Javascript lib & include (relative to the JS/ directory)
-- JS_LIBS => '-Ljs/src/Linux_All_OPT.OBJ -ljs',
-- JS_INC => '-Ijs/src/Linux_All_OPT.OBJ -Ijs/src',
-+ JS_LIBS => '-ljs',
-+ JS_INC => '-I/usr/include/js',
+ push(@postamble, join(
+ "\n",
+ qq{distclean :: realclean},
+- qq{\tcd JS/$jsdir && \$(MAKE) -f Makefile.ref BUILD_OPT=$BUILD_OPT clobber}
+ ));
- ############################################################################
- # Saxon location - required for x3d running.
+ return join("\n", @postamble);
+# TODO:
+# - install fonts system-wide (subpackage?)
%include /usr/lib/rpm/macros.perl
Summary: FreeWRL - VRML browser
Summary(pl): FreeWRL - przeglĀ±darka VRML
Name: freewrl
-Version: 0.39
+Version: 1.00
Release: 1
License: LGPL
Group: X11/Applications/Graphics
BuildRequires: OpenGL-devel
BuildRequires: XFree86-devel
BuildRequires: freetype-devel
-BuildRequires: gtk+-devel
+BuildRequires: gtk+2-devel
BuildRequires: jdk
BuildRequires: js-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
+BuildRequires: mozilla-devel
+BuildRequires: mozilla-embedded(gtk2)
BuildRequires: perl-devel >= 5.8.0
+BuildRequires: pkgconfig
BuildRequires: rpm-perlprov >= 4.1-13
BuildRequires: saxon
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Summary(pl): Wtyczka VRML dla przeglĀ±darki WWW Mozilla
Group: Libraries
Requires: %{name} = %{version}
+Requires: mozilla-embedded(gtk2)
%description -n mozilla-plugin-freewrl
VRML plugin for Mozilla WWW browser.
%{__make} \
OPTIMIZE="%{rpmcflags}" \
OPTIMIZER="%{rpmcflags}" \
- MOZILLA_INC="/usr/include/mozilla"
+ MOZILLA_INC="/usr/include/mozilla" \
+ GTK_CONFIG="pkg-config gtk+-2.0"
%{__make} -C Plugin/netscape \
OPTIMIZER="%{rpmcflags}"
install -d $RPM_BUILD_ROOT{%{mozilladir}/{plugins,java/classes},%{netscapedir}/plugins}
%{__make} install \
- DESTDIR=$RPM_BUILD_ROOT
+ DESTDIR=$RPM_BUILD_ROOT \
+ SITEARCHEXP=$RPM_BUILD_ROOT%{perl_vendorarch}
install Plugin/mozilla/_lib/npFreeWRL.so $RPM_BUILD_ROOT%{mozilladir}/plugins
install Plugin/netscape/_lib/npfreewrl.so $RPM_BUILD_ROOT%{netscapedir}/plugins