Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Sep 2016 14:37:36 +0000 (UTC)
From:      Mark Felder <feld@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r422327 - in head/lang/phantomjs: . files
Message-ID:  <201609171437.u8HEbanS012544@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: feld
Date: Sat Sep 17 14:37:36 2016
New Revision: 422327
URL: https://svnweb.freebsd.org/changeset/ports/422327

Log:
  lang/phantomjs: Fix build on 9.3 and 11.0
  
  - Take maintainership (maintainer timeouts previously)
  - Remove no-op patch
  - Remove work related to GCC build profiles as we enforce clang
  - Add patch to fix building with clang in 11.0
  - Add hack to enforce CC and CXX for 9.3
  
  Partway through the build the compiler was switching from clang++ to c++
  which is GCC in base system. This was causing build failures.
  
  MFH:		2016Q3

Added:
  head/lang/phantomjs/files/patch-src_qt_qtbase_src_tools_qlalr_lalr.cpp   (contents, props changed)
Deleted:
  head/lang/phantomjs/files/patch-mkspecs-freebsd-g++-qmake.conf
Modified:
  head/lang/phantomjs/Makefile

Modified: head/lang/phantomjs/Makefile
==============================================================================
--- head/lang/phantomjs/Makefile	Sat Sep 17 14:02:30 2016	(r422326)
+++ head/lang/phantomjs/Makefile	Sat Sep 17 14:37:36 2016	(r422327)
@@ -2,12 +2,12 @@
 
 PORTNAME=	phantomjs
 PORTVERSION=	2.0.0
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	lang
 MASTER_SITES=	https://bitbucket.org/ariya/phantomjs/downloads/
 DISTNAME=	${PORTNAME}-${PORTVERSION}-source
 
-MAINTAINER=	kuriyama@FreeBSD.org
+MAINTAINER=	feld@FreeBSD.org
 COMMENT=	Minimalistic, headless, WebKit-based, JavaScript-driven tool
 
 LICENSE=	BSD3CLAUSE
@@ -29,16 +29,19 @@ PLIST_FILES=	bin/phantomjs
 #PATCH_DEBUG=	yes
 NO_CCACHE=	yes
 
+USE_XORG=	x11
+
+# Hack for FreeBSD 9. Without it mysteriously switches from 
+# clang++ to c++ which ends in build failure.
+CC=clang
+CXX=clang++
+
 # NOTE:
 #   build.sh --qtwebkit=system requires Qt 5.3.x.  We cannot use it.
 
 # qmake.conf detection is in src/qt/qtbase/configure script.
 SPEC=	${WRKSRC}/src/qt/qtbase/mkspecs
 post-extract:
-	cd ${SPEC} && ${CP} -r freebsd-g++46 freebsd-g++48
-	cd ${SPEC} && ${CP} -r freebsd-g++46 freebsd-g++49
-	cd ${SPEC} && ${REINPLACE_CMD} -e 's|46|48|' freebsd-g++48/qmake.conf
-	cd ${SPEC} && ${REINPLACE_CMD} -e 's|46|49|' freebsd-g++49/qmake.conf
 	${MKDIR} ${SPEC}/freebsd-clang
 	cd ${SPEC} && ${SED} -e 's|\.\./\.\./|../|g' unsupported/freebsd-clang/qmake.conf > freebsd-clang/qmake.conf
 	cd ${SPEC} && ${SED} -e 's|\.\./\.\./|../|g' unsupported/freebsd-clang/qplatformdefs.h > freebsd-clang/qplatformdefs.h

Added: head/lang/phantomjs/files/patch-src_qt_qtbase_src_tools_qlalr_lalr.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/phantomjs/files/patch-src_qt_qtbase_src_tools_qlalr_lalr.cpp	Sat Sep 17 14:37:36 2016	(r422327)
@@ -0,0 +1,34 @@
+--- src/qt/qtbase/src/tools/qlalr/lalr.cpp.orig	2015-01-24 02:19:52 UTC
++++ src/qt/qtbase/src/tools/qlalr/lalr.cpp
+@@ -246,11 +246,11 @@ void Grammar::buildExtendedGrammar ()
+   non_terminals.insert (accept_symbol);
+ }
+ 
+-struct _Nullable: public std::unary_function<Name, bool>
++struct Nullable: public std::unary_function<Name, bool>
+ {
+   Automaton *_M_automaton;
+ 
+-  _Nullable (Automaton *aut):
++  Nullable (Automaton *aut):
+     _M_automaton (aut) {}
+ 
+   bool operator () (Name name) const
+@@ -308,7 +308,7 @@ void Automaton::buildNullables ()
+ 
+       for (RulePointer rule = _M_grammar->rules.begin (); rule != _M_grammar->rules.end (); ++rule)
+         {
+-          NameList::iterator nn = std::find_if (rule->rhs.begin (), rule->rhs.end (), std::not1 (_Nullable (this)));
++          NameList::iterator nn = std::find_if (rule->rhs.begin (), rule->rhs.end (), std::not1 (Nullable (this)));
+ 
+           if (nn == rule->rhs.end ())
+             changed |= nullables.insert (rule->lhs).second;
+@@ -643,7 +643,7 @@ void Automaton::buildIncludesDigraph ()
+                   if (! _M_grammar->isNonTerminal (*A))
+                     continue;
+ 
+-                  NameList::iterator first_not_nullable = std::find_if (dot, rule->rhs.end (), std::not1 (_Nullable (this)));
++                  NameList::iterator first_not_nullable = std::find_if (dot, rule->rhs.end (), std::not1 (Nullable (this)));
+                   if (first_not_nullable != rule->rhs.end ())
+                     continue;
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609171437.u8HEbanS012544>