Building KDE
        Frameworks 5 (KF5)
      
      
        KDE Frameworks 5 is a collection of libraries based on top of Qt5 and
        QML derived from the monolithic KDE 4 libraries. They can be used
        independent of the KDE Display Environment (Plasma 5).
      
      
        This package is known to build and work properly using an LFS-7.9
        platform.
      
      
        The instructions below build all of the KDE Frameworks packages in
        one step by using a bash script.
      
      
        Package Information
      
      
      
        KF5 Dependencies
      
      
        Required
      
      
        Boost-1.60.0, extra-cmake-modules-5.19.0,
        docbook-xml-4.5, docbook-xsl-1.79.1, giflib-5.1.2,
        libepoxy-1.3.1, libgcrypt-1.6.5, libjpeg-turbo-1.4.2, libpng-1.6.21,
        libxslt-1.1.28, lmdb-0.9.18, phonon-4.8.3
        (built with qt5), shared-mime-info-1.5, URI-1.71, and Wget-1.17.1 (required
        to download the packages)
      
      
        Recommended
      
      
        Aspell-0.60.6.1 (Dictionary backend for
        Sonnet), Avahi-0.6.31 (DNS-SD backend for KDNSSD),
        libdbusmenu-qt-0.9.3+15.10.20150604
        (built with qt5), NetworkManager-1.0.10 (needed to build
        NetworkManager-Qt), and polkit-qt-0.112.0 (Authentication backend for
        KAuth)
      
      
        Optional
      
      
        BlueZ-5.37 (needed to build Bluez-Qt), ModemManager
        (needed to build ModemManager-Qt)
      
      
        Runtime dependency for FrameworkIntegration
      
      
        oxygen-fonts-5.4.3 and noto-fonts
      
      
        Runtime dependencies for kapidox
      
      
        Doxygen-1.8.11, Jinja2, and
        PyYAML
      
      
        Additional image formats support in KImageFormats
      
      
        JasPer-1.900.1 and OpenEXR
      
      
        Optional dependencies for KIO
      
      
        MIT Kerberos V5-1.14
      
      
        Optional dependencies for ModemManager-QT
      
      
        ModemManager
      
      
        Optional dependencies for Solid
      
      
        UDisks-2.1.6, UPower-0.9.23 and
        media-player-info
        (runtime)
      
      
        Optional dictionary backends for Sonnet
      
      
        Hspell and
        Hunspell
      
      
        User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/kf5
      
      
        
          Downloading KDE Frameworks
        
        
          The easiest way to get the KDE Frameworks packages is to use a
          single wget to fetch
          them all at once:
        
        
url=http://download.kde.org/stable/frameworks/5.19/
wget -r -nH --cut-dirs=3 -A '*.xz' -np $url
The options used here are:
  -r            recurse through child directories
  -nH           disable generation of host-prefixed directories
  --cut-dirs=3  remove three levels of directories when saving
  -A '*.xz'     just get the *.xz files
  -np           don't get parent directories
       
      
        
          Setting Package Order
        
        
          The order of building files is important due to internal
          dependencies. Create the list of files in the proper order as
          follows:
        
        
