Add option to create a DEBUG build

This commit is contained in:
Martin Matuska
2013-07-21 23:25:52 +00:00
parent eb047527bb
commit ea0532cb22
2 changed files with 21 additions and 0 deletions
+10
View File
@@ -3,6 +3,7 @@
PORTNAME= hiphop-php
PORTVERSION= 2.1
PORTREVISION= 1
CATEGORIES= lang devel www
MASTER_SITES= https://github.com/facebook/hiphop-php/archive/:main \
http://unicode.org/Public/UNIDATA/:unidata \
@@ -45,6 +46,8 @@ LIB_DEPENDS= icudata:${PORTSDIR}/devel/icu \
unwind:${PORTSDIR}/devel/libunwind \
glog:${PORTSDIR}/devel/glog
OPTIONS_DEFINE= DEBUG
ONLY_FOR_ARCHS= amd64
ONLY_FOR_ARCHS_REASON= This program is developed for amd64 only
@@ -97,6 +100,13 @@ DISTFILES+= ${DISTNAME}${EXTRACT_SUFX}:main \
8859-15.TXT:mappings \
8859-16.TXT:mappings
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MDEBUG}
CMAKE_BUILD_TYPE= Debug
CONFIGURE_ARGS+= -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
.endif
.include <bsd.port.pre.mk>
_CFLAGS= ${CFLAGS} -DHAVE_POSIX_FALLOCATE=1
@@ -0,0 +1,11 @@
--- hphp/util/assertions.h.orig 2013-07-22 00:36:45.262881238 +0200
+++ hphp/util/assertions.h 2013-07-22 00:37:05.484417990 +0200
@@ -86,7 +86,7 @@
const char* file,
unsigned int line,
const char* func) {
-#if !defined(NDEBUG) && !defined(__APPLE__)
+#if !defined(NDEBUG) && !defined(__APPLE__) && !defined(__FreeBSD__)
__assert_fail(e, file, line, func);
#else
extern void impl_assert_fail(const char*,