1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

lang/phantomjs: Update to 2.1.1

PR:		213634
This commit is contained in:
Mark Felder 2017-01-29 19:11:35 +00:00
parent d3568d8322
commit 45f92a5a1f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=432793
12 changed files with 92 additions and 136 deletions

View File

@ -1,11 +1,9 @@
# $FreeBSD$
PORTNAME= phantomjs
PORTVERSION= 2.0.0
PORTREVISION= 6
PORTVERSION= 2.1.1
PORTREVISION= 0
CATEGORIES= lang
MASTER_SITES= https://bitbucket.org/ariya/phantomjs/downloads/
DISTNAME= ${PORTNAME}-${PORTVERSION}-source
MAINTAINER= feld@FreeBSD.org
COMMENT= Minimalistic, headless, WebKit-based, JavaScript-driven tool
@ -21,13 +19,18 @@ LIB_DEPENDS= libfreetype.so:print/freetype2 \
BROKEN_sparc64= does not link on sparc64
USES= bison:build compiler:c++11-lang gmake gperf jpeg perl5 pkgconfig python:build zip
USES= bison:build compiler:c++11-lang gmake gperf jpeg perl5 pkgconfig python:build ssl sqlite
USE_GNOME+= libxml2
USE_PERL5= build
USE_RUBY= yes
USE_GITHUB= yes
GH_ACCOUNT= ariya
GH_TUPLE= Vitallium:phantomjs-3rdparty-win:19051aa:msvc2013/src/qt/3rdparty \
Vitallium:qtbase:b5cc008:qtbase/src/qt/qtbase \
Vitallium:qtwebkit:e7b7433:qtwebkit/src/qt/qtwebkit
RUBY_NO_RUN_DEPENDS= yes
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
PLIST_FILES= bin/phantomjs
#PATCH_DEBUG= yes
NO_CCACHE= yes
OPTIONS_DEFINE= X11
@ -35,24 +38,23 @@ X11_USE= XORG=x11
.include <bsd.port.options.mk>
# 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:
${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
${MKDIR} ${WRKSRC}/src/qt/qtbase/.git
${MKDIR} ${WRKSRC}/src/qt/qtwebkit/.git
${RM} ${WRKSRC}/src/qt/qtwebkit/Source/WebCore/DerivedSources.cpp
_ENV= CC=${CC} CXX=${CXX} GMAKE=${GMAKE} OSTYPE=freebsd MAKEFLAGS=
#_ENV+= CFLAGS="-g -pipe"
_BLD= bash -x build.sh --jobs ${MAKE_JOBS_NUMBER} --confirm
_BLD= ${PYTHON_CMD} build.py --jobs ${MAKE_JOBS_NUMBER} --confirm
do-build:
.if defined(_PHANTOMJS_USE_QT_SYSTEM)
cd ${WRKSRC} && ${SETENV} ${_ENV} PATH=${PATH}:${QT_BINDIR} ${_BLD} --qt=system --qtwebkit=system
.else
cd ${WRKSRC} && ${SETENV} ${_ENV} PATH=${PATH} ${_BLD} --qt-config '-no-pch'
cd ${WRKSRC} && ${SETENV} ${_ENV} PATH=${PATH} ${_BLD}
.endif
do-install:

View File

@ -1,2 +1,9 @@
SHA256 (phantomjs-2.0.0-source.zip) = cc81249eaa059cc138414390cade9cb6509b9d6fa0df16f4f43de70b174b3bfe
SIZE (phantomjs-2.0.0-source.zip) = 110092872
TIMESTAMP = 1484137497
SHA256 (ariya-phantomjs-2.1.1_GH0.tar.gz) = bd1e63e9cd48d5a9c8ff1affc254eeae14704304437710729f133cb80cf98cf1
SIZE (ariya-phantomjs-2.1.1_GH0.tar.gz) = 1880406
SHA256 (Vitallium-phantomjs-3rdparty-win-19051aa_GH0.tar.gz) = cf097cf098c40f9b60255a5c369d968b0e3e3881e25374f00f0c74c265cfd37e
SIZE (Vitallium-phantomjs-3rdparty-win-19051aa_GH0.tar.gz) = 24611974
SHA256 (Vitallium-qtbase-b5cc008_GH0.tar.gz) = 9bf66dcaa1b522fe41d74574eae949b740a9bec3cd7f8a69e0555f3ffc2fe6a0
SIZE (Vitallium-qtbase-b5cc008_GH0.tar.gz) = 46446806
SHA256 (Vitallium-qtwebkit-e7b7433_GH0.tar.gz) = 76d0bc7430919d7f8c12cbc0cae6dd174543e40777d984a6c14af982a3a71fcc
SIZE (Vitallium-qtwebkit-e7b7433_GH0.tar.gz) = 50630572

View File

@ -0,0 +1,16 @@
--- build.py.orig 2016-01-24 18:24:05 UTC
+++ build.py
@@ -56,6 +56,13 @@ openssl_search_paths = [{
"-I/opt/local/include",
"-L/opt/local/lib"
]
+}, {
+ "name": "freebsd",
+ "header": "/usr/local/include/openssl/opensslv.h",
+ "flags": [
+ "-I/usr/local/include",
+ "-L/usr/local/lib"
+ ]
}]
# check if path points to an executable

