aboutsummaryrefslogtreecommitdiff
path: root/graphics/panomatic
diff options
context:
space:
mode:
authorSteve Wills <swills@FreeBSD.org>2012-10-03 15:01:55 +0000
committerSteve Wills <swills@FreeBSD.org>2012-10-03 15:01:55 +0000
commit2dc83000f642298a849fe966a180a0c8ee240835 (patch)
treedb3990209c5445a0fb715f0597231295c512aa73 /graphics/panomatic
parentc208343cd0cd064149a281aafa4202b98f9ce834 (diff)
downloadports-2dc83000f642298a849fe966a180a0c8ee240835.tar.gz
ports-2dc83000f642298a849fe966a180a0c8ee240835.zip
Notes
Diffstat (limited to 'graphics/panomatic')
-rw-r--r--graphics/panomatic/Makefile4
-rw-r--r--graphics/panomatic/files/patch-libpng-include-png.h11
-rw-r--r--graphics/panomatic/files/patch-libpng-src-pngset.c11
-rw-r--r--graphics/panomatic/files/patch-panomatic-PanoDetector.cpp40
-rw-r--r--graphics/panomatic/files/patch-panomatic-PanoDetector.h40
-rw-r--r--graphics/panomatic/files/patch-panomatic-TestCode.h4
-rw-r--r--graphics/panomatic/files/patch-panomatic-main.cpp46
-rw-r--r--graphics/panomatic/files/patch-vigra-include-vigra-diff2d.hxx11
-rw-r--r--graphics/panomatic/files/patch-vigra-include-vigra-rational.hxx18
-rw-r--r--graphics/panomatic/files/patch-zthread-include-zthread-Guard.h43
-rw-r--r--graphics/panomatic/files/patch-zthread-src-ThreadQueue.cxx19
-rw-r--r--graphics/panomatic/files/patch-zthread-src-posix-ThreadOps.cxx11
12 files changed, 194 insertions, 64 deletions
diff --git a/graphics/panomatic/Makefile b/graphics/panomatic/Makefile
index 497fc8ddf529..a3d180a3d704 100644
--- a/graphics/panomatic/Makefile
+++ b/graphics/panomatic/Makefile
@@ -7,7 +7,7 @@
PORTNAME= panomatic
PORTVERSION= 0.9.4
CATEGORIES= graphics
-MASTER_SITES= http://people.esterdev.com/yury/bicycles/
+MASTER_SITES= SF
DISTNAME= ${PORTNAME}-${PORTVERSION}-src
MAINTAINER= ii@any.com.ru
@@ -17,8 +17,10 @@ BUILD_DEPENDS= bjam:${PORTSDIR}/devel/boost-jam \
${LOCALBASE}/include/boost/format.hpp:${PORTSDIR}/devel/boost-libs
GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --with-boost=${LOCALBASE}/include
USE_BZIP2= yes
USE_GMAKE= yes
+USE_DOS2UNIX= yes
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
diff --git a/graphics/panomatic/files/patch-libpng-include-png.h b/graphics/panomatic/files/patch-libpng-include-png.h
new file mode 100644
index 000000000000..33e1dbea6002
--- /dev/null
+++ b/graphics/panomatic/files/patch-libpng-include-png.h
@@ -0,0 +1,11 @@
+--- libpng/include/png.h.orig 2008-02-14 23:14:15.000000000 +0000
++++ libpng/include/png.h 2012-09-24 12:02:46.519169872 +0000
+@@ -2302,7 +2302,7 @@
+
+ #if defined(PNG_iCCP_SUPPORTED)
+ extern PNG_EXPORT(void,png_set_iCCP) PNGARG((png_structp png_ptr,
+- png_infop info_ptr, png_charp name, int compression_type,
++ png_infop info_ptr, png_const_charp name, int compression_type,
+ png_charp profile, png_uint_32 proflen));
+ /* Note to maintainer: profile should be png_bytep */
+ #endif
diff --git a/graphics/panomatic/files/patch-libpng-src-pngset.c b/graphics/panomatic/files/patch-libpng-src-pngset.c
new file mode 100644
index 000000000000..805f4e7e5d87
--- /dev/null
+++ b/graphics/panomatic/files/patch-libpng-src-pngset.c
@@ -0,0 +1,11 @@
+--- libpng/src/pngset.c.orig 2008-02-14 23:14:15.000000000 +0000
++++ libpng/src/pngset.c 2012-09-24 12:02:46.529117189 +0000
+@@ -672,7 +672,7 @@
+ #if defined(PNG_iCCP_SUPPORTED)
+ void PNGAPI
+ png_set_iCCP(png_structp png_ptr, png_infop info_ptr,
+- png_charp name, int compression_type,
++ png_const_charp name, int compression_type,
+ png_charp profile, png_uint_32 proflen)
+ {
+ png_charp new_iccp_name;
diff --git a/graphics/panomatic/files/patch-panomatic-PanoDetector.cpp b/graphics/panomatic/files/patch-panomatic-PanoDetector.cpp
index 3312d71e7aaa..9094481aefb2 100644
--- a/graphics/panomatic/files/patch-panomatic-PanoDetector.cpp
+++ b/graphics/panomatic/files/patch-panomatic-PanoDetector.cpp
@@ -1,22 +1,20 @@
---- panomatic/PanoDetector.cpp.orig 2008-03-10 21:17:33.000000000 +0100
-+++ panomatic/PanoDetector.cpp 2008-04-26 20:15:44.000000000 +0200
+--- panomatic/PanoDetector.cpp.orig 2008-03-10 20:17:33.000000000 +0000
++++ panomatic/PanoDetector.cpp 2012-09-24 12:02:46.529117189 +0000
@@ -26,7 +26,7 @@
- _sieve1Width(10), _sieve1Height(10), _sieve1Size(10),
- _kdTreeSearchSteps(40), _kdTreeSecondDistance(0.15), _sieve2Width(5), _sieve2Height(5),
- _sieve2Size(1), _test(false), _cores(utils::getCPUCount()), _ransacIters(1000), _ransacDistanceThres(25),
-- _minimumMatches(4), _linearMatch(false), _linearMatchLen(1), _downscale(true)
-+ _minimumMatches(4), _linearMatch(false), _linearMatchLen(1), _scale(0.5)
- {
-
- }
-@@ -67,8 +67,8 @@
- cout << "Output file : " << _outputFile << endl;
- cout << "Number of CPU : " << _cores << endl << endl;
- cout << "Input image options" << endl;
-- cout << " Downscale to half-size : " << (_downscale?"yes":"no") << endl;
-- cout << "SURF Options" << endl;
-+ cout << " Scale factor : " << _scale << endl;
-+ cout << "SURF Options" << endl;
- cout << " Extended : " << (_extendedSurf?"yes":"no") << endl;
- cout << " Score threshold : " << _surfScoreThreshold << endl;
- cout << "Sieve 1 Options" << endl;
+ _sieve1Width(10), _sieve1Height(10), _sieve1Size(10),
+ _kdTreeSearchSteps(40), _kdTreeSecondDistance(0.15), _sieve2Width(5), _sieve2Height(5),
+ _sieve2Size(1), _test(false), _cores(utils::getCPUCount()), _ransacIters(1000), _ransacDistanceThres(25),
+- _minimumMatches(4), _linearMatch(false), _linearMatchLen(1), _downscale(true)
++ _minimumMatches(4), _linearMatch(false), _linearMatchLen(1), _scale(0.5)
+ {
+
+ }
+@@ -67,7 +67,7 @@
+ cout << "Output file : " << _outputFile << endl;
+ cout << "Number of CPU : " << _cores << endl << endl;
+ cout << "Input image options" << endl;
+- cout << " Downscale to half-size : " << (_downscale?"yes":"no") << endl;
++ cout << " Scale factor : " << _scale << endl;
+ cout << "SURF Options" << endl;
+ cout << " Extended : " << (_extendedSurf?"yes":"no") << endl;
+ cout << " Score threshold : " << _surfScoreThreshold << endl;
diff --git a/graphics/panomatic/files/patch-panomatic-PanoDetector.h b/graphics/panomatic/files/patch-panomatic-PanoDetector.h
index 3a7bc1ac647e..38a842634eaf 100644
--- a/graphics/panomatic/files/patch-panomatic-PanoDetector.h
+++ b/graphics/panomatic/files/patch-panomatic-PanoDetector.h
@@ -1,22 +1,22 @@
---- panomatic/PanoDetector.h.orig 2008-03-10 21:17:33.000000000 +0100
-+++ panomatic/PanoDetector.h 2008-04-26 20:20:01.000000000 +0200
+--- panomatic/PanoDetector.h.orig 2008-03-10 20:17:33.000000000 +0000
++++ panomatic/PanoDetector.h 2012-09-24 12:02:46.529117189 +0000
@@ -84,8 +84,8 @@
- inline bool getLinearMatch() const { return _linearMatch; }
- inline int getLinearMatchLen() const { return _linearMatchLen; }
-
-- inline bool getDownscale() const { return _downscale; }
-- inline void setDownscale(bool iDown) { _downscale = iDown; }
-+ inline float getScale() const { return _scale; }
-+ inline void setScale(float iScale) { _scale = iScale; }
-
-
- inline void addFile(const std::string& iFile) { _files.push_back(iFile); }
+ inline bool getLinearMatch() const { return _linearMatch; }
+ inline int getLinearMatchLen() const { return _linearMatchLen; }
+
+- inline bool getDownscale() const { return _downscale; }
+- inline void setDownscale(bool iDown) { _downscale = iDown; }
++ inline float getScale() const { return _scale; }
++ inline void setScale(float iScale) { _scale = iScale; }
+
+
+ inline void addFile(const std::string& iFile) { _files.push_back(iFile); }
@@ -126,7 +126,7 @@
-
- bool _test;
- int _cores;
-- bool _downscale;
-+ float _scale;
-
- // list of files
- FileNameList_t _files;
+
+ bool _test;
+ int _cores;
+- bool _downscale;
++ float _scale;
+
+ // list of files
+ FileNameList_t _files;
diff --git a/graphics/panomatic/files/patch-panomatic-TestCode.h b/graphics/panomatic/files/patch-panomatic-TestCode.h
index f8ab02ef1ac4..58972e3647ec 100644
--- a/graphics/panomatic/files/patch-panomatic-TestCode.h
+++ b/graphics/panomatic/files/patch-panomatic-TestCode.h
@@ -2,8 +2,8 @@
+++ panomatic/TestCode.h 2008-04-26 20:21:56.000000000 +0200
@@ -29,7 +29,7 @@
{
- public:
- static void drawRansacMatches(std::string& i1, std::string& i2,
+ public:
+ static void drawRansacMatches(std::string& i1, std::string& i2,
- PointMatchVector_t& iOK, PointMatchVector_t& iNOK, Ransac& iRansac, bool iHalf);
+ PointMatchVector_t& iOK, PointMatchVector_t& iNOK, Ransac& iRansac, float iScale);
diff --git a/graphics/panomatic/files/patch-panomatic-main.cpp b/graphics/panomatic/files/patch-panomatic-main.cpp
index f25f34dc29ea..2cf9c17b49f3 100644
--- a/graphics/panomatic/files/patch-panomatic-main.cpp
+++ b/graphics/panomatic/files/patch-panomatic-main.cpp
@@ -1,22 +1,28 @@
---- panomatic/main.cpp.orig 2008-03-10 21:19:09.000000000 +0100
-+++ panomatic/main.cpp 2008-04-26 20:26:30.000000000 +0200
+--- panomatic/main.cpp.orig 2008-03-10 20:19:09.000000000 +0000
++++ panomatic/main.cpp 2012-09-24 12:02:46.529117189 +0000
@@ -92,6 +92,7 @@
- MyOutput my;
- cmd.setOutput(&my);
-
+ MyOutput my;
+ cmd.setOutput(&my);
+
+ ValueArg<float> aArgScale("","scale", "Scale image with factor to detect keypoints (default:0.5)\n", false, 0.5, "float");
- SwitchArg aArgFullScale("","fullscale", "Uses full scale image to detect keypoints (default:false)\n", false);
- SwitchArg aArgSurfExtended("","surf128", "Uses extended SURF (128 descriptors) (default:true)", true);
- ValueArg<int> aArgSurfScoreThreshold("","surfscore", "SURF Detection score threshold (default : 1000)\n", false, 1000, "int");
-@@ -175,8 +176,9 @@
- if (aArgSieve2Size.isSet()) ioPanoDetector.setSieve2Size(aArgSieve2Size.getValue());
- if (aArgLinearMatch.isSet()) ioPanoDetector.setLinearMatch(aArgLinearMatch.getValue());
- if (aArgLinearMatchLen.isSet()) ioPanoDetector.setLinearMatchLen(aArgLinearMatchLen.getValue());
-- if (aArgFullScale.isSet()) ioPanoDetector.setDownscale(false);
--
-+ if (aArgFullScale.isSet()) ioPanoDetector.setScale(1.);
-+ if (aArgScale.isSet()) ioPanoDetector.setScale(aArgScale.getValue());
-+
- if (aArgTest.isSet()) ioPanoDetector.setTest(aArgTest.getValue());
- if (aArgCores.isSet()) ioPanoDetector.setCores(aArgCores.getValue());
-
+ SwitchArg aArgFullScale("","fullscale", "Uses full scale image to detect keypoints (default:false)\n", false);
+ SwitchArg aArgSurfExtended("","surf128", "Uses extended SURF (128 descriptors) (default:true)", true);
+ ValueArg<int> aArgSurfScoreThreshold("","surfscore", "SURF Detection score threshold (default : 1000)\n", false, 1000, "int");
+@@ -130,6 +131,7 @@
+ cmd.add(aArgSurfScoreThreshold);
+ cmd.add(aArgSurfExtended);
+ cmd.add(aArgFullScale);
++ cmd.add(aArgScale);
+
+ //cmd.add( aArgSurfExtended );
+
+@@ -175,7 +177,8 @@
+ if (aArgSieve2Size.isSet()) ioPanoDetector.setSieve2Size(aArgSieve2Size.getValue());
+ if (aArgLinearMatch.isSet()) ioPanoDetector.setLinearMatch(aArgLinearMatch.getValue());
+ if (aArgLinearMatchLen.isSet()) ioPanoDetector.setLinearMatchLen(aArgLinearMatchLen.getValue());
+- if (aArgFullScale.isSet()) ioPanoDetector.setDownscale(false);
++ if (aArgFullScale.isSet()) ioPanoDetector.setScale(1.);
++ if (aArgScale.isSet()) ioPanoDetector.setScale(aArgScale.getValue());
+
+ if (aArgTest.isSet()) ioPanoDetector.setTest(aArgTest.getValue());
+ if (aArgCores.isSet()) ioPanoDetector.setCores(aArgCores.getValue());
diff --git a/graphics/panomatic/files/patch-vigra-include-vigra-diff2d.hxx b/graphics/panomatic/files/patch-vigra-include-vigra-diff2d.hxx
new file mode 100644
index 000000000000..f5565d81d50a
--- /dev/null
+++ b/graphics/panomatic/files/patch-vigra-include-vigra-diff2d.hxx
@@ -0,0 +1,11 @@
+--- vigra/include/vigra/diff2d.hxx.orig 2008-02-14 23:14:15.000000000 +0000
++++ vigra/include/vigra/diff2d.hxx 2012-09-24 12:02:46.539117586 +0000
+@@ -1131,7 +1131,7 @@
+ bool contains(Rect2D const &r) const
+ {
+ return r.isEmpty() ||
+- contains(r.upperLeft()) && contains(r.lowerRight()-Diff2D(1,1));
++ (contains(r.upperLeft()) && contains(r.lowerRight()-Diff2D(1,1)));
+ }
+
+ /** Return whether this rectangle overlaps with the given
diff --git a/graphics/panomatic/files/patch-vigra-include-vigra-rational.hxx b/graphics/panomatic/files/patch-vigra-include-vigra-rational.hxx
new file mode 100644
index 000000000000..c2f5920549c1
--- /dev/null
+++ b/graphics/panomatic/files/patch-vigra-include-vigra-rational.hxx
@@ -0,0 +1,18 @@
+--- vigra/include/vigra/rational.hxx.orig 2008-02-14 23:14:15.000000000 +0000
++++ vigra/include/vigra/rational.hxx 2012-09-24 12:02:46.539117586 +0000
+@@ -1015,6 +1015,7 @@
+ // Handle the easy cases. Take advantage of the fact
+ // that the denominator is never negative.
+ if(l.denominator() == zero)
++ {
+ if(r.denominator() == zero)
+ // -inf < inf, !(-inf < -inf), !(inf < -inf), !(inf < inf)
+ return l.numerator() < r.numerator();
+@@ -1022,6 +1023,7 @@
+ // -inf < -1, -inf < 0, -inf < 1
+ // !(inf < -1), !(inf < 0), !(inf < 1)
+ return l.numerator() < zero;
++ }
+ if(r.denominator() == zero)
+ // -1 < inf, 0 < inf, 1 < inf
+ // !(-1 < -inf), !(0 < -inf), !(1 < -inf)
diff --git a/graphics/panomatic/files/patch-zthread-include-zthread-Guard.h b/graphics/panomatic/files/patch-zthread-include-zthread-Guard.h
new file mode 100644
index 000000000000..d9090a77ce5e
--- /dev/null
+++ b/graphics/panomatic/files/patch-zthread-include-zthread-Guard.h
@@ -0,0 +1,43 @@
+--- zthread/include/zthread/Guard.h.orig 2008-02-28 23:15:33.000000000 +0000
++++ zthread/include/zthread/Guard.h 2012-09-24 12:02:46.539117586 +0000
+@@ -58,7 +58,7 @@
+ public:
+
+ template <class T>
+- LockHolder(T& t) : _lock(extract(t)._lock), _enabled(true) { }
++ LockHolder(T& t) : _lock(this->extract(t)._lock), _enabled(true) { }
+
+ LockHolder(LockHolder& holder) : _lock(holder._lock), _enabled(true) { }
+
+@@ -114,11 +114,11 @@
+ if(!Scope2::createScope(l, ms)) {
+
+ Scope1::destroyScope(l);
+- return false;
++ return;
+
+ }
+
+- return true;
++ return;
+
+ }
+
+@@ -428,7 +428,7 @@
+ template <class U, class V>
+ Guard(Guard<U, V>& g) : LockHolder<LockType>(g) {
+
+- LockingPolicy::shareScope(*this, extract(g));
++ LockingPolicy::shareScope(*this, this->extract(g));
+
+ }
+
+@@ -458,7 +458,7 @@
+ template <class U, class V>
+ Guard(Guard<U, V>& g, LockType& lock) : LockHolder<LockType>(lock) {
+
+- LockingPolicy::transferScope(*this, extract(g));
++ LockingPolicy::transferScope(*this, this->extract(g));
+
+ }
+
diff --git a/graphics/panomatic/files/patch-zthread-src-ThreadQueue.cxx b/graphics/panomatic/files/patch-zthread-src-ThreadQueue.cxx
new file mode 100644
index 000000000000..44d7e1fbc223
--- /dev/null
+++ b/graphics/panomatic/files/patch-zthread-src-ThreadQueue.cxx
@@ -0,0 +1,19 @@
+--- zthread/src/ThreadQueue.cxx.orig 2008-02-28 22:51:46.000000000 +0000
++++ zthread/src/ThreadQueue.cxx 2012-09-24 12:02:46.539117586 +0000
+@@ -139,11 +139,13 @@
+
+ // Wake the main thread,if its waiting, when the last pending-thread becomes available;
+ // Otherwise, take note that no wait for pending threads to finish is needed
+- if(_userThreads.empty())
+- if(_waiter && _waiter != (ThreadImpl*)1)
++ if(_userThreads.empty()) {
++ if(_waiter && _waiter != (ThreadImpl*)1) {
+ _waiter->getMonitor().notify();
+- else
++ } else {
+ _waiter = (ThreadImpl*)!_waiter;
++ }
++ }
+
+ ZTDEBUG("1 pending-thread added.\n");
+
diff --git a/graphics/panomatic/files/patch-zthread-src-posix-ThreadOps.cxx b/graphics/panomatic/files/patch-zthread-src-posix-ThreadOps.cxx
new file mode 100644
index 000000000000..78825e983bb1
--- /dev/null
+++ b/graphics/panomatic/files/patch-zthread-src-posix-ThreadOps.cxx
@@ -0,0 +1,11 @@
+--- zthread/src/posix/ThreadOps.cxx.orig 2008-02-28 22:51:46.000000000 +0000
++++ zthread/src/posix/ThreadOps.cxx 2012-09-24 12:02:46.539117586 +0000
+@@ -103,7 +103,7 @@
+ struct sched_param param;
+ int policy = SCHED_OTHER;
+
+- if(result = (pthread_getschedparam(impl->_tid, &policy, &param) == 0)) {
++ if((result = (pthread_getschedparam(impl->_tid, &policy, &param) == 0))) {
+
+ // Convert to one of the PRIORITY values
+ if(param.sched_priority < 10)