Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Dec 2015 14:03:30 +0000 (UTC)
From:      Raphael Kubo da Costa <rakuco@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r402987 - head/graphics/hugin/files
Message-ID:  <201512041403.tB4E3Usw044410@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rakuco
Date: Fri Dec  4 14:03:30 2015
New Revision: 402987
URL: https://svnweb.freebsd.org/changeset/ports/402987

Log:
  Fix the build on 9.x.
  
  Add a missing include so that the port builds on 9.3-{amd64,i386}:
  
    /wrkdirs/usr/ports/graphics/hugin/work/hugin-2015.0.0/src/hugin_cpfind/localfeatures/RansacFiltering.cpp: In function 'int genint(int)':
    /wrkdirs/usr/ports/graphics/hugin/work/hugin-2015.0.0/src/hugin_cpfind/localfeatures/RansacFiltering.cpp:28:31: error: 'rand' was not declared in this scope
         return (int)((double)rand()*x/(double)RAND_MAX);
                                 ^
    /wrkdirs/usr/ports/graphics/hugin/work/hugin-2015.0.0/src/hugin_cpfind/localfeatures/RansacFiltering.cpp:28:43: error: 'RAND_MAX' was not declared in this scope
         return (int)((double)rand()*x/(double)RAND_MAX);
                                             ^
  
  The quarterly branch is not affected, it still contains hugin 2013.0.0.
  
  Approved by:	portmgr blanket approval (trivial and tested build fix)

Added:
  head/graphics/hugin/files/patch-src_hugin__cpfind_localfeatures_RansacFiltering.cpp   (contents, props changed)

Added: head/graphics/hugin/files/patch-src_hugin__cpfind_localfeatures_RansacFiltering.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/hugin/files/patch-src_hugin__cpfind_localfeatures_RansacFiltering.cpp	Fri Dec  4 14:03:30 2015	(r402987)
@@ -0,0 +1,19 @@
+Fixes the build on 9.x:
+
+/wrkdirs/usr/ports/graphics/hugin/work/hugin-2015.0.0/src/hugin_cpfind/localfeatures/RansacFiltering.cpp: In function 'int genint(int)':
+/wrkdirs/usr/ports/graphics/hugin/work/hugin-2015.0.0/src/hugin_cpfind/localfeatures/RansacFiltering.cpp:28:31: error: 'rand' was not declared in this scope
+     return (int)((double)rand()*x/(double)RAND_MAX);
+                               ^
+/wrkdirs/usr/ports/graphics/hugin/work/hugin-2015.0.0/src/hugin_cpfind/localfeatures/RansacFiltering.cpp:28:43: error: 'RAND_MAX' was not declared in this scope
+     return (int)((double)rand()*x/(double)RAND_MAX);
+                                           ^
+--- src/hugin_cpfind/localfeatures/RansacFiltering.cpp.orig	2015-12-04 12:57:44 UTC
++++ src/hugin_cpfind/localfeatures/RansacFiltering.cpp
+@@ -20,6 +20,7 @@
+ 
+ #include "RansacFiltering.h"
+ #include "Homography.h"
++#include <stdlib.h>
+ 
+ using namespace std;
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512041403.tB4E3Usw044410>