Bug#808789: phantomjs: FTBFS in several architectures (patch)

2015-12-27 Thread Ximin Luo
On Tue, 22 Dec 2015 23:36:59 + Mattia Rizzolo  wrote:
> Package: src:phantomjs
> Version: 1.6.0-2
> Severity: serious
> Tags: patch
> 
> 
> this packages ftbfs just about everywhere (excepts amd64, i386, armel
> and armhf) since google_breakpad is not really buildable there.
> 

I don't have time to look into it right this minute, but for more context on 
the existing state of PhantomJS in Debian see 
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=807335

X

-- 
GPG: 4096R/1318EFAC5FBBDBCE
git://github.com/infinity0/pubkeys.git



Bug#808789: phantomjs: FTBFS in several architectures (patch)

2015-12-22 Thread Zack Weinberg
On Tue, Dec 22, 2015 at 6:43 PM, Mattia Rizzolo  wrote:
> oh, dear upstream maintainer, I just submitted a debian bug to
> phantomjs, and I'd welcome a quick word from you in
> https://bugs.debian.org/808789 :)

As I said in #795719, Debian should not attempt to package PhantomJS at all.

zw



Bug#808789: phantomjs: FTBFS in several architectures (patch)

2015-12-22 Thread Mattia Rizzolo
oh, dear upstream maintainer, I just submitted a debian bug to
phantomjs, and I'd welcome a quick word from you in
https://bugs.debian.org/808789 :)

On Tue, Dec 22, 2015 at 11:36:59PM +, Mattia Rizzolo wrote:
> Reading around the source (expecially src/breakpad.cpp) I'd say
> phantomjs can deal just fine if breakpad is not available there.  With
> this belief I wrote the attached patch, which enables the inclusion of
> breakpad only in those 4 archs (x86_64, i386 and arm in QT_ARCH lingo,
> seems).
> Not that I'm not a Qt guy, so I did the following weird things (it
> works, though!):
>  * used QT_ARCH.  I'm not really sure if this is the right variable to
>use, I saw also different ones while googling for this issue
>  * couldn't find a nice way to say ((this or this) and (this or this))
>in the qmake syntax, so I falled back in nesting curly brackets...


what do you say?  (you can see the patch at the above url, attached at
the first message.


-- 
regards,
Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540  .''`.
more about me:  http://mapreri.org  : :'  :
Launchpad user: https://launchpad.net/~mapreri  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-


signature.asc
Description: PGP signature


Bug#808789: phantomjs: FTBFS in several architectures (patch)

2015-12-22 Thread Mattia Rizzolo
Package: src:phantomjs
Version: 1.6.0-2
Severity: serious
Tags: patch


this packages ftbfs just about everywhere (excepts amd64, i386, armel
and armhf) since google_breakpad is not really buildable there.

Reading around the source (expecially src/breakpad.cpp) I'd say
phantomjs can deal just fine if breakpad is not available there.  With
this belief I wrote the attached patch, which enables the inclusion of
breakpad only in those 4 archs (x86_64, i386 and arm in QT_ARCH lingo,
seems).
Not that I'm not a Qt guy, so I did the following weird things (it
works, though!):
 * used QT_ARCH.  I'm not really sure if this is the right variable to
   use, I saw also different ones while googling for this issue
 * couldn't find a nice way to say ((this or this) and (this or this))
   in the qmake syntax, so I falled back in nesting curly brackets...


Turns also out that this failure is keeping in the archive the ancient
python-pyphantomjs, which depends on python-support, that I'm trying to
kick, and since I prefer fixing packages instead of breaking them, here
you go.

Please tell me if you want to me to just upload it (might actually be a
huge improvment compared to the current buildable state...).


-- 
regards,
Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540  .''`.
more about me:  http://mapreri.org  : :'  :
Launchpad user: https://launchpad.net/~mapreri  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-
Description: enable google_breakpad only on amd64, i386, armel, armhf.
 breakpad is really unsuitable on other architectures, and phantomjs works
 fine anyway
Author: Mattia Rizzolo 
Forwarded: no
Last-Update: 2015-12-22

--- a/src/phantomjs.pro
+++ b/src/phantomjs.pro
@@ -64,16 +64,18 @@
 include(linenoise/linenoise.pri)
 include(qcommandline/qcommandline.pri)
 
-linux*|mac|openbsd* {
+linux*|mac|openbsd* { equals(QT_ARCH, x86_64)|equals(QT_ARCH, 
i386)|equals(QT_ARCH, arm) {
 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 
-}
 
-linux* {
+DEFINES += USE_BREAKPAD=1
+}}
+
+linux* { equals(QT_ARCH, x86_64)|equals(QT_ARCH, i386)|contains(QT_ARCH, arm) {
 SOURCES += 
breakpad/src/client/linux/crash_generation/crash_generation_client.cc \
   breakpad/src/client/linux/handler/exception_handler.cc \
   breakpad/src/client/linux/log/log.cc \
@@ -84,7 +86,7 @@
   breakpad/src/common/linux/guid_creator.cc \
   breakpad/src/common/linux/memory_mapped_file.cc \
   breakpad/src/common/linux/safe_readlink.cc
-}
+}}
 
 mac {
 SOURCES += 
breakpad/src/client/mac/crash_generation/crash_generation_client.cc \
--- a/src/crashdump.cpp
+++ b/src/crashdump.cpp
@@ -37,6 +37,7 @@
 #include 
 #include 
 
+#ifdef USE_BREAKPAD
 #ifdef Q_OS_LINUX
 #include "client/linux/handler/exception_handler.h"
 #define HAVE_BREAKPAD
@@ -58,6 +59,7 @@
 #define MDC_PATH_ARG   const wchar_t*
 #define MDC_EXTRA_ARGS void*, EXCEPTION_POINTERS*, MDRawAssertionInfo*
 #endif
+#endif // USE_BREAKPAD
 
 #ifdef HAVE_BREAKPAD
 


signature.asc
Description: PGP signature