]> git.pld-linux.org Git - packages/phantomjs.git/commitdiff
- up to 2.0.0; system qcommandline disabled because with it phantomjs segfaults on... auto/th/phantomjs-2.0.0-1
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 31 Mar 2015 11:11:56 +0000 (13:11 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 31 Mar 2015 11:11:56 +0000 (13:11 +0200)
12 files changed:
0001-gifwriter-bgcolor-narrowing.patch [deleted file]
0002-unbundle-giflib.patch [deleted file]
0003-unbundle-mongoose.patch
0005-unbundle-qt.patch
0007-unbundle-QCommandLine.patch
0008-unbundle-coffee-script.patch [deleted file]
giflib5.patch [deleted file]
no-qcodecs.patch [deleted file]
phantomjs-disable-breakpad.patch [moved from 0004-unbundle-breakpad.patch with 56% similarity]
phantomjs-env.patch [new file with mode: 0644]
phantomjs-qt.patch [new file with mode: 0644]
phantomjs.spec

diff --git a/0001-gifwriter-bgcolor-narrowing.patch b/0001-gifwriter-bgcolor-narrowing.patch
deleted file mode 100644 (file)
index 2fce1f9..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-From e895d93f4c3b758fe8ed5c8e656b2c80b1400d3c Mon Sep 17 00:00:00 2001
-From: Dan Callaghan <dcallagh@redhat.com>
-Date: Fri, 3 Aug 2012 12:21:40 +1000
-Subject: [PATCH 1/8] gifwriter bgcolor narrowing
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-gif/gifwriter.cpp: In function ‘bool exportGif(const QImage&, const QString&)’:
-gif/gifwriter.cpp:109:47: warning: narrowing conversion of ‘bgcolor’ from ‘int’ to ‘char’ inside { } is ill-formed in C++11 [-Wnarrowing]
-
-diff --git a/src/gif/gifwriter.cpp b/src/gif/gifwriter.cpp
-index c0a010c..27c66c7 100644
---- a/src/gif/gifwriter.cpp
-+++ b/src/gif/gifwriter.cpp
-@@ -106,7 +106,7 @@ bool exportGif(const QImage &img, const QString &fileName)
-     gif->ImageCount = 1;
-     EGifPutScreenDesc(gif, image.width(), image.height(), 256, 0, &cmap);
-     if (bgcolor >= 0) {
--        char extension[] = { 1, 0, 0, bgcolor };
-+        unsigned char extension[] = { 1, 0, 0, (unsigned char) bgcolor };
-         EGifPutExtension(gif, GRAPHICS_EXT_FUNC_CODE, 4, extension);
-     }
-     EGifPutImageDesc(gif, 0, 0, image.width(), image.height(), 0, &cmap);
--- 
-1.7.11.7
-
diff --git a/0002-unbundle-giflib.patch b/0002-unbundle-giflib.patch
deleted file mode 100644 (file)
index cb537db..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-From 85508524373ab559e821466c1b8430a8dc544c85 Mon Sep 17 00:00:00 2001
-From: Dan Callaghan <dcallagh@redhat.com>
-Date: Fri, 3 Aug 2012 12:12:38 +1000
-Subject: [PATCH 2/8] unbundle giflib
-
-
-diff --git a/src/gif/gif.pri b/src/gif/gif.pri
-index e2dd0a8..ad0c951 100644
---- a/src/gif/gif.pri
-+++ b/src/gif/gif.pri
-@@ -1,22 +1,8 @@
- VPATH += $$PWD
- INCLUDEPATH += $$PWD
--DEFINES += HAVE_CONFIG_H
--DEFINES += HAVE_FCNTL_H
--DEFINES += HAVE_STDARG_H
--!win32-msvc* {
--    DEFINES += HAVE_STDINT_H
--    DEFINES += HAVE_UNISTD_H
--}
-+LIBS += -lgif
--SOURCES += gif_err.c
--SOURCES += gifalloc.c
--SOURCES += egif_lib.c
--SOURCES += gif_hash.c
--SOURCES += quantize.c
- SOURCES += gifwriter.cpp
--HEADERS += gif_hash.h
--HEADERS += gif_lib_private.h
--HEADERS += gif_lib.h
- HEADERS += gifwriter.h
-diff --git a/src/gif/gifwriter.cpp b/src/gif/gifwriter.cpp
-index 27c66c7..53cdc28 100644
---- a/src/gif/gifwriter.cpp
-+++ b/src/gif/gifwriter.cpp
-@@ -29,7 +29,7 @@
- #include "gifwriter.h"
--#include "gif_lib.h"
-+#include <gif_lib.h>
- #include <QImage>
- #include <QFile>
--- 
-1.7.11.7
-
index 279fb1d1c78453910e469d4dc49dc9a5933089e5..2726fd0ac16f84b7577b26715dcb76ef0b39e780 100644 (file)
@@ -8,10 +8,10 @@ diff --git a/src/phantomjs.pro b/src/phantomjs.pro
 index e6f5de8..2b3fb1b 100644
 --- a/src/phantomjs.pro
 +++ b/src/phantomjs.pro
-@@ -56,7 +56,7 @@ OTHER_FILES += \
+@@ -64,7 +64,7 @@ OTHER_FILES += \
+     modules/cookiejar.js \
      repl.js
  
- include(gif/gif.pri)
 -include(mongoose/mongoose.pri)
 +LIBS += -lmongoose
  include(linenoise/linenoise.pri)
@@ -27,9 +27,9 @@ index 9c60354..e26f6c4 100644
  #include "encoding.h"
 -#include "mongoose/mongoose.h"
 +#include <mongoose.h>
+ #include "consts.h"
  
  #include <QByteArray>
- #include <QHostAddress>
 diff --git a/src/webserver.h b/src/webserver.h
 index 1cbb564..bdfdc50 100644
 --- a/src/webserver.h
@@ -43,6 +43,3 @@ index 1cbb564..bdfdc50 100644
  
  class Config;
  
--- 
-1.7.11.7
-
index f21b8fb869141b39f29e2c2fa5c4357a29c38edf..c2ce40abd9d15deda145ba9e04123c31c8d0cb05 100644 (file)
@@ -21,65 +21,20 @@ index 226c98f..2bf3fdb 100644
  }
  
  QString Config::helpText() const
