qt5.guncellendi
This commit is contained in:
parent
6019779f4e
commit
a11bf97ca4
|
@ -19,173 +19,173 @@ source=(http://download.qt.io/official_releases/qt/${version%.*}/$version/single
|
|||
qt5-webengine-nss.patch)
|
||||
|
||||
build() {
|
||||
QT5PREFIX=/usr
|
||||
QT5BINDIR=$QT5PREFIX/lib/qt5/bin
|
||||
|
||||
|
||||
cd qt-everywhere-opensource-src-$version
|
||||
|
||||
# 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
|
||||
|
||||
# Broken SSL for some sites #1870
|
||||
# https://github.com/QupZilla/qupzilla/issues/1870
|
||||
patch -p1 -d qtwebengine -i $SRC/qt5-webengine-nss.patch
|
||||
|
||||
# Respect system CXX
|
||||
[ "$CXX" ] || CXX=g++
|
||||
sed -i "/^QMAKE_CXX\s/s|=.*|= $CXX|" qtbase/mkspecs/common/g++-base.conf
|
||||
|
||||
# Remove obsolete xorg path
|
||||
sed -i 's|X11R6/||g' qtbase/mkspecs/*/*.conf
|
||||
|
||||
# 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
|
||||
|
||||
# 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
|
||||
|
||||
# Fix quoting bug
|
||||
sed -i 's|"$COMPILER" -c|$COMPILER -c|' qtbase/config.tests/unix/fvisibility.test
|
||||
|
||||
export QTDIR="$PWD"
|
||||
export LD_LIBRARY_PATH="$QTDIR/qtbase/lib:$QTDIR/qttools/lib:$LD_LIBRARY_PATH"
|
||||
export QT_PLUGIN_PATH="$QTDIR/qtbase/plugins"
|
||||
|
||||
./configure -opensource -confirm-license \
|
||||
-prefix $QT5PREFIX \
|
||||
-sysconfdir /etc/xdg \
|
||||
-bindir $QT5BINDIR \
|
||||
-plugindir /usr/lib/qt5/plugins \
|
||||
-importdir /usr/lib/qt5/imports \
|
||||
-headerdir /usr/include/qt5 \
|
||||
-datadir /usr/share/qt5 \
|
||||
-translationdir /usr/share/qt5/translations \
|
||||
-plugin-sql-{psql,mysql,sqlite,odbc} \
|
||||
-openssl-linked -dbus-linked \
|
||||
-system-lib{png,jpeg} -system-{zlib,sqlite} \
|
||||
-no-cups -optimized-qmake \
|
||||
-x{cursor,inerama,kb,randr,render} \
|
||||
-nomake examples \
|
||||
-no-separate-debug-info -no-strip -shared -no-rpath \
|
||||
-release -reduce-relocations
|
||||
|
||||
make
|
||||
make INSTALL_ROOT=$PKG install
|
||||
|
||||
find $PKG/usr/ -name qt_lib_bootstrap_private.pri \
|
||||
-exec sed -i -e "s:$PWD/qtbase:/$QT5PREfiX/lib/:g" {} \; &&
|
||||
|
||||
find $PKG/usr -name \*.prl \
|
||||
-exec sed -i -e '/^QmAKE_PRL_BUiLD_DiR/d' {} \;
|
||||
|
||||
install -v -dm755 $PKG/usr/share/pixmaps/
|
||||
|
||||
install -v -Dm644 qttools/src/assistant/assistant/images/assistant-128.png \
|
||||
$PKG/usr/share/pixmaps/assistant-qt5.png
|
||||
|
||||
install -v -Dm644 qttools/src/designer/src/designer/images/designer.png \
|
||||
$PKG/usr/share/pixmaps/designer-qt5.png
|
||||
|
||||
install -v -Dm644 qttools/src/linguist/linguist/images/icons/linguist-128-32.png \
|
||||
$PKG/usr/share/pixmaps/linguist-qt5.png
|
||||
|
||||
install -v -Dm644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer-128.png \
|
||||
$PKG/usr/share/pixmaps/qdbusviewer-qt5.png
|
||||
|
||||
install -dm755 $PKG/usr/share/applications
|
||||
QT5PREFIX=/usr
|
||||
QT5BINDIR=$QT5PREFIX/lib/qt5/bin
|
||||
|
||||
|
||||
cat > $PKG/usr/share/applications/assistant-qt5.desktop << "EOf"
|
||||
[Desktop Entry]
|
||||
Name=Qt5 Assistant
|
||||
comment=Shows Qt5 documentation and examples
|
||||
Exec=$QT5BINDIR/assistant-qt5
|
||||
icon=assistant-qt5
|
||||
Terminal=false
|
||||
Encoding=UTf-8
|
||||
Type=Application
|
||||
categories=Qt;Development;Documentation;
|
||||
EOf
|
||||
cd qt-everywhere-opensource-src-$version
|
||||
|
||||
cat > $PKG/usr/share/applications/designer-qt5.desktop << "EOf"
|
||||
[Desktop Entry]
|
||||
Name=Qt5 Designer
|
||||
GenericName=interface Designer
|
||||
comment=Design GUis for Qt5 applications
|
||||
Exec=$QT5BINDIR/designer-qt5
|
||||
icon=designer-qt5
|
||||
mimeType=application/x-designer;
|
||||
Terminal=false
|
||||
Encoding=UTf-8
|
||||
Type=Application
|
||||
categories=Qt;Development;
|
||||
EOf
|
||||
# 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
|
||||
|
||||
cat > $PKG/usr/share/applications/linguist-qt5.desktop << "EOf"
|
||||
[Desktop Entry]
|
||||
Name=Qt5 Linguist
|
||||
comment=Add translations to Qt5 applications
|
||||
Exec=$QT5BINDIR/linguist-qt5
|
||||
icon=linguist-qt5
|
||||
mimeType=text/vnd.trolltech.linguist;application/x-linguist;
|
||||
Terminal=false
|
||||
Encoding=UTf-8
|
||||
Type=Application
|
||||
categories=Qt;Development;
|
||||
EOf
|
||||
# Fix drag and drop from some applications
|
||||
patch -p1 -d qtbase -i $SRC/qtbug-45812.patch
|
||||
|
||||
cat > $PKG/usr/share/applications/qdbusviewer-qt5.desktop << "EOf"
|
||||
[Desktop Entry]
|
||||
Name=Qt5 QDbusviewer
|
||||
GenericName=D-Bus Debugger
|
||||
comment=Debug D-Bus applications
|
||||
Exec=$QT5BINDIR/qdbusviewer-qt5
|
||||
icon=qdbusviewer-qt5
|
||||
Terminal=false
|
||||
Encoding=UTf-8
|
||||
Type=Application
|
||||
categories=Qt;Development;Debugger;
|
||||
EOf
|
||||
# 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
|
||||
|
||||
mkdir -p $PKG/etc/profile.d
|
||||
cat > $PKG/etc/profile.d/qt5.sh << EOf
|
||||
# Begin /etc/profile.d/qt5.sh
|
||||
# Don't compress tablet motion events
|
||||
patch -p1 -d qtbase -i $SRC/qtbug-44964.patch
|
||||
|
||||
QT5PREFIX=$QT5PREFIX
|
||||
QT5DIR=$QT5PREFIX
|
||||
QT5BINDIR=$QT5PREFIX/lib/qt5/bin
|
||||
export QT5PREFIX QT5BINDIR QT5DIR
|
||||
# Broken SSL for some sites #1870
|
||||
# https://github.com/QupZilla/qupzilla/issues/1870
|
||||
patch -p1 -d qtwebengine -i $SRC/qt5-webengine-nss.patch
|
||||
|
||||
# End /etc/profile.d/qt5.sh
|
||||
EOf
|
||||
# Respect system CXX
|
||||
[ "$CXX" ] || CXX=g++
|
||||
sed -i "/^QMAKE_CXX\s/s|=.*|= $CXX|" qtbase/mkspecs/common/g++-base.conf
|
||||
|
||||
### Creation des liens /usr/bin vers les binaires se trouvant
|
||||
### dans le dossier /usr/lib/qt5/bin en ajoutant qt5 Ã la fin du lien
|
||||
mkdir -p $PKG/usr/bin
|
||||
# Remove obsolete xorg path
|
||||
sed -i 's|X11R6/||g' qtbase/mkspecs/*/*.conf
|
||||
|
||||
for i in $PKG/usr/lib/qt5/bin/*; do
|
||||
ln -sv /usr/lib/qt5/bin/$(basename $i) $PKG/usr/bin/$(basename $i)-qt5
|
||||
done
|
||||
# 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
|
||||
|
||||
cat > $PKG/usr/bin/setqt5 << EOF
|
||||
if [ "x\$QT4BINDIR" != "x/usr/bin" ] && [ "x\$QT4BINDIR" != "x" ]; then pathremove $QT4BINDIR; fi
|
||||
if [ "x\$QT5BINDIR" != "x/usr/bin" ]; then pathprepend $QT5BINDIR; fi
|
||||
echo \$PATH
|
||||
EOF
|
||||
# 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
|
||||
|
||||
# Fix quoting bug
|
||||
sed -i 's|"$COMPILER" -c|$COMPILER -c|' qtbase/config.tests/unix/fvisibility.test
|
||||
|
||||
export QTDIR="$PWD"
|
||||
export LD_LIBRARY_PATH="$QTDIR/qtbase/lib:$QTDIR/qttools/lib:$LD_LIBRARY_PATH"
|
||||
export QT_PLUGIN_PATH="$QTDIR/qtbase/plugins"
|
||||
|
||||
./configure -opensource -confirm-license \
|
||||
-prefix $QT5PREFIX \
|
||||
-sysconfdir /etc/xdg \
|
||||
-bindir $QT5BINDIR \
|
||||
-plugindir /usr/lib/qt5/plugins \
|
||||
-importdir /usr/lib/qt5/imports \
|
||||
-headerdir /usr/include/qt5 \
|
||||
-datadir /usr/share/qt5 \
|
||||
-translationdir /usr/share/qt5/translations \
|
||||
-plugin-sql-{psql,mysql,sqlite,odbc} \
|
||||
-openssl-linked -dbus-linked \
|
||||
-system-lib{png,jpeg} -system-{zlib,sqlite} \
|
||||
-no-cups -optimized-qmake \
|
||||
-x{cursor,inerama,kb,randr,render} \
|
||||
-nomake examples \
|
||||
-no-separate-debug-info -no-strip -shared -no-rpath \
|
||||
-release -reduce-relocations
|
||||
|
||||
make
|
||||
make INSTALL_ROOT=$PKG install
|
||||
|
||||
find $PKG/usr/ -name qt_lib_bootstrap_private.pri \
|
||||
-exec sed -i -e "s:$PWD/qtbase:/$QT5PREfiX/lib/:g" {} \; &&
|
||||
|
||||
find $PKG/usr -name \*.prl \
|
||||
-exec sed -i -e '/^QmAKE_PRL_BUiLD_DiR/d' {} \;
|
||||
|
||||
install -v -dm755 $PKG/usr/share/pixmaps/
|
||||
|
||||
install -v -Dm644 qttools/src/assistant/assistant/images/assistant-128.png \
|
||||
$PKG/usr/share/pixmaps/assistant-qt5.png
|
||||
|
||||
install -v -Dm644 qttools/src/designer/src/designer/images/designer.png \
|
||||
$PKG/usr/share/pixmaps/designer-qt5.png
|
||||
|
||||
install -v -Dm644 qttools/src/linguist/linguist/images/icons/linguist-128-32.png \
|
||||
$PKG/usr/share/pixmaps/linguist-qt5.png
|
||||
|
||||
install -v -Dm644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer-128.png \
|
||||
$PKG/usr/share/pixmaps/qdbusviewer-qt5.png
|
||||
|
||||
install -dm755 $PKG/usr/share/applications
|
||||
|
||||
|
||||
cat > $PKG/usr/share/applications/assistant-qt5.desktop << "EOf"
|
||||
[Desktop Entry]
|
||||
Name=Qt5 Assistant
|
||||
comment=Shows Qt5 documentation and examples
|
||||
Exec=$QT5BINDIR/assistant-qt5
|
||||
icon=assistant-qt5
|
||||
Terminal=false
|
||||
Encoding=UTf-8
|
||||
Type=Application
|
||||
categories=Qt;Development;Documentation;
|
||||
EOf
|
||||
|
||||
cat > $PKG/usr/share/applications/designer-qt5.desktop << "EOf"
|
||||
[Desktop Entry]
|
||||
Name=Qt5 Designer
|
||||
GenericName=interface Designer
|
||||
comment=Design GUis for Qt5 applications
|
||||
Exec=$QT5BINDIR/designer-qt5
|
||||
icon=designer-qt5
|
||||
mimeType=application/x-designer;
|
||||
Terminal=false
|
||||
Encoding=UTf-8
|
||||
Type=Application
|
||||
categories=Qt;Development;
|
||||
EOf
|
||||
|
||||
cat > $PKG/usr/share/applications/linguist-qt5.desktop << "EOf"
|
||||
[Desktop Entry]
|
||||
Name=Qt5 Linguist
|
||||
comment=Add translations to Qt5 applications
|
||||
Exec=$QT5BINDIR/linguist-qt5
|
||||
icon=linguist-qt5
|
||||
mimeType=text/vnd.trolltech.linguist;application/x-linguist;
|
||||
Terminal=false
|
||||
Encoding=UTf-8
|
||||
Type=Application
|
||||
categories=Qt;Development;
|
||||
EOf
|
||||
|
||||
cat > $PKG/usr/share/applications/qdbusviewer-qt5.desktop << "EOf"
|
||||
[Desktop Entry]
|
||||
Name=Qt5 QDbusviewer
|
||||
GenericName=D-Bus Debugger
|
||||
comment=Debug D-Bus applications
|
||||
Exec=$QT5BINDIR/qdbusviewer-qt5
|
||||
icon=qdbusviewer-qt5
|
||||
Terminal=false
|
||||
Encoding=UTf-8
|
||||
Type=Application
|
||||
categories=Qt;Development;Debugger;
|
||||
EOf
|
||||
|
||||
mkdir -p $PKG/etc/profile.d
|
||||
cat > $PKG/etc/profile.d/qt5.sh << EOf
|
||||
# Begin /etc/profile.d/qt5.sh
|
||||
|
||||
QT5PREFIX=$QT5PREFIX
|
||||
QT5DIR=$QT5PREFIX
|
||||
QT5BINDIR=$QT5PREFIX/lib/qt5/bin
|
||||
export QT5PREFIX QT5BINDIR QT5DIR
|
||||
|
||||
# End /etc/profile.d/qt5.sh
|
||||
EOf
|
||||
|
||||
### Creation des liens /usr/bin vers les binaires se trouvant
|
||||
### dans le dossier /usr/lib/qt5/bin en ajoutant qt5 Ã la fin du lien
|
||||
mkdir -p $PKG/usr/bin
|
||||
|
||||
for i in $PKG/usr/lib/qt5/bin/*; do
|
||||
ln -sv /usr/lib/qt5/bin/$(basename $i) $PKG/usr/bin/$(basename $i)-qt5
|
||||
done
|
||||
|
||||
cat > $PKG/usr/bin/setqt5 << EOF
|
||||
if [ "x\$QT4BINDIR" != "x/usr/bin" ] && [ "x\$QT4BINDIR" != "x" ]; then pathremove $QT4BINDIR; fi
|
||||
if [ "x\$QT5BINDIR" != "x/usr/bin" ]; then pathprepend $QT5BINDIR; fi
|
||||
echo \$PATH
|
||||
EOF
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue