[arch-commits] Commit in povray/trunk (3 files)

Eric Bélanger eric at archlinux.org
Fri Jan 22 02:01:28 EST 2010


    Date: Friday, January 22, 2010 @ 02:01:28
  Author: eric
Revision: 64771

upgpkg: povray 3.6.1-7
    Rebuilt for libpng 1.4 and libjpeg 8

Added:
  povray/trunk/libpng-1.4.patch
  povray/trunk/povray-3.6.1-use-system-libpng.patch
Modified:
  povray/trunk/PKGBUILD

--------------------------------------+
 PKGBUILD                             |   14 ++++++---
 libpng-1.4.patch                     |   21 +++++++++++++
 povray-3.6.1-use-system-libpng.patch |   51 +++++++++++++++++++++++++++++++++
 3 files changed, 82 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-01-22 05:56:18 UTC (rev 64770)
+++ PKGBUILD	2010-01-22 07:01:28 UTC (rev 64771)
@@ -6,18 +6,24 @@
 pkgname=povray
 pkgver=3.6.1
 _majorver=3.6
-pkgrel=6
+pkgrel=7
 pkgdesc="A script based raytracer for high-quality three-dimensional graphics"
 arch=('i686' 'x86_64')
 license=('custom')
 url="http://povray.org"
-depends=('gcc' 'zlib' 'libjpeg>=7' 'libtiff>=3.8.2-5' 'libpng' 'libxpm')
+depends=('gcc' 'zlib' 'libjpeg' 'libtiff' 'libpng' 'libxpm')
 backup=('etc/povray.conf' 'etc/povray.ini')
-source=(ftp://ftp.povray.org/pub/povray/Official/Unix/$pkgname-$pkgver.tar.bz2)
-md5sums=('b5789bb7eeaed0809c5c82d0efda571d')
+source=(ftp://ftp.povray.org/pub/povray/Official/Unix/$pkgname-$pkgver.tar.bz2 
+  libpng-1.4.patch povray-3.6.1-use-system-libpng.patch)
+md5sums=('b5789bb7eeaed0809c5c82d0efda571d' '043d88384956ac41322dee2bf15585cd'\
+         '36e21e100ef73d5d3fc0f72615cf381f')
+sha1sums=('1fab3ccbdedafbf77e3a66087709bbdf60bc643d' '6cfd98bd3c6990db43f2535aa168d7c38b56e2dd'\
+         '98333f7701ffd1803adc9b04d5d09beff2f34c27')
 
 build() {
   cd $srcdir/$pkgname-$pkgver
+  patch -p1 < ../libpng-1.4.patch || return 1
+  patch -p1 < ../povray-3.6.1-use-system-libpng.patch || return 1
   ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man \
     COMPILED_BY="ArchLinux" --disable-optimiz --enable-strip
   make || return 1

Added: libpng-1.4.patch
===================================================================
--- libpng-1.4.patch	                        (rev 0)
+++ libpng-1.4.patch	2010-01-22 07:01:28 UTC (rev 64771)
@@ -0,0 +1,21 @@
+diff -Naur povray-3.6.1-orig/source/png_pov.cpp povray-3.6.1/source/png_pov.cpp
+--- povray-3.6.1-orig/source/png_pov.cpp	2010-01-22 00:50:19.000000000 -0500
++++ povray-3.6.1/source/png_pov.cpp	2010-01-22 00:53:23.000000000 -0500
+@@ -1428,7 +1428,7 @@
+ 		if(r_info_ptr->valid & PNG_INFO_tRNS)
+ 		{
+ 			for (index = 0; index < r_info_ptr->num_trans; index++)
+-				cmap[index].Transmit = 255 - r_info_ptr->trans[index];
++				cmap[index].Transmit = 255 - r_info_ptr->trans_alpha[index];
+ 		}
+ 
+ 		Image->data.map_lines = (unsigned char **)POV_MALLOC(height * sizeof(unsigned char *), "PNG image");
+@@ -1461,7 +1461,7 @@
+ 		if(r_info_ptr->valid & PNG_INFO_tRNS)
+ 		{
+ 			for (index = 0; index < r_info_ptr->num_trans; index++)
+-				cmap[index].Transmit = 255 - r_info_ptr->trans[index];
++				cmap[index].Transmit = 255 - r_info_ptr->trans_alpha[index];
+ 		}
+ 
+ 		Image->data.map_lines = (unsigned char **)POV_MALLOC(height * sizeof(unsigned char *), "PNG image");

Added: povray-3.6.1-use-system-libpng.patch
===================================================================
--- povray-3.6.1-use-system-libpng.patch	                        (rev 0)
+++ povray-3.6.1-use-system-libpng.patch	2010-01-22 07:01:28 UTC (rev 64771)
@@ -0,0 +1,51 @@
+--- povray-3.6.1/acinclude.m4~	2004-08-03 00:16:14.000000000 +0100
++++ povray-3.6.1/acinclude.m4	2006-11-15 15:29:33.000000000 +0000
+@@ -353,13 +353,36 @@
+             [
+               AC_LANG_SOURCE(
+ [#include <stdio.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include "$5"
+ int main (void)
+ {
+   const char *version = $6;
++  char wanted[[]] = "$2";
++  char *version_tok, *wanted_tok = wanted;
++  char *version_tmp, *wanted_tmp;
+   fprintf (stderr, "%s\n", version);
+-  return ! (strcmp (version ? version : "", "$2") >= 0);
++  if (!version) return EXIT_FAILURE;
++  version_tok = strdup(version);
++  for (version_tok = strtok_r(version_tok, ".", &version_tmp),
++       wanted_tok  = strtok_r(wanted_tok,  ".", &wanted_tmp);
++       version_tok != NULL && wanted_tok != NULL;
++       version_tok = strtok_r(NULL, ".", &version_tmp),
++       wanted_tok  = strtok_r(NULL, ".", &wanted_tmp)) {
++    char *version_endptr, *wanted_endptr;
++    unsigned long version_bit = strtoul(version_tok, &version_endptr, 10);
++    unsigned long wanted_bit  = strtoul(wanted_tok,  &wanted_endptr,  10);
++    if (version_bit < wanted_bit)
++      return EXIT_FAILURE;
++    if (version_bit > wanted_bit)
++      return EXIT_SUCCESS;
++    if (strcmp(version_endptr, wanted_endptr) > 0)
++      return EXIT_SUCCESS;
++    if (strcmp(version_endptr, wanted_endptr) < 0)
++      return EXIT_FAILURE;
++  }
++  return wanted_tok == NULL ? EXIT_SUCCESS : EXIT_FAILURE;
+ }]
+               )
+             ],
+--- povray-3.6.1/source/png_pov.cpp~	2004-08-03 00:11:37.000000000 +0100
++++ povray-3.6.1/source/png_pov.cpp	2006-11-15 16:48:33.000000000 +0000
+@@ -782,7 +782,7 @@
+       {
+          // finished prematurely - trick into thinking done
+          png_ptr->num_rows = png_ptr->row_number;
+-         png_write_finish_row(png_ptr);
++         png_write_row(png_ptr, row_ptr);
+       }
+ 
+ #ifdef POV_COMMENTS // temporarily skip comment writing code 



More information about the arch-commits mailing list