1 ################################################################################
3 # kf5.cygclass - functions for building KDE Frameworks 5.x packages
5 # Part of cygport - Cygwin packaging application
6 # Copyright (C) 2006-2020 Cygport authors
7 # Provided by the Cygwin project <https://cygwin.com/>
9 # cygport is free software: you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation, either version 3 of the License, or
12 # (at your option) any later version.
14 # cygport is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with cygport. If not, see <https://www.gnu.org/licenses/>.
22 ################################################################################
24 #****h* Cygclasses/kf5.cygclass
28 # The KDE project provides a full-featured X desktop with a wide variety
29 # of applications, built on a library stack all based on the Qt C++ libraries.
30 # Most packages are written in C++ and are built with CMake.
32 # This cygclass manages the building of most KF5-based packages.
34 # cmake.cygclass, kde.org.cygclass, qt5.cygclass
37 inherit cmake qt5 kde.org
39 export QTDIR=${QT5_QTDIR}
40 export QT_PLUGIN_PATH=${QT5_PLUGINSDIR}
42 #****C* kf5.cygclass/kf5_cmake
46 # Runs cygcmake to configure the package with several Cygwin- and KF5-specific
47 # options. Additional options, in the form of -DVARIABLE=VALUE,
48 # are passed on to cygcmake.
50 # cmake, extra-cmake-modules, libQt5Core-devel, libQt5Gui-devel
54 -DPLUGIN_INSTALL_DIR=${QT5_PLUGINSDIR} \
55 -DQT_PLUGIN_INSTALL_DIR=${QT5_PLUGINSDIR} \
56 -DIMPORTS_INSTALL_DIR=${QT5_IMPORTSDIR} \
57 -DQML_INSTALL_DIR=${QT5_QMLDIR} \
58 -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
59 -DKDE_INSTALL_LIBEXECDIR=$(__host_prefix)/libexec \
60 -DKDE_INSTALL_SYSCONFDIR=$(__host_sysconfdir) \
61 -DKDE_INSTALL_LOCALSTATEDIR=$(__host_localstatedir) \
62 -DECM_MKSPECS_INSTALL_DIR=${QT5_MKSPECSDIR}/modules \
66 #****C* kf5.cygclass/kf5_compile
68 # kf5_compile [OPTIONS]
70 # Runs kf5_cmake, followed by cygmake or cygninja to compile. Options, in the
71 # form of -DVARIABLE=VALUE, are passed on to kf5_cmake.
74 : ${CYGCMAKE_GENERATOR=Ninja}
84 #****I* kf5.cygclass/kf5_install
86 # kf5_install [OPTIONS]
88 # Installs a KF5 package with cyginstall into $D, with the following addition:
89 # * Import libraries for plugins and libkdeinit5_* libraries are removed.
90 # Options, if any, are passed on to cyginstall.
100 rm -f ${D}/usr/lib/libkdeinit5_*
102 # QML plugins are built as SHARED, *not* MODULE because ECM sets
103 # CMAKE_SHARED_MODULE_PREFIX to empty (for full-fledged KDE plugins).
104 # QML/Quick plugins still need the prefix however, but that results
105 # in the installation of import libraries which we don't need.
106 if [ -d ${D}${QT5_QMLDIR} ]
108 find ${D}${QT5_QMLDIR} -type f -name '*.dll.a' -delete
112 #****o* kf5.cygclass/src_compile (kf5)
116 : ${CYGCMAKE_GENERATOR=Ninja}
118 if [ -f build.ninja ]
127 #****o* kf5.cygclass/src_install (kf5)
135 readonly -f kf5_cmake kf5_compile kf5_install