~ubuntu-branches/ubuntu/precise/ipe/precise

« back to all changes in this revision

Viewing changes to install.txt

  • Committer: Bazaar Package Importer
  • Author(s): Steve M. Robbins
  • Date: 2009-12-11 21:22:35 UTC
  • mfrom: (4.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20091211212235-5iio4nzpra64snab
Tags: 7.0.10-1
* New upstream.  Closes: #551192.
  - New build-depends: libcairo2-dev, liblua5.1-0-dev, gsfonts
  - patches/config.diff: Remove.  Upstream build system replaced.
  - Runtime lib package changed to libipe7.0.10 from libipe1c2a
  - Devel package renamed to libipe-dev (from libipe1-dev)
  - Package ipe depends on lua5.1 due to ipe-update-master.

* rules: Re-write to use dh.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
            Building and installing Ipe on Unix
3
3
--------------------------------------------------------------------
4
4
 
 
5
Quickstart
 
6
----------
 
7
 
 
8
If you have a recent Ubuntu or Debian system, the following steps
 
9
should compile and install Ipe into /usr/local:
 
10
(Note that Ubuntu 8.04 Hardy is NOT recent, and you'll need to compile
 
11
recent versions of Cairo and Qt to get Ipe to work on Hardy.)
 
12
 
 
13
    sudo apt-get install zlib1g-dev libqt4-dev
 
14
    sudo apt-get install libfreetype6-dev libcairo2-dev 
 
15
    sudo apt-get install liblua5.1-0-dev gsfonts
 
16
    cd src
 
17
    make IPEPREFIX=/usr/local
 
18
    sudo make install IPEPREFIX=/usr/local
 
19
    sudo cp ../fontmaps/gsfonts-fontmap.xml \
 
20
            /usr/local/share/ipe/7.x.y/fontmap.xml
 
21
    sudo ldconfig
 
22
 
 
23
Where 7.x.y has to be replaced by the current Ipe version.
 
24
The last line (ldconfig) may not be necessary, but can't hurt either.
 
25
 
 
26
If you do not have such a system or this doesn't work for you, please
 
27
read on!
 
28
 
 
29
--------------------------------------------------------------------
 
30
 
 
31
 
5
32
Required components
6
33
-------------------
7
34
 
8
35
Before you can compile Ipe, you will need to have the following tools
9
36
and libraries:
10
37
 
11
 
 * The Qt toolkit
12
 
 
13
 
   You need to have version 4.2.0 or higher. Make sure you not only
14
 
   have the runtime libraries but the development package as well.
15
 
 
16
 
   Linux distributions provide both Qt 3 (packages 'qt' and
17
 
   'qt-devel') and Qt 4 (packages 'qt4' and 'qt4-devel').  Ipe
18
 
   requires at least Qt 4.2.
19
 
   
20
 
   You can also install Qt 4.2 from sources available at
21
 
   "www.trolltech.com".
22
 
 
23
 
   The Ipe build process relies on "qmake", a Makefile-generation tool
24
 
   that is part of Qt.  You will need the version of qmake that comes
25
 
   with Qt 4.2.  On Fedora and probably other Linux distributions, the
26
 
   program is called "qmake-qt4" (and "qmake" is the one from Qt 3).
27
 
   If "qmake" is not on your path, check your Qt installation for its
28
 
   location, and add it to your path.
 
38
 * GNU make
 
39
 
 
40
   The Ipe makefiles are written for GNU make.  A Linux system will
 
41
   already have it.  On other Unix systems, GNU make is often
 
42
   installed as 'gmake'.  Otherwise, install it yourself from
 
43
   www.gnu.org. Other "make" implementations will not work!
29
44
 
30
45
 * The compression library 'zlib'
31
46
 
35
50
 
36
51
 * The font library 'Freetype 2'
37
52
 
38
 
   On Linux, you most likely already have this on your system.
39
 
   Otherwise, you can probably install it as a binary package.  If
40
 
   not, install from the sources at "www.freetype.org".
41
 
 
42
 
   Make sure your version of Freetype is at least 2.0.8.  Ipe will not
43
 
   compile with earlier versions.  Also, Freetype versions 2.1.6 to
44
 
   2.1.7 contain a bug that stops Ipe from working.  Freetype 2.1.8
45
 
   works fine.
46
 
 
47
 
   Freetype can be one of the problematic parts of installing Ipe.  If
48
 
   compiling Ipe is successfull, but when running it, only empty boxes
49
 
   are displayed instead of text, you very probably have a problem
50
 
   with Freetype.  If you compile a new version of Freetype for Ipe,
51
 
   be careful that Ipe uses header files and library from the same
52
 
   version.  Ipe detects when header files and libary version do not
53
 
   match and will tell you as soon as it tries to display any text.
 
53
   On Linux, you most likely already have this on your system.  You
 
54
   will need the development package (on Debian/Ubuntu, this is
 
55
   "libfreetype6-dev").  
 
56
 
 
57
   On Mac OS 10.6, install via MacPorts.
 
58
 
 
59
   The original sources are at "www.freetype.org".  You need version
 
60
   2.1.8 or newer.
 
61
 
 
62
 * The Cairo library (version 1.8.0 or higher)
 
63
 
 
64
   The Gnome desktop uses this high-quality rendering library, so you
 
65
   may already have it.  You will need the development package,
 
66
   e.g. on Debian/Ubuntu "libcairo2-dev".  
 
67
 
 
68
   On Mac OS 10.6, install via MacPorts.
 
69
 
 
70
   You can also install from sources at "www.cairographics.org".  If
 
71
   you compile Cairo yourself, note that you only need the image and
 
72
   svg surfaces (backends).  You also need freetype support, but no
 
73
   fontconfig (Cairo 1.8 does not support freetype without fontconfig,
 
74
   but 1.10 will).  Since Ipe does not need any platform-dependent
 
75
   backends, Cairo should compile fine on any platform.  
 
76
 
 
77
 * The Lua language
 
78
 
 
79
   Lua is an embeddable scripting language. On Debian/Ubuntu, install
 
80
   "liblua5.1-0-dev".  Or compile from source at "www.lua.org" - the
 
81
   sources are ANSI C and compile very easily.  Ipe requires Lua 5.1.
 
82
 
 
83
   On Mac OS 10.6, install via MacPorts.
 
84
 
 
85
 * The Qt toolkit (version 4.4 or higher)
 
86
 
 
87
   On Linux, you most likely already have it, otherwise you can find
 
88
   the sources at "qt.nokia.com".  You only need the QtCore and
 
89
   QtGui libraries.  On Debian/Ubuntu, you would need "libqt4-dev".
 
90
 
 
91
   If possible, use Qt 4.5 or higher.  Ipe compiles with Qt 4.4, but
 
92
   there is at least one problem: shortcuts consisting of a letter
 
93
   only (e.g. "d" for "duplicate") do not work.  Ipe does not compile
 
94
   with Qt 4.3 or earlier.
 
95
 
 
96
   On MacOS 10.6, install Qt 4.6 cocoa binaries.
54
97
 
55
98
 * The 14 standard Postscript fonts
56
99
 
59
102
   the PDF file. Still, Ipe needs access to the font to display it on
60
103
   the screen, and that's why you need to provide these 14 font files.
61
104
 
62
 
   The fonts are probably already on your system, for instance in
63
 
   subdirectories of "/usr/share/texmf/fonts/type1/urw", under the
64
 
   names
 
105
   The path of least resistance would be to download the fonts as
 
106
   "urw-fonts.zip" from the same place where you got Ipe.  Use the
 
107
   supplied file "urw-fontmap.xml" as the fontmap for these fonts (see
 
108
   below for installation of the fontmap).
 
109
 
 
110
   However, very likely you have these fonts already on your system,
 
111
   for instance in "/usr/share/fonts/type1/gsfonts/" under the names:
 
112
 
 
113
   n019003l.pfb n019004l.pfb n019023l.pfb n019024l.pfb n021003l.pfb
 
114
   n021004l.pfb n021023l.pfb n021024l.pfb n022003l.pfb n022004l.pfb
 
115
   n022023l.pfb n022024l.pfb s050000l.pfb d050000l.pfb
 
116
 
 
117
   Identical fonts may also be in subdirectories of
 
118
   "/usr/share/texmf/fonts/type1/urw" or
 
119
   "/usr/share/texmf-texlive/fonts/type1/urw", under the names
65
120
   
66
121
   ucrb8a.pfb ucrbo8a.pfb ucrr8a.pfb ucrro8a.pfb uhvb8a.pfb
67
122
   uhvbo8a.pfb uhvr8a.pfb uhvro8a.pfb usyr.pfb utmb8a.pfb utmbi8a.pfb
68
123
   utmr8a.pfb utmri8a.pfb uzdr.pfb
69
124
 
70
 
   Identical fonts may also be in "/usr/share/fonts/default/Type1"
71
 
   under the following names:
72
 
 
73
 
   n019003l.pfb n019004l.pfb n019023l.pfb n019024l.pfb n021003l.pfb
74
 
   n021004l.pfb n021023l.pfb n021024l.pfb n022003l.pfb n022004l.pfb
75
 
   n022023l.pfb n022024l.pfb s050000l.pfb d050000l.pfb
76
 
 
77
125
   Your system may have a fontmap file describing all the fonts on the
78
 
   system in XML-format, similar to the supplied file
79
 
   "tetex-fontmap.xml".  If so, Ipe can directly read this file and
80
 
   find the fonts, and all you need to do is to provide the path to
81
 
   the fontmap.
82
 
 
83
 
   If not, the supplied "tetex-fontmap.xml" may already be correct, if
84
 
   you have a standard teTeX installation (most Linux distributions
85
 
   do).  If not, you can check for the location of the necessary
86
 
   files, and create your own fontmap.  If you use relative paths in
87
 
   the fontmap, they are interpreted relative to the directory
88
 
   containing the fontmap file.
89
 
 
90
 
   Finally, you can take the path of least resistance, and download
91
 
   "urw-fonts.zip" from the same place where you got Ipe.  The
92
 
   supplied "urw-fontmap.xml" works for these fonts unchanged.
93
 
 
94
 
 * 'Pdflatex'
 
126
   system in XML-format, similar to the supplied files
 
127
   "gsfonts-fontmap.xml" and "texlive-fontmap.xml".  If so, Ipe can
 
128
   directly read this file and find the fonts, and all you need to do
 
129
   is to provide the path to the fontmap.
 
130
 
 
131
   If not, one of the supplied fontmaps may already be correct.  On
 
132
   Debian/Ubuntu, "gsfonts-fontmap.xml" should be correct if you have
 
133
   the "gsfonts" package installed.
 
134
 
 
135
   Otherwise you can check for the location of the necessary files,
 
136
   and create your own fontmap.  If you use relative paths in the
 
137
   fontmap, they are interpreted relative to the directory containing
 
138
   the fontmap file.
 
139
 
 
140
 * Pdflatex
95
141
 
96
142
   Ipe uses Pdflatex, a PDF-producing version of Latex, to convert
97
143
   Latex source code to Postscript/PDF.  Every modern TeX installation
98
144
   includes it.
99
145
 
 
146
   Ipe likes Pdftex 1.40.  If you have an earlier version of Pdftex,
 
147
   set the environment variable IPEANCIENTPDFTEX when running Ipe.
 
148
 
100
149
 
101
150
Configuring and building Ipe
102
151
----------------------------
103
152
 
104
153
There are some pieces of information you need to provide to the Ipe
105
 
build process by editing "src/config.pri".
106
 
 
107
 
If your Freetype include files (check for "ft2build.h") and library
108
 
("libfreetype.so") are not on the standard path, add the correct
109
 
paths.  Note that many Linux distributions have a somewhat weird,
110
 
historically grown Freetype setup.  Although "ft2build.h" is in
111
 
"/usr/include", you still need to add "/usr/include/freetype2" to your
112
 
include path.  If your system has a directory "usr/include/freetype2",
113
 
this is probably the case on your system.
114
 
 
115
 
If your Zlib include file ("zlib.h") and library ("libz.so") are not
116
 
on the standard path, add the correct paths.
117
 
 
118
 
Finally, define the Ipe directory structure.  Normally, you would only
119
 
have to define IPEPREFIX properly, depending on where you want 
120
 
Ipe to be installed.  
 
154
build process by editing "src/config.mak" (in many cases you can also
 
155
just give the definitions on the make command line, see below).
 
156
 
 
157
You first have to indicate the location of the required components
 
158
listed above.  On Linux, you probably have a correctly working
 
159
pkg-config script, and the default settings should work.
 
160
 
 
161
Second, you have to define the Ipe directory structure.  Normally, you
 
162
would only need to define IPEPREFIX properly, depending on where you
 
163
want Ipe to be installed.
121
164
 
122
165
Indicate in IPEFONTMAP the path for "fontmap.xml" (if you are using a
123
166
system fontmap, indicate the correct path; if you are using/making one
124
167
specifically for Ipe place the fontmap in this location).
125
168
 
126
 
Indicate in IPEBROWSER the program you wish to use for viewing the
127
 
on-line manual.  The user can later override all these definitions
128
 
using environment variables.
129
 
 
130
 
These steps will build Ipe:
 
169
These steps will then build Ipe:
131
170
 
132
171
     cd src
133
 
     qmake
134
172
     make
135
173
     make install
136
174
 
137
 
You may have to use "qmake-qt4" instead of "qmake" (see above).  You
138
 
may need to do "make install" as root (depending on whether you have
139
 
write permission to the installation location).
 
175
Instead of editing "src/config.mak", you can also set the variables in
 
176
the make call, e.g.:
 
177
 
 
178
    cd src
 
179
    make IPEPREFIX=/usr IPEFONTMAP=/etc/ipe/fontmap.xml
 
180
    sudo make install IPEPREFIX=/usr
 
181
 
 
182
You may need to do "make install" as root (depending on whether you
 
183
have write permission to the installation location).
 
184
 
 
185
 
 
186
Installing a fontmap
 
187
--------------------
140
188
 
141
189
If you have made a "fontmap.xml" for Ipe, move it into the location
142
 
you specified in "config.pri".  In case you are using "urw-fonts.zip",
 
190
you specified in "config.mak".  In case you are using "urw-fonts.zip",
143
191
move "urw-fontmap.xml" to "IPEPREFIX/share/ipe/IPEVERS/fontmap.xml",
144
192
and unpack the 14 fonts from "urw-fonts.zip" into
145
193
"IPEPREFIX/share/ipe/IPEVERS/fonts" (assuming you haven't changed the
146
194
standard definition of IPEFONTMAP).  Note that "make install" DOES NOT
147
 
install any fontmap -- you have to do this one step manually.
148
 
 
149
 
Note that the Ipe library is a shared library, and so your dynamic
150
 
linker has to find "libipe.so.*".  If you have chosen a standard
151
 
library directory for IPELIBDIR, saying "ldconfig" (as superuser) will
152
 
be enough to run Ipe.
153
 
 
154
 
If you installed in a different location, such as "/opt/ipe-6.0", you
 
195
install any fontmap - you have to do this one step manually.
 
196
 
 
197
 
 
198
Dynamic linking
 
199
---------------
 
200
 
 
201
The Ipe libraries are shared libraries, and so your dynamic linker has
 
202
to find "libipe*.so".  If you have chosen a standard library directory
 
203
for IPELIBDIR, saying "sudo ldconfig" will be enough to run Ipe.
 
204
 
 
205
If you installed in a different location, such as "/opt/ipe-7.0", you
155
206
can make a small script called "ipe" like the following, and put it in
156
207
your path:
157
208
 
158
209
#!/bin/sh
159
 
export LD_LIBRARY_PATH="/opt/ipe-6.0/lib/:$LD_LIBRARY_PATH"
160
 
/opt/ipe-6.0/bin/ipe $* &
 
210
export LD_LIBRARY_PATH="/opt/ipe-7.0/lib/:$LD_LIBRARY_PATH"
 
211
/opt/ipe-7.0/bin/ipe $* &
161
212
 
162
213
Alternatively, you could put links to the library in a standard
163
 
location (as superuser):
164
 
 
165
 
    ln -f -s IPELIBDIR/lib* /usr/lib
166
 
    ldconfig
167
 
 
168
 
Another alternative is to add IPELIBDIR to your system's standard
169
 
library path, usually by editing "/etc/ld.so.conf" and running
170
 
"ldconfig".
 
214
location:
 
215
 
 
216
    sudo ln -f -s IPELIBDIR/lib* /usr/lib
 
217
    sudo ldconfig
 
218
 
 
219
 
 
220
 
 
221
Setting up the Lua "ipe" module
 
222
-------------------------------
 
223
 
 
224
Ipe comes with a module that allows you to open Ipe documents and
 
225
modify their contents from the Lua language.  If you wish to write or
 
226
use Lua scripts that do this, you should setup Lua so that the Lua
 
227
line
 
228
 
 
229
require "ipe" 
 
230
 
 
231
will load the Ipelib bindings into Lua.   This is done by placing a
 
232
DLL called "ipe.so" onto the Lua C search path.  The following command
 
233
will print out this search path:
 
234
 
 
235
lua -e "print(package.cpath)"
 
236
 
 
237
Place a symbolic link to the library "libipelua.so" that you built
 
238
earlier on this path, but with the name "ipe.so".  For instance, if
 
239
Ipe was installed into /usr/local, the link could be:
 
240
 
 
241
ln -s /usr/local/lib/libipelua.so /usr/local/lib/lua/5.1/ipe.so
171
242
 
172
243
--------------------------------------------------------------------