diff options
Diffstat (limited to 'lang/phantomjs/Makefile')
-rw-r--r-- | lang/phantomjs/Makefile | 42 |
1 files changed, 34 insertions, 8 deletions
diff --git a/lang/phantomjs/Makefile b/lang/phantomjs/Makefile index 4658922c0dbb..7b99186937aa 100644 --- a/lang/phantomjs/Makefile +++ b/lang/phantomjs/Makefile @@ -1,8 +1,7 @@ # $FreeBSD$ PORTNAME= phantomjs -PORTVERSION= 1.9.8 -#PORTREVISION= 0 +PORTVERSION= 2.0.0 CATEGORIES= lang MASTER_SITES= https://bitbucket.org/ariya/phantomjs/downloads/ DISTNAME= ${PORTNAME}-${PORTVERSION}-source @@ -12,19 +11,46 @@ COMMENT= Minimalistic, headless, WebKit-based, JavaScript-driven tool LICENSE= BSD3CLAUSE -BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash +BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash \ + python:${PORTSDIR}/lang/python LIB_DEPENDS= libfreetype.so:${PORTSDIR}/print/freetype2 \ - libfontconfig.so:${PORTSDIR}/x11-fonts/fontconfig + libfontconfig.so:${PORTSDIR}/x11-fonts/fontconfig \ + libicui18n.so:${PORTSDIR}/devel/icu \ + libjpeg.so:${PORTSDIR}/graphics/jpeg \ + libpng.so:${PORTSDIR}/graphics/png PROJECTHOST= phantomjs -USES= gmake dos2unix pkgconfig zip -USE_GCC= any +USES= bison:build compiler gmake perl5 pkgconfig python:build zip +USE_PERL5= build +USE_RUBY= yes +RUBY_NO_RUN_DEPENDS= yes WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} PLIST_FILES= bin/phantomjs +#PATCH_DEBUG= yes +# 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 + +_ENV= CC=${CC} CXX=${CXX} GMAKE=${GMAKE} OSTYPE=freebsd MAKEFLAGS= +#_ENV+= CFLAGS="-g -pipe" +_BLD= bash -x build.sh --jobs ${MAKE_JOBS_NUMBER} --confirm do-build: - cd ${WRKSRC} && ${SETENV} CC=${CC} CXX=${CXX} OSTYPE=freebsd MAKEFLAGS= PATH=${PATH} bash -x build.sh --jobs ${MAKE_JOBS_NUMBER} --confirm \ - --qt-config '-no-pch' +.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' +.endif do-install: cd ${WRKSRC} && ${INSTALL_PROGRAM} bin/phantomjs ${STAGEDIR}${PREFIX}/bin/ |