commit: 37bc992dd1ea5edb176d35455afc483036d07edd Author: Enrico Tagliavini <enrico.tagliavini <AT> gmail <DOT> com> AuthorDate: Thu Apr 2 12:50:59 2015 +0000 Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> CommitDate: Sat May 23 16:52:28 2015 +0000 URL: https://gitweb.gentoo.org/proj/qt.git/commit/?id=37bc992d
[dev-qt/qtwebkit23] enable multilib support This change enables proper multilib support so that 32 bit programs depending on this, such as skype. Deps are forced to be either EAPI=5 or multilib. Versions choosen are the one I tested with, mostly stable packages for amd64 with exception of Qt libraries. This also moves the builddir out of the source tree so there is no need to copy the entire source folder for each ABI we are going to compile for. The trick about using WEBKITOUTPUTDIR comes from fedora 21 SRPM, credit to the maintainers for it. dev-qt/qtwebkit23/qtwebkit23-2.3.4.ebuild | 72 +++++++++++++++++-------------- 1 file changed, 39 insertions(+), 33 deletions(-) diff --git a/dev-qt/qtwebkit23/qtwebkit23-2.3.4.ebuild b/dev-qt/qtwebkit23/qtwebkit23-2.3.4.ebuild index 8712a77..3148278 100644 --- a/dev-qt/qtwebkit23/qtwebkit23-2.3.4.ebuild +++ b/dev-qt/qtwebkit23/qtwebkit23-2.3.4.ebuild @@ -5,7 +5,7 @@ EAPI=5 PYTHON_COMPAT=( python2_7 ) -inherit eutils multilib python-any-r1 toolchain-funcs +inherit eutils multibuild multilib python-any-r1 qmake-utils toolchain-funcs multilib-minimal DESCRIPTION="The WebKit module for the Qt toolkit" HOMEPAGE="https://www.qt.io/" @@ -17,31 +17,31 @@ KEYWORDS="~amd64" IUSE="+gstreamer" RDEPEND=" - >=dev-db/sqlite-3.8.3:3 - dev-libs/libxml2:2 - dev-libs/libxslt - dev-qt/qtcore:4[ssl] - dev-qt/qtdeclarative:4 - dev-qt/qtgui:4 - dev-qt/qtopengl:4 - dev-qt/qtscript:4 - dev-qt/qtsql:4 - dev-qt/qtsvg:4 - dev-qt/qtxmlpatterns:4 - media-libs/fontconfig - media-libs/freetype - media-libs/libpng:0= - sys-libs/zlib - virtual/jpeg:0 - virtual/libudev - virtual/opengl - x11-libs/libXext - x11-libs/libX11 - x11-libs/libXrender + >=dev-db/sqlite-3.8.9:3[${MULTILIB_USEDEP}] + >=dev-libs/libxml2-2.9.2-r1:2[${MULTILIB_USEDEP}] + >=dev-libs/libxslt-1.1.28-r4[${MULTILIB_USEDEP}] + >=dev-qt/qtcore-4.8.6-r1:4[ssl,${MULTILIB_USEDEP}] + >=dev-qt/qtdeclarative-4.8.6-r1:4[${MULTILIB_USEDEP}] + >=dev-qt/qtgui-4.8.6-r2:4[${MULTILIB_USEDEP}] + >=dev-qt/qtopengl-4.8.6-r1:4[${MULTILIB_USEDEP}] + >=dev-qt/qtscript-4.8.6-r1:4[${MULTILIB_USEDEP}] + >=dev-qt/qtsql-4.8.6-r1:4[${MULTILIB_USEDEP}] + >=dev-qt/qtsvg-4.8.6-r1:4[${MULTILIB_USEDEP}] + >=dev-qt/qtxmlpatterns-4.8.6-r1:4[${MULTILIB_USEDEP}] + >=media-libs/fontconfig-2.11.1-r2[${MULTILIB_USEDEP}] + >=media-libs/freetype-2.5.5[${MULTILIB_USEDEP}] + >=media-libs/libpng-1.6.16:0=[${MULTILIB_USEDEP}] + >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] + virtual/jpeg:0[${MULTILIB_USEDEP}] + virtual/libudev[${MULTILIB_USEDEP}] + >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}] + >=x11-libs/libXext-1.3.3[${MULTILIB_USEDEP}] + >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] + >=x11-libs/libXrender-0.9.8[${MULTILIB_USEDEP}] gstreamer? ( - dev-libs/glib:2 - media-libs/gstreamer:1.0 - media-libs/gst-plugins-base:1.0 + >=dev-libs/glib-2.42.2:2[${MULTILIB_USEDEP}] + >=media-libs/gstreamer-1.4.5:1.0[${MULTILIB_USEDEP}] + >=media-libs/gst-plugins-base-1.4.5:1.0[${MULTILIB_USEDEP}] ) " DEPEND="${RDEPEND} @@ -58,19 +58,26 @@ DEPEND="${RDEPEND} src_prepare() { # bug 458222 sed -i -e '/SUBDIRS += examples/d' Source/QtWebKit.pro || die - sed -i -e "/QMAKE_CXXFLAGS_RELEASE/d" Source/WTF/WTF.pro Source/JavaScriptCore/Target.pri || die epatch "${FILESDIR}"/${PN}-2.3.4-use-correct-typedef.patch } -src_compile() { - export QTDIR=/usr/$(get_libdir)/qt4 +multilib_src_compile() { + # Change the build dir + # Trick stolen from Fedora 21 SRPM + export WEBKITOUTPUTDIR="$PWD" + + export QTDIR=/usr/$(get_libdir)/qt4/ export CC=$(tc-getCC) export CXX=$(tc-getCXX) - - Tools/Scripts/build-webkit \ + # --qmake is needed to force the build system to use the qmake + # compiled for the correct architecture. For example using the amd64 + # qmake to compile the x86 qtwebkit will try to link it against + # amd64 qt libs, causing the build to fail + "${S}"/Tools/Scripts/build-webkit \ --qt --release --no-webkit2 \ + --qmake=$(qt4_get_bindir)/qmake \ $(use gstreamer || echo --no-video) \ --makeargs="${MAKEOPTS}" \ --qmakearg="CONFIG+=production_build CONFIG+=nostrip DEFINES+=HAVE_QTTESTLIB=0" \ @@ -85,7 +92,6 @@ src_compile() { || die } -src_install() { - cd WebKitBuild/Release || die - emake INSTALL_ROOT="${D}" install +multilib_src_install() { + emake INSTALL_ROOT="${D}" install -C Release }