[sdk/kdesrc-build/docbook_historied_per_file] doc: Set rpath to kdedir for appstream, which uses meson

Nate Graham null at kde.org
Fri May 10 10:16:51 BST 2024


Git commit 18d054554a08282d78a1f20fad4ee8216095941c by Nate Graham, on behalf of Jakob Petsovits.
Committed on 02/06/2023 at 15:51.
Pushed by ashark into branch 'docbook_historied_per_file'.

Set rpath to kdedir for appstream, which uses meson

Without this, appstreamcli and libAppStreamQt.so (used all over
Plasma, including Discover) would rely on LD_LIBRARY_PATH to find
the correct libappstream.so. That's not great because the standard
prefix.sh doesn't set LD_LIBRARY_PATH, relying on rpath instead.

Appstream's meson build doesn't set rpath for installed binaries
by default, but can be prodded into adding it with LDFLAGS.

In order to provide the correct name of the library directory
to kdesrc-build, e.g. "lib" or "lib64", this commit introduces
a new option called libname. Its default value gets initialized
in the same way as an earlier shell implementation in
sample-kde-env-master.sh, which doesn't appear to be widely used
at this point but clearly had some experience going into it.

Original commit: f9ec8c08
https://invent.kde.org/sdk/kdesrc-build/-/commit/f9ec8c084989341af6f4c0a579f3f35e042cd7b4

M  +1    -0    doc/index.docbook
M  +12   -2    doc/kdesrc-buildrc/conf-options-table.docbook

https://invent.kde.org/sdk/kdesrc-build/-/commit/18d054554a08282d78a1f20fad4ee8216095941c

diff --git a/doc/index.docbook b/doc/index.docbook
index 73310e92..88a3e33a 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -56,6 +56,7 @@
   <!ENTITY make-install-prefix '<link linkend="conf-make-install-prefix">make-install-prefix</link>'>
   <!ENTITY niceness '<link linkend="conf-niceness">niceness</link>'>
   <!ENTITY set-env '<link linkend="conf-set-env">set-env</link>'>
+  <!ENTITY libname '<link linkend="conf-libname">libname</link>'>
   <!ENTITY libpath '<link linkend="conf-libpath">libpath</link>'>
   <!ENTITY binpath '<link linkend="conf-binpath">binpath</link>'>
 
diff --git a/doc/kdesrc-buildrc/conf-options-table.docbook b/doc/kdesrc-buildrc/conf-options-table.docbook
index 331fefee..7c57fb95 100644
--- a/doc/kdesrc-buildrc/conf-options-table.docbook
+++ b/doc/kdesrc-buildrc/conf-options-table.docbook
@@ -776,14 +776,24 @@ something like: <userinput><option>kde-languages</option>
 </entry>
 </row>
 
+<row id="conf-libname">
+<entry>libname</entry>
+<entry>Module setting overrides global</entry>
+<entry>Set this option to change the default name of the installed library directory
+inside $<envar>KDEDIR</envar> and $<envar>QTDIR</envar>. On many systems this is either
+"lib" or "lib64". Auto-detection is attempted to set the correct name by default,
+but if the guess is wrong then it can be changed with this setting.
+</entry>
+</row>
+
 <row id="conf-libpath">
 <entry>libpath</entry>
 <entry>Module setting overrides global</entry>
 <entry>Set this option to set the environment variable
 <envar>LD_LIBRARY_PATH</envar> while building. You cannot override this setting
 in a module option. The default value is blank, but the paths <filename
-class="directory">$<envar>KDEDIR</envar>/lib</filename> and <filename
-class="directory">$<envar>QTDIR</envar>/lib</filename> are automatically added.
+class="directory">$<envar>KDEDIR</envar>/$<envar>LIBNAME</envar></filename> and <filename
+class="directory">$<envar>QTDIR</envar>/$<envar>LIBNAME</envar></filename> are automatically added.
 You may use the tilde (~) for any paths you add using this option.
 </entry>
 </row>



More information about the kde-doc-english mailing list