All you need to know when hacking (modifying) GNU gettext or when building
it off the git repository.


Requirements
============

You will need reasonably recent versions of the build tools:

  * A C compiler; on Cygwin or mingw also a C++ compiler. Such as GNU GCC.
    + Homepage:
      https://gcc.gnu.org/

  * GNU automake 1.13 or newer
    + Homepage:
      https://www.gnu.org/software/automake/

  * GNU autoconf
    + Homepage:
      https://www.gnu.org/software/autoconf/

  * GNU m4
    + Homepage:
      https://www.gnu.org/software/m4/

  * GNU bison 3.0 or newer
    + Homepage:
      https://www.gnu.org/software/bison/

  * GNU gperf
    + Homepage:
      https://www.gnu.org/software/gperf/

  * GNU groff 1.17 or newer
    + Homepage:
      https://www.gnu.org/software/groff/

  * GNU texinfo
    + Homepage:
      https://www.gnu.org/software/texinfo/

  * GNU emacs or XEmacs
    + Homepage:
      https://www.gnu.org/software/emacs/
      https://www.xemacs.org/

  * Perl
    + Homepage:
      https://www.perl.org/

  * TeX (for making the doc in .dvi, .ps or .pdf format)
    + Homepage:
      https://tug.org/teTeX/

  * Either an internet connection or a recent copy of GNU gnulib.
    + Homepage:
      https://www.gnu.org/software/gnulib/

  * GNU tar (for creating distributable tarballs)
    + Homepage:
      https://www.gnu.org/software/tar/

  * GNU Wget
    + Homepage:
      https://www.gnu.org/software/wget/

  * XZ Utils
    + Homepage:
      https://tukaani.org/xz/

  * Lzip
    + Homepage:
      https://www.nongnu.org/lzip/

And, of course, the packages listed in the DEPENDENCIES file.


Additional requirements for maintainers
---------------------------------------

If you are a maintainer, you will want to minimize the number of tests that
are skipped. To this effect, you need to install also:

  * A C++ compiler
    + Homepage: https://gcc.gnu.org/
    + Ubuntu package: g++
  * An Objective C compiler
    + Homepage: https://gcc.gnu.org/
    + Ubuntu package: gobjc

  * Python
    + Homepage: https://www.python.org/
    + Ubuntu package: python

  * GNU clisp
    + Homepage: http://clisp.org/
    + Ubuntu package: clisp

  * librep
    + Homepage: http://librep.sourceforge.net/
    + Ubuntu package: rep

  * GNU guile
    + Homepage: https://www.gnu.org/software/guile/
    + Ubuntu package: guile-2.0

  * GNU smalltalk
    + Homepage: http://smalltalk.gnu.org/
    + Ubuntu package: gnu-smalltalk

  * A Java compiler
    + Homepage: http://openjdk.java.net/
    + Ubuntu package: default-jdk

  * A C# compiler
    + Homepage: https://www.mono-project.com/
    + Ubuntu package: mono-mcs

  * GNU awk
    + Homepage: https://www.gnu.org/software/gawk/
    + Ubuntu package: gawk

  * The Free Pascal compiler ppc386 or ppcx64
    + Homepage: https://www.freepascal.org/
    + Ubuntu package: fp-compiler
  * The Free Pascal Free Component Library
    + Homepage: https://www.freepascal.org/fcl/fcl.var
    + Ubuntu package: fp-units-fcl

  * Tcl
    + Homepage: https://www.tcl.tk/
    + Ubuntu package: tcl

  * Perl
    + Homepage: https://www.perl.org/
    + Ubuntu package: perl
  * The Perl packages Locale::Messages and libintl-perl
    + Homepage: http://search.cpan.org/~guido/libintl-perl/
    + Ubuntu package: libintl-perl

  * php
    + Homepage: http://www.php.net/
    + Ubuntu package: php

  * Ruby
    + Homepage: https://www.ruby-lang.org/en/
    + Ubuntu package: ruby
  * The ruby-gettext package
    + Homepage: https://ruby-gettext.github.io/
    + Ubuntu package: ruby-gettext

  * lua
    + Homepage: https://www.lua.org/
    + Ubuntu package: lua5.2 or lua5.1
  * The lua-gettext package
    + Homepage: https://gitlab.com/sukhichev/lua-gettext/blob/master/README.us.md
    + Debian and Ubuntu packages:
      Download, then install through
      $ sudo dpkg -i lua-gettext_0.0_amd64.deb

  * The GNOME/Mozilla JavaScript interpreter
    + Homepage: https://wiki.gnome.org/Projects/Gjs
    + Ubuntu packages: gjs gir1.2-gtk-3.0

  * The GNOME Vala compiler
    + Homepage: https://wiki.gnome.org/Projects/Vala
    + Ubuntu package: valac

