diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2011-09-14 17:49:30 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2011-09-14 17:49:30 +0000 |
commit | 35c995711a1c43de4c2db2ea2cb33acecbdb1cbc (patch) | |
tree | 3cbbc724fc1a0992fddd15c710e2ee6bbcd17708 /sci-chemistry | |
parent | version bump (diff) | |
download | gentoo-2-35c995711a1c43de4c2db2ea2cb33acecbdb1cbc.tar.gz gentoo-2-35c995711a1c43de4c2db2ea2cb33acecbdb1cbc.tar.bz2 gentoo-2-35c995711a1c43de4c2db2ea2cb33acecbdb1cbc.zip |
Fix building with libpng15 wrt #378349 by Diego Elio Pettenò
(Portage version: 2.2.0_alpha55/cvs/Linux x86_64)
Diffstat (limited to 'sci-chemistry')
-rw-r--r-- | sci-chemistry/coot/ChangeLog | 6 | ||||
-rw-r--r-- | sci-chemistry/coot/coot-0.6.2.ebuild | 3 | ||||
-rw-r--r-- | sci-chemistry/coot/files/0.6.2-libpng15.patch | 29 |
3 files changed, 36 insertions, 2 deletions
diff --git a/sci-chemistry/coot/ChangeLog b/sci-chemistry/coot/ChangeLog index bd364d9c8d6a..1acf5e8193ed 100644 --- a/sci-chemistry/coot/ChangeLog +++ b/sci-chemistry/coot/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sci-chemistry/coot # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/coot/ChangeLog,v 1.41 2011/07/16 13:14:36 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/coot/ChangeLog,v 1.42 2011/09/14 17:49:30 ssuominen Exp $ + + 14 Sep 2011; Samuli Suominen <ssuominen@gentoo.org> + +files/0.6.2-libpng15.patch, coot-0.6.2.ebuild: + Fix building with libpng15 wrt #378349 by Diego Elio Pettenò 16 Jul 2011; Justin Lecher <jlec@gentoo.org> +files/0.6.2-ssm.patch, coot-0.6.2.ebuild: diff --git a/sci-chemistry/coot/coot-0.6.2.ebuild b/sci-chemistry/coot/coot-0.6.2.ebuild index 30ae440df979..4fe66230d07f 100644 --- a/sci-chemistry/coot/coot-0.6.2.ebuild +++ b/sci-chemistry/coot/coot-0.6.2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/coot/coot-0.6.2.ebuild,v 1.4 2011/07/16 13:14:36 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/coot/coot-0.6.2.ebuild,v 1.5 2011/09/14 17:49:30 ssuominen Exp $ EAPI=3 @@ -80,6 +80,7 @@ PATCHES=( "${FILESDIR}"/${PV}-gl.patch "${FILESDIR}"/${PV}-test.patch "${FILESDIR}"/${PV}-ssm.patch + "${FILESDIR}"/${PV}-libpng15.patch ) src_prepare() { diff --git a/sci-chemistry/coot/files/0.6.2-libpng15.patch b/sci-chemistry/coot/files/0.6.2-libpng15.patch new file mode 100644 index 000000000000..bddd251698de --- /dev/null +++ b/sci-chemistry/coot/files/0.6.2-libpng15.patch @@ -0,0 +1,29 @@ +--- ccp4mg-utils/ppmutil.cc ++++ ccp4mg-utils/ppmutil.cc +@@ -2494,15 +2494,21 @@ + + pixels = new unsigned char[width*height*colourspace]; + ++ png_colorp palette; ++ int num_trans; ++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >=4 ++ png_bytep trans_alpha; ++#endif ++ + for (int i=0; i<height; i++){ + if(color_type==PNG_COLOR_TYPE_PALETTE){ + for (int j=0; j<width; j++){ +- pixels[i*width*colourspace+j*colourspace] = png_ptr->palette[row_pointers[i][j]].red; +- pixels[i*width*colourspace+j*colourspace+1] = png_ptr->palette[row_pointers[i][j]].green; +- pixels[i*width*colourspace+j*colourspace+2] = png_ptr->palette[row_pointers[i][j]].blue; +- if(row_pointers[i][j]<png_ptr->num_trans){ ++ pixels[i*width*colourspace+j*colourspace] = palette[row_pointers[i][j]].red; ++ pixels[i*width*colourspace+j*colourspace+1] = palette[row_pointers[i][j]].green; ++ pixels[i*width*colourspace+j*colourspace+2] = palette[row_pointers[i][j]].blue; ++ if(row_pointers[i][j]<num_trans){ + #if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >=4 +- pixels[i*width*colourspace+j*colourspace+3] = png_ptr->trans_alpha[row_pointers[i][j]]; ++ pixels[i*width*colourspace+j*colourspace+3] = trans_alpha[row_pointers[i][j]]; + #else + pixels[i*width*colourspace+j*colourspace+3] = png_ptr->trans[row_pointers[i][j]]; + #endif |