From 00d23ec7f2bd4453920f9ed0a3b2d30582574f92 Mon Sep 17 00:00:00 2001 From: Chaoting Liu Date: Mon, 20 Feb 2017 14:11:06 +0000 Subject: [PATCH] the pkgbuild build only lib32-qtwebkit part, for check purpose only you can pass command like `makepkg -p PKGBUILD.test` to build this please, if build success, merge back to lib32-qt's main PKGBUILDy --- lib32-qt/PKGBUILD.test | 72 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 lib32-qt/PKGBUILD.test diff --git a/lib32-qt/PKGBUILD.test b/lib32-qt/PKGBUILD.test new file mode 100644 index 0000000..9092e65 --- /dev/null +++ b/lib32-qt/PKGBUILD.test @@ -0,0 +1,72 @@ +_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} 'gperf' 'python2' 'ruby' '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/ + # 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 PKG_CONFIG_PATH="/usr/lib32/pkgconfig" + + cd $srcdir + export QTDIR=/usr + Tools/Scripts/build-webkit --qt \ + --no-webkit2 \ + --prefix=/usr --install-libs=/usr/lib32 \ + --makeargs="$MAKEFLAGS" \ + --cmakearg="-DENABLE_GLIB_SUPPORT=0" \ + --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}" +}