summaryrefslogtreecommitdiff
path: root/graphics/autopano-sift-C
diff options
context:
space:
mode:
authorjperkin <jperkin>2016-04-14 11:46:39 +0000
committerjperkin <jperkin>2016-04-14 11:46:39 +0000
commit7286c60af625058ca8a28440bc4c6b915b273eae (patch)
treea40aa3667aa99b603a8e5bdb4f59a5abda3dc663 /graphics/autopano-sift-C
parent1f71504d3ea993c87103c82c89ddf1bfe3c19e43 (diff)
downloadpkgsrc-7286c60af625058ca8a28440bc4c6b915b273eae.tar.gz
Don't redefine ERR. Add -lm on SunOS.
Diffstat (limited to 'graphics/autopano-sift-C')
-rw-r--r--graphics/autopano-sift-C/Makefile3
-rw-r--r--graphics/autopano-sift-C/distinfo3
-rw-r--r--graphics/autopano-sift-C/patches/patch-APSCpp_ANN_kd__split.cpp33
3 files changed, 37 insertions, 2 deletions
diff --git a/graphics/autopano-sift-C/Makefile b/graphics/autopano-sift-C/Makefile
index 3a69fc26845..b0cb492719c 100644
--- a/graphics/autopano-sift-C/Makefile
+++ b/graphics/autopano-sift-C/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 2014/07/09 00:39:33 obache Exp $
+# $NetBSD: Makefile,v 1.17 2016/04/14 11:46:39 jperkin Exp $
DISTNAME= autopano-sift-C-2.5.1
PKGREVISION= 9
@@ -16,6 +16,7 @@ USE_LANGUAGES= c c++
USE_LIBTOOL= yes
LDFLAGS.DragonFly= -lm
+LDFLAGS.SunOS= -lm
# work-around finding libpng
post-extract:
diff --git a/graphics/autopano-sift-C/distinfo b/graphics/autopano-sift-C/distinfo
index 81f07933e96..65e80b069f1 100644
--- a/graphics/autopano-sift-C/distinfo
+++ b/graphics/autopano-sift-C/distinfo
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.3 2015/11/03 21:33:52 agc Exp $
+$NetBSD: distinfo,v 1.4 2016/04/14 11:46:39 jperkin Exp $
SHA1 (autopano-sift-C-2.5.1.tar.gz) = f8c5f4004ae51cb58acc5cedb065ae0ef3e19a8c
RMD160 (autopano-sift-C-2.5.1.tar.gz) = e51d996cdc7dcae3abde22878fe76ff904c55950
SHA512 (autopano-sift-C-2.5.1.tar.gz) = 4f3c9e8738c7bc29ff6284033b7b813de61ef440c3d544755be8c4ad715a6e4175801ee4c02642df5e05bac82929c5554d85a5c488a2c27da1e5e81d3cd72931
Size (autopano-sift-C-2.5.1.tar.gz) = 192267 bytes
+SHA1 (patch-APSCpp_ANN_kd__split.cpp) = 86e6a31fea8cb7a67245481ea911de1f01839851
SHA1 (patch-aa) = 7f5fbf5a7b0b9e9f936a4d3883b9415d421b2cc5
diff --git a/graphics/autopano-sift-C/patches/patch-APSCpp_ANN_kd__split.cpp b/graphics/autopano-sift-C/patches/patch-APSCpp_ANN_kd__split.cpp
new file mode 100644
index 00000000000..75088db7909
--- /dev/null
+++ b/graphics/autopano-sift-C/patches/patch-APSCpp_ANN_kd__split.cpp
@@ -0,0 +1,33 @@
+$NetBSD: patch-APSCpp_ANN_kd__split.cpp,v 1.1 2016/04/14 11:46:39 jperkin Exp $
+
+Avoid redefining ERR.
+
+--- APSCpp/ANN/kd_split.cpp.orig 2009-10-06 20:51:08.000000000 +0000
++++ APSCpp/ANN/kd_split.cpp
+@@ -31,7 +31,7 @@
+ // Constants
+ //----------------------------------------------------------------------
+
+-const double ERR = 0.001; // a small value
++const double MYERR = 0.001; // a small value
+ const double FS_ASPECT_RATIO = 3.0; // maximum allowed aspect ratio
+ // in fair split. Must be >= 2.
+
+@@ -95,7 +95,7 @@ void midpt_split(
+ ANNcoord max_spread = -1; // find long side with most spread
+ for (d = 0; d < dim; d++) {
+ // is it among longest?
+- if (double(bnds.hi[d] - bnds.lo[d]) >= (1-ERR)*max_length) {
++ if (double(bnds.hi[d] - bnds.lo[d]) >= (1-MYERR)*max_length) {
+ // compute its spread
+ ANNcoord spr = annSpread(pa, pidx, n, d);
+ if (spr > max_spread) { // is it max so far?
+@@ -165,7 +165,7 @@ void sl_midpt_split(
+ ANNcoord max_spread = -1; // find long side with most spread
+ for (d = 0; d < dim; d++) {
+ // is it among longest?
+- if ((bnds.hi[d] - bnds.lo[d]) >= (1-ERR)*max_length) {
++ if ((bnds.hi[d] - bnds.lo[d]) >= (1-MYERR)*max_length) {
+ // compute its spread
+ ANNcoord spr = annSpread(pa, pidx, n, d);
+ if (spr > max_spread) { // is it max so far?