[arch-commits] Commit in metapixel/repos (6 files)

Bartłomiej Piotrowski bpiotrowski at nymeria.archlinux.org
Mon Apr 29 19:33:18 UTC 2013


    Date: Monday, April 29, 2013 @ 21:33:18
  Author: bpiotrowski
Revision: 89535

archrelease: copy trunk to community-staging-i686, community-staging-x86_64

Added:
  metapixel/repos/community-staging-i686/
  metapixel/repos/community-staging-i686/PKGBUILD
    (from rev 89534, metapixel/trunk/PKGBUILD)
  metapixel/repos/community-staging-i686/metapixel-1.0.2-libpng-1.5.patch
    (from rev 89534, metapixel/trunk/metapixel-1.0.2-libpng-1.5.patch)
  metapixel/repos/community-staging-x86_64/
  metapixel/repos/community-staging-x86_64/PKGBUILD
    (from rev 89534, metapixel/trunk/PKGBUILD)
  metapixel/repos/community-staging-x86_64/metapixel-1.0.2-libpng-1.5.patch
    (from rev 89534, metapixel/trunk/metapixel-1.0.2-libpng-1.5.patch)

-----------------------------------------------------------+
 community-staging-i686/PKGBUILD                           |   32 ++
 community-staging-i686/metapixel-1.0.2-libpng-1.5.patch   |  174 ++++++++++++
 community-staging-x86_64/PKGBUILD                         |   32 ++
 community-staging-x86_64/metapixel-1.0.2-libpng-1.5.patch |  174 ++++++++++++
 4 files changed, 412 insertions(+)

Copied: metapixel/repos/community-staging-i686/PKGBUILD (from rev 89534, metapixel/trunk/PKGBUILD)
===================================================================
--- community-staging-i686/PKGBUILD	                        (rev 0)
+++ community-staging-i686/PKGBUILD	2013-04-29 19:33:18 UTC (rev 89535)
@@ -0,0 +1,32 @@
+# $Id$
+# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
+# Contributor: Daniel Isenmann <daniel.isenmann [at] gmx [dot] de>
+
+pkgname=metapixel
+pkgver=1.0.2
+pkgrel=4
+pkgdesc='A program for generating photomosaics.'
+arch=('i686' 'x86_64')
+url='http://www.complang.tuwien.ac.at/schani/metapixel/'
+license=('GPL')
+depends=('giflib' 'libjpeg' 'libpng' 'perl')
+source=("http://www.complang.tuwien.ac.at/schani/metapixel/files/${pkgname}-${pkgver}.tar.gz"
+        'metapixel-1.0.2-libpng-1.5.patch')
+md5sums=('af5d77d38826756af213a08e3ada9941'
+         '1832a79790b07402735bfeb9f71f36e9')
+
+build() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  patch -p1 -i ../metapixel-1.0.2-libpng-1.5.patch
+
+  make
+}
+
+package() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  
+  install -dm0755 "${pkgdir}/usr/share/man/man1"
+
+  make PREFIX="${pkgdir}/usr" install
+}

