blob: b2c9496cb563838aabb351aaa7ae9d1ea084516f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
#!/bin/sh
NAME="qt5-qtbase"
DESC="Qt5 - QtBase components"
MAKEDEPS="dbus fontconfig freetype2 glib libice libpng libsm libx11 libxext mesa openssl perl sqlite3 zlib at-spi2-atk bison cups eudev flex gawk gperf gtk2 hicolor-icon-theme icu libinput libjpeg-turbo libxi libxkbcommon libxrandr libxrender libxslt libxv mtdev pcre2 xcb-util xcb-util-image xcb-util-keysyms xcb-util-renderutil xcb-util-wm"
PKG_VER=
_commit="f36c2233fad0bfddf9350305a6bdc6de022d3635"
SOURCE="https://invent.kde.org/qt/qt/qtbase/-/archive/$_commit/qtbase-$_commit.tar.gz"
ADDITIONAL="
qt-musl-iconv-no-bom.patch
qt5-base-cflags.patch
qt5-base-nostrip.patch
"
_qt5_prefix=/usr/lib/qt5
_qt5_datadir=/usr/share/qt5
prepare() {
apply_patches
sed -i -e "s|-O2|$CXXFLAGS|" \
-e "/^QMAKE_RPATH/s| -Wl,-rpath,||g" \
-e "/^QMAKE_LFLAGS\s/s|+=|+= $LDFLAGS|g" \
mkspecs/common/*.conf
# Make configure think we are running in a git directory
# This makes it symlink the include files to the right directory
mkdir .git
}
build() {
./configure -confirm-license -opensource \
-archdatadir "$_qt5_prefix" \
-bindir "$_qt5_prefix"/bin \
-datadir "$_qt5_datadir" \
-dbus-linked \
-docdir /usr/share/doc/qt5 \
-examplesdir /usr/share/doc/qt5/examples \
-glib \
-headerdir /usr/include/qt5 \
-icu \
-importdir "$_qt5_prefix"/imports \
-libexecdir "$_qt5_prefix"/libexec \
-no-rpath \
-no-separate-debug-info \
-no-pch \
-nomake examples \
-opengl \
-openssl-linked \
-optimized-qmake \
-plugin-sql-sqlite \
-plugindir "$_qt5_prefix"/plugins \
-prefix /usr \
-sysconfdir /etc/xdg \
-system-libjpeg \
-system-libpng \
-system-sqlite \
-system-zlib \
-translationdir "$_qt5_datadir"/translations \
-no-reduce-relocations
make
}
check() {
make check
}
package() {
make INSTALL_ROOT="$PKG_DEST" install
mkdir -p "$PKG_DEST"/usr/bin/
for i in "$PKG_DEST"/"$_qt5_prefix"/bin/*; do
_name=${i##*/}
case $_name in
*.*) _dest="$PKG_DEST"/usr/bin/${_name%.*}-qt5.${_name##*.};;
*) _dest="$PKG_DEST"/usr/bin/${_name%.*}-qt5;;
esac
ln -s ../lib/qt5/bin/"$_name" "$_dest"
done
# Drop QMAKE_PRL_BUILD_DIR because reference the build dir
find "$PKG_DEST/usr/lib" -type f -name '*.prl' \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
}
|