From 1f75f86ea392ddb3dde3be9e1d9d9522cc71b267 Mon Sep 17 00:00:00 2001 From: kevlo Date: Mon, 13 Dec 2010 02:22:51 +0000 Subject: We have added support for log2() into base, so make the EXTRA_PATCHES on OSVERSION. --- devel/libdisorder/Makefile | 9 ++++++++- devel/libdisorder/files/extra-patch-disorder.c | 13 +++++++++++++ devel/libdisorder/files/patch-disorder.c | 13 ------------- 3 files changed, 21 insertions(+), 14 deletions(-) create mode 100644 devel/libdisorder/files/extra-patch-disorder.c delete mode 100644 devel/libdisorder/files/patch-disorder.c (limited to 'devel') diff --git a/devel/libdisorder/Makefile b/devel/libdisorder/Makefile index 9ddf428129fa..6d003a537ece 100644 --- a/devel/libdisorder/Makefile +++ b/devel/libdisorder/Makefile @@ -7,6 +7,7 @@ PORTNAME= libdisorder PORTVERSION= 0.0.2 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= http://libdisorder.freshdefense.net/releases/ @@ -15,6 +16,12 @@ COMMENT= A simple C library for entropy measurement USE_LDCONFIG= yes +.include + +.if ${OSVERSION} < 900027 +EXTRA_PATCHES= ${FILESDIR}/extra-patch-disorder.c +.endif + do-build: cd ${WRKSRC}/src && ${SETENV} ${MAKE_ENV} ${MAKE} @@ -28,4 +35,4 @@ do-install: post-install: ${LN} -sf ${PREFIX}/lib/libdisorder.so.1 ${PREFIX}/lib/libdisorder.so -.include +.include diff --git a/devel/libdisorder/files/extra-patch-disorder.c b/devel/libdisorder/files/extra-patch-disorder.c new file mode 100644 index 000000000000..4688ab9b59c7 --- /dev/null +++ b/devel/libdisorder/files/extra-patch-disorder.c @@ -0,0 +1,13 @@ +--- src/disorder.c.orig 2010-08-17 16:15:30.000000000 +0800 ++++ src/disorder.c 2010-08-17 16:22:27.000000000 +0800 +@@ -25,6 +25,10 @@ + #include //for NULL + #include "../include/disorder.h" + ++#if defined(__FreeBSD__) ++#define log2(x) (log((x)) * (1./M_LN2)) ++#endif ++ + /** Frequecies for each byte */ + static int m_token_freqs[LIBDO_MAX_BYTES]; //frequency of each token in sample + static float m_token_probs[LIBDO_MAX_BYTES]; //P(each token appearing) diff --git a/devel/libdisorder/files/patch-disorder.c b/devel/libdisorder/files/patch-disorder.c deleted file mode 100644 index 4688ab9b59c7..000000000000 --- a/devel/libdisorder/files/patch-disorder.c +++ /dev/null @@ -1,13 +0,0 @@ ---- src/disorder.c.orig 2010-08-17 16:15:30.000000000 +0800 -+++ src/disorder.c 2010-08-17 16:22:27.000000000 +0800 -@@ -25,6 +25,10 @@ - #include //for NULL - #include "../include/disorder.h" - -+#if defined(__FreeBSD__) -+#define log2(x) (log((x)) * (1./M_LN2)) -+#endif -+ - /** Frequecies for each byte */ - static int m_token_freqs[LIBDO_MAX_BYTES]; //frequency of each token in sample - static float m_token_probs[LIBDO_MAX_BYTES]; //P(each token appearing) -- cgit