Commit Graph

212 Commits (1686d0e64eefa5f4036dce1800d666c41b0b5e5a)

Author SHA1 Message Date
Slávek Banko 1686d0e64e
tde_create_translated_desktop: Instead of preprocessing the desktop
file for use with intltool-merge already in the configuration phase,
prepare the file during the custom command call just before calling
intltool-merge. This will allow the natural use of the macro with
the generated files.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
4 years ago
Slávek Banko a5baa2c1ab
tde_create_translated_desktop: Avoid confusing paths when processing
a desktop file in a binary folder.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
4 years ago
Slávek Banko 52001b9069
tde_create_translated_desktop: Use find_file instead of find_program
to find tde_l10n_merge.pl because it does not have the executable
bit set.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
4 years ago
Slávek Banko 53c7e28984
tde_create_translated_desktop: Incorporate a slightly modified version
of intltool-merge 0.51 to properly merge desktop file translations
containing escaped newline characters - '\n'.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
4 years ago
Slávek Banko 43763c6adf
tde_curdatetime: Add the -u option to call 'date'
so that the result is not time zone dependent.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
4 years ago
Slávek Banko b2b9e89052
Set compiler flags useful for reproducible building.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
4 years ago
Slávek Banko 7b6865d9e6
tde_create_tarball: Add options to make tarballs reproducible
independently of UMASK and time zone.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
4 years ago
Slávek Banko 28260f0078
tde_create_translated_desktop: Show the full path of the source
desktop file when merging translations.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
4 years ago
Slávek Banko ae0ecf194b
Adjust CMakeL10n module to search for tde.pot in 'core/tdelibs' folder.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
4 years ago
Michele Calgaro 35d0198787
Added search for additional files to tde_l10n_create_template.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
4 years ago
Slávek Banko 0459cbaf3e
Add a global option to force colored output from compiler.
Taken from https://medium.com/@alasher/colored-c-compiler-output-with-ninja-clang-gcc-10bfe7f2b949

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
4 years ago
Slávek Banko fb4f389731
tde_create_tarball: SOURCEDIR can be specified as relative.
If the list of files is obtained internally in a macro,
it will be sorted. This prevents unexpected order of files
- improves certainty for reproducible builds.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko 63b5532a29
tde_create_translated_desktop: Allow generating a translated desktop
file that will not be installed directly.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko 9f86304bdd
tde_create_translated_desktop: Fix CMP0054 warning in case of special
desktop file name that could be the same as the keyword.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko 3bbc0e4d62
tde_create_translated_desktop: Fix processing when using configure_file.
Although the processing with configure_file was done properly,
the original source file was used instead of the processed one
to merge the translations.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko 7592371d26
tde_create_translated_desktop: Add the ability to process multiple source
files to be installed in the same destination folder.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko 1baa4cbbd1
tde_create_translated_desktop: PO_DIR can be specified as relative.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko 690e7a7ec3
tde_create_translated_desktop: Process the source file using configure_file
if it has a ".cmake" extension.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko 8d4479fbcc
tde_create_translated_desktop: Add the ability to call for the same source
file installed in another location.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
aneejit1 8cf356884f Remove use of LINGUAS file to prevent writes to the source directory
This is for the resolution of bug 3133

Signed-off-by: aneejit1 <aneejit1@gmail.com>
5 years ago
Slávek Banko 1254cb9250
Remove adding dependencies that were previously needed
to build tdelibs as such.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko 4d52ea2c67
Fix FTBS if CMAKE_BUILD_TYPE is not set.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko e769cc0003
Set the LINK_INTERFACE_LIBRARIES and INTERFACE_LINK_LIBRARIES
properties not only for the default, but also for the specific
build type.

