head	1.10;
access;
symbols;
locks; strict;
comment	@# @;


1.10
date	2013.03.22.23.30.08;	author svnexp;	state Exp;
branches;
next	1.9;

1.9
date	2013.01.31.14.01.29;	author svnexp;	state Exp;
branches;
next	1.8;

1.8
date	2012.12.18.23.19.34;	author svnexp;	state Exp;
branches;
next	1.7;

1.7
date	2012.12.12.07.45.44;	author svnexp;	state Exp;
branches;
next	1.6;

1.6
date	2012.12.10.19.24.02;	author svnexp;	state Exp;
branches;
next	1.5;

1.5
date	2012.11.17.05.58.51;	author svnexp;	state Exp;
branches;
next	1.4;

1.4
date	2012.10.13.23.19.36;	author gerald;	state Exp;
branches;
next	1.3;

1.3
date	2012.07.19.18.05.12;	author mm;	state Exp;
branches;
next	1.2;

1.2
date	2012.07.18.17.06.02;	author mm;	state Exp;
branches;
next	1.1;

1.1
date	2012.07.18.15.12.23;	author mm;	state Exp;
branches;
next	;


desc
@@


1.10
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/314960
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@# Created by: Martin Matuska <mm@@FreeBSD.org>
# $FreeBSD: head/lang/hiphop-php/Makefile 314960 2013-03-22 20:06:14Z makc $

PORTNAME=	hiphop-php
PORTVERSION=	0.0.20120716
PORTREVISION=	6
CATEGORIES=	lang devel www
MASTER_SITES=	https://github.com/facebook/hiphop-php/tarball/${GITVERSION}/:main \
		http://unicode.org/Public/UNIDATA/:unidata \
		http://unicode.org/Public/MAPPINGS/ISO8859/:mappings
DIST_SUBDIR=	hiphop-php
EXTRACT_ONLY=	${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}

PATCH_SITES=	http://cpp.in/dev/

MAINTAINER=	mm@@FreeBSD.org
COMMENT=	Hiphop PHP to C++ code transformer

LICENSE=	PHP301 ZEND200 UNICODE
LICENSE_COMB=	multi
LICENSE_NAME_UNICODE=	Unicode, Inc. License Agreement
LICENSE_NAME_ZEND200=	The Zend Engine License, version 2.00
LICENSE_FILE_PHP301=	${WRKSRC}/LICENSE.PHP
LICENSE_FILE_UNICODE=	${FILESDIR}/LICENSE.UNICODE
LICENSE_FILE_ZEND200=	${WRKSRC}/LICENSE.ZEND
LICENSE_PERMS_UNICODE=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
LICENSE_PERMS_ZEND200=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
LICENSE_DISTFILES_PHP301=	${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}
LICENSE_DISTFILES_UNICODE= EastAsianWidth.txt \
	8859-1.TXT 8859-2.TXT 8859-3.TXT 8859-4.TXT 8859-5.TXT \
	8859-6.TXT 8859-7.TXT 8859-8.TXT 8859-9.TXT 8859-10.TXT \
	8859-11.TXT 8859-13.TXT 8859-14.TXT 8859-15.TXT 8859-16.TXT
LICENSE_DISTFILES_ZEND200=	${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}

BROKEN=		Does not build with recent boost

LIB_DEPENDS=	icudata:${PORTSDIR}/devel/icu \
		boost_thread:${PORTSDIR}/devel/boost-libs \
		execinfo:${PORTSDIR}/devel/libexecinfo \
		tbb:${PORTSDIR}/devel/tbb \
		gd:${PORTSDIR}/graphics/gd \
		mcrypt:${PORTSDIR}/security/libmcrypt \
		onig:${PORTSDIR}/devel/oniguruma4 \
		pcre:${PORTSDIR}/devel/pcre \
		expat:${PORTSDIR}/textproc/expat2 \
		memcached:${PORTSDIR}/databases/libmemcached \
		c-client4:${PORTSDIR}/mail/cclient

