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/
    + Pre-built package name:
      - On Debian and Debian-based systems: gcc, gcc-doc,
      - On Red Hat distributions: gcc.
      - Other: https://repology.org/project/gcc/versions

  * GNU automake 1.13 or newer
    + Homepage:
      https://www.gnu.org/software/automake/
    + Pre-built package name:
      - On Debian and Debian-based systems: automake,
      - On Red Hat distributions: automake.
      - Other: https://repology.org/project/automake/versions

  * GNU autoconf
    + Homepage:
      https://www.gnu.org/software/autoconf/
    + Pre-built package name:
      - On Debian and Debian-based systems: autoconf, autoconf-doc,
      - On Red Hat distributions: autoconf.
      - Other: https://repology.org/project/autoconf/versions

  * GNU m4
    + Homepage:
      https://www.gnu.org/software/m4/
    + Pre-built package name:
      - On Debian and Debian-based systems: m4, m4-doc,
      - On Red Hat distributions: m4.
      - Other: https://repology.org/project/m4/versions

  * GNU bison 3.0 or newer
    + Homepage:
      https://www.gnu.org/software/bison/
    + Pre-built package name:
      - On Debian and Debian-based systems: bison, bison-doc,
      - On Red Hat distributions: bison.
      - Other: https://repology.org/project/bison/versions

  * GNU gperf
    + Homepage:
      https://www.gnu.org/software/gperf/
    + Pre-built package name:
      - On Debian and Debian-based systems: gperf,
      - On Red Hat distributions: gperf.
      - Other: https://repology.org/project/gperf/versions

  * GNU groff 1.17 or newer
    + Homepage:
      https://www.gnu.org/software/groff/
    + Pre-built package name:
      - On Debian and Debian-based systems: groff,
      - On Red Hat distributions: groff.
      - Other: https://repology.org/project/groff/versions

  * GNU texinfo
    + Homepage:
      https://www.gnu.org/software/texinfo/
    + Pre-built package name:
      - On Debian and Debian-based systems: texinfo,
      - On Red Hat distributions: texinfo.
      - Other: https://repology.org/project/texinfo/versions

  * GNU emacs or XEmacs
    + Homepage:
      https://www.gnu.org/software/emacs/
      https://www.xemacs.org/
    + Pre-built package name:
      - On Debian and Debian-based systems: emacs,
      - On Red Hat distributions: emacs.
      - Other: https://repology.org/project/emacs/versions

  * Perl
    + Homepage:
      https://www.perl.org/
    + Pre-built package name:
      - On Debian and Debian-based systems: perl, perl-doc,
      - On Red Hat distributions: perl.
      - Other: https://repology.org/project/perl/versions

  * TeX (for making the doc in .dvi, .ps or .pdf format)
    + Homepage:
      https://tug.org/texlive/
    + Pre-built package name:
      - On Debian and Debian-based systems: texlive-base, texlive-latex-base,
      - On Red Hat distributions: texlive-base.
      - Other: https://repology.org/project/texlive/versions

  * 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/
    + Pre-built package name:
      - On Debian and Debian-based systems: tar, tar-doc,
      - On Red Hat distributions: tar.
      - Other: https://repology.org/project/tar/versions

  * GNU Wget
    + Homepage:
      https://www.gnu.org/software/wget/
    + Pre-built package name:
      - On Debian and Debian-based systems: wget,
      - On Red Hat distributions: wget.
      - Other: https://repology.org/project/wget/versions

  * XZ Utils
    + Homepage:
      https://tukaani.org/xz/
    + Pre-built package name:
      - On Debian and Debian-based systems: xz-utils,
      - On Red Hat distributions: xz.
      - Other: https://repology.org/project/xz/versions

  * Lzip
    + Homepage:
      https://www.nongnu.org/lzip/
    + Pre-built package name:
      - On Debian and Debian-based systems: lzip,
      - On Red Hat distributions: lzip (EPEL).
      - Other: https://repology.org/project/lzip/versions

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/
    + Pre-built package name:
      - On Debian and Debian-based systems: g++,
      - On Red Hat distributions: gcc-c++.
      - Other: https://repology.org/project/gcc/versions
  * An Objective C compiler
    + Homepage: https://gcc.gnu.org/
    + Pre-built package name:
      - On Debian and Debian-based systems: gobjc,
      - On Red Hat distributions: gcc-objc.
      - Other: https://repology.org/project/gcc/versions

  * Python
    + Homepage: https://www.python.org/
    + Pre-built package name:
      - On Debian and Debian-based systems: python3, python3-doc,
      - On Red Hat distributions: python3.
      - Other: https://repology.org/project/python/versions

  * GNU clisp
    + Homepage: http://clisp.org/
    + Pre-built package name:
      - On Debian and Debian-based systems: clisp, clisp-doc,
      - On Red Hat distributions: --.
      - Other: https://repology.org/project/clisp/versions

  * librep
    + Homepage: http://librep.sourceforge.net/
    + Pre-built package name:
      - On Debian and Debian-based systems: rep, rep-doc,
      - On Red Hat distributions: --.
      - Other: https://repology.org/project/librep/versions

  * GNU guile
    + Homepage: https://www.gnu.org/software/guile/
    + Pre-built package name:
      - On Debian and Debian-based systems: guile-2.2, guile-2.2-doc,
        or:                                 guile-3.0, guile-3.0-doc,
      - On Red Hat distributions: guile.
      - Other: https://repology.org/project/guile/versions

  * GNU smalltalk
    + Homepage: http://smalltalk.gnu.org/
    + Pre-built package name:
      - On Debian and Debian-based systems: gnu-smalltalk, gnu-smalltalk-doc,
      - On Red Hat distributions: gnu-smalltalk (EPEL).
      - Other: https://repology.org/project/smalltalk/versions

  * A Java compiler
    + Homepage: http://openjdk.java.net/
  + Pre-built package name:
    - On Debian and Debian-based systems:
      openjdk-11-jdk or openjdk-8-jdk or openjdk-7-jdk, default-jdk,
    - On Red Hat distributions:
      java-11-openjdk or java-1.8.0-openjdk or java-1.7.0-openjdk.
    - Other: https://repology.org/project/openjdk/versions

  * A C# compiler
    + Homepage: https://www.mono-project.com/
    + Pre-built package name:
      - On Debian and Debian-based systems: mono-mcs,
      - On Red Hat distributions: mono-devel (EPEL).
      - Other: https://repology.org/project/mono/versions

  * GNU awk
    + Homepage: https://www.gnu.org/software/gawk/
    + Pre-built package name:
      - On Debian and Debian-based systems: gawk, gawk-doc,
      - On Red Hat distributions: gawk.
      - Other: https://repology.org/project/gawk/versions

  * The Free Pascal compiler ppc386 or ppcx64
    + Homepage: https://www.freepascal.org/
    + Pre-built package name:
      - On Debian and Debian-based systems: fp-compiler, fp-docs,
      - On Red Hat distributions: fpc (EPEL).
      - Other: https://repology.org/project/fpc/versions
  * The Free Pascal Free Component Library
    + Homepage: https://www.freepascal.org/fcl/fcl.var
    + Pre-built package name:
      - On Debian and Debian-based systems: fp-units-fcl,
      - On Red Hat distributions: --.
      - Other: https://repology.org/project/fpc/versions

  * Tcl
    + Homepage: https://www.tcl.tk/
    + Pre-built package name:
      - On Debian and Debian-based systems: tcl, tcl-doc,
      - On Red Hat distributions: tcl.
      - Other: https://repology.org/project/tcl/versions

  * Perl
    + Homepage: https://www.perl.org/
    + Pre-built package name:
      - On Debian and Debian-based systems: perl, perl-doc,
      - On Red Hat distributions: perl.
      - Other: https://repology.org/project/perl/versions
  * The Perl packages Locale::Messages and libintl-perl
    + Homepage: http://search.cpan.org/~guido/libintl-perl/
    + Pre-built package name:
      - On Debian and Debian-based systems: libintl-perl,
      - On Red Hat distributions: perl-libintl.
      - Other: https://repology.org/project/perl:libintl-perl/versions

  * php
    + Homepage: http://www.php.net/
    + Pre-built package name:
      - On Debian and Debian-based systems: php,
      - On Red Hat distributions: php.
      - Other: https://repology.org/project/php/versions

  * Ruby
    + Homepage: https://www.ruby-lang.org/en/
    + Pre-built package name:
      - On Debian and Debian-based systems: ruby,
      - On Red Hat distributions: ruby.
      - Other: https://repology.org/project/ruby/versions
  * The ruby-gettext package
    + Homepage: https://ruby-gettext.github.io/
    + Pre-built package name:
      - On Debian and Debian-based systems: ruby-gettext,
      - On Red Hat distributions: ruby-gettext.
      - Other: https://repology.org/project/ruby:gettext/versions

  * lua
    + Homepage: https://www.lua.org/
    + Pre-built package name:
      - On Debian and Debian-based systems: lua5.3 or lua5.2 or lua5.1,
      - On Red Hat distributions: lua.
      - Other: https://repology.org/project/lua/versions
  * 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
    + Pre-built package name:
      - On Debian and Debian-based systems: --,
      - On Red Hat distributions: --.
      - Other: https://repology.org/project/lua:gettext/versions

  * The GNOME/Mozilla JavaScript interpreter
    + Homepage: https://wiki.gnome.org/Projects/Gjs
    + Pre-built package name:
      - On Debian and Debian-based systems: gjs, gir1.2-gtk-3.0,
      - On Red Hat distributions: gjs.
      - Other: https://repology.org/project/gjs/versions

  * The GNOME Vala compiler
    + Homepage: https://wiki.gnome.org/Projects/Vala
    + Pre-built package name:
      - On Debian and Debian-based systems: valac,
      - On Red Hat distributions: vala.
      - Other: https://repology.org/project/vala/versions

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/
    + Pre-built package name:
      - On Debian and Debian-based systems: libqt5gui5, qt5-doc-html,
        or:                                 libqt4-dev,
      - On Red Hat distributions: --.
      - Other: https://repology.org/project/qt/versions

  * The wxWidgets GUI toolkit library
    + Homepage: https://www.wxwidgets.org/
    + Pre-built package name:
      - On Debian and Debian-based systems: libwxgtk3.0-gtk3-dev, wx3.0-doc,
        or:                                 libwxgtk3.0-dev,
      - On Red Hat distributions: --.
      - Other: https://repology.org/project/wxwidgets/versions

  * The GNUstep toolkit and development environment
    + Homepage: http://www.gnustep.org/
    + Pre-built package name:
      - On Debian and Debian-based systems: gnustep-devel,
      - On Red Hat distributions: gnustep-base (EPEL).
      - Other: https://repology.org/project/gnustep-base/versions

  * The C# System.Windows.Forms implementation
    + Homepage: https://www.mono-project.com/
    + Pre-built package name:
      - On Debian and Debian-based systems: libmono-system-windows-forms4.0-cil,
      - On Red Hat distributions: mono-winforms (EPEL).
      - Other: https://pkgs.org/search/?q=mono-winforms

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
