loaders: JPG: Fix bussy loop on corrupted file.
[gfxprim.git] / doc / compilation.txt
blob576e59c131e063d2ee72a19ecd7d6836a596b811
1 Dependencies
2 ------------
4 *Base dependencies*
6 * C compiler (tested with link:http://gcc.gnu.org/[gcc] and
7   link:http://clang.llvm.org/[clang])
8 * link:https://www.gnu.org/software/make/[GNU make]
9 * link:https://www.python.org/[Python] (2.6 or newer)
11 *Optional Image loaders*
13 * libjpeg
14 * link:http://www.libpng.org/[libpng]
15 * link:http://sourceforge.net/projects/giflib/[giflib]
16 * link:http://www.remotesensing.org/libtiff/[libtiff]
17 * link:http://code.google.com/p/openjpeg/[openjpeg] >= 2.0.0
18 * link:http://www.zlib.net/[zlib] (usually installed as libpng dependency)
20 *Optinal Text rendering*
22 * link:http://www.freetype.org/[FreeType]
24 *Optional Backends*
26 * X11
27 * link:http://aa-project.sourceforge.net/aalib/[AA-lib]
28 * link:http://www.libsdl.org/[SDL] 1.2
29   (not recomended, known to be slow and buggy)
31 *Python Bindings*
33 * link:http://www.swig.org/[Swig]
34 * Python (devel library)
36 Compilation
37 -----------
39 Once devel packages are installed the compilation is as simple as running
40 +configure+ and +make+.
42 NOTE: The 'configure' script is written in 'Python'.
44 .Compilation
45 -------------------------------------------------------------------------------
46 gfxprim # ./configure
47 ...
49 gfxprim # make
50 -------------------------------------------------------------------------------
52 TIP: GFXprim supports proper parallel build, you most likely want to add
53      the '-j' with number of your processors + 1 as a parameter to the 'make'.
56 .Installation
57 -------------------------------------------------------------------------------
58 gfxprim # make install
59 -------------------------------------------------------------------------------
61 The +make install+ command will install GFXprim libraries and devel headers
62 into your system.
64 OpenSUSE & Fedora
65 ~~~~~~~~~~~~~~~~~
67 Instruction to install required packages on
68 link:http://www.opensuse.org/[OpenSUSE].
70 Works for link:http://www.fedoraproject.org/[Fedora] too if you substitute
71 +zypper in+ with +yum install+.
73 .Install basic tools
74 -------------------------------------------------------------------------------
75 zypper in gcc make
76 -------------------------------------------------------------------------------
78 .Install image devel libraries
79 -------------------------------------------------------------------------------
80 zypper in libjpeg-devel libpng-devel giflib-devel libtiff-devel
81 -------------------------------------------------------------------------------
83 .Install FreeType devel library
84 -------------------------------------------------------------------------------
85 zypper in freetype-devel
86 -------------------------------------------------------------------------------
88 .Install X11 devel library
89 -------------------------------------------------------------------------------
90 zypper in libX11-devel libXext-devel
91 -------------------------------------------------------------------------------
93 .Install swig
94 -------------------------------------------------------------------------------
95 zypper in swig python-devel
96 -------------------------------------------------------------------------------
98 .All in the one for the lazy
99 -------------------------------------------------------------------------------
100 zypper in gcc make libjpeg-devel libpng-devel giflib-devel libtiff-devel
101           freetype-devel libX11-devel libXext-devel swig python-devel
102 -------------------------------------------------------------------------------
104 Debian
105 ~~~~~~
107 Instruction to install required packages on link:http://www.debian.org[Debian]
108 and other Debian based distributions.
110 .Install basic tools
111 -------------------------------------------------------------------------------
112 apt-get install gcc make
113 -------------------------------------------------------------------------------
115 .Install image devel libraries
116 -------------------------------------------------------------------------------
117 apt-get install libjpeg-dev libpng-dev libgif-dev libtiff-dev
118 -------------------------------------------------------------------------------
120 .Install FreeType devel library
121 -------------------------------------------------------------------------------
122 apt-get install libfreetype6-dev
123 -------------------------------------------------------------------------------
125 .Install X11 devel library
126 -------------------------------------------------------------------------------
127 apt-get install libx11-dev libxext-dev
128 -------------------------------------------------------------------------------
130 .Install swig
131 -------------------------------------------------------------------------------
132 apt-get install swig python-dev
133 -------------------------------------------------------------------------------
135 .All in the one for the lazy
136 -------------------------------------------------------------------------------
137 apt-get install gcc make libjpeg-dev libpng-dev libgif-dev libtiff-dev
138                 libfreetype6-dev libx11-dev libxext-dev swig python-dev
139 -------------------------------------------------------------------------------
141 Packages
142 --------
146 RPM packages as well as specfile are available in
147 link:https://build.opensuse.org/package/show/home:metan/gfxprim[build service].
151 Deb packages can be build from the GFXprim source (after installing necessary
152 devel packages) by:
154 .Building debian packages
155 -------------------------------------------------------------------------------
156 # apt-get install devscripts
157 # cd gfxprim
158 # debuild -i -us -uc
159 -------------------------------------------------------------------------------
161 Gentoo
162 ~~~~~~
163 GFXprim source contains ebuild in 'gentoo/' directory.