LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   trying to build netsurf for slackware and slax (http://www.linuxquestions.org/questions/slackware-14/trying-to-build-netsurf-for-slackware-and-slax-747008/)

vonbiber 08-12-2009 11:04 AM

trying to build netsurf for slackware and slax
 
NetSurf is a free, open source web browser. It is written
in C and released under the GNU Public Licence version 2.

NetSurf has its own layout and rendering engine entirely
written from scratch.
It is small and capable of handling many of the
web standards in use today.

http://www.netsurf-browser.org/
#####################################
I've been trying to build netsurf for slackware and slax platforms.
I'm trying to build a framebuffer version (not interested in the GTK version).

netsurf building

after several attempts (getting the missing tools and/or libraries
that weren't even mentionned in their list of requirements)
I finally go to that stage

Package libwapcaplet was not found in the pkg-config search path

#####
After a couple of days of searching I located an address where I could get sources for wapcaplet.
But obviously some files are missing
(on the web site there was an empty build folder
and I looked at the Makefile: it tries to input some
files from that build folder)

just wondering if anybody has tried to build
or just interested discussing this.

gnashley 08-12-2009 01:21 PM

Can you list the dependencies that you already built?

larryhaja 08-12-2009 01:45 PM

1 Attachment(s)
I built it netsurf a couple months back, but was disappointed in the rendering of some pages. Netsurf either renders webites really fast (eg. www.google.com) or takes forever to render. From time to time it freezes, so I gave up on netsurf.

I actually built the gtk version of netsurf. The dependencies aren't spelled out very well in the accompanying documentation. So, I relied mainly on the Archlinux PKGBUILD and another Gentoo Ebuild. The dependencies can either be found on slackbuilds.org or on www.netsurf-browser.org.

I'll supply a tarball of the netsurf slackbuild I used if it is of any use. Just remove the .txt extention and it will be a normal tarball. All dependencies are listed in the README.

knudfl 08-12-2009 03:20 PM

Googling .. libwapcaplet rpm ..

http://dbg.download.sourcemage.org/mirror/?C=M%3BO=D
http://dbg.download.sourcemage.org/m...et-scm.tar.bz2

And trunk :
http://source.netsurf-browser.org/trunk/libwapcaplet/
... which seems to be the same files.

'make' provides 'libwapcaplet.a' , libwapcaplet.pc
.....
.....

EDIT : netsurf, SVN rev. 9215, and with the pdf option disabled,
compiles with no errors.
svn co svn://svn.netsurf-browser.org/trunk/netsurf
.....

vonbiber 08-13-2009 09:00 AM

Quote:

Originally Posted by gnashley (Post 3640767)
Can you list the dependencies that you already built?

I built this with no problem:

libparserutils-0.0.1-src.tar.gz hubbub-0.0.1-src.tar.gz
libnsbmp-0.0.1-src.tar.gz libnsgif-0.0.1-src.tar.gz
###
#this wasn't mentionned in the requirements, but I built it also
dom-0.0.1-src.tar.gz
###

That's when I was trying to build this that I got the error about
missing libwapcaplet:
Package libwapcaplet was not found in the pkg-config search path.
....

libcss-0.0.1-src.tar.gz


##################
These tools are required. I built lemon and didnt't
build re2c yet:
lemon.tar.bz2 re2c-0.13.5.tar.gz

# this is optional (pdf library, you can disable it in the Makefile)
# but i builds ok
libharu-2.1.0

vonbiber 08-13-2009 09:03 AM

Quote:

Originally Posted by knudfl (Post 3640890)
Googling .. libwapcaplet rpm ..

http://dbg.download.sourcemage.org/mirror/?C=M%3BO=D
http://dbg.download.sourcemage.org/m...et-scm.tar.bz2

And trunk :
http://source.netsurf-browser.org/trunk/libwapcaplet/
... which seems to be the same files.

'make' provides 'libwapcaplet.a' , libwapcaplet.pc
.....
.....

EDIT : netsurf, SVN rev. 9215, and with the pdf option disabled,
compiles with no errors.
svn co svn://svn.netsurf-browser.org/trunk/netsurf
.....

Thanks for the links
I downloaded the tar.bz2 archive
I'll have a look

the netsurf link is the one with the build folder empty
(and is supposed to hold the real Makefiles)

vonbiber 08-13-2009 09:09 AM

Quote:

Originally Posted by larryhaja (Post 3640789)
I built it netsurf a couple months back, but was disappointed in the rendering of some pages. Netsurf either renders webites really fast (eg. www.google.com) or takes forever to render. From time to time it freezes, so I gave up on netsurf.

I actually built the gtk version of netsurf. The dependencies aren't spelled out very well in the accompanying documentation. So, I relied mainly on the Archlinux PKGBUILD and another Gentoo Ebuild. The dependencies can either be found on slackbuilds.org or on www.netsurf-browser.org.

I'll supply a tarball of the netsurf slackbuild I used if it is of any use. Just remove the .txt extention and it will be a normal tarball. All dependencies are listed in the README.

is it the framebuffer version that freezes from time to time?
Because that's the version I'm really interested in.
On the console I use links. But if I could get a browser
that can handle more modern html (stylesheets, etc.) that
would be nice.

That "the dependencies aren't spelled out very well"
is a nice understatement.

Did you build your version on slackware12.2?

Thanks

larryhaja 08-13-2009 10:40 AM

Quote:

Originally Posted by vonbiber (Post 3641818)
is it the framebuffer version that freezes from time to time?
Because that's the version I'm really interested in.
On the console I use links. But if I could get a browser
that can handle more modern html (stylesheets, etc.) that
would be nice.

Not sure. I've only built the gtk version with the SDL FB frontend. I was underwhelmed by the software, so I never really tested it out. It may be that I just needed to make some tweaks to the software.

Quote:

Originally Posted by vonbiber (Post 3641818)
That "the dependencies aren't spelled out very well" is a nice understatement.

Yes!

Quote:

Originally Posted by vonbiber (Post 3641818)
Did you build your version on slackware12.2?

Yes, I did build mine on Slackware 12.2. Unfortunately, I built it on my stock system instead of a vanilla full install of Slackware 12.2. So, I'm not completely positive that all the dependencies in the README I supplied earlier is a complete list. But It should be enough to get started.

gnashley 08-13-2009 11:55 AM

I pulled everything from SVN:
svn co svn://svn.netsurf-browser.org/trunk/netsurf
# for framebuffer
svn co svn://svn.netsurf-browser.org/trunk/libnsfb
svn co svn://svn.netsurf-browser.org/trunk/libnsbmp
svn co svn://svn.netsurf-browser.org/trunk/libnsgif
svn co svn://svn.netsurf-browser.org/trunk/libparserutils
svn co svn://svn.netsurf-browser.org/trunk/hubbub
svn co svn://svn.netsurf-browser.org/trunk/libharu
# for GTK:
svn co svn://svn.netsurf-browser.org/trunk/libwapcaplet
svn co svn://svn.netsurf-browser.org/trunk/libcss

svn co svn://svn.netsurf-browser.org/trunk/dom

But I found the source mage tarballs also.

vonbiber 08-14-2009 08:26 AM

finally!
 
thank you all
thanks to knudfl's link the wapcaplet libraries
I was able to finally build it on slackware
Then I tried on slax
After a few trials and errors I finally built it
on slax

The thing I don't understand is although I

make TARGET=framebuffer

when I

make install DESTDIR=$PKG

the only binary copied was netsurf (which turned out
to be the gtk version as I found out when I tried
to launch it on the console: how come it built the gtk version
as well as the fb version---what's the use of TARGET=framebuffer
when, obviously it built everything for the linux platform)
Anyway I copied manually nsfb-linux to $PKG/usr/local/bin

and I copied the whole tree below $PKG to / to test it
I wrote a quick html test file with some css code in it
When I opened it with nsfb most of the css was honored
not the a and a:hover though

It looked much nicer than links

After a while I tried to quit. I tried all of these keys:
q ESCAPE Ctrl-C
none worked, tried the mouse
when I tried to switch to another vt none of the
Alt+F[2-6] worked
Eventually it froze and I had to Ctrl-Alt-Del

I think that despite what the version says
(netsurf-2.1-src.tar.gz)
this thing is still alpha

I guess I'll wait for future releases
because it does look promising

gnashley 08-14-2009 12:46 PM

The 'netsurf' which gets installed is just the wrapper which is normally used to run the nsgtk from the source directory.
You have to manually copy the nsfb binary into your package or path. You need to edit the netsurf wrapper so that it starts nsfb after exporting the resources directory. And you need to install the resources needed by the framebuffer version.

I'm posting my src2pkg script for building the package, plus the altered wrapper. You should be able to understand what it is doing, even if you don't use src2pkg.

Code:

#!/bin/bash
## src2pkg script for:        netsurf
## Auto-generated by src2pkg-1.9.9
## src2pkg - Copyright 2005-2009 Gilbert Ashley <amigo@ibilio.org>

SOURCE_NAME='netsurf-9215-20090812.tar.bz2'
ALT_NAME='netsurf'
ALT_VERSION='9215'
# ARCH=''
BUILD='1'
PRE_FIX='usr'
# Any extra options go here:
# EXTRA_CONFIGS=""
PATCHLIST='netsurf-patches/netsurf-old-freetype.diff'
# choose the gtk or framebuffer TARGET
TARGET='framebuffer'
MAKE_COMMAND="make TARGET=$TARGET"
# Optional function replaces configure_source, compile_source, fake_install
# To use, uncomment and write/paste CODE between the {} brackets.
# build() { CODE }

# Get the functions and configs
. /usr/libexec/src2pkg/FUNCTIONS ;

# Execute the named packaging steps:
pre_process
find_source
make_dirs
unpack_source
fix_source_perms
configure_source #
compile_source  # If used, the 'build' function replaces these 3

#fake_install    #

mkdir -p $PKG_DIR/usr/bin
mkdir -p $PKG_DIR/usr/share/netsurf
if [[ $TARGET = "framebuffer" ]] ; then

        cp $SRC_DIR/nsfb $PKG_DIR/usr/bin/
        cp $CWD/netsurf-patches/netsurf $PKG_DIR/usr/bin/
        chmod 755 $PKG_DIR/usr/bin/netsurf
       
        # overwrite installed files with these framebuffer-specific ones
        cp -f $SRC_DIR/framebuffer/res/default.css $PKG_DIR/usr/share/netsurf
    cp -f $SRC_DIR/framebuffer/res/Aliases $PKG_DIR/usr/share/netsurf
    cp -f $SRC_DIR/framebuffer/res/messages $PKG_DIR/usr/share/netsurf
       
        # Options for netsurf
    cat > ${PKG_DIR}/usr/share/netsurf/Options <<EOF
fb_input_devpath:/dev
fb_refresh:60
fb_depth:16
window_width:800
window_height:600
EOF
        find $PKG_DIR/usr/share/netsurf -type f -exec chmod 644 {} \; 2> /dev/null
       
        ####### fonts
    mkdir -p ${PKG_DIR}/usr/share/fonts/truetype/ttf-bitstream-vera
    #cp -a /usr/share/fonts/truetype/ttf-bitstream-vera ${PKG_DIR}/usr/share/fonts/truetype/
        mkdir -p ${PKG_DIR}/usr/share/fonts/truetype/ttf-bitstream-vera
        cp -a /usr/X11R6/lib/X11/fonts/TTF/* ${PKG_DIR}/usr/share/fonts/truetype/ttf-bitstream-vera
       
else
        cp $SRC_DIR/nsgtk $PKG_DIR/usr/bin/netsurf
        # use cp -aL to copy recursively while dereferencing the links
        cp -aL $SRC_DIR/gtk/res/* $PKG_DIR/usr/share/netsurf
        find $PKG_DIR/usr/share/netsurf -name "*.svn" -exec rm -rf {} \; 2> /dev/null
        find $PKG_DIR/usr/share/netsurf -type f -exec chmod 644 {} \; 2> /dev/null
fi

fix_pkg_perms
strip_bins
create_docs
compress_man_pages
make_description
make_doinst
make_package
post_process

'/usr/bin/netsurf' wrapper:
Code:

#!/bin/sh
# This file is part of NetSurf, http://netsurf-browser.org/
# Licensed under the GNU General Public License,
#                http://www.opensource.org/licenses/gpl-license
# Copyright 2007 Rob Kendrick <rjek@netsurf-browser.org>

if [ -d ~/.netsurf ]; then
  LOG=~/.netsurf/log.txt
elif [ -d /tmp ]; then
  LOG=/tmp/netsurf-log.txt
else
  LOG=netsurf-log.txt
fi

NETSURFRES=/usr/share/netsurf
export NETSURFRES
exec `dirname $0`/nsfb "$@" 2>$LOG

You'll need to change the path to the truetype fonts if you are running a recent Slackware version, or you can edit the Makefile.defaults to not use TTF or to use an internal version.

Note that the src2pkg script can be used to build the gtk version, but it needs more stuff installed as resources under /usr/share/netsurf.

vonbiber 08-15-2009 07:35 AM

Quote:

Originally Posted by gnashley (Post 3643388)
The 'netsurf' which gets installed is just the wrapper which is normally used to run the nsgtk from the source directory.
You have to manually copy the nsfb binary into your package or path. You need to edit the netsurf wrapper so that it starts nsfb after exporting the resources directory. And you need to install the resources needed by the framebuffer version.
[/CODE]

I did notice the presence of the wrapper in the source directory
after the binaries were built, and along nsfb-linux and nsgtk

the make install DESTDIR=$PKG

just copied nsgtk and renamed it netsurf

So I guess I definitely need to copy manually the files
to $PKG

Quote:

You'll need to change the path to the truetype fonts if you are running a recent Slackware version, or you can edit the Makefile.defaults to not use TTF or to use an internal version.
I just used their version.
But now that it builds ok, I'll try your TTF tip

Quote:

Note that the src2pkg script can be used to build the gtk version, but it needs more stuff installed as resources under /usr/share/netsurf.
I'm not interested in the gtk version, just the framebuffer

Thanks for your tips gnashley

thrashingbleat 08-15-2009 08:35 AM

You're invoking make with the framebuffer target when you compile, but you're not when you install. Unless you tell it, it defaults to the GTK version on linux.

So for the framebuffer version:

make TARGET=framebuffer
make TARGET=framebuffer install
make TARGET=framebuffer clean

etc.

When you did 'make install', it would have built and installed the GTK version.

vonbiber 08-15-2009 08:45 AM

Quote:

Originally Posted by thrashingbleat (Post 3644305)
You're invoking make with the framebuffer target when you compile, but you're not when you install. Unless you tell it, it defaults to the GTK version on linux.

So for the framebuffer version:

make TARGET=framebuffer
make TARGET=framebuffer install
make TARGET=framebuffer clean

etc.

When you did 'make install', it would have built and installed the GTK version.

I was just wondering about that.
I'll try that first before copying manually

Thanks for the tip

Hannes Worst 08-15-2009 03:27 PM

Netsurf for Slackware
 
I use Netsurf in Slackware 12.2. I took it from the 'Slacky.eu' repos. I think it's a wonderfull peace of work for such a small package. It's used in Puppy Linux too, I found it on their forum. Only the bookmarks aren't working on my Linux-box, but I use the 'global history' for surfin'. Good luck with your Slax-project!


All times are GMT -5. The time now is 11:42 AM.