summaryrefslogtreecommitdiff
path: root/graphics/hugin
diff options
context:
space:
mode:
authoradam <adam@pkgsrc.org>2015-10-18 15:56:56 +0000
committeradam <adam@pkgsrc.org>2015-10-18 15:56:56 +0000
commit12f99bb9b01dcf34299720a4acde095640fb2c34 (patch)
treed3c691efbb81c7d7650af56f80906e9277263a19 /graphics/hugin
parentb9d3413be0ed25bb274c708495795248e5b09067 (diff)
downloadpkgsrc-12f99bb9b01dcf34299720a4acde095640fb2c34.tar.gz
Changes 2015.0.0:
Hugin 2015.0 has a number of new features. Most of the changes are under the hood to improve stability, allow easier maintenance and easier addition of new features. The makefile based stitching engine has been replaced with direct calls to the underlying programs. This should reduce the overhead of calling the same program too often and so speed up the whole process. Hopefully this also allows the usage of more unusual characters in the filename. Instead of pto2mk and make we now have hugin_executor which can also be used for running the assistant from the command line. Hugin now has it's own blender, verdandi, based on a watershed algorithm, which has been included in 'nona'. verdandi can be chosen as the blender by choosing "builtin" in the stitcher tab, and can also be set in the Preferences. verdandi can also be called as a command line tool. The lensfun library has been removed as it did not fulfill our expectations. It has been replaced with our own camera and lens database which uses a data mining approach and operates automatically without user intervention. Geometric distortion and vignetting data have to be loaded manually. The fast preview window has a new tool to add or remove control points to selected areas in the output projection. Automatic exposure stack detection is now applied when loading images, and an option has been added to unlink image position when adding stacks. The fine-tune and auto-estimate functions in the control point tab have been made projection aware. It should now work also with images with different fov or different projections. The fine-tune feature has had a significant speed up when Hugin is compiled with the libfftw3 library (optional). PTBatcherGUI has more choice for the end of the process: depending on the operating system the PTBatcherGUI can be closed, the computer can be shut down or send to the hibernate mode. PTBatcherGUI now shows the thumbnails when searching for images in directories. Many of the underlying tools in hugin are now able to use available cpu cores.
Diffstat (limited to 'graphics/hugin')
-rw-r--r--graphics/hugin/Makefile44
-rw-r--r--graphics/hugin/distinfo27
-rw-r--r--graphics/hugin/patches/patch-CMakeLists.txt (renamed from graphics/hugin/patches/patch-ac)11
-rw-r--r--graphics/hugin/patches/patch-CMakeModules_FindGLUT.cmake18
-rw-r--r--graphics/hugin/patches/patch-CMakeModules_FindPNG.cmake15
-rw-r--r--graphics/hugin/patches/patch-ab12
-rw-r--r--graphics/hugin/patches/patch-doc_deghosting_mask.pod13
-rw-r--r--graphics/hugin/patches/patch-src_celeste_Utilities.cpp12
-rw-r--r--graphics/hugin/patches/patch-src_foreign_vigra_vigra__impex_png_cxx286
-rw-r--r--graphics/hugin/patches/patch-src_foreign_vigra_vigra_cachedfileimage.hxx17
-rw-r--r--graphics/hugin/patches/patch-src_foreign_zthread_include_zthread_Guard.h22
-rw-r--r--graphics/hugin/patches/patch-src_hugin1_base__wx_StitchingExecutor.cpp17
-rw-r--r--graphics/hugin/patches/patch-src_hugin1_base__wx_wxPanoCommand.cpp24
-rw-r--r--graphics/hugin/patches/patch-src_hugin1_calibrate__lens_LensCalFrame.cpp22
-rw-r--r--graphics/hugin/patches/patch-src_hugin1_icpfind_AutoCtrlPointCreator.cpp15
-rw-r--r--graphics/hugin/patches/patch-src_hugin1_ptbatcher_BatchFrame.cpp18
-rw-r--r--graphics/hugin/patches/patch-src_tools_align_image_stack.cpp24
-rw-r--r--graphics/hugin/patches/patch-src_tools_tca__correct.cpp24
18 files changed, 225 insertions, 396 deletions
diff --git a/graphics/hugin/Makefile b/graphics/hugin/Makefile
index c59553926f9..27c25269946 100644
--- a/graphics/hugin/Makefile
+++ b/graphics/hugin/Makefile
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.55 2015/06/12 10:50:10 wiz Exp $
+# $NetBSD: Makefile,v 1.56 2015/10/18 15:56:56 adam Exp $
-DISTNAME= hugin-2010.4.0
-PKGREVISION= 38
+DISTNAME= hugin-2015.0.0
CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=hugin/}
EXTRACT_SUFX= .tar.bz2
@@ -9,10 +8,8 @@ EXTRACT_SUFX= .tar.bz2
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://hugin.sourceforge.net/
COMMENT= Panorama photo stitcher
-
LICENSE= gnu-gpl-v2
-DEPENDS+= autopano-sift-C>=2.5.1:../../graphics/autopano-sift-C
DEPENDS+= enblend-enfuse>=4.0:../../graphics/enblend-enfuse
DEPENDS+= p5-Image-ExifTool>=8.15:../../graphics/p5-Image-ExifTool
@@ -21,34 +18,31 @@ USE_LANGUAGES= c c++
USE_LIBTOOL= yes
USE_TOOLS+= msgfmt pkg-config
-# Workaround for a bug(?) in cmake. CXX_FLAGS will end containing
-# '-pthread;-D_THREAD_SAFE' Happens at least on FreeBSD and DragonFly.
-SUBST_CLASSES+= pthread
-SUBST_STAGE.pthread= post-configure
-SUBST_FILES.pthread= \
- ${WRKSRC}/src/hugin1/hugin/CMakeFiles/hugin.dir/flags.make \
- ${WRKSRC}/src/hugin1/hugin/CMakeFiles/hugin.dir/link.txt \
- ${WRKSRC}/src/hugin1/base_wx/CMakeFiles/huginbasewx.dir/flags.make \
- ${WRKSRC}/src/hugin1/stitch_project/CMakeFiles/hugin_stitch_project.dir/flags.make \
- ${WRKSRC}/src/hugin1/stitch_project/CMakeFiles/hugin_stitch_project.dir/link.txt \
- ${WRKSRC}/src/hugin1/nona_gui/CMakeFiles/nona_gui.dir/flags.make \
- ${WRKSRC}/src/hugin1/nona_gui/CMakeFiles/nona_gui.dir/link.txt \
- ${WRKSRC}/src/hugin1/ptbatcher/CMakeFiles/PTBatcher.dir/flags.make \
- ${WRKSRC}/src/hugin1/ptbatcher/CMakeFiles/PTBatcher.dir/link.txt \
- ${WRKSRC}/src/hugin1/ptbatcher/CMakeFiles/PTBatcherGUI.dir/flags.make \
- ${WRKSRC}/src/hugin1/ptbatcher/CMakeFiles/PTBatcherGUI.dir/link.txt
-SUBST_SED.pthread= -e 's|-pthread;-D_THREAD_SAFE|-pthread -D_THREAD_SAFE|g'
+CMAKE_ARGS+= -DBUILD_HSI=OFF
+
+SUBST_CLASSES+= apple
+SUBST_MESSAGE.apple= Avoiding Mac OS X application bundles
+SUBST_STAGE.apple= pre-configure
+SUBST_FILES.apple= src/hugin1/hugin/CMakeLists.txt
+SUBST_FILES.apple+= src/hugin1/ptbatcher/CMakeLists.txt
+SUBST_FILES.apple+= src/hugin1/icpfind/CMakeLists.txt
+SUBST_FILES.apple+= src/hugin1/stitch_project/CMakeLists.txt
+SUBST_SED.apple= -e 's,(APPLE),(ELPPA),g'
.include "../../devel/boost-headers/buildlink3.mk"
.include "../../devel/boost-libs/buildlink3.mk"
+.include "../../devel/swig2/buildlink3.mk"
+.include "../../devel/tclap/buildlink3.mk"
.include "../../graphics/exiv2/buildlink3.mk"
.include "../../graphics/glew/buildlink3.mk"
.include "../../graphics/glut/buildlink3.mk"
.include "../../graphics/gnome-icon-theme/buildlink3.mk"
+.include "../../graphics/lensfun/buildlink3.mk"
.include "../../graphics/libpano13/buildlink3.mk"
.include "../../graphics/openexr/buildlink3.mk"
+.include "../../graphics/vigra/buildlink3.mk"
+#.include "../../lang/python/extension.mk"
+.include "../../math/fftw/buildlink3.mk"
.include "../../sysutils/desktop-file-utils/desktopdb.mk"
-.if ${OPSYS} != "Darwin"
-.include "../../x11/wxGTK28/buildlink3.mk"
-.endif
+.include "../../x11/wxGTK30/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/hugin/distinfo b/graphics/hugin/distinfo
index 4a42746b25f..5718810b2a4 100644
--- a/graphics/hugin/distinfo
+++ b/graphics/hugin/distinfo
@@ -1,12 +1,17 @@
-$NetBSD: distinfo,v 1.12 2014/12/27 02:46:40 dholland Exp $
+$NetBSD: distinfo,v 1.13 2015/10/18 15:56:56 adam Exp $
-SHA1 (hugin-2010.4.0.tar.bz2) = 47f25c0a8b97c27108e567bcd22203c87f268d07
-RMD160 (hugin-2010.4.0.tar.bz2) = f97b8d37470443eb81c3e915e5f5efa91227b135
-Size (hugin-2010.4.0.tar.bz2) = 11009978 bytes
-SHA1 (patch-ab) = 54f574d677b37569d4269efda5f0f2c6ab23432a
-SHA1 (patch-ac) = aac60aa6d3b99a632fce03749660e10ea82ad028
-SHA1 (patch-src_celeste_Utilities.cpp) = e25f3f971745be18d4752523529a96146d1dc259
-SHA1 (patch-src_foreign_vigra_vigra__impex_png_cxx) = 43ee756664ca8232b3006b76f12fb8ef55711575
-SHA1 (patch-src_foreign_vigra_vigra_cachedfileimage.hxx) = 7024471019e977f83a95d0a61fb7b82a9eba3681
-SHA1 (patch-src_foreign_zthread_include_zthread_Guard.h) = ad6ebe3c0ca9b8cc659a70848b6449036c4ef0d2
-SHA1 (patch-src_hugin1_icpfind_AutoCtrlPointCreator.cpp) = 7df1c978ef81f4d3fae46cc12aaa4d5917c4cb04
+SHA1 (hugin-2015.0.0.tar.bz2) = be7153a0791f2147153e93e8711912ef23b60b61
+RMD160 (hugin-2015.0.0.tar.bz2) = d5780454dc6e2c3c5315d3c5b755d5f6fd17bf1c
+SHA512 (hugin-2015.0.0.tar.bz2) = bb2acf4dea80d43280778f67594dd1ddb0c2e186bcbaafe460fe47e0bd464ae2191b9b25344245e7267316e602ac2179cc838a0dcecb0d408c2206890a5ab6a2
+Size (hugin-2015.0.0.tar.bz2) = 10611519 bytes
+SHA1 (patch-CMakeLists.txt) = 3edb8ff7c07ca499221fe7c5fd8faf0de120d168
+SHA1 (patch-CMakeModules_FindGLUT.cmake) = 22185536efa1883f84bb97fe31efc3ef8df1f9fd
+SHA1 (patch-CMakeModules_FindPNG.cmake) = 811fd3cf6f819b31129e1560cd8acd1f7ee6defc
+SHA1 (patch-doc_deghosting_mask.pod) = fe5462b10966420b0cf3fab004854d9dab3bfb4f
+SHA1 (patch-src_hugin1_base__wx_StitchingExecutor.cpp) = c30a62b1da413fce9524d7d558ec5bb1f21eb65e
+SHA1 (patch-src_hugin1_base__wx_wxPanoCommand.cpp) = d5bf8f747ae86338e728c472d3dc04bf4c84f182
+SHA1 (patch-src_hugin1_calibrate__lens_LensCalFrame.cpp) = 9b815a681317cb19880e7bb6ef170bc14d01b28b
+SHA1 (patch-src_hugin1_icpfind_AutoCtrlPointCreator.cpp) = 213399693c9b7e680d472ee281183fde42e58e9a
+SHA1 (patch-src_hugin1_ptbatcher_BatchFrame.cpp) = 51ce24f1eb99cc5c0151758299eb1ecc34128171
+SHA1 (patch-src_tools_align_image_stack.cpp) = d83099c308665173fde059502a89b90adf167736
+SHA1 (patch-src_tools_tca__correct.cpp) = b5b39c5cc7096903bb7d537230eeb6328677b2d2
diff --git a/graphics/hugin/patches/patch-ac b/graphics/hugin/patches/patch-CMakeLists.txt
index b8e46a4d3d6..aab89d5d035 100644
--- a/graphics/hugin/patches/patch-ac
+++ b/graphics/hugin/patches/patch-CMakeLists.txt
@@ -1,8 +1,11 @@
-$NetBSD: patch-ac,v 1.4 2011/01/12 11:46:28 adam Exp $
+$NetBSD: patch-CMakeLists.txt,v 1.1 2015/10/18 15:56:56 adam Exp $
---- CMakeLists.txt.orig 2010-09-28 22:06:42.000000000 +0000
+Correct 'man' path.
+Do not make an application bundle on OS X.
+
+--- CMakeLists.txt.orig 2013-06-26 11:19:08.000000000 +0000
+++ CMakeLists.txt
-@@ -319,7 +319,7 @@ IF (NOT MANDIR AND NOT $ENV{MANDIR} STRE
+@@ -423,7 +423,7 @@ IF (NOT MANDIR AND NOT $ENV{MANDIR} STRE
ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "NetBSD")
SET (MANDIR "man")
ELSE(NOT MANDIR AND NOT $ENV{MANDIR} STREQUAL "")
@@ -11,7 +14,7 @@ $NetBSD: patch-ac,v 1.4 2011/01/12 11:46:28 adam Exp $
ENDIF(NOT MANDIR AND NOT $ENV{MANDIR} STREQUAL "")
SET(LOCALEDIR share/locale)
-@@ -355,16 +355,6 @@ IF (APPLE)
+@@ -447,16 +447,6 @@ IF (APPLE)
ENDIF (NOT MAC_SELF_CONTAINED_BUNDLE)
ENDIF (APPLE)
diff --git a/graphics/hugin/patches/patch-CMakeModules_FindGLUT.cmake b/graphics/hugin/patches/patch-CMakeModules_FindGLUT.cmake
new file mode 100644
index 00000000000..1a8bb750a13
--- /dev/null
+++ b/graphics/hugin/patches/patch-CMakeModules_FindGLUT.cmake
@@ -0,0 +1,18 @@
+$NetBSD: patch-CMakeModules_FindGLUT.cmake,v 1.1 2015/10/18 15:56:56 adam Exp $
+
+Fix configure phase on OS X.
+
+--- CMakeModules/FindGLUT.cmake.orig 2014-02-12 17:14:43.000000000 +0000
++++ CMakeModules/FindGLUT.cmake
+@@ -31,10 +31,7 @@ ELSE (WIN32)
+
+ IF (APPLE)
+ # These values for Apple could probably do with improvement.
+- FIND_PATH( GLUT_INCLUDE_DIR glut.h
+- /System/Library/Frameworks/GLUT.framework/Versions/A/Headers
+- ${OPENGL_LIBRARY_DIR}
+- )
++ SET(GLUT_INCLUDE_DIR "/usr/include")
+ SET(GLUT_glut_LIBRARY "-framework GLUT" CACHE STRING "GLUT library for OSX")
+ SET(GLUT_cocoa_LIBRARY "-framework Cocoa" CACHE STRING "Cocoa framework for OSX")
+ ELSE (APPLE)
diff --git a/graphics/hugin/patches/patch-CMakeModules_FindPNG.cmake b/graphics/hugin/patches/patch-CMakeModules_FindPNG.cmake
new file mode 100644
index 00000000000..da00ab38f7a
--- /dev/null
+++ b/graphics/hugin/patches/patch-CMakeModules_FindPNG.cmake
@@ -0,0 +1,15 @@
+$NetBSD: patch-CMakeModules_FindPNG.cmake,v 1.1 2015/10/18 15:56:56 adam Exp $
+
+Fix PNG detection.
+
+--- CMakeModules/FindPNG.cmake.orig 2014-06-05 08:39:26.000000000 +0000
++++ CMakeModules/FindPNG.cmake
+@@ -33,7 +33,7 @@ IF (ZLIB_FOUND)
+
+ find_library_with_debug(PNG_LIBRARIES
+ WIN32_DEBUG_POSTFIX d
+- NAMES png libpng libpng16 libpng16_static libpng15 libpng15_static libpng14 wxpng
++ NAMES png libpng png16 libpng16 libpng16_static libpng15 libpng15_static libpng14 wxpng
+ PATHS ${SYSTEM_LIB_DIRS} ${SOURCE_BASE_DIR}/libpng/lib ${SOURCE_BASE_DIR}/lpng142/lib ${SOURCE_BASE_DIR}/lpng141/lib ${SOURCE_BASE_DIR}/lpng140/lib ${wxWidgets_LIB_DIR}
+ )
+
diff --git a/graphics/hugin/patches/patch-ab b/graphics/hugin/patches/patch-ab
deleted file mode 100644
index 0e94c8c1fb1..00000000000
--- a/graphics/hugin/patches/patch-ab
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-ab,v 1.7 2013/06/23 19:00:14 dholland Exp $
-
---- CMakeModules/FindPNG.cmake.orig 2010-09-28 22:06:45.000000000 +0000
-+++ CMakeModules/FindPNG.cmake
-@@ -33,6 +33,7 @@ IF (ZLIB_FOUND)
- find_library_with_debug(PNG_LIBRARIES
- WIN32_DEBUG_POSTFIX d
- NAMES png libpng libpng14 wxpng
-+ NAMES png libpng png15 libpng15 png16 libpng16 wxpng
- PATHS /usr/lib /usr/local/lib ${SOURCE_BASE_DIR}/lpng142/lib ${SOURCE_BASE_DIR}/lpng141/lib ${SOURCE_BASE_DIR}/lpng140/lib ${wxWidgets_LIB_DIR}
- )
-
diff --git a/graphics/hugin/patches/patch-doc_deghosting_mask.pod b/graphics/hugin/patches/patch-doc_deghosting_mask.pod
new file mode 100644
index 00000000000..1d248eff671
--- /dev/null
+++ b/graphics/hugin/patches/patch-doc_deghosting_mask.pod
@@ -0,0 +1,13 @@
+$NetBSD: patch-doc_deghosting_mask.pod,v 1.1 2015/10/18 15:56:56 adam Exp $
+
+Avoid non-ASCII characters.
+
+--- doc/deghosting_mask.pod.orig 2013-08-04 19:26:36.000000000 +0000
++++ doc/deghosting_mask.pod
+@@ -87,5 +87,5 @@ Verbose, repeat for more verbose output
+
+ =head1 AUTHORS
+
+-Lukáš Jirkovský
++Lukas Jirkovsky
+
diff --git a/graphics/hugin/patches/patch-src_celeste_Utilities.cpp b/graphics/hugin/patches/patch-src_celeste_Utilities.cpp
deleted file mode 100644
index 04f24866052..00000000000
--- a/graphics/hugin/patches/patch-src_celeste_Utilities.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-src_celeste_Utilities.cpp,v 1.1 2013/06/27 15:51:49 joerg Exp $
-
---- src/celeste/Utilities.cpp.orig 2013-06-25 21:55:54.000000000 +0000
-+++ src/celeste/Utilities.cpp
-@@ -27,6 +27,7 @@ Copyright (c) 2002-3 Adriaan Tijsseling
-
- #include <math.h>
- #include <stdlib.h>
-+#include <unistd.h>
- #include "Utilities.h"
-
- using namespace std;
diff --git a/graphics/hugin/patches/patch-src_foreign_vigra_vigra__impex_png_cxx b/graphics/hugin/patches/patch-src_foreign_vigra_vigra__impex_png_cxx
deleted file mode 100644
index 9ada051c780..00000000000
--- a/graphics/hugin/patches/patch-src_foreign_vigra_vigra__impex_png_cxx
+++ /dev/null
@@ -1,286 +0,0 @@
-$NetBSD: patch-src_foreign_vigra_vigra__impex_png_cxx,v 1.1 2012/01/02 22:43:49 dholland Exp $
-
-Update this file from pkgsrc vigra (1.8.0) to fix build with recent
-libpng.
-
-I'm not sure if the resolution handling changes (search for "254") are
-desirable or not. if something goes wrong, try reverting that.
-
-The package should probably be changed to use pkgsrc vigra, but I
-don't want to do that right now.
-
---- src/foreign/vigra/vigra_impex/png.cxx.super 2012-01-02 22:34:57.000000000 +0000
-+++ src/foreign/vigra/vigra_impex/png.cxx
-@@ -78,7 +78,7 @@ extern "C" {
- static void PngError( png_structp png_ptr, png_const_charp error_msg )
- {
- png_error_message = std::string(error_msg);
-- longjmp( png_ptr->jmpbuf, 1 );
-+ longjmp( png_jmpbuf(png_ptr), 1 );
- }
-
- // called on non-fatal errors
-@@ -200,9 +200,9 @@ namespace vigra {
- // check if the file is a png file
- const unsigned int sig_size = 8;
- png_byte sig[sig_size];
-- std::fread( sig, sig_size, 1, file.get() );
-+ std::size_t readCount = std::fread( sig, sig_size, 1, file.get() );
- const int no_png = png_sig_cmp( sig, 0, sig_size );
-- vigra_precondition( !no_png, "given file is not a png file.");
-+ vigra_precondition( (readCount == 1) && !no_png, "given file is not a png file.");
-
- // create png read struct with user defined handlers
- png = png_create_read_struct( PNG_LIBPNG_VER_STRING, NULL,
-@@ -210,7 +210,7 @@ namespace vigra {
- vigra_postcondition( png != 0, "could not create the read struct." );
-
- // create info struct
-- if (setjmp(png->jmpbuf)) {
-+ if (setjmp(png_jmpbuf(png))) {
- png_destroy_read_struct( &png, &info, NULL );
- vigra_postcondition( false, png_error_message.insert(0, "error in png_create_info_struct(): ").c_str() );
- }
-@@ -218,14 +218,14 @@ namespace vigra {
- vigra_postcondition( info != 0, "could not create the info struct." );
-
- // init png i/o
-- if (setjmp(png->jmpbuf)) {
-+ if (setjmp(png_jmpbuf(png))) {
- png_destroy_read_struct( &png, &info, NULL );
- vigra_postcondition( false, png_error_message.insert(0, "error in png_init_io(): ").c_str() );
- }
- png_init_io( png, file.get() );
-
- // specify that the signature was already read
-- if (setjmp(png->jmpbuf)) {
-+ if (setjmp(png_jmpbuf(png))) {
- png_destroy_read_struct( &png, &info, NULL );
- vigra_postcondition( false, png_error_message.insert(0, "error in png_set_sig_bytes(): ").c_str() );
- }
-@@ -241,13 +241,13 @@ namespace vigra {
- void PngDecoderImpl::init()
- {
- // read all chunks up to the image data
-- if (setjmp(png->jmpbuf))
-+ if (setjmp(png_jmpbuf(png)))
- vigra_postcondition( false, png_error_message.insert(0, "error in png_read_info(): ").c_str() );
- png_read_info( png, info );
-
- // pull over the header fields
- int interlace_method, compression_method, filter_method;
-- if (setjmp(png->jmpbuf))
-+ if (setjmp(png_jmpbuf(png)))
- vigra_postcondition( false, png_error_message.insert(0, "error in png_get_IHDR(): ").c_str() );
- png_get_IHDR( png, info, &width, &height, &bit_depth, &color_type,
- &interlace_method, &compression_method, &filter_method );
-@@ -261,7 +261,7 @@ namespace vigra {
-
- // transform palette to rgb
- if ( color_type == PNG_COLOR_TYPE_PALETTE) {
-- if (setjmp(png->jmpbuf))
-+ if (setjmp(png_jmpbuf(png)))
- vigra_postcondition( false, png_error_message.insert(0, "error in png_palette_to_rgb(): ").c_str() );
- png_set_palette_to_rgb(png);
- color_type = PNG_COLOR_TYPE_RGB;
-@@ -270,15 +270,10 @@ namespace vigra {
-
- // expand gray values to at least one byte size
- if ( color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8 ) {
--#if (PNG_LIBPNG_VER >= 10400)
-- if (setjmp(png->jmpbuf))
-- vigra_postcondition( false,png_error_message.insert(0, "error in png_set_expand_gray_1_2_4_to_8(): ").c_str());
-+ if (setjmp(png_jmpbuf(png)))
-+ vigra_postcondition(false,
-+ png_error_message.insert(0, "error in png_set_expand_gray_1_2_4_to_8(): ").c_str());
- png_set_expand_gray_1_2_4_to_8(png);
--#else
-- if (setjmp(png->jmpbuf))
-- vigra_postcondition( false,png_error_message.insert(0, "error in png_set_gray_1_2_4_to_8(): ").c_str());
-- png_set_gray_1_2_4_to_8(png);
--#endif
- bit_depth = 8;
- }
-
-@@ -286,7 +281,7 @@ namespace vigra {
- #if 0
- // strip alpha channel
- if ( color_type & PNG_COLOR_MASK_ALPHA ) {
-- if (setjmp(png->jmpbuf))
-+ if (setjmp(png_jmpbuf(png)))
- vigra_postcondition( false, png_error_message.insert(0, "error in png_set_strip_alpha(): ").c_str() );
- png_set_strip_alpha(png);
- color_type ^= PNG_COLOR_MASK_ALPHA;
-@@ -317,8 +312,8 @@ namespace vigra {
- }
-
- // read resolution
-- x_resolution = png_get_x_pixels_per_meter( png, info ) / 254.0;
-- y_resolution = png_get_y_pixels_per_meter( png, info ) / 254.0;
-+ x_resolution = png_get_x_pixels_per_meter( png, info ) * 0.0254f;
-+ y_resolution = png_get_y_pixels_per_meter( png, info ) * 0.0254f;
-
- // read offset
- position.x = png_get_x_offset_pixels( png, info );
-@@ -328,9 +323,13 @@ namespace vigra {
- #if (PNG_LIBPNG_VER > 10008) && defined(PNG_READ_iCCP_SUPPORTED)
- char * dummyName;
- int dummyCompType;
-+#if (PNG_LIBPNG_VER < 10500)
- char * profilePtr;
-+#else
-+ png_byte * profilePtr;
-+#endif
- png_uint_32 profileLen;
-- if (info->valid & PNG_INFO_iCCP) {
-+ if (png_get_valid( png, info, PNG_INFO_iCCP )) {
- png_get_iCCP(png, info, &dummyName, &dummyCompType, &profilePtr, &profileLen) ;
- iccProfilePtr = (unsigned char *) profilePtr;
- iccProfileLength = profileLen;
-@@ -343,7 +342,7 @@ namespace vigra {
- // image gamma
- double image_gamma = 0.45455;
- if ( png_get_valid( png, info, PNG_INFO_gAMA ) ) {
-- if (setjmp(png->jmpbuf))
-+ if (setjmp(png_jmpbuf(png)))
- vigra_postcondition( false, png_error_message.insert(0, "error in png_get_gAMA(): ").c_str() );
- png_get_gAMA( png, info, &image_gamma );
- }
-@@ -352,26 +351,26 @@ namespace vigra {
- double screen_gamma = 2.2;
-
- // set gamma correction
-- if (setjmp(png->jmpbuf))
-+ if (setjmp(png_jmpbuf(png)))
- vigra_postcondition( false, png_error_message.insert(0, "error in png_set_gamma(): ").c_str() );
- png_set_gamma( png, screen_gamma, image_gamma );
- #endif
-
- // interlace handling, get number of read passes needed
-- if (setjmp(png->jmpbuf))
-+ if (setjmp(png_jmpbuf(png)))
- vigra_postcondition( false,png_error_message.insert(0, "error in png_set_interlace_handling(): ").c_str());
- n_interlace_passes = png_set_interlace_handling(png);
-
- // update png library state to reflect any changes that were made
-- if (setjmp(png->jmpbuf))
-+ if (setjmp(png_jmpbuf(png)))
- vigra_postcondition( false, png_error_message.insert(0, "error in png_read_update_info(): ").c_str() );
- png_read_update_info( png, info );
-
-- if (setjmp(png->jmpbuf))
-+ if (setjmp(png_jmpbuf(png)))
- vigra_postcondition( false,png_error_message.insert(0, "error in png_get_channels(): ").c_str());
- n_channels = png_get_channels(png, info);
-
-- if (setjmp(png->jmpbuf))
-+ if (setjmp(png_jmpbuf(png)))
- vigra_postcondition( false,png_error_message.insert(0, "error in png_get_rowbytes(): ").c_str());
- rowsize = png_get_rowbytes(png, info);
-
-@@ -381,9 +380,10 @@ namespace vigra {
-
- void PngDecoderImpl::nextScanline()
- {
-- for (int i=0; i < n_interlace_passes; i++) {
-- if (setjmp(png->jmpbuf))
-- vigra_postcondition( false,png_error_message.insert(0, "error in png_read_row(): ").c_str());
-+ if (setjmp(png_jmpbuf(png)))
-+ vigra_postcondition( false,png_error_message.insert(0, "error in png_read_row(): ").c_str());
-+ for (int i=0; i < n_interlace_passes; i++)
-+ {
- png_read_row(png, row_data.begin(), NULL);
- }
- }
-@@ -548,7 +548,7 @@ namespace vigra {
- vigra_postcondition( png != 0, "could not create the write struct." );
-
- // create info struct
-- if (setjmp(png->jmpbuf)) {
-+ if (setjmp(png_jmpbuf(png))) {
- png_destroy_write_struct( &png, &info );
- vigra_postcondition( false, png_error_message.insert(0, "error in png_info_struct(): ").c_str() );
- }
-@@ -559,7 +559,7 @@ namespace vigra {
- }
-
- // init png i/o
-- if (setjmp(png->jmpbuf)) {
-+ if (setjmp(png_jmpbuf(png))) {
- png_destroy_write_struct( &png, &info );
- vigra_postcondition( false, png_error_message.insert(0, "error in png_init_io(): ").c_str() );
- }
-@@ -574,7 +574,7 @@ namespace vigra {
- void PngEncoderImpl::finalize()
- {
- // write the IHDR
-- if (setjmp(png->jmpbuf))
-+ if (setjmp(png_jmpbuf(png)))
- vigra_postcondition( false, png_error_message.insert(0, "error in png_set_IHDR(): ").c_str() );
- png_set_IHDR( png, info, width, height, bit_depth, color_type,
- PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT,
-@@ -582,16 +582,16 @@ namespace vigra {
-
- // set resolution
- if (x_resolution > 0 && y_resolution > 0) {
-- if (setjmp(png->jmpbuf))
-+ if (setjmp(png_jmpbuf(png)))
- vigra_postcondition( false, png_error_message.insert(0, "error in png_set_pHYs(): ").c_str() );
-- png_set_pHYs(png, info, (png_uint_32) (x_resolution * 254 + 0.5),
-- (png_uint_32) (y_resolution * 254 + 0.5),
-+ png_set_pHYs(png, info, (png_uint_32) (x_resolution / 0.0254 + 0.5),
-+ (png_uint_32) (y_resolution / 0.0254 + 0.5),
- PNG_RESOLUTION_METER);
- }
-
- // set offset
- if (position.x > 0 && position.y > 0) {
-- if (setjmp(png->jmpbuf))
-+ if (setjmp(png_jmpbuf(png)))
- vigra_postcondition( false, png_error_message.insert(0, "error in png_set_oFFs(): ").c_str() );
- png_set_oFFs(png, info, position.x, position.y, PNG_OFFSET_PIXEL);
- }
-@@ -599,13 +599,17 @@ namespace vigra {
- #if (PNG_LIBPNG_VER > 10008) && defined(PNG_WRITE_iCCP_SUPPORTED)
- // set icc profile
- if (iccProfile.size() > 0) {
-- png_set_iCCP(png, info, "icc", 0,
-- (char *)iccProfile.begin(), iccProfile.size());
-+ png_set_iCCP(png, info, (png_charp)("icc"), 0,
-+#if (PNG_LIBPNG_VER < 10500)
-+ (png_charp)iccProfile.begin(), (png_uint_32)iccProfile.size());
-+#else
-+ (png_byte*)iccProfile.begin(), (png_uint_32)iccProfile.size());
-+#endif
- }
- #endif
-
- // write the info struct
-- if (setjmp(png->jmpbuf))
-+ if (setjmp(png_jmpbuf(png)))
- vigra_postcondition( false, png_error_message.insert(0, "error in png_write_info(): ").c_str() );
- png_write_info( png, info );
-
-@@ -637,10 +641,10 @@ namespace vigra {
- }
-
- // write the whole image
-- if (setjmp(png->jmpbuf))
-+ if (setjmp(png_jmpbuf(png)))
- vigra_postcondition( false, png_error_message.insert(0, "error in png_write_image(): ").c_str() );
- png_write_image( png, row_pointers.begin() );
-- if (setjmp(png->jmpbuf))
-+ if (setjmp(png_jmpbuf(png)))
- vigra_postcondition( false, png_error_message.insert(0, "error in png_write_end(): ").c_str() );
- png_write_end(png, info);
- }
-@@ -688,8 +692,7 @@ namespace vigra {
- pimpl->components = bands;
- }
-
-- void PngEncoder::setCompressionType( const std::string & comp,
-- int quality )
-+ void PngEncoder::setCompressionType( const std::string & /* comp */, int /* quality */)
- {
- // nothing is settable => do nothing
- }
diff --git a/graphics/hugin/patches/patch-src_foreign_vigra_vigra_cachedfileimage.hxx b/graphics/hugin/patches/patch-src_foreign_vigra_vigra_cachedfileimage.hxx
deleted file mode 100644
index 5e0f3b46cce..00000000000
--- a/graphics/hugin/patches/patch-src_foreign_vigra_vigra_cachedfileimage.hxx
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-src_foreign_vigra_vigra_cachedfileimage.hxx,v 1.2 2014/12/27 02:46:41 dholland Exp $
-
---- src/foreign/vigra/vigra/cachedfileimage.hxx.orig 2013-06-25 21:58:48.000000000 +0000
-+++ src/foreign/vigra/vigra/cachedfileimage.hxx
-@@ -554,11 +554,11 @@ class NotifyingDirectionSelector;
- 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;
- #endif
- protected:
- NotifyingDirectionSelector(T base = 0) : current_(base), notify_(NULL) {}
- NotifyingDirectionSelector(NotifyingDirectionSelector const & rhs) : current_(rhs.current_), notify_(NULL) {}
diff --git a/graphics/hugin/patches/patch-src_foreign_zthread_include_zthread_Guard.h b/graphics/hugin/patches/patch-src_foreign_zthread_include_zthread_Guard.h
deleted file mode 100644
index d26f3b3fbf8..00000000000
--- a/graphics/hugin/patches/patch-src_foreign_zthread_include_zthread_Guard.h
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-src_foreign_zthread_include_zthread_Guard.h,v 1.1 2013/06/27 15:51:49 joerg Exp $
-
---- src/foreign/zthread/include/zthread/Guard.h.orig 2013-06-25 21:56:26.000000000 +0000
-+++ 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)) {
-@@ -428,7 +428,7 @@ public:
- template <class U, class V>
- Guard(Guard<U, V>& g) : LockHolder<LockType>(g) {
-
-- LockingPolicy::shareScope(*this, extract(g));
-+ LockingPolicy::shareScope(*this, this->extract(g));
-
- }
-
diff --git a/graphics/hugin/patches/patch-src_hugin1_base__wx_StitchingExecutor.cpp b/graphics/hugin/patches/patch-src_hugin1_base__wx_StitchingExecutor.cpp
new file mode 100644
index 00000000000..abc17e30a1b
--- /dev/null
+++ b/graphics/hugin/patches/patch-src_hugin1_base__wx_StitchingExecutor.cpp
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_hugin1_base__wx_StitchingExecutor.cpp,v 1.1 2015/10/18 15:56:56 adam Exp $
+
+Re-order includes to fix building.
+
+--- src/hugin1/base_wx/StitchingExecutor.cpp.orig 2015-08-24 21:56:49.000000000 +0000
++++ src/hugin1/base_wx/StitchingExecutor.cpp
+@@ -37,9 +37,9 @@
+ #include "hugin_base/panotools/PanoToolsUtils.h"
+ #include "hugin_base/panodata/PanoramaOptions.h"
+ #include "hugin_base/algorithms/basic/LayerStacks.h"
++#include "base_wx/LensTools.h"
+ #include "base_wx/platform.h"
+ #include "base_wx/wxPlatform.h"
+-#include "base_wx/LensTools.h"
+ #include "hugin/config_defaults.h"
+
+ #if wxCHECK_VERSION(3,0,0)
diff --git a/graphics/hugin/patches/patch-src_hugin1_base__wx_wxPanoCommand.cpp b/graphics/hugin/patches/patch-src_hugin1_base__wx_wxPanoCommand.cpp
new file mode 100644
index 00000000000..3b0e2c1569f
--- /dev/null
+++ b/graphics/hugin/patches/patch-src_hugin1_base__wx_wxPanoCommand.cpp
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_hugin1_base__wx_wxPanoCommand.cpp,v 1.1 2015/10/18 15:56:56 adam Exp $
+
+Re-order includes to fix building.
+
+--- src/hugin1/base_wx/wxPanoCommand.cpp.orig 2015-08-24 21:37:12.000000000 +0000
++++ src/hugin1/base_wx/wxPanoCommand.cpp
+@@ -32,14 +32,14 @@
+ #include "wxPlatform.h"
+ #include "LensTools.h"
+
++#include <vigra/cornerdetection.hxx>
++#include <vigra/localminmax.hxx>
++
+ #include "wxImageCache.h"
+ #include "platform.h"
+ #include "wxPanoCommand.h"
+ #include "HFOVDialog.h"
+ #include <panodata/OptimizerSwitches.h>
+-
+-#include <vigra/cornerdetection.hxx>
+-#include <vigra/localminmax.hxx>
+ #include <panodata/StandardImageVariableGroups.h>
+
+ #include <hugin_utils/alphanum.h>
diff --git a/graphics/hugin/patches/patch-src_hugin1_calibrate__lens_LensCalFrame.cpp b/graphics/hugin/patches/patch-src_hugin1_calibrate__lens_LensCalFrame.cpp
new file mode 100644
index 00000000000..11486e75086
--- /dev/null
+++ b/graphics/hugin/patches/patch-src_hugin1_calibrate__lens_LensCalFrame.cpp
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_hugin1_calibrate__lens_LensCalFrame.cpp,v 1.1 2015/10/18 15:56:56 adam Exp $
+
+Re-order includes to fix building.
+
+--- src/hugin1/calibrate_lens/LensCalFrame.cpp.orig 2015-03-15 11:43:45.000000000 +0000
++++ src/hugin1/calibrate_lens/LensCalFrame.cpp
+@@ -25,6 +25,7 @@
+ *
+ */
+
++#include <algorithms/optimizer/PTOptimizer.h>
+ #include "panoinc_WX.h"
+ #include "panoinc.h"
+
+@@ -36,7 +37,6 @@
+ #include <wx/app.h>
+ #include "LensCalApp.h"
+ #include "hugin/config_defaults.h"
+-#include <algorithms/optimizer/PTOptimizer.h>
+ #include "lensdb/LensDB.h"
+ #include "base_wx/wxLensDB.h"
+ #include "panodata/StandardImageVariableGroups.h"
diff --git a/graphics/hugin/patches/patch-src_hugin1_icpfind_AutoCtrlPointCreator.cpp b/graphics/hugin/patches/patch-src_hugin1_icpfind_AutoCtrlPointCreator.cpp
index 8e6c2028c7f..0c8117dd88f 100644
--- a/graphics/hugin/patches/patch-src_hugin1_icpfind_AutoCtrlPointCreator.cpp
+++ b/graphics/hugin/patches/patch-src_hugin1_icpfind_AutoCtrlPointCreator.cpp
@@ -1,14 +1,15 @@
-$NetBSD: patch-src_hugin1_icpfind_AutoCtrlPointCreator.cpp,v 1.1 2013/06/27 15:51:49 joerg Exp $
+$NetBSD: patch-src_hugin1_icpfind_AutoCtrlPointCreator.cpp,v 1.2 2015/10/18 15:56:56 adam Exp $
---- src/hugin1/icpfind/AutoCtrlPointCreator.cpp.orig 2013-06-25 22:01:10.000000000 +0000
+Fix building with Clang.
+
+--- src/hugin1/icpfind/AutoCtrlPointCreator.cpp.orig 2014-06-14 11:02:49.000000000 +0000
+++ src/hugin1/icpfind/AutoCtrlPointCreator.cpp
-@@ -28,9 +28,6 @@
+@@ -28,7 +28,7 @@
#include "panoinc.h"
#include <fstream>
-#ifdef __GNUC__
--#include <ext/stdio_filebuf.h>
--#endif
++#if defined(__GNUC__) && !defined(__clang__)
+ #include <ext/stdio_filebuf.h>
+ #endif
- #include "PT/Panorama.h"
- #include "PT/ImageGraph.h"
diff --git a/graphics/hugin/patches/patch-src_hugin1_ptbatcher_BatchFrame.cpp b/graphics/hugin/patches/patch-src_hugin1_ptbatcher_BatchFrame.cpp
new file mode 100644
index 00000000000..51b31de2280
--- /dev/null
+++ b/graphics/hugin/patches/patch-src_hugin1_ptbatcher_BatchFrame.cpp
@@ -0,0 +1,18 @@
+$NetBSD: patch-src_hugin1_ptbatcher_BatchFrame.cpp,v 1.1 2015/10/18 15:56:56 adam Exp $
+
+Re-order includes to fix building.
+
+--- src/hugin1/ptbatcher/BatchFrame.cpp.orig 2015-08-24 22:47:35.000000000 +0000
++++ src/hugin1/ptbatcher/BatchFrame.cpp
+@@ -24,10 +24,10 @@
+ *
+ */
+
++#include "FindPanoDialog.h"
+ #include "BatchFrame.h"
+ #include <wx/stdpaths.h>
+ #include "PTBatcherGUI.h"
+-#include "FindPanoDialog.h"
+ #include "FailedProjectsDialog.h"
+ #ifdef __WXMSW__
+ #include <powrprof.h>
diff --git a/graphics/hugin/patches/patch-src_tools_align_image_stack.cpp b/graphics/hugin/patches/patch-src_tools_align_image_stack.cpp
new file mode 100644
index 00000000000..3159f344bca
--- /dev/null
+++ b/graphics/hugin/patches/patch-src_tools_align_image_stack.cpp
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_tools_align_image_stack.cpp,v 1.1 2015/10/18 15:56:56 adam Exp $
+
+Avoid conflict with another variable called 'lock'.
+
+--- src/tools/align_image_stack.cpp.orig 2015-06-20 19:13:37.000000000 +0000
++++ src/tools/align_image_stack.cpp
+@@ -121,7 +121,7 @@ static void usage(const char* name)
+ }
+
+ typedef std::multimap<double, vigra::Diff2D> MapPoints;
+-static hugin_omp::Lock lock;
++static hugin_omp::Lock mylock;
+
+ template <class ImageType>
+ void FineTuneInterestPoints(Panorama& pano,
+@@ -193,7 +193,7 @@ void FineTuneInterestPoints(Panorama& pa
+ res.maxpos.y,
+ stereo ? ControlPoint::Y : ControlPoint::X_Y);
+ {
+- hugin_omp::ScopedLock sl(lock);
++ hugin_omp::ScopedLock sl(mylock);
+ pano.addCtrlPoint(p);
+ };
+ }
diff --git a/graphics/hugin/patches/patch-src_tools_tca__correct.cpp b/graphics/hugin/patches/patch-src_tools_tca__correct.cpp
new file mode 100644
index 00000000000..2061c384c7a
--- /dev/null
+++ b/graphics/hugin/patches/patch-src_tools_tca__correct.cpp
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_tools_tca__correct.cpp,v 1.1 2015/10/18 15:56:56 adam Exp $
+
+Avoid conflict with another variable called 'lock'.
+
+--- src/tools/tca_correct.cpp.orig 2015-06-20 19:58:52.000000000 +0000
++++ src/tools/tca_correct.cpp
+@@ -465,7 +465,7 @@ static void usage(const char* name)
+ << " commandline arguments for fulla" << endl;
+ }
+
+-static hugin_omp::Lock lock;
++static hugin_omp::Lock mylock;
+ typedef std::multimap<double, vigra::Diff2D> MapPoints;
+
+ template <class ImageType>
+@@ -584,7 +584,7 @@ void createCtrlPoints(Panorama& pano, co
+ }
+ if (!cps.empty())
+ {
+- hugin_omp::ScopedLock sl(lock);
++ hugin_omp::ScopedLock sl(mylock);
+ for (CPVector::const_iterator it = cps.begin(); it != cps.end(); ++it)
+ {
+ pano.addCtrlPoint(*it);