You will need all of the following libraries installed:
-
neko_gtk+-2.12.12
-
neko_curl-7.19.7
-
neko_libpng-1.2.47
-
neko_libjpg-1.2.1
-
neko_librsvg-2.18.2
-
neko_libiconv-1.14
(See also
my note about librsvg
if you have trouble with it.)
You will need the following utilities to get through the build process:
-
neko_make-3.82
-
neko_pkgconfig-0.23
-
neko_fileutils-4.1
-
neko_gperf-3.0.4
-
neko_perl-5.8.9
-
neko_perl_html_parser-3.55
-
neko_expat-2.1.0
-
neko_tar-1.26
You'll also need GCC. I used a self-compiled GCC, but neko_gcc47-4.7.1 should also work.
Make sure that /usr/nekoware/bin is first in your path. You'll need install (from neko_fileutils), perl, and tar from Nekoware to come before the standard IRIX ones which won't work with the NetSurf build system.
Download and extract the
netsurf-all-3.1.tar.gz
source code. In the resulting netsurf-all-3.1 directory, do as recommended by the NetSurf docs (assuming you extracted it into ${HOME} -- adjust to suit your own path):
Code:
Select all
mkdir workspace
mkdir workspace/inst
export PREFIX=${HOME}/netsurf-all-3.1/workspace/inst
export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig::
Note the
two
colons at the end of PKG_CONFIG_PATH. That's not a typo.
Then to build with GCC:
Code:
Select all
export CC=gcc
export CFLAGS="-mabi=n32 -mips4"
export CXX=g++
export CXXFLAGS="-mabi=n32 -mips4"
export CPPFLAGS="-I/usr/nekoware/include"
export LDFLAGS="-L/usr/nekoware/lib -Wl,-rpath -Wl,/usr/nekoware/lib"
Apply the attached patch (with "patch -p1 <../netsurf-irix.patch" from within the netsurf-all-3.1 directory). It mainly changes "-std=c99" to "-std=gnu99" in the options passed to GCC. (The IRIX headers disable all extensions in ANSI c99 mode but enable them in gnu99 mode.) The patch also adds a couple of missing includes in places, creates two configuration files, and makes one small change to work with the GTK version in Nekoware. (Note that NetSurf says it works with GTK 2.12+ but some features seem to be from 2.16 and 2.18. They produce warnings when I try to start up NetSurf.)
Then for each of the following subdirectories (in order), "cd" into it and run "gmake install". (I've ignored the top-level Makefile for now.)
-
buildsystem
-
libparseutils
-
libwapcaplet
-
libhubub
-
libcss
-
libnsgif
-
libnsbmp
-
librosprite
-
libdom
-
netsurf
You should have a netsurf binary in ${PREFIX}/bin. Check with ldd to make sure it's linked against the right Nekoware libraries. (NetSurf's own libraries were statically linked if you followed my process.) Try running it with "./netsurf -v" (assuming you're in ${PREFIX}/bin). On my system the NetSurf window opens and in the console there are a whole lot of harmless-looking Gtk-WARNING messages, a couple of GLib-GObject messages that worry me, and NetSurf's own very detailed log messages stop after it logs calling "gtk/window.c gui_window_set_icon". Then it just sits there eating 100% CPU.
That's as far as i got over the weekend. Thanks, diegel, for offering to help debug this. If anyone else wants to pitch in, I hope the above instructions are sufficiently detailed. And if we get it built and working with GCC, I'll look into buiding it with MIPS Pro.