If you want to exercise the sample programs in gettext-tools/examples/, you
also need to install:

  * The Qt GUI toolkit library
    + Homepage: https://www.qt.io/
    + Ubuntu package: libqt4-dev

  * The wxWidgets GUI toolkit library
    + Homepage: https://www.wxwidgets.org/
    + Ubuntu package: libwxgtk3.0-dev

  * The GNUstep toolkit and development environment
    + Homepage: http://www.gnustep.org/
    * Ubuntu package: gnustep-devel

  * The C# System.Windows.Forms implementation
    + Homepage: https://www.mono-project.com/
    + Ubuntu package: libmono-system-windows-forms4.0-cil

And you need to install a couple of locales, used by the tests.
By default, only those enabled in /etc/locale.gen are preinstalled.

$ sudo localedef -i de_DE -f ISO-8859-1 de_DE.ISO-8859-1
$ sudo localedef -i de_DE -f UTF-8 de_DE.UTF-8
$ sudo localedef -i fa_IR -f UTF-8 fa_IR
$ sudo localedef -i fr_FR -f ISO-8859-1 fr_FR.ISO-8859-1
$ sudo localedef -i fr_FR -f UTF-8 fr_FR.UTF-8
$ sudo localedef -i ja_JP -f EUC-JP ja_JP.EUC-JP
$ sudo localedef -i tr_TR -f UTF-8 tr_TR.UTF-8
$ sudo localedef -i zh_CN -f GB18030 zh_CN.GB18030


Building off the Git repository
===============================

Access to the Git repository is described at
https://savannah.gnu.org/git/?group=gettext .

After fetching the sources from the Git repository, peek at the comments in
autogen.sh, then run
  ./gitsub.sh pull
  ./autogen.sh
Then you can proceed with "./configure" as usual.

Each time you want to update the source, do not only "git pull".  Instead do
  git pull && ./gitsub.sh pull
  ./autogen.sh


Continuous integration
======================

The package is built automatically, at regular intervals.  You find the latest
build results here:
  https://gitlab.com/gnu-gettext/ci-distcheck/pipelines
  https://gitlab.com/gnu-gettext/ci-distcheck/-/jobs?scope=finished


Submitting patches
==================

Patches should be sent to bug-gettext@gnu.org, the bug/feature mailing
list.  You can subscribe to the mailing list, or see the list
archives, by following links from
https://savannah.gnu.org/mail/?group=gettext .

To email a patch you can use a shell command like 'git format-patch
-1' to create a file, and then attach the file to your email.  

GNU gettext development no longer stores descriptions of new changes
in ChangeLog files.  Instead, a single ChangeLog file is generated
from the commit messages when a release is prepared.  So changes you
commit should not touch any of the ChangeLog files in the repository,
but instead should contain the log entries in the commit message.

For the style of a ChangeLog entry, see the "Change Logs" section of
the GNU coding standards:

  https://www.gnu.org/prep/standards/html_node/Change-Logs.html