This resolve FTBFS when using private linking if the build is
of type Debug.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko d504c98bb7
tde_add_library: Add the ability to link libraries as private.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko 2a847be412
Move templates to a separate directory and rename to the tde_ prefix.
Create the TDE_CMAKE_ROOT and TDE_CMAKE_TEMPLATES variables.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko c3b52f0e80
tde_create_translated_desktop: For working files in a binary directory,
use the relative path according to the source directory instead of the
base file names. This will prevent potential base file name collisions
and allow the creation of common rules.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko 55cdb3a75e
Update TDEL10n module
+ Add *.theme and eventsrc to files known as desktop style.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko e4b370839f
tde_create_dcop_kidl: Use dcopildng as the default instead of dcopidl.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko f5b58cdd21
Update TDEL10n module
+ Add --from-code=UTF-8 to xgettext call.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko e51ecbd591
FindTDE: Conditional import of exported tdelibs targets.
This prevents multiple attempts to import exported tdelibs targets,
which would cause a collision if find_package( TDE ) is called
repeatedly for some reason.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko f7a3d5c3e2
tde_create_handbook: Add an optional SOURCE_BASEDIR argument.
Using the optional SOURCE_BASEDIR argument, it is possible to use
tde_create_handbook in CMakeLists.txt from a folder other than the
folder containing the documentation itself.

This will allow the creation of common rules for generating documentation
for all languages that are currently available, without the need to
create CMakeLists.txt in the directory of each individual language.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko 3b6509cacf
tde_create_translated_desktop: Use output name only during installation.
In the cmake binary directory, the name of the working file must
be used according to the source file to avoid possible collisions
if the source directory contains multiple desktop files installed
as a ".directory" file in multiple destination directories.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko 374fcabb18
Write metadata to libraries and executables using the post-build command,
except when building tdelibs, where a separate target will be used and
writing metadata will be the last step.

This also resolve TDE/tdelibs#80.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko 34e3154c44
tde_create_translated_desktop: Force the use of intltool-merge.
Because some of our desktop files contain underscores in variable
names (for example eventsrc), which is not an allowed character
for names of entries in desktop style files, we can't use msgfmt,
so we need intltool-merge.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko f6f7bfc007
Update TDEL10n module
+ Fix comment replacement and flag addition for _translatorinfo.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko e72aabadf5
Write metadata to libraries and binaries as a last step.
This prevents concurrency of writing metadata and linking
with other libraries, which could cause FTBFS.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko 778522d104
Add caching of variables from checks results and add conditions
to avoid unnecessary repetition of checks.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko 4ced9fd928
Update TDEL10n module
+ For _translatorinfo strings, replace the references
  to an intentionally non-existent source file and use
  instead comments explaining the purpose of these strings.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko 5cd16d6fb9
Replace the remaining KDE3 macros.
+ Targets are created to generate files, not just commands.
+ Generating kidl files is created as a separate targets.
+ Headers are added to the list of generated files.
+ This allows for more accurate dependency determination.
+ This prevents files generation from being repeated.
+ This prevents the occasional FTBFS during a parallel build.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko e8a95f169e
tde_create_translated_desktop: Allow spaces around the equal sign.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko 9138b8f339
tde_create_handbook: Improve build message.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko e22f5ace4a
Create symlink for base soname for libraries with release number in the name
as a separate target instead of POST_BUILD command. This prevents the
command from being executed multiple times and thus FTBFS.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko 48b1e42b64
Store ELF metadata as a separate target instead of the POST_BUILD command.
This allows naturally storing ELF metadata also in tdelibs.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko 184d1c2a4d
Avoid storing "_version-NOTFOUND" in ELF metadata.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko 3d16bad245
tde_read_src_metadata: Typo correction.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko fd7d9c535e
tde_create_translated_desktop: Use full name for target.
This solves the case where the desktop file name is not unique
throughout the project.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko 7183c21e08
tde_create_translated_desktop: Cleaning the LINGUAS file
that is generated for merging desktop file translations
will not be performed as a POST BUILD command, but as a
separate target.

This solves premature file deletion if multiple desktop
files use a common translation folder.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko 6574bc5ae9
tde_create_tarball: Add options to ensure reproducibility.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko 1f4d4093ad
Update TDEL10n module
+ Simplify entering a catalog name for placement in a directory of the same name.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago
Slávek Banko f07fe12daf
Update TDEL10n module
+ Add a function to prepare for extracting strings from desktop files.
-- xgettext creates an incorrect reference to the source file line
-- xgettext does not allow the keyword to be used as a comment

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago