commit:     9836d7172b640ba1ea9192785e08e6bf8ab7b20c
Author:     Davide Pesavento <pesa <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 24 00:51:58 2015 +0000
Commit:     Davide Pesavento <pesa <AT> gentoo <DOT> org>
CommitDate: Mon Aug 24 01:28:21 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9836d717

dev-qt/qtdeclarative: add USE=jit, enabled by default.

The JIT cannot be used on hardened/PAX kernels. Let people disable it.

Gentoo-Bug: 551318

Package-Manager: portage-2.2.20.1

 .../files/qtdeclarative-5.4.2-disable-jit.patch    | 18 ++++++++
 dev-qt/qtdeclarative/qtdeclarative-5.4.2-r1.ebuild | 48 ++++++++++++++++++++++
 2 files changed, 66 insertions(+)

diff --git a/dev-qt/qtdeclarative/files/qtdeclarative-5.4.2-disable-jit.patch 
b/dev-qt/qtdeclarative/files/qtdeclarative-5.4.2-disable-jit.patch
new file mode 100644
index 0000000..7799ef7
--- /dev/null
+++ b/dev-qt/qtdeclarative/files/qtdeclarative-5.4.2-disable-jit.patch
@@ -0,0 +1,18 @@
+diff --git a/src/qml/jsruntime/qv4global_p.h b/src/qml/jsruntime/qv4global_p.h
+index 4b08194..224ddb1 100644
+--- a/src/qml/jsruntime/qv4global_p.h
++++ b/src/qml/jsruntime/qv4global_p.h
+@@ -96,8 +96,13 @@ inline double trunc(double d) { return d > 0 ? floor(d) : 
ceil(d); }
+ #    undef V4_ENABLE_JIT
+ #endif
+ #endif
+ 
++// Gentoo note: disable the JIT due to USE="-jit"
++#ifdef V4_ENABLE_JIT
++#undef V4_ENABLE_JIT
++#endif
++
+ // Do certain things depending on whether the JIT is enabled or disabled
+ 
+ #ifdef V4_ENABLE_JIT
+ #define ENABLE_YARR_JIT 1

diff --git a/dev-qt/qtdeclarative/qtdeclarative-5.4.2-r1.ebuild 
b/dev-qt/qtdeclarative/qtdeclarative-5.4.2-r1.ebuild
new file mode 100644
index 0000000..6e560db
--- /dev/null
+++ b/dev-qt/qtdeclarative/qtdeclarative-5.4.2-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit qt5-build
+
+DESCRIPTION="The QML and Quick modules for the Qt5 framework"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+       KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc64 ~x86"
+fi
+
+IUSE="gles2 +jit localstorage +widgets xml"
+
+# qtgui[gles2=] is needed because of bug 504322
+DEPEND="
+       >=dev-qt/qtcore-${PV}:5
+       >=dev-qt/qtgui-${PV}:5[gles2=]
+       >=dev-qt/qtnetwork-${PV}:5
+       >=dev-qt/qttest-${PV}:5
+       localstorage? ( >=dev-qt/qtsql-${PV}:5 )
+       widgets? ( >=dev-qt/qtwidgets-${PV}:5[gles2=] )
+       xml? ( >=dev-qt/qtxmlpatterns-${PV}:5 )
+"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+       use jit || epatch "${FILESDIR}"/${PN}-5.4.2-disable-jit.patch
+
+       use localstorage || sed -i -e '/localstorage/d' \
+               src/imports/imports.pro || die
+
+       use widgets || sed -i -e 's/contains(QT_CONFIG, no-widgets)/true/' \
+               src/qmltest/qmltest.pro || die
+
+       qt_use_disable_mod widgets widgets \
+               src/src.pro \
+               tools/tools.pro \
+               tools/qmlscene/qmlscene.pro \
+               tools/qml/qml.pro
+
+       qt_use_disable_mod xml xmlpatterns \
+               src/imports/imports.pro \
+               tests/auto/quick/quick.pro
+
+       qt5-build_src_prepare
+}

Reply via email to