[147472] trunk/dports/graphics/hugin-app

mojca at macports.org mojca at macports.org
Mon Apr 4 16:30:20 PDT 2016


Revision: 147472
          https://trac.macports.org/changeset/147472
Author:   mojca at macports.org
Date:     2016-04-04 16:30:19 -0700 (Mon, 04 Apr 2016)
Log Message:
-----------
hugin-app: upgrade to 2016.0.0 (#46721)

Modified Paths:
--------------
    trunk/dports/graphics/hugin-app/Portfile
    trunk/dports/graphics/hugin-app/files/patch-src-hugin1-icpfind-AutoCtrlPointCreator.cpp.diff

Added Paths:
-----------
    trunk/dports/graphics/hugin-app/files/patch-CMakeLists.txt.diff
    trunk/dports/graphics/hugin-app/files/patch-nocxx11.diff

Removed Paths:
-------------
    trunk/dports/graphics/hugin-app/files/patch-src-foreign-vigra-vigra-cachedfileimage.hxx.patch
    trunk/dports/graphics/hugin-app/files/patch-src-foreign-zthread-include-zthread-Guard.h.diff

Modified: trunk/dports/graphics/hugin-app/Portfile
===================================================================
--- trunk/dports/graphics/hugin-app/Portfile	2016-04-04 21:38:35 UTC (rev 147471)
+++ trunk/dports/graphics/hugin-app/Portfile	2016-04-04 23:30:19 UTC (rev 147472)
@@ -3,12 +3,14 @@
 
 PortSystem              1.0
 PortGroup               cmake 1.0
+# C++11 can be conditionally avoided by using an older version of vigra (1.9.0)
+# and a tiny patch below
+PortGroup               cxx11 1.0
 PortGroup               perl5 1.0
 PortGroup               wxWidgets 1.0
 
 name                    hugin-app
-version                 2013.0.0
-revision                9
+version                 2016.0.0
 set branch              [join [lrange [split ${version} .] 0 1] .]
 categories              graphics
 maintainers             nomaintainer
@@ -26,18 +28,18 @@
 distname                hugin-${version}
 use_bzip2               yes
 
-# Version 2013 doesn't find "CMakeModules/FindLensfun.cmake" with an out-of-source build
-# (to be reported upstream if the problem persists in new versions)
-#
-# CMake Error at CMakeModules/FindPackageHandleStandardArgs.cmake:51 (MESSAGE):
-#   Could not find REQUIRED package Lensfun
-cmake.out_of_source     no
+cmake.out_of_source     yes
 
 perl5.branches          5.22
 wxWidgets.use           wxWidgets-3.0
 
-depends_build-append    port:pkgconfig
-depends_lib             port:boost \
+checksums               rmd160  9d73e78accbfae2194b347d3d7f7c3932adc018a \
+                        sha256  b030b05b248b583cf9a26817f5b350303e3ce2c8bc4b43d45f697fbdf55b65e6
+
+depends_build-append    port:pkgconfig \
+                        port:p${perl5.major}-image-exiftool
+
+depends_lib-append      port:boost \
                         port:exiv2 \
                         port:flann \
                         port:gettext \
@@ -52,9 +54,12 @@
                         port:swig-python \
                         port:tclap \
                         port:tiff \
+                        port:vigra \
                         port:python27 \
                         port:${wxWidgets.port}
 
+depends_run             port:enblend \
+                        port:p${perl5.major}-image-exiftool
 
 # TODO dependencies:
 # - freeglut or glut, the OpenGL utility toolkit
@@ -69,30 +74,32 @@
 
 # TODO: try to see where MAC_SELF_CONTAINED_BUNDLE gets defined
 
-# patch-src-foreign-vigra-vigra-cachedfileimage.hxx.patch - https://bugs.launchpad.net/bugs/1213586
-# patch-src-foreign-zthread-include-zthread-Guard.h.diff  - https://bugs.launchpad.net/bugs/1213585
-# patch-src-hugin1-hugin1.pch.diff                        - moderately helps with compiler issues
-patchfiles              patch-src-foreign-vigra-vigra-cachedfileimage.hxx.patch \
-                        patch-src-foreign-zthread-include-zthread-Guard.h.diff \
+# patch-CMakeLists.txt.diff        - include the file declaring check_cxx_source_compiles (report upstream)
+# patch-src-hugin1-hugin1.pch.diff - moderately helps with compiler issues
+patchfiles              patch-CMakeLists.txt.diff \
                         patch-src-hugin1-hugin1.pch.diff \
                         patch-src-hugin1-icpfind-AutoCtrlPointCreator.cpp.diff
 
-depends_run             port:enblend \
-                        port:p${perl5.major}-image-exiftool
+# if C++11
+configure.args-append   -DCMAKE_CXX_FLAGS="-std=c++11"
+# else
+#patchfiles-append      patch-nocxx11.diff
 
-checksums               rmd160  73261aa925d6284c6950c84fbfdd77e8b0a2ee7d \
-                        sha256  484e1ed58fa6fe4bae1f423967101549345bcca2653b992afbc0ed9ec0dbebd5
+# nowadays Hugin is transitioning to C++11, so this list probably doesn't make much sense
+# Per (an old) README: "Hugin can be compiled with gcc-4.4.4, gcc-4.5.1, and gcc-4.6"
+#compiler.blacklist     gcc-* apple-gcc-* macports-gcc-4.2 macports-gcc-4.3
 
-# Per the README: "Hugin can be compiled with gcc-4.4.4, gcc-4.5.1, and gcc-4.6"
-compiler.blacklist      gcc-* apple-gcc-* macports-gcc-4.2 macports-gcc-4.3
+configure.env           PATH="${prefix}/libexec/perl${perl5.major}:$env(PATH)"
 
-# TODO: fix this
+# TODO:
+# - BOOST is most likely only needed when C++11 support is missing
 configure.args-append   -DINSTALL_OSX_BUNDLE_DIR=${applications_dir} \
                         -DPYTHON_EXECUTABLE=${frameworks_dir}/Python.framework/Versions/2.7/bin/python \
                         -DPYTHON_INCLUDE_DIR=${frameworks_dir}/Python.framework/Versions/2.7/include/python2.7 \
                         -DPYTHON_LIBRARY=${prefix}/lib/libpython2.7.dylib \
                         -DwxWidgets_CONFIG_EXECUTABLE=${wxWidgets.wxconfig} \
-                        -DwxWidgets_wxrc_EXECUTABLE=${wxWidgets.wxrc}
+                        -DwxWidgets_wxrc_EXECUTABLE=${wxWidgets.wxrc} \
+                        -DUSE_BOOST=ON -DBOOST_ROOT=${prefix}
 
 # prevents some compiler errors
 configure.cxxflags-append -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=0

Added: trunk/dports/graphics/hugin-app/files/patch-CMakeLists.txt.diff
===================================================================
--- trunk/dports/graphics/hugin-app/files/patch-CMakeLists.txt.diff	                        (rev 0)
+++ trunk/dports/graphics/hugin-app/files/patch-CMakeLists.txt.diff	2016-04-04 23:30:19 UTC (rev 147472)
@@ -0,0 +1,12 @@
+Report this upstream
+
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -280,6 +280,7 @@ IF(WIN32)
+ ENDIF(WIN32)
+ 
+ # check if we have C++17 <filesystem> header
++INCLUDE (CheckCXXSourceCompiles)
+ check_cxx_source_compiles(
+   "
+     #include <filesystem>

Added: trunk/dports/graphics/hugin-app/files/patch-nocxx11.diff
===================================================================
--- trunk/dports/graphics/hugin-app/files/patch-nocxx11.diff	                        (rev 0)
+++ trunk/dports/graphics/hugin-app/files/patch-nocxx11.diff	2016-04-04 23:30:19 UTC (rev 147472)
@@ -0,0 +1,40 @@
+At the moment hugin-app would still compile without proper C++11 support with a tiny patch
+(but probably not for much longer).
+
+--- src/hugin_base/hugin_utils/utils.h.orig
++++ src/hugin_base/hugin_utils/utils.h
+@@ -43,6 +43,23 @@
+ // on unix_like systems don't use CurrentTime, this is defined as a macro in X.h and breaks the debug messages
+ // on windows we can't use GetCurrentTime because this is replaced with GetTickCount
+ 
++const // It is a const object...
++class nullptr_t
++{
++  public:
++    template<class T>
++    inline operator T*() const // convertible to any type of null non-member pointer...
++    { return 0; }
++
++    template<class C, class T>
++    inline operator T C::*() const   // or any type of null member pointer...
++    { return 0; }
++
++  private:
++    void operator&() const;  // Can't take address of nullptr
++
++} nullptr = {};
++
+ #ifdef __GNUC__
+     // the full function name is too long..
+ //  #define DEBUG_HEADER hugin_utils::CurrentTime() <<" (" << __FILE__ << ":" << __LINE__ << ") "  << __PRETTY_FUNCTION__ << "()" << std::endl << "    "
+--- src/hugin_base/lensdb/LensDB.cpp.orig
++++ src/hugin_base/lensdb/LensDB.cpp
+@@ -844,7 +844,7 @@ public:
+         {
+             return false;
+         };
+-        std::ifstream input(filename);
++        std::ifstream input(filename.c_str());
+         if (input.is_open())
+         {
+             while (!input.eof())

Deleted: trunk/dports/graphics/hugin-app/files/patch-src-foreign-vigra-vigra-cachedfileimage.hxx.patch
===================================================================
--- trunk/dports/graphics/hugin-app/files/patch-src-foreign-vigra-vigra-cachedfileimage.hxx.patch	2016-04-04 21:38:35 UTC (rev 147471)
+++ trunk/dports/graphics/hugin-app/files/patch-src-foreign-vigra-vigra-cachedfileimage.hxx.patch	2016-04-04 23:30:19 UTC (rev 147472)
@@ -1,13 +0,0 @@
-upstream patch
-http://sourceforge.net/p/hugin/hugin/ci/752123441af3ca9d1977081b59f480b9a161247f/
---- src/foreign/vigra/vigra/cachedfileimage.hxx.orig
-+++ src/foreign/vigra/vigra/cachedfileimage.hxx
-@@ -554,7 +554,7 @@
- template <class T, class Notify>
- class NotifyingDirectionSelector<UnstridedArrayTag, T, Notify>
- {
--#ifdef __GNUC__
-+#if defined __GNUC__ && !defined __clang__
- friend class Notify::self_type;
- #else
- friend typename Notify::self_type;

Deleted: trunk/dports/graphics/hugin-app/files/patch-src-foreign-zthread-include-zthread-Guard.h.diff
===================================================================
--- trunk/dports/graphics/hugin-app/files/patch-src-foreign-zthread-include-zthread-Guard.h.diff	2016-04-04 21:38:35 UTC (rev 147471)
+++ trunk/dports/graphics/hugin-app/files/patch-src-foreign-zthread-include-zthread-Guard.h.diff	2016-04-04 23:30:19 UTC (rev 147472)
@@ -1,13 +0,0 @@
-upstream patch
-http://sourceforge.net/p/hugin/hugin/ci/e07f13ff32a0677de4181f470792dcf770864378/
---- src/foreign/zthread/include/zthread/Guard.h.orig
-+++ src/foreign/zthread/include/zthread/Guard.h
-@@ -108,7 +108,7 @@ class CompoundScope {
-   }
- 
-   template <class LockType>
--  static void createScope(LockHolder<LockType>& l, unsigned long ms) {
-+  static bool createScope(LockHolder<LockType>& l, unsigned long ms) {
- 
-     if(Scope1::createScope(l, ms))
-       if(!Scope2::createScope(l, ms)) {

Modified: trunk/dports/graphics/hugin-app/files/patch-src-hugin1-icpfind-AutoCtrlPointCreator.cpp.diff
===================================================================
--- trunk/dports/graphics/hugin-app/files/patch-src-hugin1-icpfind-AutoCtrlPointCreator.cpp.diff	2016-04-04 21:38:35 UTC (rev 147471)
+++ trunk/dports/graphics/hugin-app/files/patch-src-hugin1-icpfind-AutoCtrlPointCreator.cpp.diff	2016-04-04 23:30:19 UTC (rev 147472)
@@ -1,10 +1,12 @@
---- src/hugin1/icpfind/AutoCtrlPointCreator.cpp.orig	2013-10-27 04:19:02.000000000 -0500
-+++ src/hugin1/icpfind/AutoCtrlPointCreator.cpp	2013-11-26 00:09:46.000000000 -0600
+Report this upstream
+
+--- src/hugin1/icpfind/AutoCtrlPointCreator.cpp.orig
++++ src/hugin1/icpfind/AutoCtrlPointCreator.cpp
 @@ -28,7 +28,7 @@
  #include "panoinc.h"
  
  #include <fstream>
--#ifdef __GNUC__
+-#if defined (__GNUC__) && !defined (__FreeBSD__)
 +#if defined __GNUC__ && !defined __clang__
  #include <ext/stdio_filebuf.h>
  #endif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160404/6b7a3e2b/attachment.html>


More information about the macports-changes mailing list