On Tue, Aug 16, 2016 at 10:52:07PM +0200, Adam Wolk wrote:
> On Mon, Aug 01, 2016 at 02:43:49AM +0200, Adam Wolk wrote:
> > On Mon, Jul 18, 2016 at 12:58:17AM +0200, Adam Wolk wrote:
> > > On Wed, Jul 06, 2016 at 02:28:08PM +0200, Adam Wolk wrote:
> > > > Hi ports@
> > > > 
> > > > Trivial bump for otter-browser latest weekly.
> > > > 
> > > > OK's? feedback?
> > > > 
> > > 
> > > Here is a bump for the latest weekly. Obviously waiting for port unlock 
> > > but open
> > > to testing before that happens.
> > > 
> > 
> > Ping plus a bump to weekly 134
> 
> 
> Ping plus a bump to weekly 135 and CONFIGURE_ENV accounting for the wxneeded 
> by the qt5 JIT
> in otter-browser.
> 

Including a patch to handle fprintf calls trying to
print NULL using a %s format specifier. Reported by bentley@, thx.

PS. I tried switching to USE_WXNEEDED but it seems to have no effect on cmake.

Upstream fix for fprintf handling:
https://github.com/OtterBrowser/otter-browser/issues/1173

The fix:
https://github.com/OtterBrowser/otter-browser/commit/9907933100b07b5d6754ff119c4abc5c87734ff0

The patch included in this diff is the same as the upstream change.

Feedback? OK's? :)
Index: Makefile
===================================================================
RCS file: /cvs/ports/www/otter-browser/Makefile,v
retrieving revision 1.14
diff -u -p -r1.14 Makefile
--- Makefile    21 Jun 2016 09:03:45 -0000      1.14
+++ Makefile    20 Aug 2016 12:08:26 -0000
@@ -2,7 +2,7 @@
 COMMENT =              browser aiming to recreate classic Opera (12.x) UI 
using Qt5
 
 MASTER_SITES =         ${MASTER_SITE_SOURCEFORGE:=otter-browser/}
-DISTNAME =             otter-browser-0.9.11-dev129
+DISTNAME =             otter-browser-0.9.11-dev135
 PKGNAME =              ${DISTNAME:S/-dev/pre/}
 
 EXTRACT_SUFX =         .tar.bz2
@@ -27,6 +27,9 @@ LIB_DEPENDS =         security/libgcrypt \
                        textproc/hunspell
 
 MODULES =              devel/cmake x11/qt5
+
+CONFIGURE_ENV +=       LDFLAGS="-Wl,-z,wxneeded"
+# USE_WXNEEDED =               Yes
 
 NO_TEST =      Yes
 
Index: distinfo
===================================================================
RCS file: /cvs/ports/www/otter-browser/distinfo,v
retrieving revision 1.11
diff -u -p -r1.11 distinfo
--- distinfo    21 Jun 2016 09:03:45 -0000      1.11
+++ distinfo    20 Aug 2016 12:08:26 -0000
@@ -1,2 +1,2 @@
-SHA256 (otter-browser-0.9.11-dev129.tar.bz2) = 
mwfq2hjHHJgjT9Jrv2jCD6R1tJoSEFxp37DWQe2GluA=
-SIZE (otter-browser-0.9.11-dev129.tar.bz2) = 2310570
+SHA256 (otter-browser-0.9.11-dev135.tar.bz2) = 
T6tHeUbCRjU1w0hb059Tn+mJyF1AsFBUZ67aocL4cDU=
+SIZE (otter-browser-0.9.11-dev135.tar.bz2) = 2337334
Index: patches/patch-src_main_cpp
===================================================================
RCS file: patches/patch-src_main_cpp
diff -N patches/patch-src_main_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_main_cpp  20 Aug 2016 12:08:26 -0000
@@ -0,0 +1,54 @@
+$OpenBSD$
+--- src/main.cpp.orig  Wed Jun  1 20:47:08 2016
++++ src/main.cpp       Sat Aug 20 13:45:49 2016
+@@ -28,6 +28,7 @@
+ 
+ using namespace Otter;
+ 
++#if QT_VERSION >= 0x050400
+ void otterMessageHander(QtMsgType type, const QMessageLogContext &context, 
const QString &message)
+ {
+       if (message.trimmed().startsWith(QLatin1String("OpenType support 
missing")) || message.startsWith(QLatin1String("libpng warning: iCCP:")) || 
message.startsWith(QLatin1String("OpenType support missing for script")) || 
message.startsWith(QLatin1String("QNetworkReplyImplPrivate::error: Internal 
problem, this method must only be called once")) || 
message.startsWith(QLatin1String("QBasicTimer::start: QBasicTimer can only be 
used with threads started with QThread")) || 
message.startsWith(QLatin1String("QNetworkReplyImpl::_q_startOperation was 
called more than once")))
+@@ -35,35 +36,20 @@ void otterMessageHander(QtMsgType type, const QMessage
+               return;
+       }
+ 
+-      switch (type)
+-      {
+-              case QtDebugMsg:
+-                      fprintf(stderr, "Debug: %s (%s:%u, %s)\n", 
message.toLocal8Bit().constData(), context.file, context.line, 
context.function);
++      fputs(qFormatLogMessage(type, context, 
message).toLocal8Bit().constData(), stderr);
+ 
+-                      break;
+-#if QT_VERSION >= 0x050500
+-              case QtInfoMsg:
+-                      fprintf(stderr, "Info: %s (%s:%u, %s)\n", 
message.toLocal8Bit().constData(), context.file, context.line, 
context.function);
+-
+-                      break;
+-#endif
+-              case QtWarningMsg:
+-                      fprintf(stderr, "Warning: %s (%s:%u, %s)\n", 
message.toLocal8Bit().constData(), context.file, context.line, 
context.function);
+-
+-                      break;
+-              case QtCriticalMsg:
+-                      fprintf(stderr, "Critical: %s (%s:%u, %s)\n", 
message.toLocal8Bit().constData(), context.file, context.line, 
context.function);
+-
+-                      break;
+-              case QtFatalMsg:
+-                      fprintf(stderr, "Fatal: %s (%s:%u, %s)\n", 
message.toLocal8Bit().constData(), context.file, context.line, 
context.function);
+-                      abort();
++      if (type == QtFatalMsg)
++      {
++              abort();
+       }
+ }
++#endif
+ 
+ int main(int argc, char *argv[])
+ {
++#if QT_VERSION >= 0x050400
+       qInstallMessageHandler(otterMessageHander);
++#endif
+ 
+       Application application(argc, argv);
+       application.setAttribute(Qt::AA_UseHighDpiPixmaps, true);

Reply via email to