1 ################################################################################
3 # qt4-qmake.cygclass - functions for building QMake-based Qt4 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/qt4-qmake.cygclass
28 # This cygclass builds Qt4-based packages which use the qmake build system.
35 #****C* qt4-qmake.cygclass/cygqmake4
40 # Generates Makefiles from the package's qmake project files.
43 if [ ! -x ${QT4_QMAKE} ]
45 error "libQtCore4-devel is required to build this package"
48 ${QT4_QMAKE} -recursive \
49 QMAKE_CFLAGS_RELEASE="${CFLAGS}" \
50 QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" \
51 QMAKE_LFLAGS="${LDFLAGS}" \
54 QMAKE_PROJECT_DEPTH=0 \
55 ${CYGQMAKE4_ARGS} "${@}" \
56 || error "qmake failed"
59 #****C* qt4-qmake.cygclass/qt4_qmake_compile
67 #****I* qt4-qmake.cygclass/qt4_qmake_install
72 # Installs the package into $D and fixes some common installation issues.
74 # Many qmake projects do not define correct install rules, if any at all.
75 # qt4_qmake_install is of no use in such cases; you must use manual
76 # installation commands instead.
81 make install INSTALL_ROOT=${D} || error "make install failed"
83 for dll in $(find ${D}$(__host_prefix)/lib/ -maxdepth 1 -name '*.dll' 2> /dev/null)
85 dodir $(__host_prefix)/bin
86 mv ${dll} ${D}$(__host_prefix)/bin/
90 #****o* qt4-qmake.cygclass/src_compile (qt4-qmake)
99 #****o* qt4-qmake.cygclass/src_install (qt4-qmake)
107 readonly -f cygqmake4 qt4_qmake_compile qt4_qmake_install