Copied: metapixel/repos/community-staging-i686/metapixel-1.0.2-libpng-1.5.patch (from rev 89534, metapixel/trunk/metapixel-1.0.2-libpng-1.5.patch)
===================================================================
--- community-staging-i686/metapixel-1.0.2-libpng-1.5.patch	                        (rev 0)
+++ community-staging-i686/metapixel-1.0.2-libpng-1.5.patch	2013-04-29 19:33:18 UTC (rev 89535)
@@ -0,0 +1,174 @@
+--- metapixel-1.0.2.orig/rwimg/rwpng.c
++++ metapixel-1.0.2/rwimg/rwpng.c
+@@ -57,19 +57,39 @@
+     data->end_info = png_create_info_struct(data->png_ptr);
+     assert(data->end_info != 0);
+ 
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++	if (setjmp(png_jmpbuf((data->png_ptr))))
++#else
+     if (setjmp(data->png_ptr->jmpbuf))
++#endif
+ 	assert(0);
+ 
+-    png_init_io(data->png_ptr, data->file);
+-
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++	png_init_io(data->png_ptr, data->file);
++    png_read_info(data->png_ptr, data->info_ptr);
++#else
++	png_init_io(data->png_ptr, data->file);
+     png_read_info(data->png_ptr, data->info_ptr);
++#endif
+ 
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++	*width = png_get_image_width(data->png_ptr, data->info_ptr);
++	*height = png_get_image_height(data->png_ptr, data->info_ptr);
++	{
++		png_byte value = png_get_bit_depth(data->png_ptr, data->info_ptr);
++    	assert(value == 8 || value == 16);
++		value = png_get_color_type(data->png_ptr, data->info_ptr);
++    	assert(value == PNG_COLOR_TYPE_RGB || value == PNG_COLOR_TYPE_RGB_ALPHA);
++    	value = png_get_interlace_type(data->png_ptr, data->info_ptr);
++    	assert(value == PNG_INTERLACE_NONE);
++	}
++#else
+     *width = data->info_ptr->width;
+     *height = data->info_ptr->height;
+-
+     assert(data->info_ptr->bit_depth == 8 || data->info_ptr->bit_depth == 16);
+     assert(data->info_ptr->color_type == PNG_COLOR_TYPE_RGB || data->info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA);
+     assert(data->info_ptr->interlace_type == PNG_INTERLACE_NONE);
++#endif
+ 
+     data->have_read = 0;
+ 
+@@ -81,32 +101,51 @@
+ {
+     png_data_t *data = (png_data_t*)_data;
+     int i;
+-    int bps, spp;
++    int bps, spp, width;
+     unsigned char *row;
+ 
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++
++	if (setjmp(png_jmpbuf((data->png_ptr))))
++#else
+     if (setjmp(data->png_ptr->jmpbuf))
++#endif
+ 	assert(0);
+ 
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++	if(png_get_color_type(data->png_ptr, data->info_ptr) == PNG_COLOR_TYPE_RGB)
++#else
+     if (data->info_ptr->color_type == PNG_COLOR_TYPE_RGB)
++#endif
+ 	spp = 3;
+     else
+ 	spp = 4;
+ 
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++	if(png_get_bit_depth(data->png_ptr, data->info_ptr) == 16)
++#else
+     if (data->info_ptr->bit_depth == 16)
++#endif
+ 	bps = 2;
+     else
+ 	bps = 1;
+ 
+-    row = (unsigned char*)malloc(data->info_ptr->width * spp * bps);
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++	width = png_get_image_width(data->png_ptr, data->info_ptr);
++#else
++    width = data->info_ptr->width:
++#endif
++
++    row = (unsigned char*)malloc(width * spp * bps);
+ 
+     for (i = 0; i < num_lines; ++i)
+     {
+ 	int j, channel;
+ 
+ 	png_read_row(data->png_ptr, (png_bytep)row, 0);
+-	for (j = 0; j < data->info_ptr->width; ++j)
++	for (j = 0; j < width; ++j)
+ 	    for (channel = 0; channel < 3; ++channel)
+-		lines[i * data->info_ptr->width * 3 + j * 3 + channel] = row[j * spp * bps + channel * bps];
++		lines[i * width * 3 + j * 3 + channel] = row[j * spp * bps + channel * bps];
+     }
+ 
+     free(row);
+@@ -119,7 +158,11 @@
+ {
+     png_data_t *data = (png_data_t*)_data;
+ 
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++	if (setjmp(png_jmpbuf((data->png_ptr))))
++#else
+     if (setjmp(data->png_ptr->jmpbuf))
++#endif
+ 	assert(0);
+ 
+     if (data->have_read)
+@@ -148,7 +191,11 @@
+     data->info_ptr = png_create_info_struct(data->png_ptr);
+     assert(data->info_ptr != 0);
+ 
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++	if (setjmp(png_jmpbuf((data->png_ptr))))
++#else
+     if (setjmp(data->png_ptr->jmpbuf))
++#endif
+ 	assert(0);
+ 
+     if (pixel_stride == 4)
+@@ -156,6 +203,16 @@
+ 
+     png_init_io(data->png_ptr, data->file);
+ 
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++	png_set_IHDR(data->png_ptr, data->info_ptr,
++		width, height, 8, PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE,
++		PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
++
++	/* Maybe does not need following. */
++	png_set_tRNS(data->png_ptr, data->info_ptr, NULL, 0, NULL);
++	png_set_PLTE(data->png_ptr, data->info_ptr, NULL, 0);
++	png_set_invalid(data->png_ptr, data->info_ptr, 0);
++#else
+     data->info_ptr->width = width;
+     data->info_ptr->height = height;
+     data->info_ptr->valid = 0;
+@@ -168,6 +225,7 @@
+     data->info_ptr->compression_type = PNG_COMPRESSION_TYPE_DEFAULT;
+     data->info_ptr->filter_type = PNG_FILTER_TYPE_DEFAULT;
+     data->info_ptr->interlace_type = PNG_INTERLACE_NONE;
++#endif
+ 
+     png_write_info(data->png_ptr, data->info_ptr);
+ 
+@@ -182,7 +240,11 @@
+     png_data_t *data = (png_data_t*)_data;
+     int i;
+ 
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++	if (setjmp(png_jmpbuf((data->png_ptr))))
++#else
+     if (setjmp(data->png_ptr->jmpbuf))
++#endif
+ 	assert(0);
+ 
+     for (i = 0; i < num_lines; ++i)
+@@ -194,7 +256,11 @@
+ {
+     png_data_t *data = (png_data_t*)_data;
+ 
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++	if (setjmp(png_jmpbuf((data->png_ptr))))
++#else
+     if (setjmp(data->png_ptr->jmpbuf))
++#endif
+ 	assert(0);
+ 
+     png_write_end(data->png_ptr, data->info_ptr);

Copied: metapixel/repos/community-staging-x86_64/PKGBUILD (from rev 89534, metapixel/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2013-04-29 19:33:18 UTC (rev 89535)
@@ -0,0 +1,32 @@
+# $Id$
+# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
+# Contributor: Daniel Isenmann <daniel.isenmann [at] gmx [dot] de>
+
+pkgname=metapixel
+pkgver=1.0.2
+pkgrel=4
+pkgdesc='A program for generating photomosaics.'
+arch=('i686' 'x86_64')
+url='http://www.complang.tuwien.ac.at/schani/metapixel/'
+license=('GPL')
+depends=('giflib' 'libjpeg' 'libpng' 'perl')
+source=("http://www.complang.tuwien.ac.at/schani/metapixel/files/${pkgname}-${pkgver}.tar.gz"
+        'metapixel-1.0.2-libpng-1.5.patch')
+md5sums=('af5d77d38826756af213a08e3ada9941'
+         '1832a79790b07402735bfeb9f71f36e9')
+
+build() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  patch -p1 -i ../metapixel-1.0.2-libpng-1.5.patch
+
+  make
+}
+
+package() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  
+  install -dm0755 "${pkgdir}/usr/share/man/man1"
+
+  make PREFIX="${pkgdir}/usr" install
+}

Copied: metapixel/repos/community-staging-x86_64/metapixel-1.0.2-libpng-1.5.patch (from rev 89534, metapixel/trunk/metapixel-1.0.2-libpng-1.5.patch)
===================================================================
--- community-staging-x86_64/metapixel-1.0.2-libpng-1.5.patch	                        (rev 0)
+++ community-staging-x86_64/metapixel-1.0.2-libpng-1.5.patch	2013-04-29 19:33:18 UTC (rev 89535)
@@ -0,0 +1,174 @@
+--- metapixel-1.0.2.orig/rwimg/rwpng.c
++++ metapixel-1.0.2/rwimg/rwpng.c
+@@ -57,19 +57,39 @@
+     data->end_info = png_create_info_struct(data->png_ptr);
+     assert(data->end_info != 0);
+ 
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++	if (setjmp(png_jmpbuf((data->png_ptr))))
++#else
+     if (setjmp(data->png_ptr->jmpbuf))
++#endif
+ 	assert(0);
+ 
+-    png_init_io(data->png_ptr, data->file);
+-
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++	png_init_io(data->png_ptr, data->file);
++    png_read_info(data->png_ptr, data->info_ptr);
++#else
++	png_init_io(data->png_ptr, data->file);
+     png_read_info(data->png_ptr, data->info_ptr);
++#endif
+ 
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++	*width = png_get_image_width(data->png_ptr, data->info_ptr);
++	*height = png_get_image_height(data->png_ptr, data->info_ptr);
++	{
++		png_byte value = png_get_bit_depth(data->png_ptr, data->info_ptr);
++    	assert(value == 8 || value == 16);
++		value = png_get_color_type(data->png_ptr, data->info_ptr);
++    	assert(value == PNG_COLOR_TYPE_RGB || value == PNG_COLOR_TYPE_RGB_ALPHA);
++    	value = png_get_interlace_type(data->png_ptr, data->info_ptr);
++    	assert(value == PNG_INTERLACE_NONE);
++	}
++#else
+     *width = data->info_ptr->width;
+     *height = data->info_ptr->height;
+-
+     assert(data->info_ptr->bit_depth == 8 || data->info_ptr->bit_depth == 16);
+     assert(data->info_ptr->color_type == PNG_COLOR_TYPE_RGB || data->info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA);
+     assert(data->info_ptr->interlace_type == PNG_INTERLACE_NONE);
++#endif
+ 
+     data->have_read = 0;
+ 
+@@ -81,32 +101,51 @@
+ {
+     png_data_t *data = (png_data_t*)_data;
+     int i;
+-    int bps, spp;
++    int bps, spp, width;
+     unsigned char *row;
+ 
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++
++	if (setjmp(png_jmpbuf((data->png_ptr))))
++#else
+     if (setjmp(data->png_ptr->jmpbuf))
++#endif
+ 	assert(0);
+ 
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++	if(png_get_color_type(data->png_ptr, data->info_ptr) == PNG_COLOR_TYPE_RGB)
++#else
+     if (data->info_ptr->color_type == PNG_COLOR_TYPE_RGB)
++#endif
+ 	spp = 3;
+     else
+ 	spp = 4;
+ 
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++	if(png_get_bit_depth(data->png_ptr, data->info_ptr) == 16)
++#else
+     if (data->info_ptr->bit_depth == 16)
++#endif
+ 	bps = 2;
+     else
+ 	bps = 1;
+ 
+-    row = (unsigned char*)malloc(data->info_ptr->width * spp * bps);
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++	width = png_get_image_width(data->png_ptr, data->info_ptr);
++#else
++    width = data->info_ptr->width:
++#endif
++
++    row = (unsigned char*)malloc(width * spp * bps);
+ 
+     for (i = 0; i < num_lines; ++i)
+     {
+ 	int j, channel;
+ 
+ 	png_read_row(data->png_ptr, (png_bytep)row, 0);
+-	for (j = 0; j < data->info_ptr->width; ++j)
++	for (j = 0; j < width; ++j)
+ 	    for (channel = 0; channel < 3; ++channel)
+-		lines[i * data->info_ptr->width * 3 + j * 3 + channel] = row[j * spp * bps + channel * bps];
++		lines[i * width * 3 + j * 3 + channel] = row[j * spp * bps + channel * bps];
+     }
+ 
+     free(row);
+@@ -119,7 +158,11 @@
+ {
+     png_data_t *data = (png_data_t*)_data;
+ 
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++	if (setjmp(png_jmpbuf((data->png_ptr))))
++#else
+     if (setjmp(data->png_ptr->jmpbuf))
++#endif
+ 	assert(0);
+ 
+     if (data->have_read)
+@@ -148,7 +191,11 @@
+     data->info_ptr = png_create_info_struct(data->png_ptr);
+     assert(data->info_ptr != 0);
+ 
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++	if (setjmp(png_jmpbuf((data->png_ptr))))
++#else
+     if (setjmp(data->png_ptr->jmpbuf))
++#endif
+ 	assert(0);
+ 
+     if (pixel_stride == 4)
+@@ -156,6 +203,16 @@
+ 
+     png_init_io(data->png_ptr, data->file);
+ 
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++	png_set_IHDR(data->png_ptr, data->info_ptr,
++		width, height, 8, PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE,
++		PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
++
++	/* Maybe does not need following. */
++	png_set_tRNS(data->png_ptr, data->info_ptr, NULL, 0, NULL);
++	png_set_PLTE(data->png_ptr, data->info_ptr, NULL, 0);
++	png_set_invalid(data->png_ptr, data->info_ptr, 0);
++#else
+     data->info_ptr->width = width;
+     data->info_ptr->height = height;
+     data->info_ptr->valid = 0;
+@@ -168,6 +225,7 @@
+     data->info_ptr->compression_type = PNG_COMPRESSION_TYPE_DEFAULT;
+     data->info_ptr->filter_type = PNG_FILTER_TYPE_DEFAULT;
+     data->info_ptr->interlace_type = PNG_INTERLACE_NONE;
++#endif
+ 
+     png_write_info(data->png_ptr, data->info_ptr);
+ 
+@@ -182,7 +240,11 @@
+     png_data_t *data = (png_data_t*)_data;
+     int i;
+ 
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++	if (setjmp(png_jmpbuf((data->png_ptr))))
++#else
+     if (setjmp(data->png_ptr->jmpbuf))
++#endif
+ 	assert(0);
+ 
+     for (i = 0; i < num_lines; ++i)
+@@ -194,7 +256,11 @@
+ {
+     png_data_t *data = (png_data_t*)_data;
+ 
++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4
++	if (setjmp(png_jmpbuf((data->png_ptr))))
++#else
+     if (setjmp(data->png_ptr->jmpbuf))
++#endif
+ 	assert(0);
+ 
+     png_write_end(data->png_ptr, data->info_ptr);




More information about the arch-commits mailing list