Tweak Extra-cmake-modules instead of plasma-workspace, since any other kf5

package could be pottentially affected by ECM in /usr. Tested by rebuilding
all the packages dependent on ECM, and starting KDe Plasma successfully.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@22056 af4574ff-66df-0310-9fd7-8a98e5e911e0
This commit is contained in:
Pierre Labastie 2019-08-26 13:28:27 +00:00
parent 425f8d6942
commit 9434e9a213
2 changed files with 19 additions and 10 deletions

View File

@ -80,7 +80,8 @@
<bridgehead renderas="sect4">Optional</bridgehead>
<para role="optional">
<ulink url="https://pypi.python.org/pypi/Sphinx">Sphinx</ulink> (for building documentation)
<ulink url="https://pypi.python.org/pypi/Sphinx">Sphinx</ulink> (for
building documentation)
</para>
<para condition="html" role="usernotes">
@ -92,12 +93,16 @@
<title>Installation of Extra Cmake Modules</title>
<para>
Install <application>Extra Cmake Modules</application> by running the following
commands:
Install <application>Extra Cmake Modules</application> by running the
following commands:
</para>
<screen><userinput>sed -i '/"lib64"/s/64//' kde-modules/KDEInstallDirs.cmake &amp;&amp;
sed -e '/PACKAGE_INIT/i set(SAVE_PACKAGE_PREFIX_DIR "${PACKAGE_PREFIX_DIR}")' \
-e '/^include/a set(PACKAGE_PREFIX_DIR "${SAVE_PACKAGE_PREFIX_DIR}")' \
-i ECMConfig.cmake.in &amp;&amp;
mkdir build &amp;&amp;
cd build &amp;&amp;
@ -130,6 +135,17 @@ make</userinput></screen>
install files in a <filename class="directory">lib64</filename>
sub-directory.
</para>
<para>
<command>sed ... ECMConfig.cmake.in</command>:
This command protects the global <application>cmake</application>
variable <envar>PACKAGE_PREFIX_DIR</envar> from being changed when
checking ECM presence: since we install ECM into <filename
class="directory">/usr</filename>, the check would set that variable to
<filename class="directory">/usr</filename>, while most KDE packages
expect it to be set to <filename class="directory">/opt/kf5</filename>
and would fail to build if it is set to something else.
</para>
</sect2>
<sect2 role="content">

View File

@ -318,13 +318,6 @@ ln -sfv /usr/share/dbus-1 $KF5_PREFIX/share</userinput></screen>
tar -xf $file
pushd $packagedir
# Fix a cmake problem in plasma-framework
if [ "$name" == "plasma-framework" ]; then
sed -e '/CMakeFind/i set(SAVE_PACKAGE_PREFIX_DIR "${PACKAGE_PREFIX_DIR}")' \
-e '/find_dep/a set(PACKAGE_PREFIX_DIR "${SAVE_PACKAGE_PREFIX_DIR}")' \
-i src/plasmaquick/KF5PlasmaQuickConfig.cmake.in
fi
mkdir build
cd build