-diff --git a/src/csconverter.cpp b/src/csconverter.cpp
-index e81303d..6abe1ff 100644
---- a/src/csconverter.cpp
-+++ b/src/csconverter.cpp
-@@ -49,8 +49,10 @@ CSConverter::CSConverter()
-     : QObject(QCoreApplication::instance())
- {
-     m_webPage.mainFrame()->evaluateJavaScript(
--        Utils::readResourceFileUtf8(":/coffee-script/extras/coffee-script.js"),
--        QString("phantomjs://coffee-script/extras/coffee-script.js")
-+        Utils::readResourceFileUtf8(":/coffee-script/extras/coffee-script.js")
-+#ifdef HAVE_QT_JS_STACK_TRACES
-+        , QString("phantomjs://coffee-script/extras/coffee-script.js")
-+#endif
-     );
-     m_webPage.mainFrame()->addToJavaScriptWindowObject("converter", this);
- }
-@@ -63,8 +65,10 @@ QVariant CSConverter::convert(const QString &script)
-         "    [true, this.CoffeeScript.compile(converter.source)];" \
-         "} catch (error) {" \
-         "    [false, error.message];" \
--        "}",
--        QString()
-+        "}"
-+#ifdef HAVE_QT_JS_STACK_TRACES
-+        , QString()
-+#endif
-     );
-     return result;
- }
-diff --git a/src/main.cpp b/src/main.cpp
-index 64560aa..ead0562 100644
---- a/src/main.cpp
-+++ b/src/main.cpp
-@@ -58,10 +58,6 @@ Q_IMPORT_PLUGIN(qico)
- #endif
- #endif
--#if QT_VERSION != QT_VERSION_CHECK(4, 8, 4)
--#error Something is wrong with the setup. Please report to the mailing list!
--#endif
--
- int main(int argc, char** argv, const char** envp)
- {
- #ifdef HAVE_BREAKPAD
 diff --git a/src/phantom.cpp b/src/phantom.cpp
 index 1f31795..efc4449 100644
 --- a/src/phantom.cpp
 +++ b/src/phantom.cpp
-@@ -372,7 +372,11 @@ void Phantom::loadModule(const QString &moduleSource, const QString &filename)
+@@ -372,7 +372,11 @@ void Phantom::loadModule(const QString &
        "require.cache['" + filename + "'].exports," +
        "require.cache['" + filename + "']" +
        "));";
--   m_page->mainFrame()->evaluateJavaScript(scriptSource, filename);
+-   m_page->mainFrame()->evaluateJavaScript(scriptSource, "");
 +   m_page->mainFrame()->evaluateJavaScript(scriptSource
 +#ifdef HAVE_QT_JS_STACK_TRACES
-+        , filename
++                 , ""
 +#endif
-+        );
++                 );
  }
  
  bool Phantom::injectJs(const QString &jsFilePath)
@@ -96,21 +51,6 @@ index 1f31795..efc4449 100644
                  );
  }
  
-diff --git a/src/phantomjs.pro b/src/phantomjs.pro
-index d453b31..9a690fc 100644
---- a/src/phantomjs.pro
-+++ b/src/phantomjs.pro
-@@ -6,9 +6,7 @@ CONFIG += console
- DESTDIR = ../bin
- RESOURCES = phantomjs.qrc \
--    ghostdriver/ghostdriver.qrc \
--    qt/src/3rdparty/webkit/Source/WebCore/inspector/front-end/WebKit.qrc \
--    qt/src/3rdparty/webkit/Source/WebCore/generated/InspectorBackendStub.qrc
-+    ghostdriver/ghostdriver.qrc
- HEADERS += csconverter.h \
-     phantom.h \
 diff --git a/src/repl.cpp b/src/repl.cpp
 index 5ac69da..7b1872d 100644
 --- a/src/repl.cpp
index 42f92eb057c6c3b51a742699bc0c8992d672c95d..fb199dbecdfc9966ff32725aa1d2fb3d3ffa7f7c 100644 (file)
@@ -21,7 +21,7 @@ index 2bf3fdb..9a6ecc8 100644
  #include "utils.h"
  #include "consts.h"
  
