desktop: changed translations to msgfmt and xgettext
[pspp] / README.Git
1 Prerequisites for Building PSPP from Git
2 ----------------------------------------
3
4 To build this project from the sources direct from the Git archive,
5 you must install the prerequisites listed in README, plus the
6 following:
7
8         * Autoconf 2.60 (or later).
9
10         * Automake 1.10 (or later).
11
12         * Gettext 0.19 (or later).
13
14         * GNU M4 1.4.9 (or later).
15
16         * pkg-config 0.21 (or later).
17
18         * gperf 3.0.1 (or later).
19
20         * Gnulib (see below for details).
21
22         * libtool 1.5.22 (or later).
23
24         * Texinfo 5.2 or later, to build the documentation.
25
26         * Gimp --  2.8.2 is known to work
27
28 After you install PSPP's prerequisites, you must obtain a copy of
29 Gnulib, then bootstrap the tree, as described in the sections below.
30 After that, you may follow the procedure described in INSTALL.
31
32 Obtaining Gnulib
33 ----------------
34
35 This version of PSPP should work with the Gnulib commit shown below.
36 Gnulib does not maintain a stable API or ABI, so it is possible that
37 PSPP will not work with older or newer versions of Gnulib.
38
39
40   commit 1e972a8a37c153ddc15e604592f84f939eb3c2ad
41   Author: Bruno Haible <bruno@clisp.org>
42   Date:   Sat Jun 6 10:14:24 2020 +0200
43
44     calloc-gnu tests: Avoid a test failure with clang.
45
46     * tests/test-calloc-gnu.c (main): Mark the pointer variable as
47     'volatile', to defeat compiler optimizations.
48
49
50 To clone Gnulib into a directory named "gnulib" using Git, and then
51 check out this particular commit, run these commands:
52         git clone git://git.savannah.gnu.org/gnulib.git gnulib
53         cd gnulib
54         git checkout $COMMIT
55 where $COMMIT should be replaced by the commit number listed above
56 (usually it is sufficient to just type the first 6 or so digits).
57
58 If you do not have Git installed, then you may alternately download
59 http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=snapshot;h=$COMMIT;sf=tgz
60 where $COMMIT is, again, at least the first few digits of the commit
61 number listed above.  This download will yield a tar.gz file that you
62 may extract with "gunzip" and "tar" to yield identical results.
63
64 Bootstrapping
65 -------------
66
67 Once you have Gnulib installed, PSPP must be "bootstrapped" using the
68 following command:
69         make -f Smake
70 If you checked Gnulib out in a directory named `gnulib' at the same
71 level as PSPP, then this is sufficient.  Otherwise, provide the
72 location of GNULIB on the `make' command line:
73         make -f Smake GNULIB=/gnulib/base/directory/name
74
75 After executing Smake, follow the procedure described in INSTALL to
76 build and install PSPP.  On some systems this may be as simple as:
77         ./configure
78         make
79
80 Once PSPP is built, you may run its self-tests with:
81         make check
82 or for a more thorough test:
83         make distcheck
84
85 Glade UI Design
86 ---------------
87
88 The ui files in src/ui/gui may be viewed (maybe changed) with Glade. For this
89 you need
90
91         * libgladeui 2.0 or later
92
93 Then you need to run
94
95         configure --with-gui-tools
96         make
97         make install
98
99 psppire uses some self defined widgets. To use glade these widgets have
100 to be announced to glade such that you can view the interface.
101 The install process will install the psppire glade library, icons and
102 psppire.xml files in the appropriate system locations. You cannot override
103 this with --prefix. After that you can run "glade" and open the ui files.
104
105 Building from git on Mac OS
106 ---------------------------
107
108 You can build on MacOS in the macports environment. After installing all
109 required packages to resolve library dependencies and autotools e.t.c, you
110 run make -f Smake as described above.
111
112 The macports system provides the libraries and header files in a separate
113 location from the MacOS system libraries. The typical locations are
114
115 Libraries: /opt/local/lib
116 Headers:   /opt/local/include
117
118 pspp under macports will be linked against the macports libraries. The configure
119 script has to be informed about the library and header locations. Assume the following
120 directory structure for an out of tree build:
121
122 ~/mypspp
123   |----pspp    (This is the pspp git directory)
124   |----install (The install location containing also ui files for psppire)
125   |----build   (The build directory)
126   |----gnulib  (The gnulib directory as described above)
127
128 Then you can build with the following commands:
129
130     cd ~/mypspp/pspp
131     make -f Smake
132     cd ../build
133     ../pspp/configure --prefix=/Users/USER/mypspp/install \
134                   LDFLAGS=-L/opt/local/lib \
135                   CPPFLAGS=-I/opt/local/include
136     make
137     make install
138     ../install/bin/psppire (If everything worked, you should see psppire...)