1 ################################################################################
3 # qt5-qmake.cygclass - functions for building QMake-based Qt5 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/qt5-qmake.cygclass
28 # This cygclass builds Qt5-based packages which use the qmake build system,
29 # including the Qt5 non-base components themselves.
36 #****C* qt5-qmake.cygclass/cygqmake5
38 # cygqmake5 FILE_OR_DIRECTORY
40 # Generates Makefiles from the specified qmake project file (or directory
41 # containing such file).
44 if [ ! -x ${QT5_QMAKE} ]
46 error "libQt5Core-devel is required to build this package"
50 QMAKE_CFLAGS_RELEASE="${CFLAGS}" \
51 QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" \
54 QMAKE_PROJECT_DEPTH=0 \
55 ${CYGQMAKE5_ARGS} "${@}" \
56 || error "qmake failed"
59 #****C* qt5-qmake.cygclass/qt5_qmake_compile
67 #****I* qt5-qmake.cygclass/qt5_qmake_install
70 # qt5_qmake_install [OPTIONS]
72 # Installs the package into $D and fixes some common installation issues.
73 # Any additional arguments (which may be either variable overrides or
74 # additional install targets) are passed directly to make.
76 # Many qmake projects do not define correct install rules, if any at all.
77 # qt5_qmake_install is of no use in such cases; you must use manual
78 # installation commands instead.
83 make INSTALL_ROOT=${D} install ${@} || error "make install failed"
85 for dll in $(find ${D}$(__host_prefix)/lib/ -maxdepth 1 -name '*.dll' 2> /dev/null)
87 dodir $(__host_prefix)/bin
88 mv ${dll} ${D}$(__host_prefix)/bin/
90 # dlname would need to be fixed for ../bin, and old_library
91 # made empty, but we don't want .la files anyway
92 la=$(echo ${dll} | sed -e 's|cyg\([^/]*\)-[0-9]*\.dll|lib\1.la|')
100 #****o* qt5-qmake.cygclass/src_compile (qt5-qmake)
108 #****o* qt5-qmake.cygclass/src_install (qt5-qmake)
116 readonly -f cygqmake5 qt5_qmake_compile qt5_qmake_install