OPTIONS_DEFINE=	NLS
NLS_DESC=	Depend on gettext (required if binutils have NLS)

_EXTDIR=	share/hiphop-php/ext

BUILD_DEPENDS+=	bison:${PORTSDIR}/devel/bison \
		flex:${PORTSDIR}/textproc/flex \
		re2c:${PORTSDIR}/devel/re2c \
		${LOCALBASE}/${_EXTDIR}/lib/libevent.a:${PORTSDIR}/devel/libevent-hiphop \
		${LOCALBASE}/${_EXTDIR}/lib/libcurl.a:${PORTSDIR}/ftp/curl-hiphop

RUN_DEPENDS+=	${LOCALBASE}/${_EXTDIR}/lib/libevent.a:${PORTSDIR}/devel/libevent-hiphop \
		${LOCALBASE}/${_EXTDIR}/lib/libcurl.a:${PORTSDIR}/ftp/curl-hiphop

WRKSRC=		${WRKDIR}/facebook-hiphop-php-${GITVERSION}
MAKE_JOBS_UNSAFE=	yes

GNU_CONFIGURE=	yes
USES=		cmake
USE_MYSQL=	yes
USE_GNOME=	libxml2
USE_OPENSSL=	yes
USE_OPENLDAP=	yes
USE_GETTEXT=	yes
USE_GCC=	4.4+

GITVERSION=	96532ec
FETCH_ARGS=	-pRr

CUSTOM_ENV=	HPHP_HOME=${WRKSRC} \
		HPHP_LIB=${WRKSRC}/bin \
		CMAKE_PREFIX_PATH=${WRKDIR}/libs

DISTFILES+=	${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}:main \
		EastAsianWidth.txt:unidata \
		8859-1.TXT:mappings \
		8859-2.TXT:mappings \
		8859-3.TXT:mappings \
		8859-4.TXT:mappings \
		8859-5.TXT:mappings \
		8859-6.TXT:mappings \
		8859-7.TXT:mappings \
		8859-8.TXT:mappings \
		8859-9.TXT:mappings \
		8859-10.TXT:mappings \
		8859-11.TXT:mappings \
		8859-13.TXT:mappings \
		8859-14.TXT:mappings \
		8859-15.TXT:mappings \
		8859-16.TXT:mappings

PATCHFILES+=	hphp-freebsd-20120214.patch \
		hphp-libmemcached-1.0.patch

SUB_LIST+=	CC="${CC}" \
		CPP="${CPP}" \
		CXX="${CXX}" \
		HPHP_HOME="${DATADIR}" \
		HPHP="${DATADIR}/bin/hphp"

SUB_FILES+=	hphp

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MNLS}
EXTRA_PATCHES+=	${FILESDIR}/extra-patch-gettext
.endif

.include <bsd.port.pre.mk>

_CFLAGS=	${CFLAGS}
_CXXFLAGS=	-rpath=${_GCC_RUNTIME} ${CXXFLAGS}
_LDFLAGS=	${LDFLAGS}

CONFIGURE_ENV+=	${CUSTOM_ENV}
MAKE_ENV+=	${CUSTOM_ENV}

post-extract:
	@@${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/EastAsianWidth.txt \
		${WRKSRC}/src/third_party/libmbfl/mbfl/
.for i in 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16
	@@${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/8859-${i}.TXT \
		${WRKSRC}/src/third_party/libmbfl/filters/
.endfor

post-patch:
	@@${REINPLACE_CMD} -e 's|-levent|${WRKSRC}/libs/lib/libevent.a|g' \
		${WRKSRC}/src/third_party/libafdt/configure
	@@${REINPLACE_CMD} -e 's|-L$$(LIB_DIR)|${_LDFLAGS} -L$$(LIB_DIR)|g' \
		${WRKSRC}/src/rules.mk
	@@${REINPLACE_CMD} \
		-e 's|%%CURL_LIB%%|${LOCALBASE}/${_EXTDIR}/lib/libcurl.a|g' \
		-e 's|%%LIBEVENT_LIB%%|${LOCALBASE}/${_EXTDIR}/lib/libevent.a|g' \
		-e 's|%%CURL_INCLUDE_DIR%%|${LOCALBASE}/${_EXTDIR}/include|g' \
		-e 's|%%LIBEVENT_INCLUDE_DIR%%|${LOCALBASE}/${_EXTDIR}/include|g' \
		${WRKSRC}/CMake/HPHPFindLibs.cmake
	@@${REINPLACE_CMD} -e 's|%%CFLAGS%%|${_CFLAGS}|g' \
		-e 's|%%CXXFLAGS%%|${_CXXFLAGS}|g' \
		${WRKSRC}/CMake/HPHPSetup.cmake
	@@${REINPLACE_CMD} -e 's|LICENSE.PHP|src/version|g' \
		${WRKSRC}/bin/CMakeLists.base.txt

do-install:
	@@${MKDIR} ${DATADIR}/bin ${DATADIR}/src
	@@${FIND} ${WRKSRC} -type f -name '*.orig' -exec ${RM} {} \;
	@@${FIND} ${WRKSRC} -type f -name '*.bak' -exec ${RM} {} \;
	@@${CP} -R ${WRKSRC}/CMake ${WRKSRC}/bin ${DATADIR}
	@@${CP} -R ${WRKSRC}/src/runtime ${WRKSRC}/src/system \
		${WRKSRC}/src/util  ${DATADIR}/src
	@@${INSTALL_DATA} ${WRKSRC}/src/version ${DATADIR}/src/version
	@@${INSTALL_PROGRAM} ${WRKSRC}/src/hphp/hphp ${DATADIR}/bin
	@@${INSTALL_PROGRAM} ${WRKSRC}/src/hphpi/hphpi ${PREFIX}/bin/hphpi
	@@${INSTALL_SCRIPT} ${WRKDIR}/hphp ${PREFIX}/bin/hphp

.include <bsd.port.post.mk>
@


1.9
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/311310
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d2 1
a2 1
# $FreeBSD: head/lang/hiphop-php/Makefile 311310 2013-01-31 13:38:42Z bapt $
d67 1
a67 1
USE_CMAKE=	yes
@


1.8
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/309206
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r309206 | bapt | 2012-12-18 23:09:07 +0000 (Tue, 18 Dec 2012) | 2 lines
## SVN ##
## SVN ## Chase icu, graphite2 and libexttextcat bump
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d2 1
a2 1
# $FreeBSD: head/lang/hiphop-php/Makefile 309206 2012-12-18 23:09:07Z bapt $
d6 1
a6 1
PORTREVISION=	5
d35 2
@


1.7
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/308744
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r308744 | martymac | 2012-12-12 07:42:34 +0000 (Wed, 12 Dec 2012) | 6 lines
## SVN ##
## SVN ## - Update devel/tbb to 4.1.1 and bump dependent port's PORTREVISIONs
## SVN ## - Remove hardcoded dependency on gcc [1]
## SVN ##
## SVN ## PR:		ports/171297 [1]
## SVN ## Submitted by:	Christian Mangin <christian.mangin@@gmail.com> [1]
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 2
a2 6
# New ports collection makefile for:	hiphop
# Date created:				20120712
# Whom:					Martin Matuska <mm@@FreeBSD.org>
#
# $FreeBSD: head/lang/hiphop-php/Makefile 308744 2012-12-12 07:42:34Z martymac $
#
d6 1
a6 1
PORTREVISION=	4
d35 1
a35 1
LIB_DEPENDS=	icudata.48:${PORTSDIR}/devel/icu \
d38 8
a45 8
		tbb.4:${PORTSDIR}/devel/tbb \
		gd.4:${PORTSDIR}/graphics/gd \
		mcrypt.8:${PORTSDIR}/security/libmcrypt \
		onig.1:${PORTSDIR}/devel/oniguruma4 \
		pcre.3:${PORTSDIR}/devel/pcre \
		expat.6:${PORTSDIR}/textproc/expat2 \
		memcached.10:${PORTSDIR}/databases/libmemcached \
		c-client4.9:${PORTSDIR}/mail/cclient
a47 1
OPTIONS_DEFAULT=	NLS
@


1.6
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/308630
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r308630 | mm | 2012-12-10 19:11:11 +0000 (Mon, 10 Dec 2012) | 4 lines
## SVN ##
## SVN ## Update PCRE to 8.32
## SVN ## Introduces the UTF-32 library pcre32
## SVN ## Bump PORTREVISION in dependent ports
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d5 1
a5 1
# $FreeBSD: head/lang/hiphop-php/Makefile 308630 2012-12-10 19:11:11Z mm $
d10 1
a10 1
PORTREVISION=	3
@


1.5
log
@Switch exporter over
@
text
@d5 1
a5 1
# $FreeBSD: head/lang/hiphop-php/Makefile 305851 2012-10-13 23:19:36Z gerald $
d10 1
a10 1
PORTREVISION=	2
d46 1
a46 1
		pcre.1:${PORTSDIR}/devel/pcre \
@


1.4
log
@SVN rev 305851 on 2012-10-13 23:19:36Z by gerald

Replace the use of _GCC_BUILD_DEPENDS (which was never meant to be
used outside of Mk/bsd.gcc.mk) by _GCC_RUNTIME.  This is still not
ideal, but at least a documented stopgap, and it avoids the manual
construction of the directory to be added to rpath.

Remove -rpath= from _CFLAGS and _LDFLAGS since CFLAGS and LDFLAGS
already have -Wl,-rpath= (and -rpath= itself is not even accepted
by current versions of GCC).

Approved by:	maintainer timeout (6 weeks)
Feature safe:	yes
@
text
@d5 1
a5 1
# $FreeBSD$
@


1.3
log
@SVN rev 301181 on 2012-07-19 18:05:12Z by mm

Fix build if binutils are linked to gettext [1]
Depend on libexecinfo

PR:		ports/169996
Reported by:	Volodymyr Kostyrko
@
text
@d122 3
a124 6
_CFLAGS=	-rpath=${LOCALBASE}/lib/${_GCC_BUILD_DEPENDS} \
		${CFLAGS}
_CXXFLAGS=	-rpath=${LOCALBASE}/lib/${_GCC_BUILD_DEPENDS} \
		${CXXFLAGS}
_LDFLAGS=	-rpath=${LOCALBASE}/lib/${_GCC_BUILD_DEPENDS} \
		${LDFLAGS}
@


1.2
log
@SVN rev 301104 on 2012-07-18 17:06:02Z by mm

Add license infromation for program and all distfiles
Fix pkg-plist
@
text
@d10 1
a10 1
PORTREVISION=	1
d41 1
d51 4
d75 1
d114 6
@


1.1
log
@SVN rev 301100 on 2012-07-18 15:12:23Z by mm

From the HipHop Homepage:

HipHop transforms your PHP source code into highly optimized C++ and then
compiles it with g++ to build binary files. You keep coding in simpler PHP,
then HipHop executes your source code in a semantically equivalent manner and
sacrifices some rarely used features - such as eval() - in exchange for
improved performance.

HipHop was developed by Facebook and was released as open source in early 2010.

Facebook sees about a 50% reduction in CPU usage when serving equal amounts
of Web traffic when compared to Apache and PHP. Facebook.s API tier can serve
twice the traffic using 30% less CPU.

WWW:	https://github.com/facebook/hiphop-php/wiki
@
text
@d2 1
a2 1
# Date created:				2012-07-18
d10 1
d23 16
d142 2
d148 1
d152 1
a152 3
.for file in LICENSE.PHP LICENSE.ZEND src/version
	@@${INSTALL_DATA} ${WRKSRC}/${file} ${DATADIR}/${file}
.endfor
@

