By default, Bugzilla does not search the list of RESOLVED bugs.
You can force it to do so by putting the upper-case word ALL in front of your search query, e.g.: ALL tdelibs
We recommend searching for bugs this way, as you may discover that your bug has already been resolved and fixed in a later release.
Bug 3133 - TDEMacros.cmake: Add Support for Private Links and Fix LINGUAS Write to Source Tree
Summary: TDEMacros.cmake: Add Support for Private Links and Fix LINGUAS Write to Sourc...
Status: RESOLVED FIXED
Alias: None
Product: TDE
Classification: Unclassified
Component: other (any) (show other bugs)
Version: R14.0.x [Trinity]
Hardware: Other Linux
: P5 normal
Assignee: Timothy Pearson
URL:
Depends on:
Blocks: R14.0.9
  Show dependency treegraph
 
Reported: 2020-06-10 14:24 CDT by aneejit1
Modified: 2020-06-26 08:16 CDT (History)
2 users (show)

See Also:
Compiler Version:
TDE Version String:
Application Version:
Application Name:


Attachments
Patch to add tde_add_library "LINK_PRIVATE" option and stop LINGUAS source writes (2.59 KB, patch)
2020-06-10 14:24 CDT, aneejit1
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description aneejit1 2020-06-10 14:24:49 CDT
Created attachment 2975 [details]
Patch to add tde_add_library "LINK_PRIVATE" option and stop LINGUAS source writes

1. Private links

I am installing to the following directories:

- TQt3 goes to /opt/trinity/i686-pc-linux-gnu and /opt/trinity/x86_64-unknown-linux-gnu to allow for both 32-bit and 64-bit builds
- The rest of TDE goes to /opt/trinity

This exposes a problem whereby libraries cannot be found, most notably libr, because the paths to the libraries have not been expressly specified and are different to the TQt3 ones which are specified in the CMakeLists.txt files. Rather than specify, for instance, "${LIBR_LIBRARY_DIRS}" in all "link_directories" statements in the CMakeLists.txt for the projects affected, it has been pointed out that ensuring that the libraries are private linked in tdelibs to remove the need to do all these changes (see ticket 3123).

At present, the "tde_add_library" does not offer the functionality to do private links, the patch attached adds a "LINK_PRIVATE" option to the function. This then passes the list of libraries to the "target_link_libraries" statement using the "PRIVATE" option.

The relevant changes required for tdelibs will be raised separately.


2. LINGUAS Being Written to the Source Tree

The "msgfmt" command only looks for the LINGUAS file in the specified input source tree, so this creates a problem when the file is generated and the source tree is read-only.

The commonly accepted wisdom on this file appears to be that it is something that should be maintained in the source tree rather than something that should be auto-constructed at build time. By rights, this file should therefore exist and be managed in every project that has the need to use it.

There is no way to override where "msgfmt" looks for the LINGUAS file, however, it is not necessary to have one. The use of this file appears to have been introduced with gettext version 0.18 (circa 2010). This version also contains the provision to obtain the exact same information contained in that file from the LINGUAS environment variable.

To avoid the need to either generate the LINGUAS file or maintain it in the projects where it is needed, the attached fix to TDEMacros.cmake causes the language list to be obtained as a space delimited string which is exported to the LINGUAS variable before "msgfmt" and unset afterwards (the export/unset each use is used just in case it becomes necessary to call this twice in a build but with a different language list).
Comment 1 Slávek Banko 2020-06-15 10:54:10 CDT
It is a pity that you are entering reports into the old Bugzilla, which is completely impractical for a developer workflow.

As a result, the first part of your patch is completely outdated, because it was created and revised in TGW without the knowledge of this proposed patch.

The second part is still valid, but needs to be revised. Please, can you do it as a pull-request in TGW instead of the patch in the Bugzilla attachment?
Comment 2 Slávek Banko 2020-06-26 08:16:10 CDT
Resolved by TDE/tde-common-cmake#53 and TDE/tde-common-cmake#55

https://mirror.git.trinitydesktop.org/gitea/TDE/tde-common-cmake/pulls/53
https://mirror.git.trinitydesktop.org/gitea/TDE/tde-common-cmake/pulls/55