summaryrefslogtreecommitdiff
path: root/CMake
AgeCommit message (Collapse)Author
2016-08-10CMake: Translations: Build .pot in po binary dir, not project oneJulian Andres Klode
This was cluttering up things all over the place. Gbp-Dch: ignore
2016-08-10CMake: Translations: Allow excluding languages from translationJulian Andres Klode
This seems to be needed for the hebrew translations. Gbp-Dch: ignore
2016-08-10CMake: Translations: Avoid rebuilding .mo if .pot did not changeJulian Andres Klode
Use the witness/byproducts approach to build the translations. A byproduct of a command is like an output, but may be older than the input. Here, we generate a normal template with headers in the normal way as a witness (and for Launchpad translations), but we also generate a .pot-tmp0 template file without a header that gets copied to a .pot-tmp byproduct only if it changed. This way, the .pot-tmp is only updated if an actual string translation changed. We also create a custom target for the .pot file that we'll depend on later in the overall target creating the mo files to ensure that the template is build before we try to build mo files. Then we make the msgmerge depend on the .pot-tmp instead of the .pot file, which means that msgmerge and msgfmt only get re-run if a string change occured. Gbp-Dch: ignore
2016-08-10CMake: Translations: Add a statistics targetJulian Andres Klode
This is really useful stuff to have. Gbp-Dch: ignore
2016-08-10CMake: Translations: Build apt-all.pot and update .po filesJulian Andres Klode
Merge all the per-domain templates into one template file using msgcomm, stripping any line numbers in the input files, and sorting the output per file. This should create reasonably stable .pot and .po files that do not change just because files move around. It should also be resilient against some line changes, as long as one translated line is not moved before/after another translated line. Gbp-Dch: ignore
2016-08-10CMake: Translations: Add support for shell scriptsJulian Andres Klode
Rework the arguments to apt_add_translation_domain so a user can specify TARGETS and SCRIPTS, the latter being Shell scripts. For each language (TARGETS being C++, SCRIPTS being Shell), a separate template is generated via xgettext. Those templates are then merged together by using msgcomm. In case there are no Shell scripts in the translation domain, msgcomm will receive /dev/null instead of a shell translation template. This also reintroduces line numbers, as msgcomm would otherwise re-order the merged files not only by filename, but also by message string. It's unclear why it does that, it could just leave strings within a file alone. In contrast to the old build system, we use xgettext for shell scripts instead of bash --dump-strings, as it's just easier to use the same tool for everything. We also create valid headers.
2016-08-10CMake: Translations: Write a .po file before writing a .mo fileJulian Andres Klode
This makes debugging things easier. Gbp-Dch: ignore
2016-08-10CMake: Translations: Pass some additional arguments to commandsJulian Andres Klode
This gets rid of the line numbers, adds the plural keyword, and makes msgfmt print statistics, so we know how well translated we are. Gbp-Dch: ignore
2016-08-10CMake: Translations: Make po templates depend on input filesJulian Andres Klode
I wondered why the template was not rebuilt after I changed a file, now I have the answer. Gbp-Dch: ignore
2016-08-10CMake: Set PACKAGE_MAIL variableJulian Andres Klode
This is needed in a lot of places. Also adjust config.h.in to use it instead of the bare email address. Gbp-Dch: ignore
2016-08-10CMake: Improve handling of vendor filesJulian Andres Klode
First of all, instead of creating the files at configure time, generate the files using normal target. This has the huge advantage that they are rebuilt if their input changes. While we are at it, also add dependencies on the vendor entity files. This also fixes the path to the vendor script, which was given relatively before, which obviously won't work when running from inside a deeper subdirectory. To speed things up, pass the --vendor option to getinfo, so we do not have to find out the current vendor in getinfo all over again. Gbp-Dch: ignore
2016-08-06CMake: Add initial support for documentation buildingJulian Andres Klode
Build HTML docbook guides (untranslated) and manual pages (including translations). Also install the examples in the example subdirectory. Translation of docbook guides has not been implemented yet, but should be easy to do. The code also needs some cleanup to automatically detect the available translations.
2016-08-06CMake: Add support for building and installing .mo filesJulian Andres Klode
Introduce support for building translation domain-specific templates, merging them with the translations, and building a language-specific .mo file. The invocation of xgettext is done in the project source directory, not in the current source directory, and all paths are made relative to the project root, in order to have clean templates. This only supports the C++ source code for now, it unfortunately does not handle the shell scripts of deselect yet.
2016-08-06CMake: Add basic CMake build systemJulian Andres Klode
Introduce an initial CMake buildsystem. This build system can build a fully working apt system without translation or documentation. The FindBerkelyDB module is from kdelibs, with some small adjustements to also look in db5 directories. Initial work on this CMake build system started in 2009, and was resumed in August 2016.