View File

@ -1,26 +0,0 @@
--- build.sh.orig 2015-05-24 22:42:43.825783273 +0900
+++ build.sh 2015-05-27 15:04:32.203956214 +0900
@@ -152,12 +152,12 @@
if [[ "$QTCORE" == "bundled" ]]; then
export QMAKE=$PWD/src/qt/qtbase/bin/qmake
- ( cd src/qt && ./preconfig.sh $QTDEPLIBS $QT_CFG )
+ ( cd src/qt && bash -x ./preconfig.sh $QTDEPLIBS $QT_CFG )
echo
echo "Building Qt..."
echo
- ( cd src/qt/qtbase && make -j$COMPILE_JOBS $MAKE_S )
+ ( cd src/qt/qtbase && ${GMAKE} -j$COMPILE_JOBS $MAKE_S )
else
export QMAKE=qmake
# some Linux distros (e.g. Debian) allow you to parallel-install
@@ -189,7 +189,7 @@
( cd src/qt/qtwebkit &&
$QMAKE "WEBKIT_CONFIG -= $WEBKIT_DISABLE" $QMAKE_ARGS &&
- make -j$COMPILE_JOBS $MAKE_S )
+ ${GMAKE} -j$COMPILE_JOBS $MAKE_S )
fi
echo

View File

@ -1,11 +1,10 @@
--- src/phantomjs.pro.orig 2015-04-03 17:42:14.245640426 +0900
+++ src/phantomjs.pro 2015-04-03 17:42:47.482878170 +0900
@@ -68,7 +68,7 @@
include(linenoise/linenoise.pri)
include(qcommandline/qcommandline.pri)
-linux*|mac|openbsd* {
+linux*|mac|openbsd*|freebsd* {
INCLUDEPATH += breakpad/src
SOURCES += breakpad/src/client/minidump_file_writer.cc \
--- src/phantomjs.pro.orig 2016-01-24 18:24:05 UTC
+++ src/phantomjs.pro
@@ -97,3 +97,7 @@ win32-msvc* {
openbsd* {
LIBS += -L/usr/X11R6/lib
}
+
+freebsd* {
+ LIBS += -L/usr/local/lib
+}

View File

@ -1,6 +1,6 @@
--- src/qt/preconfig.sh.orig 2015-05-24 22:51:56.181745985 +0900
+++ src/qt/preconfig.sh 2015-05-25 07:48:59.018524838 +0900
@@ -182,5 +182,6 @@
--- src/qt/preconfig.sh.orig 2016-01-24 18:24:05 UTC
+++ src/qt/preconfig.sh
@@ -187,5 +187,6 @@ if [[ -n "$SILENT" ]]; then
exec >& /dev/null
fi

View File

@ -1,6 +1,14 @@
--- src/qt/qtbase/configure.orig 2015-05-24 22:39:30.864797690 +0900
+++ src/qt/qtbase/configure 2015-08-29 19:51:35.227904574 +0900
@@ -2617,11 +2617,19 @@
--- src/qt/qtbase/configure.orig 2015-12-12 12:58:05 UTC
+++ src/qt/qtbase/configure
@@ -51,6 +51,7 @@ mactests="$relpath/config.tests/mac"
WHICH="$unixtests/which.test"
PERL=`$WHICH perl 2>/dev/null`
+export CXX=${CXX}
# find out which awk we want to use, prefer gawk, then nawk, then regular awk
AWK=
@@ -2791,11 +2792,19 @@ if [ -z "$PLATFORM" ]; then
ULTRIX:*)
PLATFORM=ultrix-g++
;;
@ -21,15 +29,7 @@
;;
OpenBSD:*)
PLATFORM=openbsd-g++
@@ -3971,6 +3979,7 @@
fi
fi
+export CXX="${CXX}"
# detect availability of float math.h functions
if compileTest unix/floatmath "floatmath"; then
CFG_USE_FLOATMATH=yes
@@ -5793,7 +5802,7 @@
@@ -6359,7 +6368,7 @@ case "$XPLATFORM" in
;;
*-g++*)
# Check gcc's version

