Package: phantomjs Severity: wishlist There’s a new upstream version available, 2.0.0.
I packaged it for a project at work, and I’m attaching the patch. Unfortunately, this patch does not use the system Qt/QtWebKit— though it does use all other system libraries, libjpeg, libfreetype, etc. Ciao, -d
diff --git a/phantomjs/debian/changelog b/phantomjs/debian/changelog index 5b880f5..d275c4a 100644 --- a/phantomjs/debian/changelog +++ b/phantomjs/debian/changelog @@ -1,3 +1,30 @@ +phantomjs (2.0.0-0.1) unstable; urgency=low + + * Update to version 2.0.0. + + * Adjusted build dependencies: + + + remove: + - libqt4-dev (we use embedded Qt5) + - libjs-coffeescript (dropped upstream) + + + add dependencies needed for Qt5: + - libicu-dev + - libharfbuzz-dev + - libpcre3-dev + + + add dependencies needed for WebKit: + - flex, bison, gperf, python, ruby + + * Use upstream’s build.sh for the build step. + + * Remove patches which no longer apply / are not needed: + + - 0001-build-with-libjs-coffeesciprt.patch + - 0002-Don-t-use-ld.gold-when-building-webkit.patch + + -- Dato Simó <d...@debian.org> Thu, 28 May 2015 20:36:42 -0300 + phantomjs (1.9.0-1) unstable; urgency=low * Imported Upstream version 1.9.0 (Closes: #685404, #702381) diff --git a/phantomjs/debian/control b/phantomjs/debian/control index 63619e3..3379fd5 100644 --- a/phantomjs/debian/control +++ b/phantomjs/debian/control @@ -3,17 +3,21 @@ Section: web Priority: extra Maintainer: TANIGUCHI Takaki <tak...@debian.org> Build-Depends: debhelper (>= 7.0.50~), - libqt4-dev, - libjs-coffeescript + , bison + , flex + , gperf , libfreetype6-dev + , libharfbuzz-dev + , libicu-dev , libjpeg-dev + , libpcre3-dev , libpng-dev , libsqlite3-dev , libssl-dev , libz-dev , libfontconfig1-dev - , libx11-dev - , libxext-dev + , python + , ruby Standards-Version: 3.9.3 Homepage: http://www.phantomjs.org/ Vcs-Git: git://git.debian.org/collab-maint/phantomjs.git diff --git a/phantomjs/debian/patches/0001-build-with-libjs-coffeesciprt.patch b/phantomjs/debian/patches/0001-build-with-libjs-coffeesciprt.patch deleted file mode 100644 index 851a6e3..0000000 --- a/phantomjs/debian/patches/0001-build-with-libjs-coffeesciprt.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: TANIGUCHI Takaki <tak...@asis.media-as.org> -Date: Sat, 29 Oct 2011 18:26:43 +0900 -Subject: build with libjs-coffeesciprt - ---- - python/pyphantomjs/csconverter.py | 2 +- - python/pyphantomjs/resources.qrc | 1 - - src/csconverter.cpp | 2 +- - src/phantomjs.qrc | 1 - - 4 files changed, 2 insertions(+), 4 deletions(-) - -Index: phantomjs/src/csconverter.cpp -=================================================================== ---- phantomjs.orig/src/csconverter.cpp 2013-05-09 09:58:59.548611914 +0900 -+++ phantomjs/src/csconverter.cpp 2013-05-09 09:59:36.460792369 +0900 -@@ -49,7 +49,7 @@ - : QObject(QCoreApplication::instance()) - { - m_webPage.mainFrame()->evaluateJavaScript( -- Utils::readResourceFileUtf8(":/coffee-script/extras/coffee-script.js"), -+ Utils::readResourceFileUtf8("/usr/share/javascript/coffee-script/coffee-script.js"), - QString("phantomjs://coffee-script/extras/coffee-script.js") - ); - m_webPage.mainFrame()->addToJavaScriptWindowObject("converter", this); diff --git a/phantomjs/debian/patches/0002-Don-t-use-ld.gold-when-building-webkit.patch b/phantomjs/debian/patches/0002-Don-t-use-ld.gold-when-building-webkit.patch deleted file mode 100644 index 26f7997..0000000 --- a/phantomjs/debian/patches/0002-Don-t-use-ld.gold-when-building-webkit.patch +++ /dev/null @@ -1,32 +0,0 @@ ->From 03dd5a6ca3fca08fd35e37dfe93e7aca27728b00 Mon Sep 17 00:00:00 2001 -From: Eric Cooper <e...@cmu.edu> -Date: Mon, 19 Nov 2012 15:16:58 -0500 -Subject: [PATCH] Don't use ld.gold when building webkit - - -Signed-off-by: Eric Cooper <e...@cmu.edu> ---- - src/qt/src/3rdparty/webkit/Source/common.pri | 7 ------- - 1 file changed, 7 deletions(-) - -diff --git a/src/qt/src/3rdparty/webkit/Source/common.pri b/src/qt/src/3rdparty/webkit/Source/common.pri -index 0f62e14..093647a 100644 ---- a/src/qt/src/3rdparty/webkit/Source/common.pri -+++ b/src/qt/src/3rdparty/webkit/Source/common.pri -@@ -3,13 +3,6 @@ - contains(JAVASCRIPTCORE_JIT,yes): DEFINES+=ENABLE_JIT=1 - contains(JAVASCRIPTCORE_JIT,no): DEFINES+=ENABLE_JIT=0 - --linux-g++ { --isEmpty($$(SBOX_DPKG_INST_ARCH)):exists(/usr/bin/ld.gold) { -- message(Using gold linker) -- QMAKE_LFLAGS+=-fuse-ld=gold --} --} -- - # We use this flag on production branches - # See https://bugs.webkit.org/show_bug.cgi?id=60824 - CONFIG += production --- -1.7.10.4 - diff --git a/phantomjs/debian/patches/series b/phantomjs/debian/patches/series deleted file mode 100644 index b2f64d1..0000000 --- a/phantomjs/debian/patches/series +++ /dev/null @@ -1,2 +0,0 @@ -0002-Don-t-use-ld.gold-when-building-webkit.patch -0001-build-with-libjs-coffeesciprt.patch diff --git a/phantomjs/debian/rules b/phantomjs/debian/rules index 2786686..c46ef61 100755 --- a/phantomjs/debian/rules +++ b/phantomjs/debian/rules @@ -1,16 +1,17 @@ #!/usr/bin/make -f -# include /usr/share/hardening-includes/hardening.make - -# CFLAGS=$(shell dpkg-buildflags --get CFLAGS) -# CXXFLAGS=$(shell dpkg-buildflags --get CXXFLAGS) -# LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS) -# CFLAGS+=$(HARDENING_CFLAGS) -# CXXFLAGS+=$(HARDENING_CXXFLAGS) -# LDFLAGS+=$(HARDENING_LDFLAGS) - -QT_CFG=-no-rpath -system-zlib -system-libjpeg -system-libpng \ - -system-sqlite -plugin-sql-sqlite +# We compile the Qt5 source copy that PhantomJS embeds, but use system libraries +# like libjpeg/libpng, libfreetype, etc. Using the system Qt (--qt=system, +# --qtwebkit=system) seems like a risky proposition for the time being. +QT_LIBS = --qtdeps=system + +# Upstream disables PCRE with --qtdeps=system because not all distributions +# compile it with char16_t support. Debian/Ubuntu do, so we enable it back. +# +# TODO: would need to patch src/qt/qtbase/config.tests/unix/pcre/pcre.pro to +# link with vanilla -lpcre instead of -lpcre16. +# +# QT_LIBS += --pcre=system %: dh $@ @@ -19,9 +20,11 @@ override_dh_auto_configure: true override_dh_auto_build: - (cd src/qt && ./preconfig.sh --qt-config "$(QT_CFG)" && cd ../..) - src/qt/bin/qmake - $(MAKE) +# build.sh dies if MAKEFLAGS is non-empty but does not contain a -jN option. We +# set it to empty, and let build.sh figure out the number of jobs on its own. +# +# TODO: patch build.sh not to die if MAKEFLAGS is non-empty but -jN is missing. + env MAKEFLAGS= ./build.sh --confirm $(QT_LIBS) override_dh_auto_clean: dh_auto_clean