summaryrefslogtreecommitdiff
path: root/Docs/BUILDING-AmigaOS
blob: 6eb8a3bb41539e003b527ee123e8558e626deb1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
--------------------------------------------------------------------------------
  Build Instructions for AmigaOS NetSurf                      13 February 2010
--------------------------------------------------------------------------------

  This document provides instructions for building the AmigaOS version of
  NetSurf and provides guidance on obtaining NetSurf's build dependencies.

  AmigaOS NetSurf has been tested on AmigaOS 4.0 July 2007 Update and AmigaOS
  4.1.  It will require modification for AmigaOS 3.9 or earlier, or other
  Amiga-like platforms.

  AmigaOS NetSurf will build against newlib by default, building against
  clib2 has not been tested.


  Building and executing NetSurf
================================

  First of all, you should examine the contents of Makefile.defaults
  and enable and disable relevant features as you see fit by creating
  a Makefile.config.  Some of these options can be automatically
  detected and used, although it is better to explicitly enable or
  disable options.
  
  You should then obtain NetSurf's dependencies, keeping in mind which options
  you have enabled in the configuration file.  See the next section for
  specifics.
  
  Once done, to build AmigaOS NetSurf on OS4, simply run:

      1> gmake

  If that produces errors, you probably don't have some of NetSurf's build
  dependencies installed. See "Obtaining NetSurf's dependencies" below, or turn
  off the complaining features in a Makefile.config.

  Running NetSurf from the build tree requires some setup:

      1> makelink resources amiga/resources force
      1> copy amiga/resources/themes/default/NetSurf.info NetSurf.info

  It should then be possible to run NetSurf by executing NetSurf from the
  Shell or by double-clicking on the icon.


  Obtaining NetSurf's build dependencies
========================================

  Many of NetSurf's dependencies are included with the OS4 SDK or available
  from Aminet or OS4Depot.  The remainder must be built manually.

  The NetSurf project's libraries
---------------------------------

  The NetSurf project has developed several libraries which are required by
  the browser.  To fetch each of these libraries, run the following commands:

      $ svn co svn://svn.netsurf-browser.org/trunk/libparserutils
      $ svn co svn://svn.netsurf-browser.org/trunk/libwapcaplet
      $ svn co svn://svn.netsurf-browser.org/trunk/hubbub
      $ svn co svn://svn.netsurf-browser.org/trunk/libcss
      $ svn co svn://svn.netsurf-browser.org/trunk/libnsgif
      $ svn co svn://svn.netsurf-browser.org/trunk/libnsbmp
      $ svn co svn://svn.netsurf-browser.org/trunk/librosprite
      $ svn co svn://svn.netsurf-browser.org/trunk/libsvgtiny

  To build and install these libraries, simply enter each of their directories
  and run:
  
      1> gmake install

  | Note: We advise enabling ivonv() support in libparserutils, which vastly
  |       increases the number of supported character sets.  To do this,
  |       create a file called Makefile.config.override in the libparserutils
  |       directory, containing the following line:
  |
  |           CFLAGS += -DWITH_ICONV_FILTER
  |
  |       For more information, consult the libparserutils README file.

  | Note: Building libsvgtiny requires gperf, which is available from Aminet:
  |
  |           http://www.aminet.net/package/dev/c/gperf


  cURL
------

  A version of libcurl built for newlib is available from Aminet

      http://www.aminet.net/package/dev/lib/libcurl

  There is a shared object version included with some OWB releases.  To use
  this when compiling with Cairo support, a link must be made:

      1> makelink sdk:local/newlib/lib/libcurl.so sobjs:libcurl-7.16.so soft


  libmng
--------

  NetSurf uses libMNG to display MNG and PNG files.
  It builds without any problems on OS4, or available from Aminet:

      http://www.aminet.net/package/dev/lib/libmng_so


  libxml2
---------

  libxml2 is available from Aminet:

      http://www.aminet.net/package/dev/lib/libxml2

  The shared object version included with OS4.1 does work with NetSurf,
  however the "ELF QuickFix" must be installed from Hyperion's website.

  The shared object can then be enabled with the following command:

      1> makelink sdk:local/newlib/lib/libxml2.so sobjs:libxml2-2.6.so soft


  OpenSSL
---------

  NetSurf uses OpenSSL for encrypted transfers.

      http://www.os4depot.net/share/development/library/misc/libopenssl.lha

  There is a shared object version included with some OWB releases.  To use
  this when compiling with Cairo support, a link must be made:

      1> makelink sdk:local/newlib/lib/libssl.so sobjs:libssl-0.9.8.so soft
      1> makelink sdk:local/newlib/lib/libcrypto.so sobjs:libssl-0.9.8.so soft


  Libhpdf
---------

  NetSurf can use Haru PDF to enable PDF export and printing in GTK.  This
  is currently enabled by default, and cannot be auto-detected by the Makefile.
  If you wish to disable it, do so by creating a Makefile.config.

  Haru PDF can be obtained from http://libharu.sourceforge.net/, although we
  currently depend on features that the official version does not have.  You
  can obtain our patched version from the following Subversion address until
  the patches are accepted upstream;

      svn://svn.netsurf-browser.org/trunk/libhpdf


  libregex
----------

  A version of the regular expression library can be obtained from Aminet:

      http://www.aminet.net/package/dev/lib/libregex-4.4.3


  openurl.library
-----------------

  The AmigaOS mailto: URL support uses openurl.library, this and the includes
  can be obtained from Aminet:

      http://www.aminet.net/package/comm/www/OpenURL-OS4


  General requirements
----------------------

  SDK:newlib/include/strings.h needs to be modified by adding the following:

      extern int strcasecmp(const char *, const char *);
      extern int strncasecmp(const char *, const char *, size_t);

  amiga/version.c is generated by version.rexx using the SVN command.  If
  the source has not been checked out from SVN, or is being cross-compiled,
  this file will need to be created by hand.  See the end of version.rexx
  for the variables that are defined in the file.

  Please note that building with Cairo (option NETSURF_AMIGA_USE_CAIRO) will
  link NetSurf against shared objects, and require the OS4.1 SDK to build and
  AmigaOS 4.1 to run.