diff options
author | Rong-En Fan <rafan@FreeBSD.org> | 2006-10-21 10:12:31 +0000 |
---|---|---|
committer | Rong-En Fan <rafan@FreeBSD.org> | 2006-10-21 10:12:31 +0000 |
commit | a496109e19f7386588ed829aed802ae68537bb17 (patch) | |
tree | 9070ab01f374ac28c07b717bfa256216a1fee199 /graphics/yafray | |
parent | Unbreak, chase updated binaries (diff) |
- Unbreak on system < 7.x by using malloc(3)
- Remove optimized cflags until other scons based ports play nice with them
PR: ports/104542
Submitted by: David Yeske <dyeske at yahoo.com> (maintainer)
Approved by: portmgr (erwin)
Notes
Notes:
svn path=/head/; revision=175467
Diffstat (limited to 'graphics/yafray')
-rw-r--r-- | graphics/yafray/Makefile | 14 | ||||
-rw-r--r-- | graphics/yafray/files/patch-src_yafraycore_y_alloc.h | 21 |
2 files changed, 20 insertions, 15 deletions
diff --git a/graphics/yafray/Makefile b/graphics/yafray/Makefile index 9e504aa4bad7..6ed07ac60ac1 100644 --- a/graphics/yafray/Makefile +++ b/graphics/yafray/Makefile @@ -20,20 +20,10 @@ USE_LDCONFIG= yes WRKSRC= ${WRKDIR}/${PORTNAME} -.if defined(WITH_OPTIMIZED_CFLAGS) -CFLAGS+= -O3 -ffast-math -.endif - -pre-everything:: -.if !defined(WITH_OPTIMIZED_CFLAGS) - @${ECHO_MSG} "You can enable additional compilation optimizations" - @${ECHO_MSG} "by defining WITH_OPTIMIZED_CFLAGS" -.endif - .include <bsd.port.pre.mk> -.if ${OSVERSION} < 700014 -BROKEN= depends on posix_memalign(3) +.if ${OSVERSION} < 500000 +BROKEN= Does not compile on 4.x .endif pre-patch: diff --git a/graphics/yafray/files/patch-src_yafraycore_y_alloc.h b/graphics/yafray/files/patch-src_yafraycore_y_alloc.h index e45f3b6b2172..25b0823c6c25 100644 --- a/graphics/yafray/files/patch-src_yafraycore_y_alloc.h +++ b/graphics/yafray/files/patch-src_yafraycore_y_alloc.h @@ -1,24 +1,39 @@ --- src/yafraycore/y_alloc.h.orig Thu Jul 13 12:35:02 2006 -+++ src/yafraycore/y_alloc.h Tue Sep 19 03:33:32 2006 ++++ src/yafraycore/y_alloc.h Tue Oct 17 14:55:47 2006 @@ -5,7 +5,7 @@ #include<config.h> #endif -#ifdef __APPLE__ -+#ifdef __FreeBSD__ ++#if defined(__APPLE__) || defined (__FreeBSD__) #include <stdlib.h> #else #include <malloc.h> -@@ -26,6 +26,12 @@ +@@ -13,6 +13,10 @@ + #include <vector> + #include <algorithm> + ++#if defined(__FreeBSD__) ++#include <sys/param.h> ++#endif ++ + __BEGIN_YAFRAY + + typedef unsigned int u_int32; +@@ -26,6 +30,16 @@ // however, malloc is supposed to return at least SSE2 compatible alignment, which has to be enough. // alternative would be valloc, but i have no good info on its effects. return malloc(size); +#elif defined(__FreeBSD__) ++#if (__FreeBSD_version < 700014) ++ return malloc(size); ++#else + void *ret; + if (posix_memalign(&ret, bound, size) != 0) + return (NULL); + else + return (ret); ++#endif #else return memalign(bound, size); #endif |