summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-gfx/metapixel
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-gfx/metapixel')
-rw-r--r--media-gfx/metapixel/Manifest1
-rw-r--r--media-gfx/metapixel/files/metapixel-1.0.2-libpng15.patch141
-rw-r--r--media-gfx/metapixel/metadata.xml5
-rw-r--r--media-gfx/metapixel/metapixel-1.0.2.ebuild38
4 files changed, 185 insertions, 0 deletions
diff --git a/media-gfx/metapixel/Manifest b/media-gfx/metapixel/Manifest
new file mode 100644
index 000000000000..a36da97047ca
--- /dev/null
+++ b/media-gfx/metapixel/Manifest
@@ -0,0 +1 @@
+DIST metapixel-1.0.2.tar.gz 63197 RMD160 7343c66e925e5b55cfe63624be18159717b1295e SHA1 f917aec91430b1bdbcc7b3dea29cb93f15a04c77 SHA256 8d77810978da397c070b9b4e228ae6204e9f5c524518ad1a4fcab9462171f55b
diff --git a/media-gfx/metapixel/files/metapixel-1.0.2-libpng15.patch b/media-gfx/metapixel/files/metapixel-1.0.2-libpng15.patch
new file mode 100644
index 000000000000..988437dea2af
--- /dev/null
+++ b/media-gfx/metapixel/files/metapixel-1.0.2-libpng15.patch
@@ -0,0 +1,141 @@
+--- rwimg/rwpng.c
++++ rwimg/rwpng.c
+@@ -42,6 +42,7 @@
+ open_png_file_reading (const char *filename, int *width, int *height)
+ {
+ png_data_t *data = (png_data_t*)malloc(sizeof(png_data_t));
++ int _bit_depth,_color_type,_interlace_type,_compression,_filter;
+
+ assert(data != 0);
+
+@@ -57,19 +58,20 @@
+ data->end_info = png_create_info_struct(data->png_ptr);
+ assert(data->end_info != 0);
+
+- if (setjmp(data->png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(data->png_ptr)))
+ assert(0);
+
+ png_init_io(data->png_ptr, data->file);
+
+ png_read_info(data->png_ptr, data->info_ptr);
+
+- *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);
++ png_get_IHDR(data->png_ptr,data->info_ptr,
++ (png_uint_32 *)width,(png_uint_32 *)height,
++ &_bit_depth,&_color_type,&_interlace_type,&_compression,&_filter);
++
++ assert(_bit_depth == 8 || _bit_depth == 16);
++ assert(_color_type == PNG_COLOR_TYPE_RGB || _color_type == PNG_COLOR_TYPE_RGB_ALPHA);
++ assert(_interlace_type == PNG_INTERLACE_NONE);
+
+ data->have_read = 0;
+
+@@ -83,30 +85,36 @@
+ int i;
+ int bps, spp;
+ unsigned char *row;
++ png_uint_32 _width,_height;
++ int _bit_depth,_color_type,_interlace_type,_compression,_filter;
+
+- if (setjmp(data->png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(data->png_ptr)))
+ assert(0);
+
+- if (data->info_ptr->color_type == PNG_COLOR_TYPE_RGB)
++ png_get_IHDR(data->png_ptr,data->info_ptr,
++ &_width,&_height,&_bit_depth,&_color_type,&_interlace_type,
++ &_compression,&_filter);
++
++ if (_color_type == PNG_COLOR_TYPE_RGB)
+ spp = 3;
+ else
+ spp = 4;
+
+- if (data->info_ptr->bit_depth == 16)
++ if (_bit_depth == 16)
+ bps = 2;
+ else
+ bps = 1;
+
+- row = (unsigned char*)malloc(data->info_ptr->width * spp * bps);
++ 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 +127,7 @@
+ {
+ png_data_t *data = (png_data_t*)_data;
+
+- if (setjmp(data->png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(data->png_ptr)))
+ assert(0);
+
+ if (data->have_read)
+@@ -148,7 +156,7 @@
+ data->info_ptr = png_create_info_struct(data->png_ptr);
+ assert(data->info_ptr != 0);
+
+- if (setjmp(data->png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(data->png_ptr)))
+ assert(0);
+
+ if (pixel_stride == 4)
+@@ -156,18 +164,14 @@
+
+ png_init_io(data->png_ptr, data->file);
+
+- data->info_ptr->width = width;
+- data->info_ptr->height = height;
+- data->info_ptr->valid = 0;
++ 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);
++ /* setting these to 0 so just skipping ...
+ data->info_ptr->rowbytes = width * 3;
+ data->info_ptr->palette = 0;
+ data->info_ptr->num_palette = 0;
+- data->info_ptr->num_trans = 0;
+- data->info_ptr->bit_depth = 8;
+- data->info_ptr->color_type = PNG_COLOR_TYPE_RGB;
+- 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;
++ data->info_ptr->num_trans = 0; */
+
+ png_write_info(data->png_ptr, data->info_ptr);
+
+@@ -182,7 +186,7 @@
+ png_data_t *data = (png_data_t*)_data;
+ int i;
+
+- if (setjmp(data->png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(data->png_ptr)))
+ assert(0);
+
+ for (i = 0; i < num_lines; ++i)
+@@ -194,7 +198,7 @@
+ {
+ png_data_t *data = (png_data_t*)_data;
+
+- if (setjmp(data->png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(data->png_ptr)))
+ assert(0);
+
+ png_write_end(data->png_ptr, data->info_ptr);
diff --git a/media-gfx/metapixel/metadata.xml b/media-gfx/metapixel/metadata.xml
new file mode 100644
index 000000000000..e770d1bc9a96
--- /dev/null
+++ b/media-gfx/metapixel/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>graphics</herd>
+</pkgmetadata>
diff --git a/media-gfx/metapixel/metapixel-1.0.2.ebuild b/media-gfx/metapixel/metapixel-1.0.2.ebuild
new file mode 100644
index 000000000000..67e2c002dd44
--- /dev/null
+++ b/media-gfx/metapixel/metapixel-1.0.2.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit eutils toolchain-funcs
+
+DESCRIPTION="a program for generating photomosaics"
+HOMEPAGE="http://www.complang.tuwien.ac.at/schani/metapixel"
+SRC_URI="http://www.complang.tuwien.ac.at/schani/${PN}/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+RDEPEND="dev-lang/perl
+ media-libs/giflib
+ >=media-libs/libpng-1.4
+ virtual/jpeg"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-libpng15.patch
+
+ sed -i -e 's:/usr/X11R6:/usr:g' Makefile || die
+ sed -i -e 's:ar:$(AR):' rwimg/Makefile || die
+}
+
+src_compile() {
+ emake AR="$(tc-getAR)" CC="$(tc-getCC)" OPTIMIZE="${CFLAGS}" LDOPTS="${LDFLAGS}"
+}
+
+src_install() {
+ dobin ${PN}{,-prepare,-imagesize,-sizesort}
+ doman ${PN}.1
+ dodoc NEWS README
+}