opt/qt5/Pkgfile

130 lines
4.6 KiB
Plaintext
Raw Normal View History

2014-08-17 09:00:26 +02:00
# Description: Qt Free Edition, version 5.x
2015-06-04 13:53:15 +02:00
# URL: http://qt-project.org/
2014-11-10 13:25:50 +01:00
# Maintainer: Danny Rawlins, crux at romster dot me
2014-08-17 09:00:26 +02:00
# Packager: predrag ivanovic, predivan at open dot telekom dot rs
# Depends on: dbus gst-plugins-base gst-plugins-base-compat libmng mesa3d xorg-libxcursor xorg-libxi xorg-libxinerama xorg-libxrandr xorg-xcb-util-image xorg-xcb-util-wm xorg-xcb-util-keysyms
name=qt5
2016-05-18 16:54:05 +02:00
version=5.6.0
2016-06-03 10:33:32 +02:00
release=3
2016-06-01 13:01:36 +02:00
source=(http://download.qt.io/official_releases/qt/${version%.*}/$version/single/qt-everywhere-opensource-src-$version.tar.xz
qt5-alsa1.11.patch
qtbug-51648.patch
qtbug-51649.patch
qtbug-51676.patch
qtbug-45812.patch
qtbug-44964.patch
qtbug-53071.patch
2016-06-03 10:33:32 +02:00
qtbug-53071b.patch
qt5-webengine-nss.patch)
2014-08-17 09:00:26 +02:00
build() {
2014-09-28 09:40:04 +02:00
cd qt-everywhere-opensource-src-$version
2014-08-17 09:00:26 +02:00
2016-06-01 13:01:36 +02:00
# Backport fixes for QtDBus deadlocks
patch -p1 -d qtbase -i $SRC/qtbug-51648.patch
patch -p1 -d qtbase -i $SRC/qtbug-51649.patch
patch -p1 -d qtbase -i $SRC/qtbug-51676.patch
# Fix drag and drop from some applications
patch -p1 -d qtbase -i $SRC/qtbug-45812.patch
# Fix parsing of tzfile(5) POSIX rule zone names with bracket quotes
patch -p1 -d qtbase -i $SRC/qtbug-53071.patch
patch -p1 -d qtbase -i $SRC/qtbug-53071b.patch
# Don't compress tablet motion events
patch -p1 -d qtbase -i $SRC/qtbug-44964.patch
2016-06-03 10:33:32 +02:00
# Broken SSL for some sites #1870
# https://github.com/QupZilla/qupzilla/issues/1870
patch -p1 -d qtwebengine -i $SRC/qt5-webengine-nss.patch
2014-09-28 09:40:04 +02:00
# Respect system CXX
[ "$CXX" ] || CXX=g++
sed -i "/^QMAKE_CXX\s/s|=.*|= $CXX|" qtbase/mkspecs/common/g++-base.conf
2014-08-17 09:00:26 +02:00
2014-09-28 09:40:04 +02:00
# Remove obsolete xorg path
sed -i 's|X11R6/||g' qtbase/mkspecs/*/*.conf
2014-08-17 09:00:26 +02:00
2014-09-28 09:40:04 +02:00
# Respect system CXXFLAGS
sed -i "s|^\(QMAKE_CFLAGS_RELEASE.*\)|\1 ${CXXFLAGS}|" qtbase/mkspecs/common/gcc-base.conf
#sed -i "s|-O2|$CXXFLAGS|" qtbase/mkspecs/common/g++-unix.conf
#sed -i "s|-O2|${CXXFLAGS}|" qtbase/mkspecs/common/{g++,gcc}-base.conf
2014-08-17 09:00:26 +02:00
2014-09-28 09:40:04 +02:00
# Respect system LDFLAGS
sed -i "s|^\(QMAKE_LFLAGS_RELEASE.*\)|\1 ${LDFLAGS}|" qtbase/mkspecs/common/g++-unix.conf
#sed -i "/^QMAKE_LFLAGS\s/s|+=|+= ${LDFLAGS}|g" qtbase/mkspecs/common/gcc-base.conf
2014-08-17 09:00:26 +02:00
2014-09-28 09:40:04 +02:00
# Fix quoting bug
sed -i 's|"$COMPILER" -c|$COMPILER -c|' qtbase/config.tests/unix/fvisibility.test
2014-08-17 09:00:26 +02:00
2014-09-28 09:40:04 +02:00
export QTDIR="$PWD"
export LD_LIBRARY_PATH="$QTDIR/qtbase/lib:$QTDIR/qttools/lib:$LD_LIBRARY_PATH"
export QT_PLUGIN_PATH="$QTDIR/qtbase/plugins"
2014-08-17 09:00:26 +02:00
2014-09-28 09:40:04 +02:00
./configure -prefix /usr/share/qt5 \
2014-08-17 09:00:26 +02:00
-bindir /usr/share/qt5/bin \
-headerdir /usr/share/qt5/include \
-libdir /usr/share/qt5/lib \
-libexecdir /usr/share/qt5/lib \
-plugindir /usr/share/qt5/plugins \
2014-09-28 09:40:04 +02:00
-sysconfdir /usr/etc/xdg \
2014-08-17 09:00:26 +02:00
-openssl-linked -dbus-linked \
2014-09-28 09:40:04 +02:00
-system-lib{png,jpeg} -system-{zlib,sqlite} \
2014-08-17 09:00:26 +02:00
-no-cups -optimized-qmake \
-x{cursor,inerama,kb,randr,render} \
-nomake examples \
2014-09-28 09:40:04 +02:00
-no-separate-debug-info -no-strip -shared -no-rpath \
-opensource -confirm-license -release -reduce-relocations
2014-08-17 09:00:26 +02:00
2014-09-28 09:40:04 +02:00
make
make INSTALL_ROOT=$PKG install
2014-08-17 09:00:26 +02:00
2014-09-28 09:40:04 +02:00
# Fix paths
find $PKG/usr/share/qt5/lib -type f -name '*.prl' \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
2014-08-17 09:00:26 +02:00
2014-09-28 09:40:04 +02:00
sed -e "s|$PWD/qtbase|/usr/share/qt5/lib|g" \
-i $PKG/usr/share/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri
# Remove unnecessary files
rm -rf $(find $PKG/usr/share/qt5/mkspecs/* | \
egrep -v '(linux-g++|common|modules|pri|features)')
rm -f $PKG/usr/share/qt5/mkspecs/linux-g++/linux-g++
rm -rf $PKG/usr/share/qt5/mkspecs/features/{mac,win32}
rm -rf $PKG/usr/share/qt5/mkspecs/common/mac*
rm -rf $PKG/usr/share/qt5/{phrasebooks,translations}
# Install linker config
install -d $PKG/{etc/ld.so.conf.d,usr/{bin,lib,include}}
echo "/usr/share/qt5/lib" > $PKG/etc/ld.so.conf.d/qt5.conf
ln -s ../share/qt5/include $PKG/usr/include/qt5
ln -s ../share/qt5/lib $PKG/usr/lib/qt5
ln -s linux-g++ $PKG/usr/share/qt5/mkspecs/default
# Install pkg config
mv $PKG/usr/share/qt5/lib/pkgconfig $PKG/usr/lib
# Fix paths
sed \
-e "s|-L$SRC/qt-everywhere-opensource-src-$version/lib ||g" \
-e "s|$SRC/qt-everywhere-opensource-src-$version/bin|/usr/share/qt5/bin|g" \
-i $PKG/usr/lib/pkgconfig/*.pc
# Install useful symlinks
install -d $PKG/usr/bin
for b in $PKG/usr/share/qt5/bin/*; do
ln -s /usr/share/qt5/bin/$(basename $b) $PKG/usr/bin/$(basename $b)-qt5
done
2015-11-28 08:21:13 +01:00
# cmake
install -d $PKG/usr/lib/cmake
for b in $PKG/usr/share/qt5/lib/cmake/*; do
ln -s /usr/share/qt5/lib/cmake/$(basename $b) $PKG/usr/lib/cmake/$(basename $b)
done
2014-08-17 09:00:26 +02:00
}