-@@ -48,32 +48,58 @@
+@@ -48,35 +48,35 @@
  
  static const struct QCommandLineConfigEntry flags[] =
  {
@@ -33,6 +33,7 @@ index 2bf3fdb..9a6ecc8 100644
 -    { QCommandLine::Option, '\0', "load-images", "Loads all inlined images: 'true' (default) or 'false'", QCommandLine::Optional },
 -    { QCommandLine::Option, '\0', "local-storage-path", "Specifies the location for offline local storage", QCommandLine::Optional },
 -    { QCommandLine::Option, '\0', "local-storage-quota", "Sets the maximum size of the offline local storage (in KB)", QCommandLine::Optional },
+-    { QCommandLine::Option, '\0', "local-url-access", "Allows use of 'file:///' URLs: 'true' (default) or 'false'", QCommandLine::Optional },
 -    { QCommandLine::Option, '\0', "local-to-remote-url-access", "Allows local content to access remote URL: 'true' or 'false' (default)", QCommandLine::Optional },
 -    { QCommandLine::Option, '\0', "max-disk-cache-size", "Limits the size of the disk cache (in KB)", QCommandLine::Optional },
 -    { QCommandLine::Option, '\0', "output-encoding", "Sets the encoding for the terminal output, default is 'utf8'", QCommandLine::Optional },
@@ -42,8 +43,10 @@ index 2bf3fdb..9a6ecc8 100644
 -    { QCommandLine::Option, '\0', "proxy-auth", "Provides authentication information for the proxy, e.g. ''-proxy-auth=username:password'", QCommandLine::Optional },
 -    { QCommandLine::Option, '\0', "proxy-type", "Specifies the proxy type, 'http' (default), 'none' (disable completely), or 'socks5'", QCommandLine::Optional },
 -    { QCommandLine::Option, '\0', "script-encoding", "Sets the encoding used for the starting script, default is 'utf8'", QCommandLine::Optional },
+-    { QCommandLine::Option, '\0', "script-language", "Sets the script language instead of detecting it: 'javascript'", QCommandLine::Optional },
 -    { QCommandLine::Option, '\0', "web-security", "Enables web security, 'true' (default) or 'false'", QCommandLine::Optional },
--    { QCommandLine::Option, '\0', "ssl-protocol", "Sets the SSL protocol (supported protocols: 'SSLv3' (default), 'SSLv2', 'TLSv1', 'any')", QCommandLine::Optional },
+-    { QCommandLine::Option, '\0', "ssl-protocol", "Selects a specific SSL protocol version to offer. Values (case insensitive): TLSv1.2, TLSv1.1, TLSv1.0, TLSv1 (same as v1.0), SSLv3, or ANY. Default is to offer all that Qt thinks are secure (SSLv3 and up). Not all values may be supported, depending on the system OpenSSL library.", QCommandLine::Optional },
+-    { QCommandLine::Option, '\0', "ssl-ciphers", "Sets supported TLS/SSL ciphers. Argument is a colon-separated list of OpenSSL cipher names (macros like ALL, kRSA, etc. may not be used). Default matches modern browsers.", QCommandLine::Optional },
 -    { QCommandLine::Option, '\0', "ssl-certificates-path", "Sets the location for custom CA certificates (if none set, uses system default)", QCommandLine::Optional },
 -    { QCommandLine::Option, '\0', "webdriver", "Starts in 'Remote WebDriver mode' (embedded GhostDriver): '[[<IP>:]<PORT>]' (default '127.0.0.1:8910') ", QCommandLine::Optional },
 -    { QCommandLine::Option, '\0', "webdriver-logfile", "File where to write the WebDriver's Log (default 'none') (NOTE: needs '--webdriver') ", QCommandLine::Optional },
@@ -51,58 +54,35 @@ index 2bf3fdb..9a6ecc8 100644
 -    { QCommandLine::Option, '\0', "webdriver-selenium-grid-hub", "URL to the Selenium Grid HUB: 'URL_TO_HUB' (default 'none') (NOTE: needs '--webdriver') ", QCommandLine::Optional },
 -    { QCommandLine::Param, '\0', "script", "Script", QCommandLine::Flags(QCommandLine::Optional|QCommandLine::ParameterFence)},
 -    { QCommandLine::Param, '\0', "argument", "Script argument", QCommandLine::OptionalMultiple },
-+    { QCommandLine::Option, '\0', "cookies-file", "Sets the file name to store the persistent cookies",
-+        QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
-+    { QCommandLine::Option, '\0', "config", "Specifies JSON-formatted configuration file",
-+        QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
-+    { QCommandLine::Option, '\0', "debug", "Prints additional warning and debug message: 'true' or 'false' (default)",
-+        QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
-+    { QCommandLine::Option, '\0', "disk-cache", "Enables disk cache: 'true' or 'false' (default)",
-+        QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
-+    { QCommandLine::Option, '\0', "ignore-ssl-errors", "Ignores SSL errors (expired/self-signed certificate errors): 'true' or 'false' (default)",
-+        QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
-+    { QCommandLine::Option, '\0', "load-images", "Loads all inlined images: 'true' (default) or 'false'",
-+        QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
-+    { QCommandLine::Option, '\0', "local-storage-path", "Specifies the location for offline local storage",
-+        QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
-+    { QCommandLine::Option, '\0', "local-storage-quota", "Sets the maximum size of the offline local storage (in KB)",
-+        QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
-+    { QCommandLine::Option, '\0', "local-to-remote-url-access", "Allows local content to access remote URL: 'true' or 'false' (default)",
-+        QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
-+    { QCommandLine::Option, '\0', "max-disk-cache-size", "Limits the size of the disk cache (in KB)",
-+        QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
-+    { QCommandLine::Option, '\0', "output-encoding", "Sets the encoding for the terminal output, default is 'utf8'",
-+        QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
-+    { QCommandLine::Option, '\0', "remote-debugger-port", "Starts the script in a debug harness and listens on the specified port",
-+        QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
-+    { QCommandLine::Option, '\0', "remote-debugger-autorun", "Runs the script in the debugger immediately: 'true' or 'false' (default)",
-+        QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
-+    { QCommandLine::Option, '\0', "proxy", "Sets the proxy server, e.g. '--proxy=http://proxy.company.com:8080'",
-+        QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
-+    { QCommandLine::Option, '\0', "proxy-auth", "Provides authentication information for the proxy, e.g. ''-proxy-auth=username:password'",
-+        QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
-+    { QCommandLine::Option, '\0', "proxy-type", "Specifies the proxy type, 'http' (default), 'none' (disable completely), or 'socks5'",
-+        QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
-+    { QCommandLine::Option, '\0', "script-encoding", "Sets the encoding used for the starting script, default is 'utf8'",
-+        QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
-+    { QCommandLine::Option, '\0', "web-security", "Enables web security, 'true' (default) or 'false'",
-+        QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
-+    { QCommandLine::Option, '\0', "ssl-protocol", "Sets the SSL protocol (supported protocols: 'SSLv3' (default), 'SSLv2', 'TLSv1', 'any')",
-+        QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
-+    { QCommandLine::Option, '\0', "ssl-certificates-path", "Sets the location for custom CA certificates (if none set, uses system default)",
-+        QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
-+    { QCommandLine::Option, '\0', "webdriver", "Starts in 'Remote WebDriver mode' (embedded GhostDriver): '[[<IP>:]<PORT>]' (default '127.0.0.1:8910') ",
-+        QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
-+    { QCommandLine::Option, '\0', "webdriver-logfile", "File where to write the WebDriver's Log (default 'none') (NOTE: needs '--webdriver') ",
-+        QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
-+    { QCommandLine::Option, '\0', "webdriver-loglevel", "WebDriver Logging Level: (supported: 'ERROR', 'WARN', 'INFO', 'DEBUG') (default 'INFO') (NOTE: needs '--webdriver') ",
-+        QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
-+    { QCommandLine::Option, '\0', "webdriver-selenium-grid-hub", "URL to the Selenium Grid HUB: 'URL_TO_HUB' (default 'none') (NOTE: needs '--webdriver') ",
-+        QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
-+    { QCommandLine::Param, '\0', "script", "Script",
-+        QCommandLine::Flags(QCommandLine::Optional|QCommandLine::ParameterFence|QCommandLine::SuppressHelp)},
-+    { QCommandLine::Param, '\0', "argument", "Script argument",
-+        QCommandLine::Flags(QCommandLine::OptionalMultiple|QCommandLine::SuppressHelp) },
++    { QCommandLine::Option, '\0', "cookies-file", "Sets the file name to store the persistent cookies", QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName)},
++    { QCommandLine::Option, '\0', "config", "Specifies JSON-formatted configuration file", QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
++    { QCommandLine::Option, '\0', "debug", "Prints additional warning and debug message: 'true' or 'false' (default)", QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
++    { QCommandLine::Option, '\0', "disk-cache", "Enables disk cache: 'true' or 'false' (default)", QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
++    { QCommandLine::Option, '\0', "ignore-ssl-errors", "Ignores SSL errors (expired/self-signed certificate errors): 'true' or 'false' (default)", QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
++    { QCommandLine::Option, '\0', "load-images", "Loads all inlined images: 'true' (default) or 'false'", QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
++    { QCommandLine::Option, '\0', "local-storage-path", "Specifies the location for offline local storage", QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
++    { QCommandLine::Option, '\0', "local-storage-quota", "Sets the maximum size of the offline local storage (in KB)", QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
++    { QCommandLine::Option, '\0', "local-url-access", "Allows use of 'file:///' URLs: 'true' (default) or 'false'", QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
++    { QCommandLine::Option, '\0', "local-to-remote-url-access", "Allows local content to access remote URL: 'true' or 'false' (default)", QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
++    { QCommandLine::Option, '\0', "max-disk-cache-size", "Limits the size of the disk cache (in KB)", QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
++    { QCommandLine::Option, '\0', "output-encoding", "Sets the encoding for the terminal output, default is 'utf8'", QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
++    { QCommandLine::Option, '\0', "remote-debugger-port", "Starts the script in a debug harness and listens on the specified port", QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
++    { QCommandLine::Option, '\0', "remote-debugger-autorun", "Runs the script in the debugger immediately: 'true' or 'false' (default)", QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
++    { QCommandLine::Option, '\0', "proxy", "Sets the proxy server, e.g. '--proxy=http://proxy.company.com:8080'", QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
++    { QCommandLine::Option, '\0', "proxy-auth", "Provides authentication information for the proxy, e.g. ''-proxy-auth=username:password'", QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
++    { QCommandLine::Option, '\0', "proxy-type", "Specifies the proxy type, 'http' (default), 'none' (disable completely), or 'socks5'", QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
++    { QCommandLine::Option, '\0', "script-encoding", "Sets the encoding used for the starting script, default is 'utf8'", QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
++    { QCommandLine::Option, '\0', "script-language", "Sets the script language instead of detecting it: 'javascript'", QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
++    { QCommandLine::Option, '\0', "web-security", "Enables web security, 'true' (default) or 'false'", QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
++    { QCommandLine::Option, '\0', "ssl-protocol", "Selects a specific SSL protocol version to offer. Values (case insensitive): TLSv1.2, TLSv1.1, TLSv1.0, TLSv1 (same as v1.0), SSLv3, or ANY. Default is to offer all that Qt thinks are secure (SSLv3 and up). Not all values may be supported, depending on the system OpenSSL library.", QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
++    { QCommandLine::Option, '\0', "ssl-ciphers", "Sets supported TLS/SSL ciphers. Argument is a colon-separated list of OpenSSL cipher names (macros like ALL, kRSA, etc. may not be used). Default matches modern browsers.", QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
++    { QCommandLine::Option, '\0', "ssl-certificates-path", "Sets the location for custom CA certificates (if none set, uses system default)", QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
++    { QCommandLine::Option, '\0', "webdriver", "Starts in 'Remote WebDriver mode' (embedded GhostDriver): '[[<IP>:]<PORT>]' (default '127.0.0.1:8910') ", QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
++    { QCommandLine::Option, '\0', "webdriver-logfile", "File where to write the WebDriver's Log (default 'none') (NOTE: needs '--webdriver') ", QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
++    { QCommandLine::Option, '\0', "webdriver-loglevel", "WebDriver Logging Level: (supported: 'ERROR', 'WARN', 'INFO', 'DEBUG') (default 'INFO') (NOTE: needs '--webdriver') ", QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
++    { QCommandLine::Option, '\0', "webdriver-selenium-grid-hub", "URL to the Selenium Grid HUB: 'URL_TO_HUB' (default 'none') (NOTE: needs '--webdriver') ", QCommandLine::Flags(QCommandLine::Optional|QCommandLine::NoShortName) },
++    { QCommandLine::Param, '\0', "script", "Script", QCommandLine::Flags(QCommandLine::Optional|QCommandLine::ParameterFence|QCommandLine::SuppressHelp)},
++    { QCommandLine::Param, '\0', "argument", "Script argument", QCommandLine::Flags(QCommandLine::OptionalMultiple|QCommandLine::SuppressHelp) },
      { QCommandLine::Switch, 'w', "wd", "Equivalent to '--webdriver' option above", QCommandLine::Optional },
      { QCommandLine::Switch, 'h', "help", "Shows this message and quits", QCommandLine::Optional },
      { QCommandLine::Switch, 'v', "version", "Prints out PhantomJS version", QCommandLine::Optional },
diff --git a/0008-unbundle-coffee-script.patch b/0008-unbundle-coffee-script.patch
deleted file mode 100644 (file)
index e49435b..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-From 6ac405d555c7f80c95b0636be64e3739d194318e Mon Sep 17 00:00:00 2001
-From: Dan Callaghan <dcallagh@redhat.com>
-Date: Mon, 11 Feb 2013 10:32:55 +1000
-Subject: [PATCH 8/8] unbundle coffee-script
-
-
-diff --git a/src/csconverter.cpp b/src/csconverter.cpp
-index 6abe1ff..8806e8d 100644
---- a/src/csconverter.cpp
-+++ b/src/csconverter.cpp
-@@ -49,9 +49,9 @@ CSConverter::CSConverter()
-     : QObject(QCoreApplication::instance())
- {
-     m_webPage.mainFrame()->evaluateJavaScript(
--        Utils::readResourceFileUtf8(":/coffee-script/extras/coffee-script.js")
-+        Utils::readResourceFileUtf8("/usr/share/coffee-script/extras/coffee-script.js")
- #ifdef HAVE_QT_JS_STACK_TRACES
--        , QString("phantomjs://coffee-script/extras/coffee-script.js")
-+        , QString("/usr/share/coffee-script/extras/coffee-script.js")
- #endif
-     );
-     m_webPage.mainFrame()->addToJavaScriptWindowObject("converter", this);
-diff --git a/src/modules/_coffee-script.js b/src/modules/_coffee-script.js
-index 4366c50..a8e8f7d 100644
---- a/src/modules/_coffee-script.js
-+++ b/src/modules/_coffee-script.js
-@@ -8,4 +8,4 @@ require.stub('fs', {
-     }
- });
--module.exports = require('../coffee-script');
-+module.exports = require('/usr/lib/node_modules/coffee-script');
-diff --git a/src/phantomjs.qrc b/src/phantomjs.qrc
-index 31839b5..1e9fc94 100644
---- a/src/phantomjs.qrc
-+++ b/src/phantomjs.qrc
-@@ -11,22 +11,5 @@
-         <file>modules/child_process.js</file>
-         <file>modules/_coffee-script.js</file>
-         <file>repl.js</file>
--
--        <file>coffee-script/package.json</file>
--        <file>coffee-script/lib/coffee-script/coffee-script.js</file>
--        <file>coffee-script/lib/coffee-script/optparse.js</file>
--        <file>coffee-script/lib/coffee-script/command.js</file>
--        <file>coffee-script/lib/coffee-script/scope.js</file>
--        <file>coffee-script/lib/coffee-script/parser.js</file>
--        <file>coffee-script/lib/coffee-script/browser.js</file>
--        <file>coffee-script/lib/coffee-script/nodes.js</file>
--        <file>coffee-script/lib/coffee-script/grammar.js</file>
--        <file>coffee-script/lib/coffee-script/lexer.js</file>
--        <file>coffee-script/lib/coffee-script/repl.js</file>
--        <file>coffee-script/lib/coffee-script/cake.js</file>
--        <file>coffee-script/lib/coffee-script/helpers.js</file>
--        <file>coffee-script/lib/coffee-script/rewriter.js</file>
--        <file>coffee-script/lib/coffee-script/index.js</file>
--        <file>coffee-script/extras/coffee-script.js</file>
-     </qresource>
- </RCC>
--- 
-1.7.11.7
-
diff --git a/giflib5.patch b/giflib5.patch
deleted file mode 100644 (file)
index 6f9f094..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-https://github.com/ariya/phantomjs/pull/11760
-https://github.com/bmanojlovic/phantomjs/commit/f504f5316fe0a170bf41327b1715f806d8592d9a.patch
-
-From f504f5316fe0a170bf41327b1715f806d8592d9a Mon Sep 17 00:00:00 2001
-From: Boris Manojlovic <boris.manojlovic@zis.co.rs>
-Date: Mon, 18 Nov 2013 08:02:05 +0100
-Subject: [PATCH] add giflib5 support to codebase
-
----
- src/gif/gifwriter.cpp | 13 ++++++++++++-
- 1 file changed, 12 insertions(+), 1 deletion(-)
-
-diff --git a/src/gif/gifwriter.cpp b/src/gif/gifwriter.cpp
-index c0a010c..5a8647e 100644
---- a/src/gif/gifwriter.cpp
-+++ b/src/gif/gifwriter.cpp
-@@ -34,6 +34,12 @@
- #include <QImage>
- #include <QFile>
-+#if defined GIFLIB_MAJOR && GIFLIB_MAJOR >=5
-+#define EGifOpenFileName(a, b) EGifOpenFileName(a, b, NULL)
-+#define EGifOpen(a, b) EGifOpen(a, b, NULL)
-+#define QuantizeBuffer GifQuantizeBuffer
-+#endif
-+
- static int saveGifBlock(GifFileType *gif, const GifByteType *data, int i)
- {
-     QFile *file = (QFile*)(gif->UserData);
-@@ -100,9 +106,14 @@ bool exportGif(const QImage &img, const QString &fileName)
-         if (qAlpha(colorTable[c]) == 0)
-             bgcolor = c;
-     }
--    EGifSetGifVersion("87a");
-+#if defined GIFLIB_MAJOR && GIFLIB_MAJOR >= 5
-+    GifFileType *gif = EGifOpen(&file, saveGifBlock);
-+    EGifSetGifVersion(gif, false);
-+#else
-+    EGifSetGifVersion("87a");
-     GifFileType *gif = EGifOpen(&file, saveGifBlock);
-+#endif
-     gif->ImageCount = 1;
-     EGifPutScreenDesc(gif, image.width(), image.height(), 256, 0, &cmap);
-     if (bgcolor >= 0) {
--- 
-1.8.5.5
-
---- phantomjs-1.9.7/src/gif/gifwriter.cpp~     2014-11-04 21:03:45.000000000 +0100
-+++ phantomjs-1.9.7/src/gif/gifwriter.cpp      2014-11-04 21:06:16.042996189 +0100
-@@ -128,7 +128,11 @@
-         }
-     }
-+#if ((GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1) || GIFLIB_MAJOR > 5)
-+    EGifCloseFile(gif, NULL);
-+#else
-     EGifCloseFile(gif);
-+#endif
-     file.close();
-     delete [] cmap.Colors;
diff --git a/no-qcodecs.patch b/no-qcodecs.patch
deleted file mode 100644 (file)
index 4d80c46..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-disable static qcncodecs, qjpcodecs, qkrcodecs, qtwcodecs codecs
-
-the shared versions already come from QtCore package:
--rwxr-xr-x 1 root root 144K Feb  5 15:23 /usr/lib64/qt4/plugins/codecs/libqcncodecs.so*
--rwxr-xr-x 1 root root 181K Feb  5 15:23 /usr/lib64/qt4/plugins/codecs/libqjpcodecs.so*
--rwxr-xr-x 1 root root  78K Feb  5 15:23 /usr/lib64/qt4/plugins/codecs/libqkrcodecs.so*
--rwxr-xr-x 1 root root 158K Feb  5 15:23 /usr/lib64/qt4/plugins/codecs/libqtwcodecs.so*
-
---- phantomjs-1.9.7/./src/phantomjs.pro~       2014-03-02 16:26:44.000000000 +0200
-+++ phantomjs-1.9.7/./src/phantomjs.pro        2014-03-02 16:28:02.520192429 +0200
-@@ -58,14 +58,6 @@
- LIBS += -llinenoise
- LIBS += -lqcommandline
--linux*|mac {
--    QTPLUGIN += \
--        qcncodecs \
--        qjpcodecs \
--        qkrcodecs \
--        qtwcodecs
--}
--
- win32: RC_FILE = phantomjs_win.rc
- os2:   RC_FILE = phantomjs_os2.rc
-@@ -82,10 +74,6 @@
-     CONFIG(static) {
-         DEFINES += STATIC_BUILD
-         QTPLUGIN += \
--            qcncodecs \
--            qjpcodecs \
--            qkrcodecs \
--            qtwcodecs \
-             qico
-     }
- }
similarity index 56%
rename from 0004-unbundle-breakpad.patch
rename to phantomjs-disable-breakpad.patch
index 1dc0a71a578175fcc5e6b8de8c8bbf1a1b532cd4..054efa7918f26e80dea5bc6d88e86db5592a1bfe 100644 (file)
@@ -1,64 +1,29 @@
-From ee970c5d54f41a45e3288c5b107b5aa0c065291f Mon Sep 17 00:00:00 2001
-From: Dan Callaghan <dcallagh@redhat.com>
-Date: Fri, 3 Aug 2012 12:16:20 +1000
-Subject: [PATCH 4/8] unbundle breakpad
-
-
-diff --git a/src/main.cpp b/src/main.cpp
-index 734c084..64560aa 100644
---- a/src/main.cpp
-+++ b/src/main.cpp
-@@ -32,12 +32,14 @@
- #include "env.h"
- #include "phantom.h"
+--- phantomjs-2.0.0/src/crashdump.cpp~ 2015-01-24 03:19:52.000000000 +0100
++++ phantomjs-2.0.0/src/crashdump.cpp  2015-03-31 10:42:18.791404606 +0200
+@@ -37,7 +37,7 @@
+ #include <exception>
+ #include <cstdlib>
  
-+#ifdef HAVE_BREAKPAD
- #ifdef Q_OS_LINUX
+-#ifdef Q_OS_LINUX
++#if 0
  #include "client/linux/handler/exception_handler.h"
- #endif
- #ifdef Q_OS_MAC
- #include "client/mac/handler/exception_handler.h"
- #endif
-+#endif
- #include <QApplication>
- #include <QSslSocket>
-@@ -62,6 +64,7 @@ Q_IMPORT_PLUGIN(qico)
- int main(int argc, char** argv, const char** envp)
- {
-+#ifdef HAVE_BREAKPAD
-     // Setup Google Breakpad exception handler
- #ifdef Q_OS_LINUX
-     google_breakpad::ExceptionHandler eh("/tmp", NULL, Utils::exceptionHandler, NULL, true);
-@@ -88,6 +91,7 @@ int main(int argc, char** argv, const char** envp)
-         free(szBuffer);
-     }
- #endif
-+#endif
+ #define HAVE_BREAKPAD
+ #define EHC_EXTRA_ARGS true
+--- phantomjs-2.0.0/src/phantomjs.pro~ 2015-03-31 12:19:42.000000000 +0200
++++ phantomjs-2.0.0/src/phantomjs.pro  2015-03-31 12:20:46.849769573 +0200
+@@ -68,44 +68,6 @@ LIBS += -lmongoose
+ LIBS += -llinenoise
+ LIBS += -lqcommandline
  
-     QApplication app(argc, argv);
---- phantomjs-1.9.7/src/phantomjs.pro~ 2014-03-02 15:55:56.000000000 +0200
-+++ phantomjs-1.9.7/src/phantomjs.pro  2014-03-02 15:57:03.766411109 +0200
-@@ -61,13 +61,6 @@
- include(qcommandline/qcommandline.pri)
- linux*|mac {
+-linux*|mac|openbsd* {
 -    INCLUDEPATH += breakpad/src
 -
 -    SOURCES += breakpad/src/client/minidump_file_writer.cc \
 -      breakpad/src/common/convert_UTF.c \
 -      breakpad/src/common/md5.cc \
 -      breakpad/src/common/string_conversion.cc 
+-}
 -
-     QTPLUGIN += \
-         qcncodecs \
-         qjpcodecs \
-@@ -75,35 +68,6 @@
-         qtwcodecs
- }
 -linux* {
 -    SOURCES += breakpad/src/client/linux/crash_generation/crash_generation_client.cc \
 -      breakpad/src/client/linux/handler/exception_handler.cc \
@@ -91,14 +56,59 @@ index 734c084..64560aa 100644
  win32: RC_FILE = phantomjs_win.rc
  os2:   RC_FILE = phantomjs_os2.rc
  
-@@ -117,10 +81,6 @@
+@@ -119,10 +81,6 @@ mac {
  
  win32-msvc* {
-     LIBS += -lCrypt32
+     LIBS += -lCrypt32 -llibxml2
 -    INCLUDEPATH += breakpad/src
 -    SOURCES += breakpad/src/client/windows/handler/exception_handler.cc \
 -      breakpad/src/client/windows/crash_generation/crash_generation_client.cc \
 -      breakpad/src/common/windows/guid_string.cc
      CONFIG(static) {
          DEFINES += STATIC_BUILD
-         QTPLUGIN += \
+     }
+--- phantomjs-2.0.0/src/crashdump.h~   2015-01-24 03:19:52.000000000 +0100
++++ phantomjs-2.0.0/src/crashdump.h    2015-03-31 13:02:08.664129280 +0200
+@@ -31,9 +31,11 @@
+ #ifndef CRASHDUMP_H
+ #define CRASHDUMP_H
++#ifdef HAVE_BREAKPAD
+ namespace google_breakpad {
+     class ExceptionHandler;
+ }
++#endif
+ class CrashHandler
+ {
+@@ -43,7 +45,9 @@
+ private:
+     void (*old_terminate_handler)();
++#ifdef HAVE_BREAKPAD
+     google_breakpad::ExceptionHandler *eh;
++#endif
+ };
+ #endif // CRASHDUMP_H
+--- phantomjs-2.0.0/src/crashdump.cpp~ 2015-03-31 13:02:35.000000000 +0200
++++ phantomjs-2.0.0/src/crashdump.cpp  2015-03-31 13:05:36.369213390 +0200
+@@ -188,12 +188,16 @@
+ // and crash promptly if not.
+ CrashHandler::CrashHandler()
+-  : old_terminate_handler(std::set_terminate(std::abort)),
+-    eh(initBreakpad())
++  : old_terminate_handler(std::set_terminate(std::abort))
++#ifdef HAVE_BREAKPAD
++    ,eh(initBreakpad())
++#endif
+ {}
+ CrashHandler::~CrashHandler()
+ {
++#ifdef HAVE_BREAKPAD
+   delete eh;
++#endif
+   std::set_terminate(old_terminate_handler);
+ }
diff --git a/phantomjs-env.patch b/phantomjs-env.patch
new file mode 100644 (file)
index 0000000..f9cfa8c
--- /dev/null
@@ -0,0 +1,11 @@
+--- phantomjs-2.0.0/src/system.cpp~    2015-01-24 03:19:52.000000000 +0100
++++ phantomjs-2.0.0/src/system.cpp     2015-03-31 12:19:03.100496332 +0200
+@@ -35,7 +35,7 @@
+ #include <QVariantMap>
+ #include <QTextCodec>
+-#include "../env.h"
++#include "env.h"
+ #include "terminal.h"
+ #if defined(Q_OS_LINUX) || defined(Q_OS_MAC)
diff --git a/phantomjs-qt.patch b/phantomjs-qt.patch
new file mode 100644 (file)
index 0000000..40c4075
--- /dev/null
@@ -0,0 +1,22 @@
+--- phantomjs-2.0.0/src/phantomjs.pro~ 2015-03-31 11:33:10.000000000 +0200
++++ phantomjs-2.0.0/src/phantomjs.pro  2015-03-31 11:35:56.083153334 +0200
+@@ -1,6 +1,6 @@
+-if(!equals(QT_MAJOR_VERSION, 5)|!equals(QT_MINOR_VERSION, 3)) {
+-    error("This program can only be compiled with Qt 5.3.x.")
++if(!equals(QT_MAJOR_VERSION, 5)|!equals(QT_MINOR_VERSION, 4)) {
++    error("This program can only be compiled with Qt 5.4.x.")
+ }
+ TEMPLATE = app
+--- phantomjs-2.0.0/src/phantomjs.pro~ 2015-03-31 12:28:29.000000000 +0200
++++ phantomjs-2.0.0/src/phantomjs.pro  2015-03-31 12:30:37.684374103 +0200
+@@ -5,7 +5,7 @@
+ TEMPLATE = app
+ TARGET = phantomjs
+-QT += network webkitwidgets
++QT += network webkitwidgets printsupport
+ CONFIG += console
+ DESTDIR = ../bin
index 94b9bb898bb55978eedc245b4ea3a3cf6e7c6460..953b30d3c23d28f63e0a99955e685fba2bbcd6da 100644 (file)
@@ -1,28 +1,28 @@
+%bcond_with    system_qcommandline
 Summary:       Headless WebKit with a JavaScript API
 Name:          phantomjs
-Version:       1.9.7
-Release:       4
+Version:       2.0.0
+Release:       1
 License:       BSD
 Group:         Applications/Networking
 Source0:       https://bitbucket.org/ariya/phantomjs/downloads/%{name}-%{version}-source.zip
-# Source0-md5: 5d308d2db7d8b494f99dbb5664447547
-Patch0:                giflib5.patch
-Patch1:                0001-gifwriter-bgcolor-narrowing.patch
-Patch2:                0002-unbundle-giflib.patch
+# Source0-md5: feabe9064100e241d21347739312e64d
+Patch0:                phantomjs-qt.patch
+Patch1:                phantomjs-env.patch
+
 Patch3:                0003-unbundle-mongoose.patch
-Patch4:                0004-unbundle-breakpad.patch
+Patch4:                phantomjs-disable-breakpad.patch
 Patch5:                0005-unbundle-qt.patch
 Patch6:                0006-unbundle-linenoise.patch
 Patch7:                0007-unbundle-QCommandLine.patch
-Patch8:                0008-unbundle-coffee-script.patch
-Patch9:                no-qcodecs.patch
 URL:           http://phantomjs.org/
-BuildRequires: QtWebKit-devel
+BuildRequires: Qt5WebKit-devel
+BuildRequires: Qt5PrintSupport-devel
 BuildRequires: coffee-script
 BuildRequires: giflib-devel
 BuildRequires: linenoise-devel
 BuildRequires: mongoose-devel
-BuildRequires: qcommandline-devel
+%{?with_system_qcommandline:BuildRequires:     qcommandline-devel}
 BuildRequires: unzip
 Requires:      coffee-script
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -37,35 +37,23 @@ testing. It includes an implementation of the WebDriver API.
 %setup -q
 
 # remove bundled sources
-rm -r src/gif/config.h
-rm -r src/gif/egif_lib.c
-rm -r src/gif/gif_err.c
-rm -r src/gif/gif_hash.c
-rm -r src/gif/gif_hash.h
-rm -r src/gif/gif_lib.h
-rm -r src/gif/gif_lib_private.h
-rm -r src/gif/gifalloc.c
-rm -r src/gif/quantize.c
 rm -r src/mongoose
 rm -r src/qt
 rm -r src/linenoise
-rm -r src/qcommandline
-rm -r src/coffee-script
+%{?with_system_qcommandline:rm -r src/qcommandline}
 rm -r src/breakpad
 
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
+
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
-%patch7 -p1
-%patch8 -p1
-%patch9 -p1
+%{?with_system_qcommandline:%patch7 -p1}
 
 %build
-qmake-qt4
+qmake-qt5
 %{__make} \
        CXX="%{__cxx}" \
        CXXFLAGS="%{rpmcxxflags}"
This page took 0.137953 seconds and 4 git commands to generate.