@ -1,20 +1,15 @@
name=qt5
submodule=base
majver=5.9
version=$majver.3
update_url='https://www.qt.io/download-open-source /'
majver=5.10
version=$majver.1
update_url='https://www1.qt.io/offline-installers /'
update_names="qt-everywhere-opensource-src-$version.tar.xz"
optional_libraries='libpng libjpeg freetype harfbuzz xcb xkbcommon-x11'
for opt in $optional_libraries; do
define_option "$opt: Enable support for $opt"
done
dlextract "http://download.qt.io/official_releases/qt/$majver/$version/submodules/qt$submodule-opensource-src-$version.tar.xz" \
'96f79e2350c7597632abade992fd3f8f'
dlextract "http://download.qt.io/official_releases/qt/$majver/$version/submodules/qt$submodule-everywhere-src-$version.tar.xz" \
'1d5ebf49abb2897d573cee622a12f54d'
_
cd "qt$submodule-opensourc e-src-$version"
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
@ -23,12 +18,15 @@ sed -i -e "s/^\(QMAKE_LFLAGS_RELEASE.*\)/\1 $(safe_sed "$LDFLAGS")/" mkspecs/com
# 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 $optional_libraries; do
option $opt && optional="$optional -system-$opt" || optional="$optional -no-$opt"
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
# NOTE: Only double-conversion from Qt itself is used, as there's no recent stable version available, due to lack of maintenance (last I can find is 1.1.5 from 2014, but there's scripts to build 2.0.1, for example in AUR, yet there's no proper place to get the sources for that).
./configure -confirm-license -opensource \
# TODO: Use system double-conversion
./configure -v - confirm-license -opensource \
-prefix "/$dir_prefix" \
-libdir "/$dir_prefix/$dir_lib" \
-headerdir "/$dir_prefix/$dir_include/$name" \
@ -38,12 +36,12 @@ done
-archdatadir "/$dir_prefix/$dir_lib/$name" \
-docdir "/$dir_prefix/$dir_doc/$name" \
-examplesdir "/$dir_prefix/$dir_doc/$name/examples" \
-system-sqlite \
-system-zlib \
-system-pcre \
-system-zlib \
-system-sqlite \
-qt-doubleconversion \
-openssl-linked \
-dbus-linked \
-openssl-linked \
-nomake examples \
$optional
make