pkgsrc-wip/phantomjs/Makefile
Filip Hajny 29ea9731e5 Update phantomjs to 1.9.1.
The main change from the old 1.4.1 version is that PhantomJS now integrates
a QT4 fork and runs entirely headless.

For other changes, see release notes:

http://phantomjs.org/releases.html

Tested on SmartOS/i386 and NetBSD 6.1/x86_64, 64bit build on SunOS remains
broken for now.
2013-06-18 11:02:22 +00:00

90 lines
2.9 KiB
Makefile

# $NetBSD: Makefile,v 1.4 2013/06/18 11:02:22 fhajny Exp $
#
DISTNAME= phantomjs-1.9.1-source
PKGNAME= ${DISTNAME:S/-source//}
CATEGORIES= www
MASTER_SITES= http://phantomjs.googlecode.com/files/
EXTRACT_SUFX= .zip
MAINTAINER= filip@joyent.com
HOMEPAGE= http://www.phantomjs.org/
COMMENT= Headless WebKit with JavaScript API
LICENSE= modified-bsd
WRKSRC= ${WRKDIR}/${DISTNAME:S/-source//}
USE_LANGUAGES= c c++ c99
USE_TOOLS+= bash gmake
CHECK_PORTABILITY_SKIP= src/qt/config.tests/mac/dwarf2.test src/qt/configure
CHECK_PORTABILITY_SKIP+=src/breakpad/src/third_party/protobuf/protobuf/post_process_dist.sh
.include "../../mk/bsd.prefs.mk"
NOT_FOR_PLATFORM+= SunOS-*-x86_64
CONFIGURE_ENV+= MACHINE_ARCH=${MACHINE_ARCH}
CFLAGS.SunOS+= -D_XPG6
MAKE_ENV+= QTDIR=${WRKSRC}/src/qt
INSTALLATION_DIRS+= bin
post-extract:
${MKDIR} -p ${WRKSRC}/src/qt/mkspecs/solaris-g++ ${WRKSRC}/src/qt/mkspecs/solaris-g++-64
${INSTALL_DATA} ${FILESDIR}/qmake.conf ${WRKSRC}/src/qt/mkspecs/solaris-cc
${INSTALL_DATA} ${FILESDIR}/qplatformdefs.h ${WRKSRC}/src/qt/mkspecs/solaris-g++
${INSTALL_DATA} ${FILESDIR}/qplatformdefs.h ${WRKSRC}/src/qt/mkspecs/solaris-g++-64
pre-configure:
sed -e 's:@LOCALBASE@:${LOCALBASE}:g' \
-e 's:@X11BASE@:${X11BASE}:g' \
-e 's:@X11PREFIX@:${X11PREFIX}:g' \
-e 's:@LIBTOOL@:${LIBTOOL:Q}:g' \
-e 's:@CC@:${CC:Q}:g' \
-e 's:@CXX@:${CXX:Q}:g' \
-e 's:@LDFLAGS@:${LDFLAGS:Q}:g' \
-e 's:@CFLAGS@:${CFLAGS:Q}:g' \
-e 's:@CXXFLAGS@:${CXXFLAGS:Q}:g' \
-e 's:@SYS_LIBS@:${SYS_LIBS:Q}:g' \
-e 's:@LEX@:${LEX}:g' \
-e 's:@YACC@:${TOOLS_CMDLINE_YACC:Q}:g' \
-e 's:@AR@:${AR:Q}:g' \
-e 's:@MKDIR@:${MKDIR}:g' \
-e 's:@LIBQT@:${LIBQT:Q}:g' \
-e 's:@PTHREAD_LDFLAGS@:${PTHREAD_LDFLAGS:Q}:g' \
-e 's:@PTHREAD_LIBS@:${PTHREAD_LIBS:Q}:g' \
-e 's:@COMPILER_RPATH_FLAG@:${COMPILER_RPATH_FLAG}:g' \
-e 's:@QMAKE_RANLIB@:${QMAKE_RANLIB:Q}:g' \
${FILESDIR}/qmake.conf > ${WRKSRC}/qmake.conf
for dir in ${WRKSRC}/src/qt/mkspecs/*; do \
cp ${WRKSRC}/qmake.conf $${dir}; \
rm -f $${dir}/*.orig; \
done
do-configure:
cd ${WRKSRC}/src/qt && ${SETENV} ${CONFIGURE_ENV} ./preconfig.sh ${CONFIGURE_ARGS}
do-build: ${WRKDIR}/.build_phantom_done
${WRKDIR}/.build_qt_done:
cd ${WRKSRC}/src/qt && ${BUILD_MAKE_CMD} ${BUILD_TARGET}
cd ${WRKSRC}/src/qt/src/plugins/codecs && ${BUILD_MAKE_CMD} ${BUILD_TARGET}
cd ${WRKSRC} && ./src/qt/bin/qmake
${TOUCH} ${WRKDIR}/.build_qt_done
${WRKDIR}/.build_phantom_done: ${WRKDIR}/.build_qt_done
cd ${WRKSRC} && ${BUILD_MAKE_CMD} ${BUILD_TARGET}
do-install:
cd ${WRKSRC} && ${INSTALL_PROGRAM} bin/phantomjs ${DESTDIR}${PREFIX}/bin/
.include "../../mk/dlopen.buildlink3.mk"
BUILDLINK_TRANSFORM+= opt:-ldl:${BUILDLINK_LDADD.dl:M*}
.include "../../fonts/fontconfig/buildlink3.mk"
.include "../../graphics/freetype2/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../x11/libXext/buildlink3.mk"
.include "../../x11/libX11/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"