media-gfx/metapixel: Fix giflib-5 building (#571934)
authorPacho Ramos <pacho@gentoo.org>
Sun, 16 Oct 2016 08:39:49 +0000 (10:39 +0200)
committerPacho Ramos <pacho@gentoo.org>
Sun, 16 Oct 2016 08:49:56 +0000 (10:49 +0200)
Package-Manager: portage-2.3.1

media-gfx/metapixel/files/metapixel-1.0.2-giflib5.patch [new file with mode: 0644]
media-gfx/metapixel/files/metapixel-1.0.2-libpng15.patch
media-gfx/metapixel/metapixel-1.0.2-r1.ebuild [new file with mode: 0644]

diff --git a/media-gfx/metapixel/files/metapixel-1.0.2-giflib5.patch b/media-gfx/metapixel/files/metapixel-1.0.2-giflib5.patch
new file mode 100644 (file)
index 0000000..b543dc4
--- /dev/null
@@ -0,0 +1,21 @@
+diff -u metapixel-1.0.2/debian/changelog metapixel-1.0.2/debian/changelog
+--- metapixel-1.0.2.orig/rwimg/rwgif.c
++++ metapixel-1.0.2/rwimg/rwgif.c
+@@ -54,7 +54,7 @@
+     
+     assert(data != 0);
+     
+-    data->file = DGifOpenFileName(filename);
++    data->file = DGifOpenFileName(filename, NULL);
+     
+     assert(data->file !=0);
+         
+@@ -137,7 +137,7 @@
+     }
+     free(buffer);
+     
+-    assert(DGifCloseFile(data->file) == GIF_OK);
++    assert(DGifCloseFile(data->file, NULL) == GIF_OK);
+     
+     return data;
+ }
index 988437dea2afa9c99d9038b93804eb4b666db8cf..f766fb14e02a4760ae0590281bfd40fa22372c5c 100644 (file)
@@ -1,5 +1,5 @@
---- rwimg/rwpng.c
-+++ rwimg/rwpng.c
+--- a/rwimg/rwpng.c
++++ b/rwimg/rwpng.c
 @@ -42,6 +42,7 @@
  open_png_file_reading (const char *filename, int *width, int *height)
  {
diff --git a/media-gfx/metapixel/metapixel-1.0.2-r1.ebuild b/media-gfx/metapixel/metapixel-1.0.2-r1.ebuild
new file mode 100644 (file)
index 0000000..43e9ad5
--- /dev/null
@@ -0,0 +1,45 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+inherit 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-5:0=
+       >=media-libs/libpng-1.4:0=
+       virtual/jpeg:0
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-libpng15.patch
+       "${FILESDIR}"/${P}-giflib5.patch
+)
+
+src_prepare() {
+       default
+
+       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
+}