1 ################################################################################
3 # qt3.cygclass - functions for building Qt3-dependent 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/qt3.cygclass
28 # Qt is a C++ cross-platform application framework for writing desktop GUI
29 # applications. Qt is the underlying toolkit used by the KDE desktop
32 # This cygclass provides definitions and install functions which can be used
33 # by all Qt3-based packages, regardless of the build system being used.
35 # * Packages based on the newer 4.x or 5.x versions of Qt must use
36 # qt4.cygclass or qt5.cygclass, respectively.
37 # * The 3.x version of Qt is deprecated. Support for Qt3 may be dropped in
40 # kde3.cygclass, qt3-qmake.cygclass
43 #****d* qt3.cygclass/QTDIR
45 # Root directory of the Qt3 installation. This variable is exported to the
48 #****d* qt3.cygclass/QT3_BINDIR
50 # Directory containing the Qt3 development tools.
52 #****d* qt3.cygclass/QT3_INCLUDEDIR
54 # Directory containing the Qt3 library headers.
56 #****d* qt3.cygclass/QT3_LIBDIR
58 # Directory containing the Qt3 link libraries.
60 #****d* qt3.cygclass/QT3_PLUGINSDIR
62 # Installation path for Qt3 plugins.
64 #****d* qt3.cygclass/QT3_DATADIR
66 # Directory containing the Qt3 documentation and translation data.
71 export QTDIR=${CROSS_PREFIX}
72 QT3_BINDIR=${CROSS_BINDIR}
73 QT3_INCLUDEDIR=${CROSS_INCLUDEDIR}/qt3
74 QT3_LIBDIR=${CROSS_LIBDIR}
75 QT3_PLUGINSDIR=${CROSS_LIBDIR}/qt3/plugins
76 QT3_DATADIR=${CROSS_DATADIR}/qt3
78 export QTDIR=/usr/lib/qt3
79 QT3_BINDIR=${QTDIR}/bin
80 QT3_INCLUDEDIR=/usr/include/qt3
82 QT3_PLUGINSDIR=${QTDIR}/plugins
83 QT3_DATADIR=/usr/share/qt3
86 #****d* qt3.cygclass/QT3_QMAKE
88 # Absolute path to the Qt3 project and Makefile generator.
90 QT3_QMAKE=/usr/lib/qt3/bin/qmake
92 #****d* qt3.cygclass/QT3_MOC
94 # Absolute path to the Qt3 Meta-Object Compiler.
96 QT3_MOC=/usr/lib/qt3/bin/moc
98 #****d* qt3.cygclass/QT3_UIC
100 # Absolute path to the Qt3 User Interface Compiler.
102 QT3_UIC=/usr/lib/qt3/bin/uic
107 # FIXME: -64 varieties
109 *-ibm-aix*) spec="aix-g++" ;;
110 *-*-bsdi*) spec="bsdi-g++" ;;
111 *-*-cygwin*) spec="cygwin-g++" ;;
112 *-*-darwin*) spec="darwin-g++" ;;
113 *-*-dgux*) spec="dgux-g++" ;;
114 *-*-freebsd*) spec="freebsd-g++" ;;
115 *-*-hpux) spec="hpux-g++" ;;
116 *-*-irix) spec="irix-g++" ;;
117 *-*-linux*) spec="linux-g++" ;;
118 *-*-lynxos*) spec="lynxos-g++" ;;
119 *-*-netbsd*) spec="netbsd-g++" ;;
120 *-*-openbsd*) spec="openbsd-g++" ;;
121 *-*-qnx*) spec="qnx-g++" ;;
122 *-*-sco*) spec="sco-g++" ;;
123 *-*-solaris*) spec="solaris-g++" ;;
124 *-*-osf*) spec="tru64-g++" ;;
125 *-*-sysv4.2uw*) spec="unixware-g++" ;;
126 *-*-mingw*) spec="win32-g++" ;;
127 # must be last to avoid false positives from *-*-KERNEL-gnu
128 *-*-gnu*) spec="hurd-g++" ;;
129 *) error "Host ${CHOST} is not supported by Qt3" ;;
135 QMAKESPEC=$(__qt3_qmakespec)
137 export PATH="/usr/lib/qt3/bin:${PATH}"
139 #****I* qt3.cygclass/doqt3inc
143 # Installs headers into QT3_INCLUDEDIR under $D.
146 insinto ${QT3_INCLUDEDIR}
150 #****I* qt3.cygclass/doqt3lib
154 # Installs link libraries into QT3_LIBDIR under $D.
157 insinto ${QT3_LIBDIR}
161 #****I* qt3.cygclass/qt3pluginto
163 # qt3pluginto SUBDIRECTORY
165 # Sets the subdirectory of QT3_PLUGINDIR in which doqt3plugin should install.
166 # Supported subdirectores include:
167 # * crypto: Qt Cryptographic Architecture backends
168 # * designer: Qt Designer widgets
169 # * imageformats: image format handlers
170 # * sqldrivers: SQL datbase backends
171 # * styles: GUI style engines
174 if [ -z "${1}" -o -n "${2}" ]
176 error "qt3pluginto requires exactly one argument"
179 __QT3_PLUGIN_SUBDIR=${1}
182 #****I* qt3.cygclass/doqt3plugin
184 # qt3pluginto SUBDIRECTORY
185 # doqt3plugin PLUGINS
187 # Installs the given plugins into the subdirectory of QT3_PLUGINDIR passed
188 # to the previous call to qt3pluginto.
191 if ! defined __QT3_PLUGIN_SUBDIR
193 error "qt3pluginto must be called before doqt3plugin"
196 exeinto ${QT3_PLUGINSDIR}/${__QT3_PLUGIN_SUBDIR}
200 readonly -f doqt3inc doqt3lib qt3pluginto doqt3plugin