File unset-QT_QPA_PLATFORM.patch of Package phantomjs
From: Karl Cheng <qantas94heavy@gmail.com>
Date: Wed, 07 Dec 2016 11:36:36 +0800
Subject: Override the default QPA platform plugin
References: gh#ariya/phantomjs#14061
Upstream: submitted by others
PhantomJS crashes on startup because the QT_QPA_PLATFORM environment
variable is set to "xcb", which is not supported by the bundled Qt.
---
Index: phantomjs-2.1.1/src/main.cpp
===================================================================
--- phantomjs-2.1.1.orig/src/main.cpp
+++ phantomjs-2.1.1/src/main.cpp
@@ -41,6 +41,10 @@
static int inner_main(int argc, char** argv)
{
+#ifdef Q_OS_LINUX
+ qputenv("QT_QPA_PLATFORM", "");
+#endif
+
QApplication app(argc, argv);
app.setWindowIcon(QIcon(":/phantomjs-icon.png"));