|
|
|
name=qt5
|
|
|
|
submodule=base
|
|
|
|
majver=5.10
|
|
|
|
version=$majver.1
|
|
|
|
update_url='https://www1.qt.io/offline-installers/'
|
|
|
|
update_names="qt-everywhere-opensource-src-$version.tar.xz"
|
|
|
|
|
|
|
|
dlextract "http://download.qt.io/official_releases/qt/$majver/$version/submodules/qt$submodule-everywhere-src-$version.tar.xz" \
|
|
|
|
'1d5ebf49abb2897d573cee622a12f54d'
|
|
|
|
_
|
|
|
|
|
|
|
|
cd "qt$submodule-everywhere-src-$version"
|
|
|
|
|
|
|
|
# Build using custom CFLAGS, CXXFLAGS and LDFLAGS (Shamelessly stolen from ArchLinux)
|
|
|
|
sed -i -e "s/^\(QMAKE_CFLAGS_RELEASE.*\)/\1 $(safe_sed "$CFLAGS")/" mkspecs/common/gcc-base.conf
|
|
|
|
sed -i -e "s/^\(QMAKE_CXXFLAGS_RELEASE.*\)/\1 $(safe_sed "$CXXFLAGS")/" mkspecs/common/gcc-base.conf
|
|
|
|
sed -i -e "s/^\(QMAKE_LFLAGS_RELEASE.*\)/\1 $(safe_sed "$LDFLAGS")/" mkspecs/common/g++-unix.conf
|
|
|
|
|
|
|
|
# Make sure all the possible libraries are linked from the OS, as Qt might use it's own if they aren't available.
|
|
|
|
optional=""
|
|
|
|
for opt in libpng libjpeg freetype harfbuzz xcb xkbcommon-x11; do
|
|
|
|
lib="$opt"
|
|
|
|
[ "$lib" = 'freetype' ] && lib='freetype2'
|
|
|
|
|
|
|
|
pkg-config --exists "$lib" && optional+=" -system-$opt" || optional+=" -no-$opt"
|
|
|
|
done
|
|
|
|
|
|
|
|
# TODO: Use system double-conversion
|
|
|
|
./configure -v -confirm-license -opensource \
|
|
|
|
-prefix "/$dir_prefix" \
|
|
|
|
-libdir "/$dir_prefix/$dir_lib" \
|
|
|
|
-headerdir "/$dir_prefix/$dir_include/$name" \
|
|
|
|
-sysconfdir "/$dir_prefix/$dir_sysconf/xdg" \
|
|
|
|
-datadir "/$dir_prefix/$dir_data/$name" \
|
|
|
|
-bindir "/$dir_prefix/$dir_lib/$name/bin" \
|
|
|
|
-archdatadir "/$dir_prefix/$dir_lib/$name" \
|
|
|
|
-docdir "/$dir_prefix/$dir_doc/$name" \
|
|
|
|
-examplesdir "/$dir_prefix/$dir_doc/$name/examples" \
|
|
|
|
-system-pcre \
|
|
|
|
-system-zlib \
|
|
|
|
-system-sqlite \
|
|
|
|
-qt-doubleconversion \
|
|
|
|
-dbus-linked \
|
|
|
|
-openssl-linked \
|
|
|
|
-nomake examples \
|
|
|
|
$optional
|
|
|
|
make
|
|
|
|
make INSTALL_ROOT="$dir_install" install
|
|
|
|
|
|
|
|
mkdir -p "$dir_install/$dir_prefix/$dir_bin"
|
|
|
|
find "$dir_install/$dir_prefix/$dir_lib/$name/bin/" -type f -printf '%P\n' | while IFS= read bin; do
|
|
|
|
ln -s "/$dir_prefix/$dir_lib/$name/bin/$bin" "$dir_install/$dir_prefix/$dir_bin/$bin-$name"
|
|
|
|
done
|
|
|
|
|
|
|
|
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab:
|