Imported Upstream version 0.20.2
[platform/upstream/gettext.git] / HACKING
1 All you need to know when hacking (modifying) GNU gettext or when building
2 it off the git repository.
3
4
5 Requirements
6 ============
7
8 You will need reasonably recent versions of the build tools:
9
10   * A C compiler; on Cygwin or mingw also a C++ compiler. Such as GNU GCC.
11     + Homepage:
12       https://gcc.gnu.org/
13
14   * GNU automake 1.13 or newer
15     + Homepage:
16       https://www.gnu.org/software/automake/
17
18   * GNU autoconf
19     + Homepage:
20       https://www.gnu.org/software/autoconf/
21
22   * GNU m4
23     + Homepage:
24       https://www.gnu.org/software/m4/
25
26   * GNU bison 3.0 or newer
27     + Homepage:
28       https://www.gnu.org/software/bison/
29
30   * GNU gperf
31     + Homepage:
32       https://www.gnu.org/software/gperf/
33
34   * GNU groff 1.17 or newer
35     + Homepage:
36       https://www.gnu.org/software/groff/
37
38   * GNU texinfo
39     + Homepage:
40       https://www.gnu.org/software/texinfo/
41
42   * GNU emacs or XEmacs
43     + Homepage:
44       https://www.gnu.org/software/emacs/
45       https://www.xemacs.org/
46
47   * Perl
48     + Homepage:
49       https://www.perl.org/
50
51   * TeX (for making the doc in .dvi, .ps or .pdf format)
52     + Homepage:
53       https://tug.org/teTeX/
54
55   * Either an internet connection or a recent copy of GNU gnulib.
56     + Homepage:
57       https://www.gnu.org/software/gnulib/
58
59   * GNU tar (for creating distributable tarballs)
60     + Homepage:
61       https://www.gnu.org/software/tar/
62
63   * GNU Wget
64     + Homepage:
65       https://www.gnu.org/software/wget/
66
67   * XZ Utils
68     + Homepage:
69       https://tukaani.org/xz/
70
71   * Lzip
72     + Homepage:
73       https://www.nongnu.org/lzip/
74
75 And, of course, the packages listed in the DEPENDENCIES file.
76
77
78 Additional requirements for maintainers
79 ---------------------------------------
80
81 If you are a maintainer, you will want to minimize the number of tests that
82 are skipped. To this effect, you need to install also:
83
84   * A C++ compiler
85     + Homepage: https://gcc.gnu.org/
86     + Ubuntu package: g++
87   * An Objective C compiler
88     + Homepage: https://gcc.gnu.org/
89     + Ubuntu package: gobjc
90
91   * Python
92     + Homepage: https://www.python.org/
93     + Ubuntu package: python
94
95   * GNU clisp
96     + Homepage: http://clisp.org/
97     + Ubuntu package: clisp
98
99   * librep
100     + Homepage: http://librep.sourceforge.net/
101     + Ubuntu package: rep
102
103   * GNU guile
104     + Homepage: https://www.gnu.org/software/guile/
105     + Ubuntu package: guile-2.0
106
107   * GNU smalltalk
108     + Homepage: http://smalltalk.gnu.org/
109     + Ubuntu package: gnu-smalltalk
110
111   * A Java compiler
112     + Homepage: http://openjdk.java.net/
113     + Ubuntu package: default-jdk
114
115   * A C# compiler
116     + Homepage: https://www.mono-project.com/
117     + Ubuntu package: mono-mcs
118
119   * GNU awk
120     + Homepage: https://www.gnu.org/software/gawk/
121     + Ubuntu package: gawk
122
123   * The Free Pascal compiler ppc386 or ppcx64
124     + Homepage: https://www.freepascal.org/
125     + Ubuntu package: fp-compiler
126   * The Free Pascal Free Component Library
127     + Homepage: https://www.freepascal.org/fcl/fcl.var
128     + Ubuntu package: fp-units-fcl
129
130   * Tcl
131     + Homepage: https://www.tcl.tk/
132     + Ubuntu package: tcl
133
134   * Perl
135     + Homepage: https://www.perl.org/
136     + Ubuntu package: perl
137   * The Perl packages Locale::Messages and libintl-perl
138     + Homepage: http://search.cpan.org/~guido/libintl-perl/
139     + Ubuntu package: libintl-perl
140
141   * php
142     + Homepage: http://www.php.net/
143     + Ubuntu package: php
144
145   * lua
146     + Homepage: https://www.lua.org/
147     + Ubuntu package: lua5.2 or lua5.1
148   * The lua-gettext package
149     + Homepage: https://gitlab.com/sukhichev/lua-gettext/blob/master/README.us.md
150     + Debian and Ubuntu packages:
151       Download, then install through
152       $ sudo dpkg -i lua-gettext_0.0_amd64.deb
153
154   * The GNOME/Mozilla JavaScript interpreter
155     + Homepage: https://wiki.gnome.org/Projects/Gjs
156     + Ubuntu packages: gjs gir1.2-gtk-3.0
157
158   * The GNOME Vala compiler
159     + Homepage: https://wiki.gnome.org/Projects/Vala
160     + Ubuntu package: valac
161
162 If you want to exercise the sample programs in gettext-tools/examples/, you
163 also need to install:
164
165   * The Qt GUI toolkit library
166     + Homepage: https://www.qt.io/
167     + Ubuntu package: libqt4-dev
168
169   * The wxWidgets GUI toolkit library
170     + Homepage: https://www.wxwidgets.org/
171     + Ubuntu package: libwxgtk3.0-dev
172
173   * The GNUstep toolkit and development environment
174     + Homepage: http://www.gnustep.org/
175     * Ubuntu package: gnustep-devel
176
177   * The C# System.Windows.Forms implementation
178     + Homepage: https://www.mono-project.com/
179     + Ubuntu package: libmono-system-windows-forms4.0-cil
180
181 And you need to install a couple of locales, used by the tests.
182 By default, only those enabled in /etc/locale.gen are preinstalled.
183
184 $ sudo localedef -i de_DE -f ISO-8859-1 de_DE.ISO-8859-1
185 $ sudo localedef -i de_DE -f UTF-8 de_DE.UTF-8
186 $ sudo localedef -i fa_IR -f UTF-8 fa_IR
187 $ sudo localedef -i fr_FR -f ISO-8859-1 fr_FR.ISO-8859-1
188 $ sudo localedef -i fr_FR -f UTF-8 fr_FR.UTF-8
189 $ sudo localedef -i ja_JP -f EUC-JP ja_JP.EUC-JP
190 $ sudo localedef -i tr_TR -f UTF-8 tr_TR.UTF-8
191 $ sudo localedef -i zh_CN -f GB18030 zh_CN.GB18030
192
193
194 Building off the Git repository
195 ===============================
196
197 Access to the Git repository is described at
198 https://savannah.gnu.org/git/?group=gettext .
199
200 After fetching the sources from the Git repository, peek at the comments in
201 autogen.sh, then run
202   ./gitsub.sh pull
203   ./autogen.sh
204 Then you can proceed with "./configure" as usual.
205
206 Each time you want to update the source, do not only "git pull".  Instead do
207   git pull && ./gitsub.sh pull
208   ./autogen.sh
209
210
211 Submitting patches
212 ==================
213
214 Patches should be sent to bug-gettext@gnu.org, the bug/feature mailing
215 list.  You can subscribe to the mailing list, or see the list
216 archives, by following links from
217 https://savannah.gnu.org/mail/?group=gettext .
218
219 To email a patch you can use a shell command like 'git format-patch
220 -1' to create a file, and then attach the file to your email.  
221
222 GNU gettext development no longer stores descriptions of new changes
223 in ChangeLog files.  Instead, a single ChangeLog file is generated
224 from the commit messages when a release is prepared.  So changes you
225 commit should not touch any of the ChangeLog files in the repository,
226 but instead should contain the log entries in the commit message.
227
228 For the style of a ChangeLog entry, see the "Change Logs" section of
229 the GNU coding standards:
230
231   https://www.gnu.org/prep/standards/html_node/Change-Logs.html