diff options
author | Jun Kuriyama <kuriyama@FreeBSD.org> | 2012-08-05 02:31:53 +0000 |
---|---|---|
committer | Jun Kuriyama <kuriyama@FreeBSD.org> | 2012-08-05 02:31:53 +0000 |
commit | e4c5b38537037fa5d3347bab50d9c49725e7ef34 (patch) | |
tree | d90fffec9490907d969259ffcb60bec992642f3f | |
parent | 4d3e1335495e9485123953983340edd751ead141 (diff) | |
download | ports-e4c5b38537037fa5d3347bab50d9c49725e7ef34.tar.gz ports-e4c5b38537037fa5d3347bab50d9c49725e7ef34.zip |
Notes
-rw-r--r-- | lang/phantomjs/Makefile | 19 | ||||
-rw-r--r-- | lang/phantomjs/distinfo | 4 | ||||
-rw-r--r-- | lang/phantomjs/files/patch-build.sh | 52 | ||||
-rw-r--r-- | lang/phantomjs/files/patch-mongoose-pri | 10 | ||||
-rw-r--r-- | lang/phantomjs/files/patch-src-mongoose-mongoose.c | 13 | ||||
-rw-r--r-- | lang/phantomjs/pkg-plist | 7 |
6 files changed, 85 insertions, 20 deletions
diff --git a/lang/phantomjs/Makefile b/lang/phantomjs/Makefile index 43396b6831b2..56557844c693 100644 --- a/lang/phantomjs/Makefile +++ b/lang/phantomjs/Makefile @@ -6,8 +6,7 @@ # PORTNAME= phantomjs -PORTVERSION= 1.4.1 -PORTREVISION= 1 +PORTVERSION= 1.6.1 CATEGORIES= lang MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE} DISTNAME= ${PORTNAME}-${PORTVERSION}-source @@ -15,18 +14,28 @@ DISTNAME= ${PORTNAME}-${PORTVERSION}-source MAINTAINER= kuriyama@FreeBSD.org COMMENT= Minimalistic, headless, WebKit-based, JavaScript-driven tool +LICENSE= BSD + +BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash + PROJECTHOST= phantomjs +USE_ZIP= YES USE_GMAKE= YES USE_DOS2UNIX= YES USE_QT4= moc qmake gui webkit rcc -PLIST_FILES= bin/phantomjs WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} do-build: - cd ${WRKSRC}/src/ && ${QMAKE} phantomjs.pro -o Makefile.phantomjs && ${REINPLACE_CMD} -e 's|-ldl||g' Makefile.phantomjs - cd ${WRKSRC}/src/ && ${GMAKE} -f Makefile.phantomjs all + cd ${WRKSRC} && ${REINPLACE_CMD} -e 's|!/|!/usr/local/|g' build.sh + cd ${WRKSRC}/src/qt && ${REINPLACE_CMD} -e 's|!/|!/usr/local/|g' preconfig.sh + cd ${WRKSRC} && ${LOCALBASE}/bin/bash -x build.sh --jobs 2 do-install: cd ${WRKSRC} && ${INSTALL_PROGRAM} bin/phantomjs ${PREFIX}/bin/ + ${MKDIR} ${PREFIX}/lib/phantomjs/ + cd ${WRKSRC} && ${INSTALL_LIB} src/qt/lib/libQtWebKit.so.4 ${PREFIX}/lib/phantomjs/ + cd ${WRKSRC} && ${INSTALL_LIB} src/qt/lib/libQtGui.so.4 ${PREFIX}/lib/phantomjs/ + cd ${WRKSRC} && ${INSTALL_LIB} src/qt/lib/libQtNetwork.so.4 ${PREFIX}/lib/phantomjs/ + cd ${WRKSRC} && ${INSTALL_LIB} src/qt/lib/libQtCore.so.4 ${PREFIX}/lib/phantomjs/ .include <bsd.port.mk> diff --git a/lang/phantomjs/distinfo b/lang/phantomjs/distinfo index 4a25cbd5c3cb..adb3766c95f9 100644 --- a/lang/phantomjs/distinfo +++ b/lang/phantomjs/distinfo @@ -1,2 +1,2 @@ -SHA256 (phantomjs-1.4.1-source.tar.gz) = 93df6e2125d560c10519a79b5502833b37a4986a2bc9fc42cc6d65e3536d20a4 -SIZE (phantomjs-1.4.1-source.tar.gz) = 497856 +SHA256 (phantomjs-1.6.1-source.zip) = e3e0020a6b3b9c3ff747aa2ab865998f7759faa4e0cb894aa01bb957510217c2 +SIZE (phantomjs-1.6.1-source.zip) = 39443796 diff --git a/lang/phantomjs/files/patch-build.sh b/lang/phantomjs/files/patch-build.sh new file mode 100644 index 000000000000..d32247cfd0c2 --- /dev/null +++ b/lang/phantomjs/files/patch-build.sh @@ -0,0 +1,52 @@ +$FreeBSD$ + +--- build.sh.orig 2012-07-30 01:56:37.113285721 +0900 ++++ build.sh 2012-07-30 06:42:31.502288222 +0900 +@@ -7,27 +7,27 @@ + COMPILE_JOBS=1 + MAKEFLAGS_JOBS='' + +-if [[ "$MAKEFLAGS" != "" ]]; then +- MAKEFLAGS_JOBS=$(echo $MAKEFLAGS | egrep -o '\-j[0-9]+' | egrep -o '[0-9]+') +-fi ++#if [[ "$MAKEFLAGS" != "" ]]; then ++# MAKEFLAGS_JOBS=$(echo $MAKEFLAGS | egrep -o '\-j[0-9]+' | egrep -o '[0-9]+') ++#fi + +-if [[ "$MAKEFLAGS_JOBS" != "" ]]; then +- # user defined number of jobs in MAKEFLAGS, re-use that number +- COMPILE_JOBS=$MAKEFLAGS_JOBS +-elif [[ $OSTYPE = darwin* ]]; then +- # We only support modern Mac machines, they are at least using +- # hyperthreaded dual-core CPU. +- COMPILE_JOBS=4 +-else +- CPU_CORES=`grep -c ^processor /proc/cpuinfo` +- if [[ "$CPU_CORES" -gt 1 ]]; then +- COMPILE_JOBS=$CPU_CORES +- if [[ "$COMPILE_JOBS" -gt 8 ]]; then +- # Safety net. +- COMPILE_JOBS=8 +- fi +- fi +-fi ++#if [[ "$MAKEFLAGS_JOBS" != "" ]]; then ++# # user defined number of jobs in MAKEFLAGS, re-use that number ++# COMPILE_JOBS=$MAKEFLAGS_JOBS ++#elif [[ $OSTYPE = darwin* ]]; then ++# # We only support modern Mac machines, they are at least using ++# # hyperthreaded dual-core CPU. ++# COMPILE_JOBS=4 ++#else ++# CPU_CORES=`grep -c ^processor /proc/cpuinfo` ++# if [[ "$CPU_CORES" -gt 1 ]]; then ++# COMPILE_JOBS=$CPU_CORES ++# if [[ "$COMPILE_JOBS" -gt 8 ]]; then ++# # Safety net. ++# COMPILE_JOBS=8 ++# fi ++# fi ++#fi + + until [ -z "$1" ]; do + case $1 in diff --git a/lang/phantomjs/files/patch-mongoose-pri b/lang/phantomjs/files/patch-mongoose-pri new file mode 100644 index 000000000000..067aa888b2c5 --- /dev/null +++ b/lang/phantomjs/files/patch-mongoose-pri @@ -0,0 +1,10 @@ +$FreeBSD$ + +--- src/mongoose/mongoose.pri.orig 2012-05-16 01:39:25.000000000 +0600 ++++ src/mongoose/mongoose.pri 2012-05-16 03:08:39.000000000 +0600 +@@ -3,5 +3,4 @@ + + SOURCES += mongoose.c + HEADERS += mongoose.h +-unix:LIBS += -ldl + win32:LIBS += -lWs2_32 diff --git a/lang/phantomjs/files/patch-src-mongoose-mongoose.c b/lang/phantomjs/files/patch-src-mongoose-mongoose.c index 2c9af0e311c8..e69de29bb2d1 100644 --- a/lang/phantomjs/files/patch-src-mongoose-mongoose.c +++ b/lang/phantomjs/files/patch-src-mongoose-mongoose.c @@ -1,13 +0,0 @@ ---- src/mongoose/mongoose.c.orig 2012-01-08 11:06:17.000000000 +0800 -+++ src/mongoose/mongoose.c 2012-01-08 11:08:32.000000000 +0800 -@@ -18,6 +18,10 @@ - // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - // THE SOFTWARE. - -+#if defined(__FreeBSD__) -+#include <sys/socket.h> -+#endif -+ - #if defined(_WIN32) - #define _CRT_SECURE_NO_WARNINGS // Disable deprecation warning in VS2005 - #else
\ No newline at end of file diff --git a/lang/phantomjs/pkg-plist b/lang/phantomjs/pkg-plist new file mode 100644 index 000000000000..6c624b7a0d4a --- /dev/null +++ b/lang/phantomjs/pkg-plist @@ -0,0 +1,7 @@ +@comment $FreeBSD$ +bin/phantomjs +lib/phantomjs/libQtWebKit.so.4 +lib/phantomjs/libQtGui.so.4 +lib/phantomjs/libQtNetwork.so.4 +lib/phantomjs/libQtCore.so.4 +@dirrm lib/phantomjs |