diff options
author | Heinz Wiesinger <pprkut@slackbuilds.org> | 2021-11-20 20:24:27 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-11-22 09:10:20 +0700 |
commit | 80dde6cb9fb24583c26dc3fc1d2d6ce45de47771 (patch) | |
tree | d25d6c6d05a7ce4cbf735c5a2f7775b04dec83a0 /development/phantomjs | |
parent | 0b1d0630dade44cb8cbace138ec338bdffffe79c (diff) |
development/phantomjs: Updated for version 2.1.1
Signed-off-by: Heinz Wiesinger <pprkut@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/phantomjs')
-rw-r--r-- | development/phantomjs/patches/build-no-ghostdriver.patch | 63 | ||||
-rw-r--r-- | development/phantomjs/patches/build-qt-components.patch | 18 | ||||
-rw-r--r-- | development/phantomjs/patches/build-qt55-evaluateJavaScript.patch | 169 | ||||
-rw-r--r-- | development/phantomjs/patches/build-qt55-no-websecurity.patch | 54 | ||||
-rw-r--r-- | development/phantomjs/patches/build-qt55-print.patch | 34 | ||||
-rw-r--r-- | development/phantomjs/patches/build-qtpath.patch | 18 | ||||
-rw-r--r-- | development/phantomjs/patches/fix-missing-webkit-include-files.patch | 23 | ||||
-rw-r--r-- | development/phantomjs/patches/unlock-qt.patch | 17 | ||||
-rw-r--r-- | development/phantomjs/phantomjs | 3 | ||||
-rw-r--r-- | development/phantomjs/phantomjs.SlackBuild | 75 | ||||
-rw-r--r-- | development/phantomjs/phantomjs.info | 6 | ||||
-rw-r--r-- | development/phantomjs/qt-gcc5.patch | 58 |
12 files changed, 442 insertions, 96 deletions
diff --git a/development/phantomjs/patches/build-no-ghostdriver.patch b/development/phantomjs/patches/build-no-ghostdriver.patch new file mode 100644 index 0000000000000..b0462f98a699e --- /dev/null +++ b/development/phantomjs/patches/build-no-ghostdriver.patch @@ -0,0 +1,63 @@ +Last-Update: 2016-02-15 +Forwarded: not-needed +Author: Dmitry Smirnov <onlyjob@debian.org> +Description: fix compilation without non-DFSG Selenium "ghostdriver/third_party/webdriver-atoms/*" files + +--- a/src/ghostdriver/ghostdriver.qrc ++++ b/src/ghostdriver/ghostdriver.qrc +@@ -17,55 +17,8 @@ + <file>third_party/console++.js</file> + <file>third_party/har.js</file> + <file>third_party/parseuri.js</file> + <file>third_party/uuid.js</file> +- <file>third_party/webdriver-atoms/active_element.js</file> +- <file>third_party/webdriver-atoms/clear.js</file> +- <file>third_party/webdriver-atoms/clear_local_storage.js</file> +- <file>third_party/webdriver-atoms/clear_session_storage.js</file> +- <file>third_party/webdriver-atoms/click.js</file> +- <file>third_party/webdriver-atoms/double_click.js</file> +- <file>third_party/webdriver-atoms/drag.js</file> +- <file>third_party/webdriver-atoms/execute_async_script.js</file> +- <file>third_party/webdriver-atoms/execute_script.js</file> +- <file>third_party/webdriver-atoms/execute_sql.js</file> +- <file>third_party/webdriver-atoms/find_element.js</file> +- <file>third_party/webdriver-atoms/find_elements.js</file> +- <file>third_party/webdriver-atoms/focus_on_element.js</file> +- <file>third_party/webdriver-atoms/get_appcache_status.js</file> +- <file>third_party/webdriver-atoms/get_attribute.js</file> +- <file>third_party/webdriver-atoms/get_attribute_value.js</file> +- <file>third_party/webdriver-atoms/get_current_position.js</file> +- <file>third_party/webdriver-atoms/get_local_storage_item.js</file> +- <file>third_party/webdriver-atoms/get_local_storage_keys.js</file> +- <file>third_party/webdriver-atoms/get_local_storage_size.js</file> +- <file>third_party/webdriver-atoms/get_location.js</file> +- <file>third_party/webdriver-atoms/get_location_in_view.js</file> +- <file>third_party/webdriver-atoms/get_session_storage_item.js</file> +- <file>third_party/webdriver-atoms/get_session_storage_keys.js</file> +- <file>third_party/webdriver-atoms/get_session_storage_size.js</file> +- <file>third_party/webdriver-atoms/get_size.js</file> +- <file>third_party/webdriver-atoms/get_text.js</file> +- <file>third_party/webdriver-atoms/get_value_of_css_property.js</file> +- <file>third_party/webdriver-atoms/is_displayed.js</file> +- <file>third_party/webdriver-atoms/is_enabled.js</file> +- <file>third_party/webdriver-atoms/is_online.js</file> +- <file>third_party/webdriver-atoms/is_selected.js</file> +- <file>third_party/webdriver-atoms/lastupdate</file> +- <file>third_party/webdriver-atoms/move_mouse.js</file> +- <file>third_party/webdriver-atoms/pinch.js</file> +- <file>third_party/webdriver-atoms/remove_local_storage_item.js</file> +- <file>third_party/webdriver-atoms/remove_session_storage_item.js</file> +- <file>third_party/webdriver-atoms/right_click.js</file> +- <file>third_party/webdriver-atoms/rotate.js</file> +- <file>third_party/webdriver-atoms/scroll_into_view.js</file> +- <file>third_party/webdriver-atoms/scroll_mouse.js</file> +- <file>third_party/webdriver-atoms/set_local_storage_item.js</file> +- <file>third_party/webdriver-atoms/set_session_storage_item.js</file> +- <file>third_party/webdriver-atoms/submit.js</file> +- <file>third_party/webdriver-atoms/swipe.js</file> +- <file>third_party/webdriver-atoms/tap.js</file> +- <file>third_party/webdriver-atoms/type.js</file> + <file>webdriver_atoms.js</file> + <file>webelementlocator.js</file> + </qresource> + </RCC> diff --git a/development/phantomjs/patches/build-qt-components.patch b/development/phantomjs/patches/build-qt-components.patch new file mode 100644 index 0000000000000..de52fb4370aee --- /dev/null +++ b/development/phantomjs/patches/build-qt-components.patch @@ -0,0 +1,18 @@ +Last-Update: 2016-02-15 +Forwarded: no +Author: Dmitry Smirnov <onlyjob@debian.org> +Description: fix FTBFS. + +--- a/src/phantomjs.pro ++++ b/src/phantomjs.pro +@@ -8,9 +8,9 @@ + } + + TEMPLATE = app + TARGET = phantomjs +-QT += network webkitwidgets ++QT += network webkitwidgets printsupport + CONFIG += console + + DESTDIR = ../bin + diff --git a/development/phantomjs/patches/build-qt55-evaluateJavaScript.patch b/development/phantomjs/patches/build-qt55-evaluateJavaScript.patch new file mode 100644 index 0000000000000..ba1f5301d7b0c --- /dev/null +++ b/development/phantomjs/patches/build-qt55-evaluateJavaScript.patch @@ -0,0 +1,169 @@ +Last-Update: 2016-02-15 +Forwarded: no +Bug-Upstream: https://github.com/ariya/phantomjs/issues/13727 +Author: Ximin Luo <infinity0@debian.org> +Reviewed-By: Dmitry Smirnov <onlyjob@debian.org> +Description: Port to Qt 5.5 + - Remove second argument to evaluateJavascript(), which was not really used + for anything, anyways + +--- a/src/utils.cpp ++++ b/src/utils.cpp +@@ -37,8 +37,9 @@ + #include <QDateTime> + #include <QDir> + #include <QtWebKitWidgets/QWebFrame> + ++ + static QString findScript(const QString& jsFilePath, const QString& libraryPath) + { + if (!jsFilePath.isEmpty()) { + QFile jsFile; +@@ -131,9 +132,9 @@ + } + return false; + } + // Execute JS code in the context of the document +- targetFrame->evaluateJavaScript(scriptBody, QString(JAVASCRIPT_SOURCE_CODE_URL).arg(QFileInfo(scriptPath).fileName())); ++ targetFrame->evaluateJavaScript(scriptBody); + return true; + } + + bool loadJSForDebug(const QString& jsFilePath, const QString& libraryPath, QWebFrame* targetFrame, const bool autorun) +@@ -146,12 +147,12 @@ + QString scriptPath = findScript(jsFilePath, libraryPath); + QString scriptBody = jsFromScriptFile(scriptPath, jsFileLanguage, jsFileEnc); + + scriptBody = QString("function __run() {\n%1\n}").arg(scriptBody); +- targetFrame->evaluateJavaScript(scriptBody, QString(JAVASCRIPT_SOURCE_CODE_URL).arg(QFileInfo(scriptPath).fileName())); ++ targetFrame->evaluateJavaScript(scriptBody); + + if (autorun) { +- targetFrame->evaluateJavaScript("__run()", QString()); ++ targetFrame->evaluateJavaScript("__run()"); + } + + return true; + } +--- a/src/repl.cpp ++++ b/src/repl.cpp +@@ -146,9 +146,9 @@ + // Set the static callback to offer Completions to the User + linenoiseSetCompletionCallback(REPL::offerCompletion); + + // Inject REPL utility functions +- m_webframe->evaluateJavaScript(Utils::readResourceFileUtf8(":/repl.js"), QString(JAVASCRIPT_SOURCE_PLATFORM_URL).arg("repl.js")); ++ m_webframe->evaluateJavaScript(Utils::readResourceFileUtf8(":/repl.js")); + + // Add self to JavaScript world + m_webframe->addToJavaScriptWindowObject("_repl", this); + +@@ -183,10 +183,9 @@ + // This will return an array of String with the possible completions + QStringList completions = REPL::getInstance()->m_webframe->evaluateJavaScript( + QString(JS_RETURN_POSSIBLE_COMPLETIONS).arg( + toInspect, +- toComplete), +- QString() ++ toComplete) + ).toStringList(); + + foreach(QString c, completions) { + if (lastIndexOfDot > -1) { +@@ -209,9 +208,9 @@ + if (userInput[0] != '\0') { + // Send the user input to the main Phantom frame for evaluation + m_webframe->evaluateJavaScript( + QString(JS_EVAL_USER_INPUT).arg( +- QString(userInput).replace('"', "\\\"")), QString("phantomjs://repl-input")); ++ QString(userInput).replace('"', "\\\""))); + + // Save command in the REPL history + linenoiseHistoryAdd(userInput); + linenoiseHistorySave(m_historyFilepath.data()); //< requires "char *" +--- a/src/phantom.cpp ++++ b/src/phantom.cpp +@@ -380,9 +380,9 @@ + "require.cache['" + filename + "']._getRequire()," + + "require.cache['" + filename + "'].exports," + + "require.cache['" + filename + "']" + + "));"; +- m_page->mainFrame()->evaluateJavaScript(scriptSource, QString(JAVASCRIPT_SOURCE_PLATFORM_URL).arg(QFileInfo(filename).fileName())); ++ m_page->mainFrame()->evaluateJavaScript(scriptSource); + } + + bool Phantom::injectJs(const QString& jsFilePath) + { +@@ -477,10 +477,9 @@ + m_page->mainFrame()->addToJavaScriptWindowObject("phantom", this); + + // Bootstrap the PhantomJS scope + m_page->mainFrame()->evaluateJavaScript( +- Utils::readResourceFileUtf8(":/bootstrap.js"), +- QString(JAVASCRIPT_SOURCE_PLATFORM_URL).arg("bootstrap.js") ++ Utils::readResourceFileUtf8(":/bootstrap.js") + ); + } + + bool Phantom::setCookies(const QVariantList& cookies) +--- a/src/config.cpp ++++ b/src/config.cpp +@@ -176,9 +176,9 @@ + QWebPage webPage; + // Add this object to the global scope + webPage.mainFrame()->addToJavaScriptWindowObject("config", this); + // Apply the JSON config settings to this very object +- webPage.mainFrame()->evaluateJavaScript(configurator.arg(jsonConfig), QString()); ++ webPage.mainFrame()->evaluateJavaScript(configurator.arg(jsonConfig)); + } + + QString Config::helpText() const + { +--- a/src/webpage.cpp ++++ b/src/webpage.cpp +@@ -752,10 +752,10 @@ + + qDebug() << "WebPage - evaluateJavaScript" << function; + + evalResult = m_currentFrame->evaluateJavaScript( +- function, //< function evaluated +- QString("phantomjs://webpage.evaluate()")); //< reference source file ++ function //< function evaluated ++ ); + + qDebug() << "WebPage - evaluateJavaScript result" << evalResult; + + return evalResult; +@@ -925,9 +925,9 @@ + networkOp = QNetworkAccessManager::DeleteOperation; + } + + if (networkOp == QNetworkAccessManager::UnknownOperation) { +- m_mainFrame->evaluateJavaScript("console.error('Unknown network operation: " + operation + "');", QString()); ++ m_mainFrame->evaluateJavaScript("console.error('Unknown network operation: " + operation + "');"); + return; + } + + if (address == "about:blank") { +@@ -1314,9 +1314,9 @@ + return ret.toString(); + } + } + } +- frame->evaluateJavaScript("console.error('Bad header callback given, use phantom.callback);", QString()); ++ frame->evaluateJavaScript("console.error('Bad header callback given, use phantom.callback);"); + return QString(); + } + + QString WebPage::header(int page, int numPages) +@@ -1353,9 +1353,9 @@ + } + + void WebPage::_appendScriptElement(const QString& scriptUrl) + { +- m_currentFrame->evaluateJavaScript(QString(JS_APPEND_SCRIPT_ELEMENT).arg(scriptUrl), scriptUrl); ++ m_currentFrame->evaluateJavaScript(QString(JS_APPEND_SCRIPT_ELEMENT).arg(scriptUrl)); + } + + QObject* WebPage::_getGenericCallback() + { diff --git a/development/phantomjs/patches/build-qt55-no-websecurity.patch b/development/phantomjs/patches/build-qt55-no-websecurity.patch new file mode 100644 index 0000000000000..9311c93cf07eb --- /dev/null +++ b/development/phantomjs/patches/build-qt55-no-websecurity.patch @@ -0,0 +1,54 @@ +Last-Update: 2016-02-15 +Forwarded: not-needed +Bug-Upstream: https://github.com/ariya/phantomjs/issues/13727 +Author: Ximin Luo <infinity0@debian.org> +Reviewed-By: Dmitry Smirnov <onlyjob@debian.org> +Description: Port to Qt 5.5 + - Remove "webSecurity" option since that's not exposed in Qt 5.5 + +--- a/src/consts.h ++++ b/src/consts.h +@@ -63,9 +63,8 @@ + #define PAGE_SETTINGS_USERNAME "userName" + #define PAGE_SETTINGS_PASSWORD "password" + #define PAGE_SETTINGS_MAX_AUTH_ATTEMPTS "maxAuthAttempts" + #define PAGE_SETTINGS_RESOURCE_TIMEOUT "resourceTimeout" +-#define PAGE_SETTINGS_WEB_SECURITY_ENABLED "webSecurityEnabled" + #define PAGE_SETTINGS_JS_CAN_OPEN_WINDOWS "javascriptCanOpenWindows" + #define PAGE_SETTINGS_JS_CAN_CLOSE_WINDOWS "javascriptCanCloseWindows" + + #define DEFAULT_WEBDRIVER_CONFIG "127.0.0.1:8910" +--- a/src/phantom.cpp ++++ b/src/phantom.cpp +@@ -135,9 +135,8 @@ + m_defaultPageSettings[PAGE_SETTINGS_JS_ENABLED] = QVariant::fromValue(true); + m_defaultPageSettings[PAGE_SETTINGS_XSS_AUDITING] = QVariant::fromValue(false); + m_defaultPageSettings[PAGE_SETTINGS_USER_AGENT] = QVariant::fromValue(m_page->userAgent()); + m_defaultPageSettings[PAGE_SETTINGS_LOCAL_ACCESS_REMOTE] = QVariant::fromValue(m_config.localToRemoteUrlAccessEnabled()); +- m_defaultPageSettings[PAGE_SETTINGS_WEB_SECURITY_ENABLED] = QVariant::fromValue(m_config.webSecurityEnabled()); + m_defaultPageSettings[PAGE_SETTINGS_JS_CAN_OPEN_WINDOWS] = QVariant::fromValue(m_config.javascriptCanOpenWindows()); + m_defaultPageSettings[PAGE_SETTINGS_JS_CAN_CLOSE_WINDOWS] = QVariant::fromValue(m_config.javascriptCanCloseWindows()); + m_page->applySettings(m_defaultPageSettings); + +--- a/src/webpage.cpp ++++ b/src/webpage.cpp +@@ -367,9 +367,8 @@ + // attribute "WebSecurityEnabled" must be applied during the initializing + // security context for Document instance. Setting up it later will not cause any effect + // see <qt\src\3rdparty\webkit\Source\WebCore\dom\Document.cpp:4468> + QWebSettings* settings = m_customWebPage->settings(); +- settings->setAttribute(QWebSettings::WebSecurityEnabled, phantomCfg->webSecurityEnabled()); + + m_mainFrame = m_customWebPage->mainFrame(); + m_currentFrame = m_mainFrame; + m_mainFrame->setHtml(BLANK_HTML, baseUrl); +@@ -621,9 +620,8 @@ + opt->setAttribute(QWebSettings::AutoLoadImages, def[PAGE_SETTINGS_LOAD_IMAGES].toBool()); + opt->setAttribute(QWebSettings::JavascriptEnabled, def[PAGE_SETTINGS_JS_ENABLED].toBool()); + opt->setAttribute(QWebSettings::XSSAuditingEnabled, def[PAGE_SETTINGS_XSS_AUDITING].toBool()); + opt->setAttribute(QWebSettings::LocalContentCanAccessRemoteUrls, def[PAGE_SETTINGS_LOCAL_ACCESS_REMOTE].toBool()); +- opt->setAttribute(QWebSettings::WebSecurityEnabled, def[PAGE_SETTINGS_WEB_SECURITY_ENABLED].toBool()); + opt->setAttribute(QWebSettings::JavascriptCanOpenWindows, def[PAGE_SETTINGS_JS_CAN_OPEN_WINDOWS].toBool()); + opt->setAttribute(QWebSettings::JavascriptCanCloseWindows, def[PAGE_SETTINGS_JS_CAN_CLOSE_WINDOWS].toBool()); + + if (def.contains(PAGE_SETTINGS_USER_AGENT)) { diff --git a/development/phantomjs/patches/build-qt55-print.patch b/development/phantomjs/patches/build-qt55-print.patch new file mode 100644 index 0000000000000..62984c5c613b8 --- /dev/null +++ b/development/phantomjs/patches/build-qt55-print.patch @@ -0,0 +1,34 @@ +Last-Update: 2016-02-15 +Forwarded: no +Bug-Upstream: https://github.com/ariya/phantomjs/issues/13727 +Author: Ximin Luo <infinity0@debian.org> +Reviewed-By: Dmitry Smirnov <onlyjob@debian.org> +Description: Port to Qt 5.5 + - In webpage, don't inherit QWebFrame::PrintCallback since it's not public + +--- a/src/webpage.cpp ++++ b/src/webpage.cpp +@@ -1254,9 +1254,9 @@ + } + + printer.setPageMargins(marginLeft, marginTop, marginRight, marginBottom, QPrinter::Point); + +- m_mainFrame->print(&printer, this); ++ m_mainFrame->print(&printer); + return true; + } + + void WebPage::setZoomFactor(qreal zoom) +--- a/src/webpage.h ++++ b/src/webpage.h +@@ -44,9 +44,9 @@ + class NetworkAccessManager; + class QWebInspector; + class Phantom; + +-class WebPage : public QObject, public QWebFrame::PrintCallback ++class WebPage : public QObject + { + Q_OBJECT + Q_PROPERTY(QString title READ title) + Q_PROPERTY(QString frameTitle READ frameTitle) diff --git a/development/phantomjs/patches/build-qtpath.patch b/development/phantomjs/patches/build-qtpath.patch new file mode 100644 index 0000000000000..6fa48bc0d3859 --- /dev/null +++ b/development/phantomjs/patches/build-qtpath.patch @@ -0,0 +1,18 @@ +Last-Update: 2016-02-15 +Forwarded: not-needed +Author: Dmitry Smirnov <onlyjob@debian.org> +Description: build system correction(s). + +--- a/build.py ++++ b/build.py +@@ -80,9 +80,9 @@ + def qmakePath(): + exe = "qmake" + if platform.system() == "Windows": + exe += ".exe" +- return os.path.abspath("src/qt/qtbase/bin/" + exe) ++ return os.path.abspath("/usr/lib64/qt5/bin/" + exe) + + # returns paths for 3rd party libraries (Windows only) + def findThirdPartyDeps(): + include_dirs = [] diff --git a/development/phantomjs/patches/fix-missing-webkit-include-files.patch b/development/phantomjs/patches/fix-missing-webkit-include-files.patch new file mode 100644 index 0000000000000..9e1fe8aaccb9e --- /dev/null +++ b/development/phantomjs/patches/fix-missing-webkit-include-files.patch @@ -0,0 +1,23 @@ +diff --git a/src/webpage.cpp b/src/webpage.cpp +index fc235bc..2151e4e 100644 +--- a/src/webpage.cpp ++++ b/src/webpage.cpp +@@ -45,12 +45,12 @@ + #include <QNetworkRequest> + #include <QPainter> + #include <QtPrintSupport/QPrinter> +-#include <QWebHistory> +-#include <QWebHistoryItem> +-#include <QWebElement> +-#include <QWebFrame> +-#include <QWebPage> +-#include <QWebInspector> ++#include <QtWebKit/QWebHistory> ++#include <QtWebKit/QWebHistoryItem> ++#include <QtWebKit/QWebElement> ++#include <QtWebKitWidgets/QWebFrame> ++#include <QtWebKitWidgets/QWebPage> ++#include <QtWebKitWidgets/QWebInspector> + #include <QMapIterator> + #include <QBuffer> + #include <QDebug> diff --git a/development/phantomjs/patches/unlock-qt.patch b/development/phantomjs/patches/unlock-qt.patch new file mode 100644 index 0000000000000..1a6d5b0b71389 --- /dev/null +++ b/development/phantomjs/patches/unlock-qt.patch @@ -0,0 +1,17 @@ +Last-Update: 2016-06-16 +Forwarded: not-needed +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=827421 +Author: Dmitry Smirnov <onlyjob@debian.org> +Description: allow build with QT-5.5+ + +--- a/src/phantomjs.pro ++++ b/src/phantomjs.pro +@@ -1,8 +1,4 @@ + +-if(!equals(QT_MAJOR_VERSION, 5)|!equals(QT_MINOR_VERSION, 5)) { +- error("This program can only be compiled with Qt 5.5.x.") +-} +- + TEMPLATE = app + TARGET = phantomjs + QT += network webkitwidgets diff --git a/development/phantomjs/phantomjs b/development/phantomjs/phantomjs new file mode 100644 index 0000000000000..0ba233823dfe7 --- /dev/null +++ b/development/phantomjs/phantomjs @@ -0,0 +1,3 @@ +#!/bin/bash + +/usr/libLIBDIRSUFFIX/phantomjs/phantomjs -platform offscreen $@ diff --git a/development/phantomjs/phantomjs.SlackBuild b/development/phantomjs/phantomjs.SlackBuild index ba25b1052366c..67f7a24033cc2 100644 --- a/development/phantomjs/phantomjs.SlackBuild +++ b/development/phantomjs/phantomjs.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for phantomjs -# Copyright 2012-2016 Heinz Wiesinger, Amsterdam, The Netherlands +# Copyright 2012-2021 Heinz Wiesinger, Amsterdam, The Netherlands # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -11,22 +11,22 @@ # 1. Redistributions of this script must retain the above copyright # notice, this list of conditions and the following disclaimer. # -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cd $(dirname $0) ; CWD=$(pwd) PRGNAM=phantomjs -VERSION=${VERSION:-1.9.8} -BUILD=${BUILD:-2} +VERSION=${VERSION:-2.1.1} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -70,7 +70,7 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -unzip $CWD/$PRGNAM-$VERSION-source.zip +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . find -L . \ @@ -79,34 +79,39 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# strip MAKEFLAGS usage -sed -i "s|-j\$COMPILE_JOBS||" src/qt/preconfig.sh -sed -i "s|export MAKEFLAGS=||" src/qt/preconfig.sh +# Patches from arch +patch -p1 -i $CWD/patches/fix-missing-webkit-include-files.patch -# Don't use unsupported -fuse-ld=gold flag -sed -i "6,11d" src/qt/src/3rdparty/webkit/Source/common.pri +# Patches from debian +patch -p1 -i $CWD/patches/build-no-ghostdriver.patch +patch -p1 -i $CWD/patches/build-qt-components.patch +patch -p1 -i $CWD/patches/build-qt55-evaluateJavaScript.patch +patch -p1 -i $CWD/patches/build-qt55-no-websecurity.patch +patch -p1 -i $CWD/patches/build-qt55-print.patch +patch -p1 -i $CWD/patches/unlock-qt.patch -# Fix alsa test -sed -i "s|SND_LIB_MINOR == 0 \&\& SND_LIB_SUBMINOR >= 10|SND_LIB_MINOR == 1 \&\& SND_LIB_SUBMINOR >= 0|" \ - src/qt/config.tests/unix/alsa/alsatest.cpp +# Point to our qmake (adapted from debian patch) +patch -p1 -i $CWD/patches/build-qtpath.patch -# Fix gcc 5 detection in qt's configure script -patch -p1 -d src/qt -i $CWD/qt-gcc5.patch +python2 build.py \ + --skip-git \ + --skip-qtbase \ + --skip-qtwebkit \ + --confirm \ + --release -cd src/qt - ./preconfig.sh -cd - +mkdir -p $PKG/usr/{bin,lib$LIBDIRSUFFIX/phantomjs,share/phantomjs} -src/qt/bin/qmake - QMAKE_CFLAGS+="$SLKCFLAGS" \ - QMAKE_CXXFLAGS+="$SLKCFLAGS" \ - PREFIX=/usr +# Our phantomjs is linked against system Qt, which uses the X11 QPA +# by default and prevents phantomjs from running headlessly. To +# work around that we provide a thin wrapper that switches phantomjs +# to the "offscreen" QPA +sed "s|LIBDIRSUFFIX|$LIBDIRSUFFIX|" $CWD/phantomjs > $PKG/usr/bin/phantomjs +install -m 755 bin/phantomjs $PKG/usr/lib$LIBDIRSUFFIX/phantomjs/ -make +chmod 755 $PKG/usr/bin/phantomjs -mkdir -p $PKG/usr/bin - -install -m 755 bin/phantomjs $PKG/usr/bin/ +cp -r examples $PKG/usr/share/phantomjs/ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true diff --git a/development/phantomjs/phantomjs.info b/development/phantomjs/phantomjs.info index 68b9667cb5792..89b7263777f30 100644 --- a/development/phantomjs/phantomjs.info +++ b/development/phantomjs/phantomjs.info @@ -1,8 +1,8 @@ PRGNAM="phantomjs" -VERSION="1.9.8" +VERSION="2.1.1" HOMEPAGE="http://phantomjs.org/" -DOWNLOAD="https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-source.zip" -MD5SUM="f8163aef2230ebbda2d25a71a06ded7d" +DOWNLOAD="https://github.com/ariya/phantomjs/archive/2.1.1/phantomjs-2.1.1.tar.gz" +MD5SUM="db2d71e67e3557a977c2f269f1ec7fee" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/development/phantomjs/qt-gcc5.patch b/development/phantomjs/qt-gcc5.patch deleted file mode 100644 index 39495a53137e1..0000000000000 --- a/development/phantomjs/qt-gcc5.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 4badb867bbffbd66762c150258b37b6c0b7e3c22 Mon Sep 17 00:00:00 2001 -From: Rex Dieter <rdieter@gmail.com> -Date: Wed, 18 Feb 2015 07:17:22 -0600 -Subject: Configure: Fix detection of GCC 5 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -- Backport qt5 commit 9fb4c2c412621b63c06dbbd899f44041b2e126c2 -- fix webkit feature enablement -- set QT_BUILD_KEY (same as gcc4), Qt5 has no QT_BUILD_KEY so no - change there is necessary - -Change-Id: Ie131be711a774052bc42f18e8090b2a3dde69475 -Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> -Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> -Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> ---- - configure | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/configure b/configure -index f3a800a..4144400 100755 ---- a/configure -+++ b/configure -@@ -7729,7 +7729,7 @@ case "$XPLATFORM" in - *-g++*) - # Check gcc's version - case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in -- 4*|3.4*) -+ 5*|4*|3.4*) - ;; - 3.3*) - canBuildWebKit="no" -@@ -8031,6 +8031,11 @@ g++*) - QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'` - QT_GCC_PATCH_VERSION=0 - ;; -+ *) -+ QT_GCC_MAJOR_VERSION=$COMPILER_VERSION -+ QT_GCC_MINOR_VERSION=0 -+ QT_GCC_PATCH_VERSION=0 -+ ;; - esac - - case "$COMPILER_VERSION" in -@@ -8040,7 +8045,7 @@ g++*) - 3.*) - COMPILER_VERSION="3.*" - ;; -- 4.*) -+ 5*|4.*) - COMPILER_VERSION="4" - ;; - *) --- -cgit v0.11.0 - |