1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/plasma-framework/kde-conf.in
3 # Copyright (C) 2004 - 2021 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; version 2 of the License. A copy of the
11 # GNU General Public License can be found in the file COPYING.
12 # --- T2-COPYRIGHT-NOTE-END ---
14 if [ "$prefix_auto" = 1 ]; then
15 if [ "$1" == "NO_SANITY_CHECK" ]; then
16 if [ "$SDECFG_PKG_KDE_CORE_PREFIX" ]; then
17 prefix="$SDECFG_PKG_KDE_CORE_PREFIX"
21 elif pkginstalled kde-extra-cmake-modules; then
22 pkgprefix -t kde-extra-cmake-modules
23 prefix=`pkgprefix kde-extra-cmake-modules`
28 export ECM_DIR=/opt/kde/share/ECM/cmake
30 # make sure the right qt and kde libs are used
32 export PATH="$(pkgprefix bindir qt5):$PATH"
33 export LD_LIBRARY_PATH="$QTDIR/${libdir##*/}:/$prefix/${libdir##*/}:$LD_LIBRARY_PATH"
36 # KDE specific cmake options
37 var_append extraconfopt " " "-DCMAKE_INSTALL_PREFIX=/$prefix -DLIB_SUFFIX=${libdir##*/lib}"
38 var_append extraconfopt " " '-DCMAKE_BUILD_TYPE=Release'
40 #TODO, this needs to be fixed, hardcoded atm
41 var_append extraconfopt " " '-DDOCBOOKXML_CURRENTDTD_DIR=$root/usr/share/xml/docbook/docbook-xml-dtd-4.2'
42 var_append extraconfopt " " '-DDOCBOOKXSL_DIR=$root/usr/share/xml/docbook/docbook-xsl-1.75.2'
44 # some feature and optimization settings ...
46 if pkginstalled openldap; then
48 var_append confopt " " "--with-ldap=$root/$( pkgprefix openldap )"
50 var_append confopt " " "--with-xinerama --enable-dnotify"
52 [ $arch = x86 ] && var_append confopt " " "--enable-fast-malloc=full"
53 [[ $libdir != *lib ]] && var_append confopt " " "--enable-libsuffix=${libdir##*/lib}"
56 if [ -f CMakeLists.txt ]; then
57 mkdir objdir; cd objdir
58 var_remove_regex confopt ' ' '--.*'
59 var_remove_regex extraconfopt ' ' '--.*'
60 eval cmake .. $confopt $extraconfopt
63 hook_add preconf 3 "kde_cmake"