From 6bd84f327af7e8a598bd3ab7c6a254fd1dd0a310 Mon Sep 17 00:00:00 2001 From: marino Date: Thu, 15 Dec 2011 08:33:44 +0000 Subject: graphics/vigra: Fix ambiguous math functions for DragonFly --- graphics/vigra/Makefile | 5 ++++- graphics/vigra/distinfo | 3 ++- graphics/vigra/patches/patch-include-vigra-mathutil.hxx | 17 +++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 graphics/vigra/patches/patch-include-vigra-mathutil.hxx (limited to 'graphics/vigra') diff --git a/graphics/vigra/Makefile b/graphics/vigra/Makefile index c7f32fb6dbb..eb61ac4ed8e 100644 --- a/graphics/vigra/Makefile +++ b/graphics/vigra/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.13 2011/10/16 17:47:49 adam Exp $ +# $NetBSD: Makefile,v 1.14 2011/12/15 08:33:44 marino Exp $ DISTNAME= vigra-1.8.0-src PKGNAME= ${DISTNAME:S/-src//} @@ -35,6 +35,9 @@ CHECK_INTERPRETER_SKIP= bin/vigra-config .include "options.mk" +post-patch: + ${RM} ${WRKSRC}/include/vigra/*.orig + .include "../../devel/zlib/buildlink3.mk" .include "../../graphics/openexr/buildlink3.mk" .include "../../graphics/png/buildlink3.mk" diff --git a/graphics/vigra/distinfo b/graphics/vigra/distinfo index 89ba28cc49d..ca0f29f3e5e 100644 --- a/graphics/vigra/distinfo +++ b/graphics/vigra/distinfo @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.6 2011/10/16 17:47:49 adam Exp $ +$NetBSD: distinfo,v 1.7 2011/12/15 08:33:44 marino Exp $ SHA1 (vigra-1.8.0-src.tar.gz) = 09f1d506c2748ebeb7d9f1c77ce387f9e7b837d2 RMD160 (vigra-1.8.0-src.tar.gz) = 99d781da6e0ca94ce3404e1bcb3adeb9e43a2017 Size (vigra-1.8.0-src.tar.gz) = 29814914 bytes +SHA1 (patch-include-vigra-mathutil.hxx) = 80e8645fef1a53ba4d29b23174567e24728e8829 diff --git a/graphics/vigra/patches/patch-include-vigra-mathutil.hxx b/graphics/vigra/patches/patch-include-vigra-mathutil.hxx new file mode 100644 index 00000000000..142690b6e22 --- /dev/null +++ b/graphics/vigra/patches/patch-include-vigra-mathutil.hxx @@ -0,0 +1,17 @@ +$NetBSD: patch-include-vigra-mathutil.hxx,v 1.1 2011/12/15 08:33:44 marino Exp $ + +--- include/vigra/mathutil.hxx.orig 2011-12-15 07:07:07.573857000 +0000 ++++ include/vigra/mathutil.hxx +@@ -553,7 +553,12 @@ VIGRA_DEFINE_NORM(int) + VIGRA_DEFINE_NORM(unsigned int) + VIGRA_DEFINE_NORM(long) + VIGRA_DEFINE_NORM(unsigned long) ++#if defined(__DragonFly__) ++inline NormTraits::SquaredNormType squaredNorm(long long t) { return sq((long int) t); } \ ++inline NormTraits::NormType norm(long long t) { return abs((long int) t); } ++#else + VIGRA_DEFINE_NORM(long long) ++#endif + VIGRA_DEFINE_NORM(unsigned long long) + VIGRA_DEFINE_NORM(float) + VIGRA_DEFINE_NORM(double) -- cgit v1.2.3