summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-gfx')
-rw-r--r--media-gfx/hugin/ChangeLog9
-rw-r--r--media-gfx/hugin/files/hugin-2011.0.0_rc1-libpng15.patch275
-rw-r--r--media-gfx/hugin/hugin-2011.0.0_rc1.ebuild61
3 files changed, 344 insertions, 1 deletions
diff --git a/media-gfx/hugin/ChangeLog b/media-gfx/hugin/ChangeLog
index 23b84795fa72..c92e38ee2b04 100644
--- a/media-gfx/hugin/ChangeLog
+++ b/media-gfx/hugin/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for media-gfx/hugin
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/hugin/ChangeLog,v 1.108 2011/02/13 11:03:32 radhermit Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/hugin/ChangeLog,v 1.109 2011/05/18 06:41:54 radhermit Exp $
+
+*hugin-2011.0.0_rc1 (18 May 2011)
+
+ 18 May 2011; Tim Harder <radhermit@gentoo.org> +hugin-2011.0.0_rc1.ebuild,
+ +files/hugin-2011.0.0_rc1-libpng15.patch:
+ Version bump to release candidate. Remove old post install message, bump to
+ EAPI 4, apply patch for libpng-1.5 (bug #355885).
13 Feb 2011; Tim Harder <radhermit@gentoo.org> hugin-2010.0.0.ebuild,
hugin-2010.2.0.ebuild, hugin-2010.4.0.ebuild:
diff --git a/media-gfx/hugin/files/hugin-2011.0.0_rc1-libpng15.patch b/media-gfx/hugin/files/hugin-2011.0.0_rc1-libpng15.patch
new file mode 100644
index 000000000000..27522318a347
--- /dev/null
+++ b/media-gfx/hugin/files/hugin-2011.0.0_rc1-libpng15.patch
@@ -0,0 +1,275 @@
+--- hugin-2011.0.0.orig/src/foreign/vigra/vigra_impex/png.cxx
++++ hugin-2011.0.0/src/foreign/vigra/vigra_impex/png.cxx
+@@ -78,7 +75,7 @@
+ 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 +197,9 @@
+ // 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 +207,7 @@
+ 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 +215,14 @@
+ 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 +238,13 @@
+ 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 +258,7 @@
+
+ // 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 +267,10 @@
+
+ // 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 +278,7 @@
+ #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 +309,8 @@
+ }
+
+ // 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 +320,13 @@
+ #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 +339,7 @@
+ // 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 +348,26 @@
+ 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 +377,10 @@
+
+ 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 +545,7 @@
+ 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 +556,7 @@
+ }
+
+ // 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 +571,7 @@
+ 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 +579,16 @@
+
+ // 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 +596,17 @@
+ #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 +638,10 @@
+ }
+
+ // 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 +689,7 @@
+ 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/media-gfx/hugin/hugin-2011.0.0_rc1.ebuild b/media-gfx/hugin/hugin-2011.0.0_rc1.ebuild
new file mode 100644
index 000000000000..34f71f276004
--- /dev/null
+++ b/media-gfx/hugin/hugin-2011.0.0_rc1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/hugin/hugin-2011.0.0_rc1.ebuild,v 1.1 2011/05/18 06:41:54 radhermit Exp $
+
+EAPI=4
+WX_GTK_VER="2.8"
+
+inherit cmake-utils wxwidgets versionator
+
+DESCRIPTION="GUI for the creation & processing of panoramic images"
+HOMEPAGE="http://hugin.sf.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+LICENSE="GPL-2 SIFT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+LANGS=" bg ca cs de en_GB es fi fr hu it ja ko nl pl pt_BR ru sk sl sv uk zh_CN zh_TW"
+IUSE="lapack sift $(echo ${LANGS//\ /\ linguas_})"
+
+CDEPEND="
+ !!dev-util/cocom
+ app-arch/zip
+ >=dev-libs/boost-1.35.0-r5
+ >=media-gfx/enblend-3.0_p20080807
+ media-gfx/exiv2
+ media-libs/freeglut
+ >=media-libs/libpano13-2.9.17
+ media-libs/libpng
+ media-libs/openexr
+ media-libs/tiff
+ sys-libs/zlib
+ virtual/jpeg
+ x11-libs/wxGTK:2.8[X,opengl,-odbc]
+ lapack? ( virtual/lapack )
+ sift? ( media-gfx/autopano-sift-C )"
+RDEPEND="${CDEPEND}
+ media-libs/exiftool"
+DEPEND="${CDEPEND}
+ dev-util/pkgconfig"
+
+S=${WORKDIR}/${PN}-$(get_version_component_range 1-3)
+
+PATCHES=( "${FILESDIR}"/${P}-libpng15.patch )
+
+pkg_setup() {
+ DOCS="authors.txt README TODO"
+ mycmakeargs=( $(cmake-utils_use_enable lapack LAPACK) )
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ for lang in ${LANGS} ; do
+ case ${lang} in
+ ca) dir=ca_ES;;
+ cs) dir=cs_CZ;;
+ *) dir=${lang};;
+ esac
+ use linguas_${lang} || rm -r "${D}"/usr/share/locale/${dir}
+ done
+}