mirror of
https://gitdl.cn/https://github.com/chakralinux/lib32.git
synced 2025-02-16 00:20:27 +08:00
- add pending lib32-qt to build excluded qtwebkit (but failed currently) - patch ported from x64 packages
125 lines
4.6 KiB
Plaintext
125 lines
4.6 KiB
Plaintext
_pkgbasename=qt
|
|
pkgname="lib32-${_pkgbasename}"
|
|
pkgver=4.8.7
|
|
pkgrel=6
|
|
pkgdesc='A cross-platform application and UI framework. (ELF32)'
|
|
arch=('x86_64')
|
|
url='http://www.qt.io'
|
|
license=('GPL3' 'LGPL')
|
|
depends=(lib32-{fontconfig,sqlite3,alsa-lib,glib2,dbus-core,openssl,gst-plugins-base}
|
|
lib32-lib{png,tiff,mng,gl,sm,xrandr,xv,xi,xinerama,xcursor,xfixes,ffi,xml2}
|
|
"${_pkgbasename}=${pkgver}")
|
|
makedepends=('cups' lib32-{mesa,libcups,libxfixes,icu,clang} 'gperf' 'python2' 'ruby' 'git' 'mesa' 'gst-plugins-base-libs')
|
|
_pkgfqn="${_pkgbasename}-everywhere-opensource-src-${pkgver}"
|
|
source=("http://download.qt.io/official_releases/qt/4.8/${pkgver}/${_pkgfqn}.tar.gz"
|
|
'http://download.kde.org/stable/qtwebkit-2.3/2.3.4/src/qtwebkit-2.3.4.tar.gz'
|
|
"kubuntu_14_systemtrayicon.diff"
|
|
'disable-sslv3.patch'
|
|
'qtwebkit-2.3.4-gcc5-1.patch'
|
|
'qtwebkit-2.3-debuginfo.patch'
|
|
'qtwebkit-2.3-save_memory.patch')
|
|
md5sums=('d990ee66bf7ab0c785589776f35ba6ad'
|
|
'42ef76d0cf7d0c611ef83418e9f297ff'
|
|
'a523644faa8f98a73f55c4aa23c114a6'
|
|
'1803ab6313df762d807678e58fc85f53'
|
|
'b12602b7460914994354a5c2cae83df2'
|
|
'ab784b24965ef9bbe42f875e98e43ac0'
|
|
'e588c0c49b72951c68358970db75b4fd')
|
|
|
|
prepare() {
|
|
cd "${srcdir}/${_pkgfqn}"
|
|
patch -Np1 -i ../kubuntu_14_systemtrayicon.diff
|
|
|
|
# disable SSLv3
|
|
patch -p1 -i "${srcdir}"/disable-sslv3.patch
|
|
|
|
sed -i "/^QMAKE_LINK\s/s|g++|g++ -m32|g" mkspecs/common/g++-base.conf
|
|
sed -i "s|-O2|${CXXFLAGS} -m32|" mkspecs/common/g++-base.conf
|
|
sed -i "s|-O2|${CXXFLAGS} -m32|" mkspecs/common/gcc-base.conf
|
|
sed -i "/^QMAKE_LFLAGS_RPATH/s| -Wl,-rpath,||g" mkspecs/common/gcc-base-unix.conf
|
|
sed -i "/^QMAKE_LFLAGS\s/s|+=|+= ${LDFLAGS} -m32|g" mkspecs/common/gcc-base.conf
|
|
sed -i "s|-Wl,-O1|-m32 -Wl,-O1|" mkspecs/common/g++-unix.conf
|
|
sed -e "s|-O2|$CXXFLAGS -m32|" \
|
|
-e "/^QMAKE_RPATH/s| -Wl,-rpath,||g" \
|
|
-e "/^QMAKE_LINK\s/s|g++|g++ -m32|g" \
|
|
-e "/^QMAKE_LFLAGS\s/s|+=|+= $LDFLAGS|g" \
|
|
-i mkspecs/common/g++.conf
|
|
|
|
cd $srcdir/
|
|
|
|
# reduce debug info, to avoid the error "ar: libWebCore.a: File truncated" of 4GB file max exceed
|
|
patch -p1 -i "${srcdir}"/qtwebkit-2.3-debuginfo.patch
|
|
patch -p1 -i "${srcdir}"/qtwebkit-2.3-save_memory.patch
|
|
|
|
# Fix build with GCC 5 (LFS)
|
|
patch -p1 -i "$srcdir"/qtwebkit-2.3.4-gcc5-1.patch
|
|
}
|
|
|
|
build() {
|
|
export CC='clang -m32'
|
|
export CXX='clang++ -m32'
|
|
export QT4DIR=$srcdir/$_pkgfqn
|
|
export LD_LIBRARY_PATH=${QT4DIR}/lib:${LD_LIBRARY_PATH}
|
|
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
|
|
|
|
# The bundled QtWebkit of Qt-4.8.7 requires legacy gstreamer support, but we know that qtwebkit-2.3.4 supports gst1.x
|
|
cd "${srcdir}/${_pkgfqn}"
|
|
./configure -confirm-license -opensource -v -platform linux-g++-32 \
|
|
-prefix /usr \
|
|
-libdir /usr/lib32 \
|
|
-plugindir /usr/lib32/qt/plugins \
|
|
-importdir /usr/lib32/qt/imports \
|
|
-datadir /usr/share/qt \
|
|
-translationdir /usr/share/qt/translations \
|
|
-sysconfdir /etc \
|
|
-system-sqlite \
|
|
-no-phonon \
|
|
-no-phonon-backend \
|
|
-no-webkit \
|
|
-graphicssystem raster \
|
|
-openssl-linked \
|
|
-nomake demos \
|
|
-nomake examples \
|
|
-nomake docs \
|
|
-nomake tools \
|
|
-optimized-qmake \
|
|
-no-rpath \
|
|
-dbus-linked \
|
|
-reduce-relocations \
|
|
-no-openvg \
|
|
-xcursor
|
|
|
|
make
|
|
#
|
|
cd $srcdir
|
|
export QTDIR=/usr
|
|
export PATH=$QT4DIR/bin:$PATH
|
|
Tools/Scripts/build-webkit --qt \
|
|
--no-webkit2 \
|
|
--prefix=/usr --install-libs=/usr/lib32 \
|
|
--makeargs="$MAKEFLAGS" \
|
|
--release \
|
|
--qmakearg="CONFIG+=production_build" \
|
|
--system-malloc
|
|
}
|
|
|
|
package() {
|
|
# install QtWebkit
|
|
make -C WebKitBuild/Release INSTALL_ROOT="${pkgdir}" install
|
|
|
|
# Qt4 part
|
|
cd "${srcdir}/${_pkgfqn}"
|
|
make install INSTALL_ROOT="${pkgdir}"
|
|
|
|
# Fix wrong path in pkgconfig files
|
|
find "${pkgdir}/usr/lib32/pkgconfig" -type f -name '*.pc' \
|
|
-exec perl -pi -e "s, -L${srcdir}/?\S+,,g" {} \;
|
|
# Fix wrong path in prl files
|
|
find "${pkgdir}/usr/lib32" -type f -name '*.prl' \
|
|
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
|
|
|
|
rm -rf "${pkgdir}/usr"/{include,share,bin}
|
|
mkdir -p "${pkgdir}/usr/share/licenses"
|
|
ln -s "${_pkgbasename}" "${pkgdir}/usr/share/licenses/${pkgname}"
|
|
}
|