View File

@ -0,0 +1,10 @@
--- src/qt/qtbase/src/3rdparty/icu_dependency.pri.orig 2015-12-12 12:58:05 UTC
+++ src/qt/qtbase/src/3rdparty/icu_dependency.pri
@@ -10,7 +10,4 @@ win32 {
}
} else {
LIBS_PRIVATE += -licui18n -licuuc -licudata
- CONFIG(static) {
- LIBS_PRIVATE += -ldl
- }
}

View File

@ -0,0 +1,18 @@
--- src/qt/qtbase/src/corelib/io/qstorageinfo_unix.cpp.orig 2015-12-12 12:58:05 UTC
+++ src/qt/qtbase/src/corelib/io/qstorageinfo_unix.cpp
@@ -506,9 +506,15 @@ void QStorageInfoPrivate::retrieveVolume
valid = true;
ready = true;
+#if defined(Q_OS_FREEBSD)
+ bytesTotal = statfs_buf.f_blocks * statfs_buf.f_bsize;
+ bytesFree = statfs_buf.f_bfree * statfs_buf.f_bsize;
+ bytesAvailable = statfs_buf.f_bavail * statfs_buf.f_bsize;
+#else
bytesTotal = statfs_buf.f_blocks * statfs_buf.f_frsize;
bytesFree = statfs_buf.f_bfree * statfs_buf.f_frsize;
bytesAvailable = statfs_buf.f_bavail * statfs_buf.f_frsize;
+#endif
#if defined(Q_OS_ANDROID) || defined (Q_OS_BSD4)
#if defined(_STATFS_F_FLAGS)
readOnly = (statfs_buf.f_flags & ST_RDONLY) != 0;

View File

@ -1,14 +0,0 @@
--- src/qt/qtbase/src/network/ssl/qsslcontext.cpp.orig 2015-01-24 02:19:52 UTC
+++ src/qt/qtbase/src/network/ssl/qsslcontext.cpp
@@ -142,7 +142,11 @@ init_context:
#endif
break;
case QSsl::SslV3:
+#ifndef OPENSSL_NO_SSL3
sslContext->ctx = q_SSL_CTX_new(client ? q_SSLv3_client_method() : q_SSLv3_server_method());
+#else
+ sslContext->ctx = 0; // SSL 3 not supported by the system, but chosen deliberately -> error
+#endif
break;
case QSsl::SecureProtocols: // SslV2 will be disabled below
case QSsl::TlsV1SslV3: // SslV2 will be disabled below

View File

@ -1,22 +0,0 @@
--- src/qt/qtbase/src/network/ssl/qsslsocket_openssl_symbols.cpp.orig 2015-01-24 02:19:52 UTC
+++ src/qt/qtbase/src/network/ssl/qsslsocket_openssl_symbols.cpp
@@ -266,7 +266,9 @@ DEFINEFUNC(SSL_SESSION*, SSL_get_session
#ifndef OPENSSL_NO_SSL2
DEFINEFUNC(const SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return 0, return)
#endif
+#ifndef OPENSSL_NO_SSL3
DEFINEFUNC(const SSL_METHOD *, SSLv3_client_method, DUMMYARG, DUMMYARG, return 0, return)
+#endif
DEFINEFUNC(const SSL_METHOD *, SSLv23_client_method, DUMMYARG, DUMMYARG, return 0, return)
DEFINEFUNC(const SSL_METHOD *, TLSv1_client_method, DUMMYARG, DUMMYARG, return 0, return)
#if OPENSSL_VERSION_NUMBER >= 0x10001000L
@@ -276,7 +278,9 @@ DEFINEFUNC(const SSL_METHOD *, TLSv1_2_c
#ifndef OPENSSL_NO_SSL2
DEFINEFUNC(const SSL_METHOD *, SSLv2_server_method, DUMMYARG, DUMMYARG, return 0, return)
#endif
+#ifndef OPENSSL_NO_SSL3
DEFINEFUNC(const SSL_METHOD *, SSLv3_server_method, DUMMYARG, DUMMYARG, return 0, return)
+#endif
DEFINEFUNC(const SSL_METHOD *, SSLv23_server_method, DUMMYARG, DUMMYARG, return 0, return)
DEFINEFUNC(const SSL_METHOD *, TLSv1_server_method, DUMMYARG, DUMMYARG, return 0, return)
#if OPENSSL_VERSION_NUMBER >= 0x10001000L

View File

@ -1,34 +0,0 @@
--- 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;