1 # Build recipe for tqt3 (trinity).
3 # Copyright (c) 2019-2022 Matias Fonzo, <selk@dragora.org>.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 # Exit immediately on any error
21 version=20220430_ec04b50a
24 # Define a category for the output of the package name
27 tarname=${program}-${version}.tar.lz
31 https://dragora.mirror.garr.it/current/sources/$tarname
32 rsync://rsync.dragora.org/current/sources/$tarname
36 Qt is a multiplatform C++ GUI application framework.
38 Qt 3.3 introduces new features and many improvements over
39 the 3.2.x series. See the changes file for details.
41 The Qt version 3.3 series is binary compatible with the
42 3.2.x series - applications compiled for 3.2 will continue
46 homepage=https://www.trinitydesktop.org/
47 license="GPLv2+, GPLv3+ | The Q Public License"
49 # Source documentation
50 docs="FAQ LICENSE* README*"
51 docsdir="${docdir}/${program}-${version}"
55 unpack "${tardir}/$tarname"
59 # Remove unneeded specs for targets other than GNU/Linux
60 ( cd mkspecs && find . -maxdepth 1 \( -type d -a ! -name 'linux-g++' \) -exec rm -rf -- '{}' \; )
62 # Do not build the HTML documentation in order to save disk space
63 #sed -i '/htmldocs/d' src/qt_install.pri
65 # Set custom compilation flags from Qi
67 -e "s:QMAKE_CFLAGS_RELEASE.*=:QMAKE_CFLAGS_RELEASE=${QICXXFLAGS} :" \
68 mkspecs/linux*/qmake.conf
70 # Set sane permissions
71 chmod -R u+w,go-w,a+rX-s .
73 LD_LIBRARY_PATH="${PWD}/lib:${LD_LIBRARY_PATH}"
74 LD_LIBRARY_PATH="${LD_LIBRARY_PATH%%:*}"; # Get the rid of ":".
75 export LD_LIBRARY_PATH
76 echo "New LD_LIBRARY_PATH: $LD_LIBRARY_PATH"
78 echo yes | ./configure \
79 -L/usr/lib${libSuffix} \
80 -I/usr/include/freetype2 \
81 -I/usr/include/tirpc \
83 -libdir "/usr/lib${libSuffix}" \
84 -sysconfdir "/etc/tqt3" \
85 -headerdir "/usr/include/tqt3" \
86 -plugindir "/usr/lib${libSuffix}/tqt3/plugins" \
87 -datadir "/usr/share/tqt3" \
88 -translationdir "/usr/share/tqt3/translations" \
118 make -i -j${jobs} sub-tools
119 make -j${jobs} INSTALL_ROOT="$destdir" install
121 unset -v LD_LIBRARY_PATH
123 # Strip remaining binaries and libraries
124 find "$destdir" -type f | xargs file | \
125 awk '/ELF/ && /executable/ || /shared object/' | \
126 cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
128 # Compress and link man pages (if needed)
129 if test -d "${destdir}/$mandir"
132 cd "${destdir}/$mandir"
133 find . -type f -exec lzip -9 {} +
134 find . -type l | while read -r file
136 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
143 mkdir -p "${destdir}/$docsdir"
144 cp -p $docs "${destdir}/$docsdir"