aboutsummaryrefslogtreecommitdiffstats
path: root/lang/hiphop-php
diff options
context:
space:
mode:
authormm <mm@FreeBSD.org>2012-07-20 02:05:12 +0800
committermm <mm@FreeBSD.org>2012-07-20 02:05:12 +0800
commite017d1d722b4c8bfe8736263dc4a96504d89b2c3 (patch)
tree22eea9042f8bca1c2c165a88947ec774fb6ccb7f /lang/hiphop-php
parentedfe8e7e3668ba1e894c0e1601d9c1f4d596eae7 (diff)
downloadfreebsd-ports-gnome-e017d1d722b4c8bfe8736263dc4a96504d89b2c3.tar.gz
freebsd-ports-gnome-e017d1d722b4c8bfe8736263dc4a96504d89b2c3.tar.zst
freebsd-ports-gnome-e017d1d722b4c8bfe8736263dc4a96504d89b2c3.zip
Fix build if binutils are linked to gettext [1]
Depend on libexecinfo PR: ports/169996 Reported by: Volodymyr Kostyrko
Diffstat (limited to 'lang/hiphop-php')
-rw-r--r--lang/hiphop-php/Makefile14
-rw-r--r--lang/hiphop-php/files/extra-patch-gettext25
2 files changed, 38 insertions, 1 deletions
diff --git a/lang/hiphop-php/Makefile b/lang/hiphop-php/Makefile
index 6368effb2e48..1bb22459e5a2 100644
--- a/lang/hiphop-php/Makefile
+++ b/lang/hiphop-php/Makefile
@@ -7,7 +7,7 @@
PORTNAME= hiphop-php
PORTVERSION= 0.0.20120716
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= lang devel www
MASTER_SITES= https://github.com/facebook/hiphop-php/tarball/${GITVERSION}/:main \
http://unicode.org/Public/UNIDATA/:unidata \
@@ -38,6 +38,7 @@ LICENSE_DISTFILES_ZEND200= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}
LIB_DEPENDS= icudata.48:${PORTSDIR}/devel/icu \
boost_thread:${PORTSDIR}/devel/boost-libs \
+ execinfo:${PORTSDIR}/devel/libexecinfo \
tbb.4:${PORTSDIR}/devel/tbb \
gd.4:${PORTSDIR}/graphics/gd \
mcrypt.8:${PORTSDIR}/security/libmcrypt \
@@ -47,6 +48,10 @@ LIB_DEPENDS= icudata.48:${PORTSDIR}/devel/icu \
memcached.10:${PORTSDIR}/databases/libmemcached \
c-client4.9:${PORTSDIR}/mail/cclient
+OPTIONS_DEFINE= NLS
+OPTIONS_DEFAULT= NLS
+NLS_DESC= Depend on gettext (required if binutils have NLS)
+
_EXTDIR= share/hiphop-php/ext
BUILD_DEPENDS+= bison:${PORTSDIR}/devel/bison \
@@ -67,6 +72,7 @@ USE_MYSQL= yes
USE_GNOME= libxml2
USE_OPENSSL= yes
USE_OPENLDAP= yes
+USE_GETTEXT= yes
USE_GCC= 4.4+
GITVERSION= 96532ec
@@ -105,6 +111,12 @@ SUB_LIST+= CC="${CC}" \
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= -rpath=${LOCALBASE}/lib/${_GCC_BUILD_DEPENDS} \
diff --git a/lang/hiphop-php/files/extra-patch-gettext b/lang/hiphop-php/files/extra-patch-gettext
new file mode 100644
index 000000000000..ce5cbe965139
--- /dev/null
+++ b/lang/hiphop-php/files/extra-patch-gettext
@@ -0,0 +1,25 @@
+--- 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})