-
Notifications
You must be signed in to change notification settings - Fork 308
Building with Autotools
-
autoconf >= 2.69,automake >= 1.15andgettext >= 0.19.7(may work with older versions, but not tested) - D compiler executable is in the
$PATH(currently, onlydmdis supported out of the box.ldcfrom git master also works and there is a workaround to build with latest stable release LDC 1.0.0. See #387 for more information) pkg-config-
gtkd-3andvted-3(both shared libraries and "headers") built with the same compiler that will be used to build Terminix (instructions to build these below)
In order to build terminix with autotools, issue the following commands:
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install
Some parameters may be added to these commands:
-
./configureaccepts a--prefix=/path/to/prefixparameter (defaults to/usr/local) - the compiler detection may be overridden by passing
DC=compilerto themakecommand (The DMD-compatible wrapper must be used, i.e.DC=ldmdto use theldccompiler). - compiler flags may be passed in variable
DCFLAGS. Default value is-O. A release version of Terminix can be built with commandmake DCFLAGS='-O -inline -release -version=StdLoggerDisableTrace' - it is possible to specify the installation root to
make installin variableDESTDIR(defaults to/).
GtkD tarball comes with a handmade Makefile, so building and installing it can be done with the following commands:
$ make DC='dmd' DCFLAGS='-O -release -inline' shared-libs shared-gstreamer shared-vte
$ make prefix=/path/to/prefix DESTDIR=/path/to/install \
install-shared install-shared-gstreamer install-shared-vte \
install-headers install-headers-gstreamer install-headers-vte
These commands install all the shared libraries, although Terminix only requires the gtkd and vted ones (headers for these are also required). Please, refer to the GtkD README for the dependencies and further details.
The command above builds GtkD with dmd, but it also can be built with DC='ldc' (this is the default if no DC is informed)
If the system already contains GtkD libraries compiled with another D compiler, it is necessary to add a suffix to the installed files to avoid conflicts. It may be done by changing the makefile with the following command run from GtkD top directory:
sed -i 's#-$(MAJOR)#-$(MAJOR)-dmd#g' GNUmakefile
This way, libraries gtkd-3-dmd and vted-3-dmd will be generated.
It is possible to create a source distribution tarball by calling make dist after the ./configure step. This will create a terminix-<version>.tar.gz archive that can be used to build Terminix without autotools. Just extract the contents and run the well known ./configure; make; make install commands from the extracted directory.
As changes in the Terminix tree occur, it may be necessary to adjust the autotools support accordingly. If no new files are added to the tree, maintaining autotools files means simply bumping versions in file configure.ac. Also, the following file additions do not require any additional maintenance:
-
.dfiles undersource/ -
.jsoncolor schemes underdata/schemes/ -
.cssstylesheets underdata/resources/css/ -
.uiGtkBuilder files underdata/resources/ui/ - icons under
data/resources/icons/ - icons under
data/icons - translation files under
po/
Other files must be analyzed on a case-by-case basis.