Was supposed to be a linux distribution, now just a collection of build scripts for packages on top of (ideally) any distribution.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
2.4 KiB

name=qt5
submodule=base
majver=5.9
8 years ago
version=$majver.1
update_url='https://www.qt.io/download-open-source/'
8 years ago
update_names="qt-everywhere-opensource-src-$version.tar.xz"
optional_libraries='libpng libjpeg freetype harfbuzz xcb xkbcommon-x11'
for opt in $optional_libraries; do
8 years ago
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" \
8 years ago
'5a74869fc3731bcb8311e62e235d11a7'
_
cd "qt$submodule-opensource-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 $optional_libraries; do
option $opt && optional="$optional -system-$opt" || optional="$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 \
-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-sqlite \
-system-zlib \
-system-pcre \
-qt-doubleconversion \
-openssl-linked \
-dbus-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: