Unbreak lang/hiphop-php and update to 2.1

Some functionality issues still need fixing (sqlite3)
This commit is contained in:
Martin Matuska 2013-07-21 22:06:56 +00:00
parent 6487ca7742
commit cd17c8f3a3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=323419
18 changed files with 295 additions and 1518 deletions

View file

@ -2,14 +2,13 @@
# $FreeBSD$
PORTNAME= hiphop-php
PORTVERSION= 0.0.20120716
PORTREVISION= 7
PORTVERSION= 2.1
CATEGORIES= lang devel www
MASTER_SITES= https://github.com/facebook/hiphop-php/tarball/${GITVERSION}/:main \
MASTER_SITES= https://github.com/facebook/hiphop-php/archive/:main \
http://unicode.org/Public/UNIDATA/:unidata \
http://unicode.org/Public/MAPPINGS/ISO8859/:mappings
DIST_SUBDIR= hiphop-php
EXTRACT_ONLY= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}
DISTNAME= HPHP-${PORTVERSION}
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
PATCH_SITES= http://cpp.in/dev/
@ -25,14 +24,14 @@ 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_PHP301= ${DISTNAME}${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}
LICENSE_DISTFILES_ZEND200= ${DISTNAME}${EXTRACT_SUFX}
BROKEN= Does not build with recent boost
#BROKEN= Does not build with recent boost
LIB_DEPENDS= icudata:${PORTSDIR}/devel/icu \
boost_thread:${PORTSDIR}/devel/boost-libs \
@ -44,23 +43,25 @@ LIB_DEPENDS= icudata:${PORTSDIR}/devel/icu \
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)
c-client4:${PORTSDIR}/mail/cclient \
unwind:${PORTSDIR}/devel/libunwind \
glog:${PORTSDIR}/devel/glog
_EXTDIR= share/hiphop-php/ext
BUILD_DEPENDS+= bison:${PORTSDIR}/devel/bison \
flex:${PORTSDIR}/textproc/flex \
re2c:${PORTSDIR}/devel/re2c \
bash:${PORTSDIR}/shells/bash \
${LOCALBASE}/${_EXTDIR}/lib/libevent.a:${PORTSDIR}/devel/libevent-hiphop \
${LOCALBASE}/${_EXTDIR}/lib/libcurl.a:${PORTSDIR}/ftp/curl-hiphop
${LOCALBASE}/${_EXTDIR}/lib/libcurl.a:${PORTSDIR}/ftp/curl-hiphop \
${LOCALBASE}/lib/libdwarf.a:${PORTSDIR}/devel/libdwarf
RUN_DEPENDS+= ${LOCALBASE}/${_EXTDIR}/lib/libevent.a:${PORTSDIR}/devel/libevent-hiphop \
${LOCALBASE}/${_EXTDIR}/lib/libcurl.a:${PORTSDIR}/ftp/curl-hiphop
${LOCALBASE}/${_EXTDIR}/lib/libcurl.a:${PORTSDIR}/ftp/curl-hiphop \
${LOCALBASE}/lib/libdwarf.a:${PORTSDIR}/devel/libdwarf
WRKSRC= ${WRKDIR}/facebook-hiphop-php-${GITVERSION}
WRKSRC= ${WRKDIR}/${PORTNAME}-HPHP-${PORTVERSION}
MAKE_JOBS_UNSAFE= yes
GNU_CONFIGURE= yes
@ -69,7 +70,7 @@ USE_MYSQL= yes
USE_GNOME= libxml2
USE_OPENSSL= yes
USE_OPENLDAP= yes
USE_GCC= 4.4+
USE_GCC= yes
GITVERSION= 96532ec
FETCH_ARGS= -pRr
@ -78,7 +79,7 @@ CUSTOM_ENV= HPHP_HOME=${WRKSRC} \
HPHP_LIB=${WRKSRC}/bin \
CMAKE_PREFIX_PATH=${WRKDIR}/libs
DISTFILES+= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}:main \
DISTFILES+= ${DISTNAME}${EXTRACT_SUFX}:main \
EastAsianWidth.txt:unidata \
8859-1.TXT:mappings \
8859-2.TXT:mappings \
@ -96,67 +97,46 @@ DISTFILES+= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}:main \
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}
_CFLAGS= ${CFLAGS} -DHAVE_POSIX_FALLOCATE=1
_CXXFLAGS= -Wl,-rpath=${_GCC_RUNTIME} ${CXXFLAGS} -D_GLIBCXX_USE_C99 -DHAVE_POSIX_FALLOCATE=1
CONFIGURE_ENV+= ${CUSTOM_ENV}
MAKE_ENV+= ${CUSTOM_ENV}
post-extract:
@${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/EastAsianWidth.txt \
${WRKSRC}/src/third_party/libmbfl/mbfl/
${WRKSRC}/hphp/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/
${WRKSRC}/hphp/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
${WRKSRC}/hphp/third_party/libafdt/configure
@${REINPLACE_CMD} -e 's,#!/bin/bash,#!${LOCALBASE}/bin/bash,g' \
${WRKSRC}/hphp/util/parser/test/run_verify_parse.sh \
${WRKSRC}/hphp/util/generate_buildinfo.sh \
${WRKSRC}/hphp/tools/timeout.sh
@${REINPLACE_CMD} \
-e 's|%%CURL_LIB%%|${LOCALBASE}/${_EXTDIR}/lib/libcurl.a|g' \
-e 's|%%CURL_LIB%%|${LOCALBASE}/${_EXTDIR}/lib/libcurl.a /usr/lib/libgssapi.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|%%LOCALBASE%%|${LOCALBASE}|g' \
${WRKSRC}/CMake/FindLibDwarf.cmake \
${WRKSRC}/CMake/FindLibElf.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
${INSTALL_PROGRAM} ${WRKSRC}/hphp/hhvm/hhvm ${LOCALBASE}/bin/
${MKDIR} ${DATADIR}/bin
${INSTALL_DATA} ${WRKSRC}/bin/systemlib.php ${DATADIR}/bin/
${CP} ${WRKSRC}/bin/*.a ${DATADIR}/bin/
.include <bsd.port.post.mk>

View file

@ -1,38 +1,36 @@
SHA256 (hiphop-php/hiphop-php-0.0.20120716.tar.gz) = 7234854e91ce3955ac195534f2ee863f85843fa5fe400eb68abd126a7ddd9689
SIZE (hiphop-php/hiphop-php-0.0.20120716.tar.gz) = 8460604
SHA256 (hiphop-php/EastAsianWidth.txt) = d591c24b702c1b025b58ca6168746f713b657c6e252c268f52cb07758f428067
SIZE (hiphop-php/EastAsianWidth.txt) = 884136
SHA256 (hiphop-php/8859-1.TXT) = 884eb5ae5aa74867c7b2c93a40b9460920e26731dfafa58f783e9d568fc79055
SIZE (hiphop-php/8859-1.TXT) = 10592
SHA256 (hiphop-php/8859-2.TXT) = 5c81eca66455c5b36853c8a66495f58636643f6ddb261083d877a7f2a48287b7
SIZE (hiphop-php/8859-2.TXT) = 10816
SHA256 (hiphop-php/8859-3.TXT) = a7906a91ec3a4ac7f10ec7e25966d36d98fb720f401d595de5f9f06ab1f2b2a7
SIZE (hiphop-php/8859-3.TXT) = 10498
SHA256 (hiphop-php/8859-4.TXT) = 5bb8f1fa3fdf6df88ee3d1a17f58bdf5e336f6b665d58ea04bf7bd7bdbf259dc
SIZE (hiphop-php/8859-4.TXT) = 10792
SHA256 (hiphop-php/8859-5.TXT) = c1244fabad6e9b7a8053da89448c42388bbe93681742e01e74f7a22b7f08e3ed
SIZE (hiphop-php/8859-5.TXT) = 10427
SHA256 (hiphop-php/8859-6.TXT) = a2917a1017ecb3c82fc44cd57365dbda0788f7cc1e8da94d8175f6600cf03548
SIZE (hiphop-php/8859-6.TXT) = 8308
SHA256 (hiphop-php/8859-7.TXT) = 7b8d7ce8242993556958a5f95529d9d71181e6a08a070d037f157a22a77716a9
SIZE (hiphop-php/8859-7.TXT) = 10582
SHA256 (hiphop-php/8859-8.TXT) = 4bea5cf4b048e3b7ccf704ea153edcf77d2a4c627dd8710f8f7e037afb62a171
SIZE (hiphop-php/8859-8.TXT) = 8553
SHA256 (hiphop-php/8859-9.TXT) = 976d48dfff033c7bfedd08bc61d26f0a5fefb4c3f48f8735f454e100cf40294c
SIZE (hiphop-php/8859-9.TXT) = 10628
SHA256 (hiphop-php/8859-10.TXT) = 13339ad725052723ff6aac91ceef1a120a3231c4fac647e0b63d5565efdd2a53
SIZE (hiphop-php/8859-10.TXT) = 10989
SHA256 (hiphop-php/8859-11.TXT) = a742830aea98cbd27e5ecf811277d0c68e1e7be5a29cf7b98719474cc9cd458a
SIZE (hiphop-php/8859-11.TXT) = 9730
SHA256 (hiphop-php/8859-13.TXT) = 6e07d8120d8225f0556c9c7f477c7d4392141290c3ae7f6a81c3926c34c0e52c
SIZE (hiphop-php/8859-13.TXT) = 10588
SHA256 (hiphop-php/8859-14.TXT) = 3426e4b6b5b644920110ddd7d6404cd41b361eec966cfcb6cd135e1439f7719b
SIZE (hiphop-php/8859-14.TXT) = 11021
SHA256 (hiphop-php/8859-15.TXT) = 0e94e2789e46c7a1e7e453735947e5e593fed2ded6eef659a5282dfc413ff59f
SIZE (hiphop-php/8859-15.TXT) = 10601
SHA256 (hiphop-php/8859-16.TXT) = f6abb360ffac4700d51bb84c753b088d0f7d49bdc6bc482c458b2c3ef2725a54
SIZE (hiphop-php/8859-16.TXT) = 10886
SHA256 (hiphop-php/hphp-freebsd-20120214.patch) = 8b201a72d8164c1c139909c050c89b970ac9d33a05fd69454815bc48c8e1d96e
SIZE (hiphop-php/hphp-freebsd-20120214.patch) = 12331
SHA256 (hiphop-php/hphp-libmemcached-1.0.patch) = 2ce5159d9208abff4eddf52fef0f1a84ad27eecb169d7309dae8867bd4cac0da
SIZE (hiphop-php/hphp-libmemcached-1.0.patch) = 1504
SHA256 (HPHP-2.1.tar.gz) = 7d8ecfe9c84a4824b3d26b674305df19c07caa90325d38eb8d092386ca175ec6
SIZE (HPHP-2.1.tar.gz) = 10209944
SHA256 (EastAsianWidth.txt) = 8461529935463876182ca12c1d7d7a0a1111ae3b3e2a9a660fc66551e690fe83
SIZE (EastAsianWidth.txt) = 884163
SHA256 (8859-1.TXT) = 884eb5ae5aa74867c7b2c93a40b9460920e26731dfafa58f783e9d568fc79055
SIZE (8859-1.TXT) = 10592
SHA256 (8859-2.TXT) = 5c81eca66455c5b36853c8a66495f58636643f6ddb261083d877a7f2a48287b7
SIZE (8859-2.TXT) = 10816
SHA256 (8859-3.TXT) = a7906a91ec3a4ac7f10ec7e25966d36d98fb720f401d595de5f9f06ab1f2b2a7
SIZE (8859-3.TXT) = 10498
SHA256 (8859-4.TXT) = 5bb8f1fa3fdf6df88ee3d1a17f58bdf5e336f6b665d58ea04bf7bd7bdbf259dc
SIZE (8859-4.TXT) = 10792
SHA256 (8859-5.TXT) = c1244fabad6e9b7a8053da89448c42388bbe93681742e01e74f7a22b7f08e3ed
SIZE (8859-5.TXT) = 10427
SHA256 (8859-6.TXT) = a2917a1017ecb3c82fc44cd57365dbda0788f7cc1e8da94d8175f6600cf03548
SIZE (8859-6.TXT) = 8308
SHA256 (8859-7.TXT) = 7b8d7ce8242993556958a5f95529d9d71181e6a08a070d037f157a22a77716a9
SIZE (8859-7.TXT) = 10582
SHA256 (8859-8.TXT) = 4bea5cf4b048e3b7ccf704ea153edcf77d2a4c627dd8710f8f7e037afb62a171
SIZE (8859-8.TXT) = 8553
SHA256 (8859-9.TXT) = 976d48dfff033c7bfedd08bc61d26f0a5fefb4c3f48f8735f454e100cf40294c
SIZE (8859-9.TXT) = 10628
SHA256 (8859-10.TXT) = 13339ad725052723ff6aac91ceef1a120a3231c4fac647e0b63d5565efdd2a53
SIZE (8859-10.TXT) = 10989
SHA256 (8859-11.TXT) = a742830aea98cbd27e5ecf811277d0c68e1e7be5a29cf7b98719474cc9cd458a
SIZE (8859-11.TXT) = 9730
SHA256 (8859-13.TXT) = 6e07d8120d8225f0556c9c7f477c7d4392141290c3ae7f6a81c3926c34c0e52c
SIZE (8859-13.TXT) = 10588
SHA256 (8859-14.TXT) = 3426e4b6b5b644920110ddd7d6404cd41b361eec966cfcb6cd135e1439f7719b
SIZE (8859-14.TXT) = 11021
SHA256 (8859-15.TXT) = 0e94e2789e46c7a1e7e453735947e5e593fed2ded6eef659a5282dfc413ff59f
SIZE (8859-15.TXT) = 10601
SHA256 (8859-16.TXT) = f6abb360ffac4700d51bb84c753b088d0f7d49bdc6bc482c458b2c3ef2725a54
SIZE (8859-16.TXT) = 10886
SHA256 (hphp-libmemcached-1.0.patch) = 2ce5159d9208abff4eddf52fef0f1a84ad27eecb169d7309dae8867bd4cac0da
SIZE (hphp-libmemcached-1.0.patch) = 1504

View file

@ -1,25 +0,0 @@
--- CMake/HPHPFindLibs.cmake.orig 2012-07-15 01:13:18.000000000 +0200
+++ CMake/HPHPFindLibs.cmake 2012-07-19 16:20:37.949508810 +0200
@@ -304,6 +284,14 @@
if (FREEBSD)
FIND_LIBRARY (EXECINFO_LIB execinfo)
+ FIND_LIBRARY (GETTEXT_LIB intl)
+
+ if (NOT EXECINFO_LIB)
+ message(FATAL_ERROR "You need to install libexecinfo")
+ endif()
+ if (NOT GETTEXT_LIB)
+ message(FATAL_ERROR "You need to install gettext (libintl)")
+ endif()
endif()
#find_package(BISON REQUIRED)
@@ -349,6 +337,7 @@
if (FREEBSD)
target_link_libraries(${target} ${EXECINFO_LIB})
+ target_link_libraries(${target} ${GETTEXT_LIB})
endif()
target_link_libraries(${target} ${BFD_LIB})

View file

@ -1,6 +0,0 @@
#!/bin/sh
[ -z "$CC" ] && export CC=%%CC%%
[ -z "$CPP" ] && export CPP=%%CPP%%
[ -z "$CXX" ] && export CXX=%%CXX%%
export HPHP_HOME=%%HPHP_HOME%%
%%HPHP%% $@

View file

@ -1,11 +0,0 @@
--- CMake/FindCClient.cmake.orig 2012-06-29 08:14:55.000000000 +0200
+++ CMake/FindCClient.cmake 2012-07-13 14:22:31.488508616 +0200
@@ -9,7 +9,7 @@
)
FIND_LIBRARY(CCLIENT_LIBRARY
- NAMES c-client
+ NAMES c-client4
PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib
)

View file

@ -0,0 +1,36 @@
--- CMake/FindLibDwarf.cmake.orig 2013-07-12 20:00:55.000000000 +0200
+++ CMake/FindLibDwarf.cmake 2013-07-21 16:31:25.292419225 +0200
@@ -16,31 +16,8 @@
set (LibDwarf_FIND_QUIETLY TRUE)
endif (LIBDWARF_LIBRARIES AND LIBDWARF_INCLUDE_DIRS)
-find_path (DWARF_INCLUDE_DIR
- NAMES
- dwarf.h
- PATHS
- /usr/include
- /usr/include/libdwarf
- /usr/local/include
- /opt/local/include
- /sw/include
- ENV CPATH) # PATH and INCLUDE will also work
-
-if (DWARF_INCLUDE_DIR)
- set (LIBDWARF_INCLUDE_DIRS ${DWARF_INCLUDE_DIR})
-endif ()
-
-find_library (LIBDWARF_LIBRARIES
- NAMES
- dwarf
- PATHS
- /usr/lib
- /usr/local/lib
- /opt/local/lib
- /sw/lib
- ENV LIBRARY_PATH # PATH and LIB will also work
- ENV LD_LIBRARY_PATH)
+set (LIBDWARF_INCLUDE_DIRS %%LOCALBASE%%/include)
+set (LIBDWARF_LIBRARIES %%LOCALBASE%%/lib/libdwarf.a)
include (FindPackageHandleStandardArgs)

View file

@ -1,6 +1,6 @@
--- CMake/HPHPFindLibs.cmake.orig 2012-07-13 14:44:33.729505429 +0200
+++ CMake/HPHPFindLibs.cmake 2012-07-13 14:45:03.602507878 +0200
@@ -17,6 +17,16 @@
--- CMake/HPHPFindLibs.cmake.orig 2013-07-12 20:00:55.000000000 +0200
+++ CMake/HPHPFindLibs.cmake 2013-07-21 20:48:54.447418294 +0200
@@ -17,6 +17,18 @@
include(CheckFunctionExists)
@ -13,11 +13,13 @@
+set(CURL_LIBRARIES %%CURL_LIB%%)
+set(CURL_INCLUDE_DIR %%CURL_INCLUDE_DIR%%)
+include_directories(${CURL_INCLUDE_DIR})
+add_definitions("-DHAVE_CURL_MULTI_SELECT")
+add_definitions("-DHAVE_CURL_MULTI_WAIT")
+
# boost checks
find_package(Boost 1.37.0 COMPONENTS system;program_options;filesystem REQUIRED)
@@ -51,21 +61,6 @@
find_package(Boost 1.48.0 COMPONENTS system program_options filesystem regex REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
@@ -73,21 +85,6 @@
find_package(PCRE REQUIRED)
include_directories(${PCRE_INCLUDE_DIRS})
@ -39,8 +41,8 @@
# GD checks
find_package(GD REQUIRED)
@@ -76,21 +71,6 @@
# nothing for now
@@ -104,21 +101,6 @@
add_definitions(-DHAVE_LIBXED)
endif()
-# CURL checks
@ -48,16 +50,39 @@
-include_directories(${CURL_INCLUDE_DIR})
-
-set(CMAKE_REQUIRED_LIBRARIES "${CURL_LIBRARIES}")
-CHECK_FUNCTION_EXISTS("curl_multi_select" HAVE_CUSTOM_CURL)
-if (NOT HAVE_CUSTOM_CURL)
- unset(HAVE_CUSTOM_CURL CACHE)
- unset(CURL_INCLUDE_DIR CACHE)
- unset(CURL_LIBRARIES CACHE)
- unset(CURL_FOUND CACHE)
- message(FATAL_ERROR "Custom libcurl is required with the HipHop patch")
-endif ()
-CHECK_FUNCTION_EXISTS("curl_multi_select" HAVE_CURL_MULTI_SELECT)
-CHECK_FUNCTION_EXISTS("curl_multi_wait" HAVE_CURL_MULTI_WAIT)
-if (HAVE_CURL_MULTI_SELECT)
- add_definitions("-DHAVE_CURL_MULTI_SELECT")
-endif()
-if (HAVE_CURL_MULTI_WAIT)
- add_definitions("-DHAVE_CURL_MULTI_WAIT")
-endif()
-set(CMAKE_REQUIRED_LIBRARIES)
-
# LibXML2 checks
find_package(LibXml2 REQUIRED)
include_directories(${LIBXML2_INCLUDE_DIR})
@@ -328,9 +310,14 @@
if (FREEBSD)
FIND_LIBRARY (EXECINFO_LIB execinfo)
+ FIND_LIBRARY (GETTEXT_LIB intl)
+
if (NOT EXECINFO_LIB)
message(FATAL_ERROR "You need to install libexecinfo")
endif()
+ if (NOT GETTEXT_LIB)
+ message(FATAL_ERROR "You need to install gettext (libintl)")
+ endif()
endif()
if (APPLE)
@@ -396,6 +383,7 @@
if (FREEBSD)
target_link_libraries(${target} ${EXECINFO_LIB})
+ target_link_libraries(${target} ${GETTEXT_LIB})
endif()
if (APPLE)

View file

@ -1,13 +1,13 @@
--- CMake/HPHPSetup.cmake.orig 2012-07-13 12:37:46.091528166 +0200
+++ CMake/HPHPSetup.cmake 2012-07-13 12:38:38.308521628 +0200
@@ -113,8 +113,8 @@
--- CMake/HPHPSetup.cmake.orig 2013-07-12 20:00:55.000000000 +0200
+++ CMake/HPHPSetup.cmake 2013-07-21 11:03:57.285458378 +0200
@@ -133,8 +133,8 @@
set(CMAKE_C_FLAGS "-no-ipo -fp-model precise -wd584 -wd1418 -wd1918 -wd383 -wd869 -wd981 -wd424 -wd1419 -wd444 -wd271 -wd2259 -wd1572 -wd1599 -wd82 -wd177 -wd593 -w")
set(CMAKE_CXX_FLAGS "-no-ipo -fp-model precise -wd584 -wd1418 -wd1918 -wd383 -wd869 -wd981 -wd424 -wd1419 -wd444 -wd271 -wd2259 -wd1572 -wd1599 -wd82 -wd177 -wd593 -fno-omit-frame-pointer -ftemplate-depth-60 -Wall -Woverloaded-virtual -Wno-deprecated -w1 -Wno-strict-aliasing -Wno-write-strings -Wno-invalid-offsetof -fno-operator-names")
set(CMAKE_CXX_FLAGS "-no-ipo -fp-model precise -wd584 -wd1418 -wd1918 -wd383 -wd869 -wd981 -wd424 -wd1419 -wd444 -wd271 -wd2259 -wd1572 -wd1599 -wd82 -wd177 -wd593 -fno-omit-frame-pointer -ftemplate-depth-120 -Wall -Woverloaded-virtual -Wno-deprecated -w1 -Wno-strict-aliasing -Wno-write-strings -Wno-invalid-offsetof -fno-operator-names")
else()
- set(CMAKE_C_FLAGS "-w")
- set(CMAKE_CXX_FLAGS "-fno-gcse -fno-omit-frame-pointer -ftemplate-depth-60 -Wall -Woverloaded-virtual -Wno-deprecated -Wno-parentheses -Wno-strict-aliasing -Wno-write-strings -Wno-invalid-offsetof -fno-operator-names")
+ set(CMAKE_C_FLAGS "-w %%CFLAGS%%")
+ set(CMAKE_CXX_FLAGS "-fno-gcse -fno-omit-frame-pointer -ftemplate-depth-60 -Wall -Woverloaded-virtual -Wno-deprecated -Wno-parentheses -Wno-strict-aliasing -Wno-write-strings -Wno-invalid-offsetof -fno-operator-names %%CXXFLAGS%%")
- set(CMAKE_CXX_FLAGS "-fno-gcse -fno-omit-frame-pointer -ftemplate-depth-120 -Wall -Woverloaded-virtual -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-invalid-offsetof -fno-operator-names -Wno-error=array-bounds -Wno-error=switch -std=gnu++0x -Werror=format-security -Wno-unused-result -Wno-sign-compare")
+ set(CMAKE_C_FLAGS "%%CFLAGS%%")
+ set(CMAKE_CXX_FLAGS "-fno-gcse -fno-omit-frame-pointer -ftemplate-depth-120 -Wall -Woverloaded-virtual -Wno-deprecated -Wno-strict-aliasing -Wno-write-strings -Wno-invalid-offsetof -fno-operator-names -Wno-error=array-bounds -Wno-error=switch -std=gnu++0x -Werror=format-security -Wno-unused-result -Wno-sign-compare %%CXXFLAGS%%")
endif()
IF(CMAKE_COMPILER_IS_GNUCC)

View file

@ -0,0 +1,16 @@
--- hphp/runtime/base/program_functions.cpp.orig 2013-07-21 12:37:28.901704505 +0200
+++ hphp/runtime/base/program_functions.cpp 2013-07-21 12:37:50.729630002 +0200
@@ -1290,10 +1290,10 @@
void hphp_process_init() {
pthread_attr_t attr;
-#ifndef __APPLE__
- pthread_getattr_np(pthread_self(), &attr);
-#else
+#if defined(__APPLE__) || defined(__FreeBSD__)
pthread_attr_init(&attr);
+#else
+ pthread_getattr_np(pthread_self(), &attr);
#endif
Util::init_stack_limits(&attr);
pthread_attr_destroy(&attr);

View file

@ -0,0 +1,10 @@
--- hphp/runtime/ext/ext_hotprofiler.cpp.orig 2013-07-21 13:34:10.135485647 +0200
+++ hphp/runtime/ext/ext_hotprofiler.cpp 2013-07-21 13:35:02.222657875 +0200
@@ -28,6 +28,7 @@
#ifdef __FreeBSD__
# include <sys/resource.h>
+# include <sys/param.h>
# include <sys/cpuset.h>
# define cpu_set_t cpuset_t
# define SET_AFFINITY(pid, size, mask) \

View file

@ -0,0 +1,10 @@
--- hphp/runtime/ext/ext_posix.cpp.orig 2013-07-21 13:35:52.420426882 +0200
+++ hphp/runtime/ext/ext_posix.cpp 2013-07-21 13:36:48.030517355 +0200
@@ -20,6 +20,7 @@
#include <sys/times.h>
#include <sys/utsname.h>
#include <sys/types.h>
+#include <sys/param.h>
#include <sys/time.h>
#include <pwd.h>
#include <memory>

View file

@ -0,0 +1,47 @@
--- hphp/runtime/vm/debug/dwarf.cpp.orig 2013-07-21 17:25:47.751427347 +0200
+++ hphp/runtime/vm/debug/dwarf.cpp 2013-07-21 17:27:13.024430533 +0200
@@ -17,7 +17,7 @@
#include <stdio.h>
#include "debug.h"
-#ifndef __APPLE__
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
#include "hphp/runtime/vm/debug/elfwriter.h"
#endif
#include "hphp/runtime/vm/debug/gdb-jit.h"
@@ -36,7 +36,7 @@
int g_dwarfCallback(char *name, int size, Dwarf_Unsigned type,
Dwarf_Unsigned flags, Dwarf_Unsigned link, Dwarf_Unsigned info,
Dwarf_Unsigned *sect_name_index, Dwarf_Ptr handle, int *error) {
-#ifndef __APPLE__
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
ElfWriter *e = reinterpret_cast<ElfWriter *>(handle);
return e->dwarfCallback(name, size, type, flags, link, info);
#else
@@ -221,7 +221,7 @@
m_dwarfChunks[j] = nullptr;
}
m_dwarfChunks[i] = chunk;
-#ifndef __APPLE__
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
// register compacted chunk with gdb
ElfWriter e = ElfWriter(chunk);
#endif
@@ -291,7 +291,7 @@
f->m_chunk = chunk;
}
-#ifndef __APPLE__
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
if (f->m_chunk->m_functions.size() >= RuntimeOption::EvalGdbSyncChunks) {
ElfWriter e = ElfWriter(f->m_chunk);
}
@@ -306,7 +306,7 @@
for (i = 0; i < m_dwarfChunks.size(); i++) {
if (m_dwarfChunks[i] && !m_dwarfChunks[i]->isSynced()) {
unregister_gdb_chunk(m_dwarfChunks[i]);
-#ifndef __APPLE__
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
ElfWriter e = ElfWriter(m_dwarfChunks[i]);
#endif
}

View file

@ -0,0 +1,10 @@
--- hphp/runtime/vm/jit/translator-x64.cpp.orig 2013-07-21 13:57:07.101533182 +0200
+++ hphp/runtime/vm/jit/translator-x64.cpp 2013-07-21 13:57:26.025419037 +0200
@@ -31,6 +31,7 @@
#ifdef __FreeBSD__
#define RIP_REGISTER(v) (v).mc_rip
+#include <sys/ucontext.h>
#elif defined(__APPLE__)
#define RIP_REGISTER(v) (v)->__ss.__rip
#elif defined(__x86_64__)

View file

@ -0,0 +1,18 @@
--- hphp/third_party/folly/folly/FileUtil.cpp.orig 2013-07-21 12:17:10.950456554 +0200
+++ hphp/third_party/folly/folly/FileUtil.cpp 2013-07-21 12:17:51.135882548 +0200
@@ -53,10 +53,12 @@
}
int fdatasyncNoInt(int fd) {
-#ifndef __APPLE__
- return wrapNoInt(fdatasync, fd);
-#else
+#if defined(__APPLE__)
return wrapNoInt(fcntl, fd, F_FULLFSYNC);
+#elif defined(__FreeBSD__)
+ return wrapNoInt(fsync, fd);
+#else
+ return wrapNoInt(fdatasync, fd);
#endif
}

View file

@ -0,0 +1,11 @@
--- hphp/util/compatibility.cpp.orig 2013-07-21 12:48:24.829495815 +0200
+++ hphp/util/compatibility.cpp 2013-07-21 12:48:45.364579480 +0200
@@ -20,7 +20,7 @@
namespace HPHP {
///////////////////////////////////////////////////////////////////////////////
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
char *strndup(const char* str, size_t len) {
size_t str_len = strlen(str);
if (len < str_len) {

View file

@ -0,0 +1,11 @@
--- hphp/util/compatibility.h.orig 2013-07-21 12:48:18.383655924 +0200
+++ hphp/util/compatibility.h 2013-07-21 12:48:34.993417921 +0200
@@ -24,7 +24,7 @@
#define PHP_DIR_SEPARATOR '/'
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
char *strndup(const char* str, size_t len);
int dprintf(int fd, const char *format, ...) ATTRIBUTE_PRINTF(2,3);
typedef int clockid_t;

View file

@ -1,19 +0,0 @@
--- src/runtime/base/preg.cpp.orig 2012-07-12 15:09:35.645510793 +0200
+++ src/runtime/base/preg.cpp 2012-07-12 15:18:26.056540495 +0200
@@ -126,6 +126,7 @@
static pcre_cache_entry *pcre_get_compiled_regex_cache(CStrRef regex) {
PCRECache &pcre_cache = *s_pcre_cache;
+ int count = 0;
/* Try to lookup the cached regex entry, and if successful, just pass
back the compiled pattern, otherwise go on and compile it. */
@@ -135,7 +136,7 @@
* We use a quick pcre_info() check to see whether cache is corrupted,
* and if it is, we flush it and compile the pattern from scratch.
*/
- if (pcre_info(pce->re, NULL, NULL) == PCRE_ERROR_BADMAGIC) {
+ if (pcre_fullinfo(pce->re, NULL, PCRE_INFO_CAPTURECOUNT, &count) == PCRE_ERROR_BADMAGIC) {
pcre_cache.cleanup();
} else {
#if HAVE_SETLOCALE

File diff suppressed because it is too large Load diff