Bump to 1.1
[platform/upstream/libunistring.git] / HACKING
1 All you need to know when hacking (modifying) GNU libunistring or when building
2 it off a git checkout.
3
4
5 Requirements
6 ============
7
8 You will need reasonably recent versions of the build tools:
9
10   * A C compiler. Such as GNU GCC.
11     + Homepage:
12       https://gcc.gnu.org/
13
14   * GNU automake 1.16.4 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 gperf
27     + Homepage:
28       https://www.gnu.org/software/gperf/
29
30   * GNU sed
31     + Homepage:
32       https://www.gnu.org/software/sed/
33
34   * Perl
35     + Homepage:
36       https://www.perl.org/
37
38   * Either an internet connection or a recent copy of GNU gnulib.
39     In order to work with the HEAD of libunistring development, you need the
40     HEAD of the gnulib development.
41     In order to work with the version of libunistring at a given date, you need
42     the version of gnulib of the same date.
43     In order to work with a released tarball of libunistring, you need the
44     particular version of gnulib which is indicated in the GNULIB_GIT_COMMIT
45     variable in version.sh.
46     + Homepage:
47       https://www.gnu.org/software/gnulib/
48
49 And, of course, the packages listed in the DEPENDENCIES file.
50
51
52 Additional requirements for maintainers
53 ---------------------------------------
54
55 If you are a maintainer, you will want to minimize the number of tests that
56 are skipped. To this effect, you need to install a couple of locales, used by
57 the tests. By default, only those enabled in /etc/locale.gen are preinstalled.
58
59 $ sudo localedef -i ar_SA -f ISO-8859-6 ar_SA.ISO-8859-6
60 $ sudo localedef -i fr_FR -f ISO-8859-1 fr_FR.ISO-8859-1
61 $ sudo localedef -i fr_FR -f UTF-8 fr_FR.UTF-8
62 $ sudo localedef -i ja_JP -f EUC-JP ja_JP.EUC-JP
63 $ sudo localedef -i zh_CN -f GB18030 zh_CN.GB18030
64
65
66 Building off the Git repository
67 ===============================
68
69 Access to the Git repository is described at
70 https://savannah.gnu.org/git/?group=libunistring .
71
72 After fetching the sources from the Git repository, peek at the comments in
73 autogen.sh, then run
74   ./autopull.sh
75   ./autogen.sh
76 Then you can proceed with "./configure" as usual.
77
78 Each time you want to update the source, do not only "git pull".  Instead do
79   git pull && ./autopull.sh
80   ./autogen.sh
81
82
83 Sources
84 =======
85
86 Most of the sources have their origin in gnulib.
87
88
89 Building
90 ========
91
92 See the INSTALL file for generic instructions.
93
94 To speed up the build:
95   1) You can use the configure option --disable-namespacing.  The speed up is
96      by a factor of 1.5.  The resulting library is not namespace-clean and
97      therefore should not be installed (if you don't want to risk collisions
98      with other libraries) and should certainly not be distributed.
99   2) You can use the configure option --disable-static.  The speed up is by
100      a factor of 1.6.  The resulting library cannot be used for static
101      linking and therefore should certainly not be distributed.
102
103
104 Continuous integration
105 ======================
106
107 The package is built automatically, at regular intervals.  You find the latest
108 build results here:
109   https://gitlab.com/gnu-libunistring/ci-distcheck/pipelines
110   https://gitlab.com/gnu-libunistring/ci-distcheck/-/jobs?scope=finished
111
112
113 Running the testsuite in valgrind
114 =================================
115
116 To run the test suite with a memory access checker and leak detector such as
117 valgrind,
118   1) configure with the options --disable-shared and CFLAGS="-g",
119   2) run "make",
120   3) edit tests/Makefile to uncomment the appropriate definition of the CHECKER
121      macro,
122   4) run "make check".