aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2016-09-17 14:39:38 +0000
committerMark Felder <feld@FreeBSD.org>2016-09-17 14:39:38 +0000
commit02883f8dceac589508efd58c1f472ca501c264fa (patch)
treef4fde2ce39d473fc60e6412ea5ebe06fc3b922f0
parentf216e0c4a0f74585f26417dc4fdfdba23460f7e3 (diff)
downloadports-02883f8dceac589508efd58c1f472ca501c264fa.tar.gz
ports-02883f8dceac589508efd58c1f472ca501c264fa.zip
MFH: r422327
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. Approved by: ports-secteam (with hat)
Notes
Notes: svn path=/branches/2016Q3/; revision=422328
-rw-r--r--lang/phantomjs/Makefile15
-rw-r--r--lang/phantomjs/files/patch-mkspecs-freebsd-g++-qmake.conf11
-rw-r--r--lang/phantomjs/files/patch-src_qt_qtbase_src_tools_qlalr_lalr.cpp34
3 files changed, 43 insertions, 17 deletions
diff --git a/lang/phantomjs/Makefile b/lang/phantomjs/Makefile
index 154402b3cea5..c837ab1de13c 100644
--- a/lang/phantomjs/Makefile
+++ b/lang/phantomjs/Makefile
@@ -2,12 +2,12 @@
PORTNAME= phantomjs
PORTVERSION= 2.0.0
-PORTREVISION= 1
+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
diff --git a/lang/phantomjs/files/patch-mkspecs-freebsd-g++-qmake.conf b/lang/phantomjs/files/patch-mkspecs-freebsd-g++-qmake.conf
deleted file mode 100644
index c59a2614a79c..000000000000
--- a/lang/phantomjs/files/patch-mkspecs-freebsd-g++-qmake.conf
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/qt/qtbase/mkspecs/freebsd-g++/qmake.conf.orig 2015-01-24 11:19:52.000000000 +0900
-+++ src/qt/qtbase/mkspecs/freebsd-g++/qmake.conf 2015-09-02 10:38:29.496373596 +0900
-@@ -33,4 +33,8 @@
- include(../common/unix.conf)
- include(../common/gcc-base-unix.conf)
- include(../common/g++-unix.conf)
-+#QMAKE_CC = $(CC)
-+#QMAKE_CXX = $(CXX)
-+#QMAKE_LINK_SHLIB = $(CXX)
-+#QMAKE_LINK = $(CXX)
- load(qt_config)
diff --git a/lang/phantomjs/files/patch-src_qt_qtbase_src_tools_qlalr_lalr.cpp b/lang/phantomjs/files/patch-src_qt_qtbase_src_tools_qlalr_lalr.cpp
new file mode 100644
index 000000000000..13163087b48b
--- /dev/null
+++ b/lang/phantomjs/files/patch-src_qt_qtbase_src_tools_qlalr_lalr.cpp
@@ -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;
+