cat > frameworks-5.19.0.md5 << "EOF"
3b4b45a3e250cec426890735089c7fcf  attica-5.19.0.tar.xz
#c18b4e3ad6e37ce1fe372931d2b269fb  extra-cmake-modules-5.19.0.tar.xz
ed50b3908baef964e14266477133e3ea  kapidox-5.19.0.tar.xz
de8678f38303699cf66303f29bb06748  karchive-5.19.0.tar.xz
7569f06a767ddd08ece025fe50197eba  kcodecs-5.19.0.tar.xz
79953233cd7d507f4f8394bf62e23078  kconfig-5.19.0.tar.xz
996db46c7e3b6a3b1837a0cc9373bcdd  kcoreaddons-5.19.0.tar.xz
4ef9082483a46d04f531d1dce8be4232  kdbusaddons-5.19.0.tar.xz
678deda3ac690b5cc43f398504211273  kdnssd-5.19.0.tar.xz
b423159cec98dbac442bdb88e1daeda4  kguiaddons-5.19.0.tar.xz
281cfa08356179d250b67b6d19b85b46  ki18n-5.19.0.tar.xz
945cd1f8bf3b5b34c7db3d7693274314  kidletime-5.19.0.tar.xz
678b42ebec88ce18ac0c85d539fada01  kimageformats-5.19.0.tar.xz
acf477f070df240248cb7eab316ff370  kitemmodels-5.19.0.tar.xz
ab98c10a12f67c437a8918ebfcf1ac80  kitemviews-5.19.0.tar.xz
7487f642bc0c0ed9a38e68c4ef21ff2c  kplotting-5.19.0.tar.xz
b1b37d5c240ad5dea9c43012282beb7e  kwidgetsaddons-5.19.0.tar.xz
5e4a9cbe3d4217062c8656833db641f8  kwindowsystem-5.19.0.tar.xz
327dc9c1ec64e59357545e842d29e5da  networkmanager-qt-5.19.0.tar.xz
d664fa2d968c6d6a273881e90f749c7e  solid-5.19.0.tar.xz
08106da14942ebdfe0b901e649c20d7c  sonnet-5.19.0.tar.xz
fb9848428899fa10c46121810cf3a022  threadweaver-5.19.0.tar.xz
ab6498a04ed69236cb582677df829c91  kauth-5.19.0.tar.xz
e0542f7b67153e79efcdbb0877979775  kcompletion-5.19.0.tar.xz
6ede0e1e87a9009d9b24b3a824543dc9  kcrash-5.19.0.tar.xz
6c05f13822f918abf26b56510861d392  kdoctools-5.19.0.tar.xz
09e682b3395c9eb5f1a63203564c7d99  kpty-5.19.0.tar.xz
989c83f68e01d4f3bdc13fbe8299816a  kunitconversion-5.19.0.tar.xz
ce0c538d90c1753fea03be8beacfc648  kconfigwidgets-5.19.0.tar.xz
b1d5dc66f1ab4320b92b792203d3737a  kglobalaccel-5.19.0.tar.xz
fb28532a75361e3c8b26bf4acad7b158  kpackage-5.19.0.tar.xz
ca272f22047a121d3e21f2bad845295c  kservice-5.19.0.tar.xz
adcff09780e4b64d1148825f452ded1d  kdesu-5.19.0.tar.xz
9126afb4d6d54090f0b72ff08f396d96  kemoticons-5.19.0.tar.xz
234f1a331fcda7425061cc0667b62fc9  kiconthemes-5.19.0.tar.xz
3b27494142b2a8eb01c85ad811f1ba02  kjobwidgets-5.19.0.tar.xz
c5efd59dd9f2687aa2efae4a5356ce9f  knotifications-5.19.0.tar.xz
c4f03d70c30725e636eaf43b5dcfd893  ktextwidgets-5.19.0.tar.xz
1c6c9aac635b623ab78368dd8617ca4e  kwallet-5.19.0.tar.xz
8e29c5073c871cb1a2128c717500b325  kxmlgui-5.19.0.tar.xz
95e4a58669b64aff6b4341ec3438eac4  kbookmarks-5.19.0.tar.xz
f7a87528e9f0fba984323d26773cd553  kio-5.19.0.tar.xz
045ed4200129ee96b8ca521a005ac33c  kdeclarative-5.19.0.tar.xz
3b94a572bc0d4ca9acff03f6f37421d3  kcmutils-5.19.0.tar.xz
5ff469c4b86c11bae91b1ee43a8fe386  frameworkintegration-5.19.0.tar.xz
3c40a568bfe04957ad68b9fa1afe54fd  kinit-5.19.0.tar.xz
d5855a91bf2579f9faafce0563fa658f  knewstuff-5.19.0.tar.xz
6acd427037e73e23f3087db88ed11ecc  knotifyconfig-5.19.0.tar.xz
d1472c82637f2eecd4561b815b96c5e4  kparts-5.19.0.tar.xz
b5ceb59e0b354858849c6728d7df2c3d  kactivities-5.19.0.tar.xz
941612d0df418b20981dfe9430f94263  kded-5.19.0.tar.xz
a6a871e08809693934ea8f4b255f8065  kdewebkit-5.19.0.tar.xz
165cc67fc95363ffa6e247b230965b09  ktexteditor-5.19.0.tar.xz
be9704c908fe4a7d8ab04b14192f9948  kdesignerplugin-5.19.0.tar.xz
dbb2096267291d4a36482575c00a3c58  plasma-framework-5.19.0.tar.xz
#a7cdce5f943c6bf9b5190f96942d3042  modemmanager-qt-5.19.0.tar.xz
bb7bc4b9d6f1433538692d63506bac86  kpeople-5.19.0.tar.xz
590e3f07e6e47564208f1d1f94df4315  kxmlrpcclient-5.19.0.tar.xz
58377c34045907d67140df9167417919  bluez-qt-5.19.0.tar.xz
dc869a38e8dcde117d91b9de656be324  kfilemetadata-5.19.0.tar.xz
58351139c7bf473b08ab7fa3220ede8b  baloo-5.19.0.tar.xz
#f5a4a9776492c8438524fad00ba606cc  breeze-icons-5.19.0.tar.xz
#dc41677e256fbe7b853e4d9568b1a5c9  oxygen-icons5-5.19.0.tar.xz
c81cc309513c4c7f075e0e922a3bceff  portingAids/kjs-5.19.0.tar.xz
7b6b02db93202ba8948d47a6b6b1abff  portingAids/kdelibs4support-5.19.0.tar.xz
ff9f526613bec9cae31aab8856624266  portingAids/khtml-5.19.0.tar.xz
39ca8356ee4646146030a38ac831a33c  portingAids/kjsembed-5.19.0.tar.xz
fb28b85be8a78b276bbcadc7c6166a69  portingAids/kmediaplayer-5.19.0.tar.xz
3ed3ca232a3b6a2859a37a7b0017ded9  portingAids/kross-5.19.0.tar.xz
c43cef2cc5b9322dd34c849ba3474c89  portingAids/krunner-5.19.0.tar.xz
EOF
        
          In the above list, notice that some files have been commented out
          with a hash (#) character. The extra-cmake-modules entry has been
          commented out because it was built earlier in the Introduction to
          KDE. The icon packages are covered separately at breeze-icons-5.19.0 and oxygen-icons5-5.19.0. The
          modemmanager-qt package may be built if its optional dependency has
          been installed.
        
       
      
        
          Installation of KDE Frameworks
        
        
          
          
            Note
          
          
            When installing multiple packages in a script, the installation
            needs to be done as the root user. There are three general
            options that can be used to do this:
          
          
            
              - 
                
                  Run the entire script as the root user (not recommended).
                
               
              - 
                
                  Use the sudo
                  command from the Sudo-1.8.15
                  package.
                
               
              - 
                
                  Use su -c "command
                  arguments" (quotes required) which will ask
                  for the root password for every iteration of the loop.
                
               
            
           
          
            One way to handle this situation is to create a short
            bash function that
            automatically selects the appropriate method. Once the command is
            set in the environment, it does not need to be set again.
          
          
as_root()
{
  if   [ $EUID = 0 ];        then $*
  elif [ -x /usr/bin/sudo ]; then sudo $*
  else                            su -c \\"$*\\"
  fi
}
export -f as_root
         
        
          
          
            Caution
          
          
            If inatalling in /opt and there is an existing /opt/kf5 either as
            a regular directory or a symbolic link, it should be removed (as
            root):
          
          
rm -rf /opt/kf5
         
        
          First, start a subshell that will exit on error:
        
        
bash -e
        
          Install all of the packages by running the following commands:
        
        
while read -r line; do
    # Get the file name, ignoring comments and blank lines
    if $(echo $line | grep -E -q '^ *$|^#' ); then continue; fi
    file=$(echo $line | cut -d" " -f2)
    pkg=$(echo $file|sed 's|^.*/||')          # Remove directory
    packagedir=$(echo $pkg|sed 's|\.tar.*||') # Package directory
    tar -xf $file
    pushd $packagedir
      mkdir build
      cd    build
      cmake -DCMAKE_INSTALL_PREFIX=$KF5_PREFIX \
            -DCMAKE_PREFIX_PATH=$QT5DIR        \
            -DCMAKE_BUILD_TYPE=Release         \
            -DLIB_INSTALL_DIR=lib              \
            -DBUILD_TESTING=OFF                \
            -Wno-dev ..
      make
      as_root make install
  popd
  rm -rf $packagedir
  as_root /sbin/ldconfig
done < frameworks-5.19.0.md5
exit
        
          
          
            Note
          
          
            Any modules that have been omitted can be installed later by
            using the same mkdir build; cd build; cmake; make; make install
            procedure as above.
          
         
        
          Sometimes the installation paths are hardcoded into installed
          files. If the installed directory is not /usr, rename the directory
          and create a symlink:
        
        
mv -v /opt/kf5 /opt/kf5-5.19.0
ln -sfvn kf5-5.19.0 /opt/kf5
       
      
        
          Command Explanations
        
        
          -DCMAKE_PREFIX_PATH=$QT5DIR: This
          switch is used to allow cmake to find the proper Qt libraries.
        
        
          -DCMAKE_BUILD_TYPE=Release:
          This switch is used to apply higher level of the compiler
          optimizations.
        
        
          -DLIB_INSTALL_DIR=lib: This
          switch is used to get libraries to install to $KF5_PREFIX/lib instead of $KF5_PREFIX/lib64 on a 64 bit system.
        
        
          -DBUILD_TESTING=OFF: This
          switch is used to prevent building test programs and libraries that
          are of no use to an end user.
        
       
      
        
          Contents
        
        
          
            
              Installed Programs:
              There are 53 programs installed in
              /opt/kf5/bin.
            
            
              Installed Libraries:
              There are too many kf5 libraries (79) to
              list separately.
            
            
              Installed Directories:
              /opt/kf5 (symlink to
              /opt/kf5-5.19.0)
            
           
         
        
          
            Short Descriptions
          
          
            
            
              
                | 
                   
                    checkXML5
                   
                 | 
                
                   
                    is a tool to check for syntax errors in KDE DocBook XML
                    files.
                   
                 | 
              
              
                | 
                   
                    depdiagram-generate
                   
                 | 
                
                   
                    is a tool to generate a dependency diagram.
                   
                 | 
              
              
                | 
                   
                    depdiagram-generate-all
                   
                 | 
                
                   
                    is a tool to generate a dependency diagram for all
                    frameworks at once..
                   
                 | 
              
              
                | 
                   
                    depdiagram-prepare
                   
                 | 
                
                   
                    is a tool to prepare dot files.
                   
                 | 
              
              
                | 
                   
                    desktoptojson
                   
                 | 
                
                   
                    is a tool to convert a .desktop file to a .json file.
                   
                 | 
              
              
                | 
                   
                    kactivitymanagerd
                   
                 | 
                
                   
                    is the KDE Plasma Workspace Activity Manager.
                   
                 | 
              
              
                | 
                   
                    kbuildsycoca5
                   
                 | 
                
                   
                    rebuilds the KService desktop file system configuration
                    cache.
                   
                 | 
              
              
                | 
                   
                    kcookiejar5
                   
                 | 
                
                   
                    is a command line interface to the HTTP cookie store used
                    by KDE, a D-BUS service to store/retrieve/clean cookies.
                   
                 | 
              
              
                | 
                   
                    kded5
                   
                 | 
                
                   
                    consolidates several small services in one process.
                   
                 | 
              
              
                | 
                   
                    kdeinit5
                   
                 | 
                
                   
                    is a process launcher somewhat similar to the famous init
                    used for booting UNIX.
                   
                 | 
              
              
                | 
                   
                    kf5-config
                   
                 | 
                
                   
                    is a command line program used to retrieve information
                    about KDE installation or user paths.
                   
                 | 
              
              
                | 
                   
                    kf5kross
                   
                 | 
                
                   
                    executes kross scripts written in KDE Javascript, Python,
                    Ruby, Java and Falcon.
                   
                 | 
              
              
                | 
                   
                    kgenapidox
                   
                 | 
                
                   
                    is a tool to generate API documentation in the KDE style.
                   
                 | 
              
              
                | 
                   
                    kgendesignerplugin
                   
                 | 
                
                   
                    generates widget plugins for Qt(TM) Designer.
                   
                 | 
              
              
                | 
                   
                    kglobalaccel5
                   
                 | 
                
                   
                    is a daemon use to register the key bindings and for
                    getting notified when the action triggered.
                   
                 | 
              
              
                | 
                   
                    kjs5
                   
                 | 
                
                   
                    is KDE ECMAScript/JavaScript engine.
                   
                 | 
              
              
                | 
                   
                    kjscmd5
                   
                 | 
                
                   
                    is a tool for launching KJSEmbed scripts from the command
                    line.
                   
                 | 
              
              
                | 
                   
                    kjsconsole
                   
                 | 
                
                   
                    is a console for kjs5.
                   
                 | 
              
              
                | 
                   
                    kmailservice5
                   
                 | 
                
                   
                    is a mail service.
                   
                 | 
              
              
                | 
                   
                    kpackagelauncherqml
                   
                 | 
                
                   
                    is a commandline tool for launching kpackage QML
                    application
                   
                 | 
              
              
                | 
                   
                    kpackagetool5
                   
                 | 
                
                   
                    is a command line kpackage tool.
                   
                 | 
              
              
                | 
                   
                    kreadconfig5
                   
                 | 
                
                   
                    is a command line tool to retrieve values from KDE
                    configuration files.
                   
                 | 
              
              
                | 
                   
                    kshell5
                   
                 | 
                
                   
                    start applications via kdeinit.
                   
                 | 
              
              
                | 
                   
                    ktelnetservice5
                   
                 | 
                
                   
                    is a telnet service.
                   
                 | 
              
              
                | 
                   
                    ktrash5
                   
                 | 
                
                   
                    is a helper program to handle the KDE trash can.
                   
                 | 
              
              
                | 
                   
                    kwalletd5
                   
                 | 
                
                   
                    is the wallet manager daemon.
                   
                 | 
              
              
                | 
                   
                    kwriteconfig5
                   
                 | 
                
                   
                    is a command line tool to write values in KDE
                    configuration files.
                   
                 | 
              
              
                | 
                   
                    meinproc5
                   
                 | 
                
                   
                    converts DocBook files to HTML.
                   
                 | 
              
              
                | 
                   
                    plasmapkg2
                   
                 | 
                
                   
                    is a tool to install, list, remove Plasma packages
                   
                 | 
              
              
                | 
                   
                    preparetips5
                   
                 | 
                
                   
                    is a script to extract the text from a tips file.
                   
                 | 
              
              
                | 
                   
                    solid-hardware5
                   
                 | 
                
                   
                    is a command line tool to investigate available devices.
                   
                 | 
              
            
          
         
       
      
        Last updated on 2016-02-28 12:29:40 -0800