summaryrefslogtreecommitdiff
path: root/media-gfx/exact-image
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /media-gfx/exact-image
reinit the tree, so we can have metadata
Diffstat (limited to 'media-gfx/exact-image')
-rw-r--r--media-gfx/exact-image/Manifest8
-rw-r--r--media-gfx/exact-image/exact-image-0.8.1-r3.ebuild105
-rw-r--r--media-gfx/exact-image/files/exact-image-0.7.5-libpng14.patch69
-rw-r--r--media-gfx/exact-image/files/exact-image-0.8.1-gcc6.patch139
-rw-r--r--media-gfx/exact-image/files/exact-image-0.8.1-libpng15.patch34
-rw-r--r--media-gfx/exact-image/metadata.xml11
6 files changed, 366 insertions, 0 deletions
diff --git a/media-gfx/exact-image/Manifest b/media-gfx/exact-image/Manifest
new file mode 100644
index 000000000000..ead7933124a5
--- /dev/null
+++ b/media-gfx/exact-image/Manifest
@@ -0,0 +1,8 @@
+AUX exact-image-0.7.5-libpng14.patch 2435 SHA256 55dfd0b95374bcf10810102595a27147ff7b9145cf55e5113baa4d7dc2d328a2 SHA512 4f216f96c4190c4f04991368d92e685592f694cb3c9f5dab90281a9bc1f06c9fcaa817494fb15412f5dc427750558019b6e2aeef8769ed932e974e201776bd48 WHIRLPOOL 86813e134690c46ae0261d39fa9ecd53dfe325d05cfe0ce2a82770e50bd0483f92e9c3b92c727949af3c0532c8fcdff70df55a6ddffa8e2646492f1ebcc54d05
+AUX exact-image-0.8.1-gcc6.patch 6101 SHA256 8d83e7d7a651b9ba4c7549ebdd547aa73280cb3f449ac2d38fcd8f46af7d6f3a SHA512 e11a9dca3c5c6ac4ca5557e6ca212354346b307c38abe77ceaea9f15ef35f5a8de8d24628b290c4ecfdaf84dee44af49414d57c89b067e78b60a02d4e09a5dd4 WHIRLPOOL 2c81167b6aedc82ab7737f6e130a207352a7b8eccdba0286d485d951ff09ef832dc3d7991f501fe43dbd546420ef5274aaa41ac4741011c78d43e9d5fc2cd28e
+AUX exact-image-0.8.1-libpng15.patch 754 SHA256 73f3f17b39aa1fd519bec63f0c91859a9edeb757c3f3688b74828f367641d3cd SHA512 7f3d271d908e55e3731b38e072dcadcb0d99cbf3de327d5bd486e232c2827055b8f712052e04c9bc81b20fd42d27cc18627a6bc118c9d1ece58b91c18fa9bf13 WHIRLPOOL 4db5dd1a92cf6c1a9e5ea9e6ac95550b05397ae9ab1b5fb0420d6812f3900d4b35fc8e7e91f1af3e6c6e784e0eff13937f142a29e232224654534ad817a2d5e5
+DIST exact-image-0.8.1.tar.bz2 283660 SHA256 926a09c897489705ba42daeb01fc4a3c327a8194dc65431f630d50684390e28b SHA512 0adc51c5a29415e236a963cfdaf8f5527e628e9a645e87d00c69a7185e60639cfcd9b1c2b4c3abe1826c5364f0c5d45a0ebb8923cfed53d041d1d36b2604b565 WHIRLPOOL 58b7d66f52d5b6c2202806cad6ca2ebc8e21035a32698861a575c8246f63f4edacc930defd3fa4f6b8496368d2d9d002f06f6463e4f45abc1c235a0bc68a0352
+EBUILD exact-image-0.8.1-r3.ebuild 2641 SHA256 09f06de779ac28adadd268dc278b9ee9ec034fc2f444713a74f0dcdade16b3be SHA512 102ecdbbface34c0b8f773095bdf97284e76c4eaa9baf3180afc3f0a66cca8a931c4864aaa8809d0ecdcce29329f3075e2d6e13d375f181d755bd4507778e44c WHIRLPOOL e9eb47b524ce2b96ab55a0afa9743039cd63dd1f17e716143fa91415fd221e9988a2215bc26a151d6a89efc1da5d35b0ef19a1d69e224690ffcfd598b96caccb
+MISC ChangeLog 2923 SHA256 f11a8b8b35a357a11186dced954b03676c2a15af02a5bf0aa0a8366553efe694 SHA512 1099f690387be080c6854d732b4551a78d2ac9701dab893af6478c0c052949c8fb70fdbf92022d161aa4fe4a15f79be8a68663057b5f38120265299f8598422b WHIRLPOOL bbd9d3b021a1ef735cdaec3479801dc6ad772159e8a7922c6da96bdcfb5416d166c72a2a62147f9b1e868081fd7498b3ff7c0aa6365c0ff635e7a25a5c825f52
+MISC ChangeLog-2015 2154 SHA256 7afbdd08641904d111b4ee92f83c25e19d316bf072eaa3043bbd1c02ee278ffc SHA512 ef3528d1e0dce31e1ad853eb6100887cfa3c2bbc22779bff85b71021efc40a363521ab868d6d3a9fc4f960be113cc163e61b8d0a822e0355080cffdfd0ca4c0a WHIRLPOOL ccd1339a156d123022cf95a5fe1b06fd8e651c150807cf86c62d3771854b806a45618f282f48f07118441078d34bc82da77e834c8891b290969b35e6d6023635
+MISC metadata.xml 337 SHA256 c70d9acde2108a79d809bf2df55617deaf508c8e721197a6a9f12c1181db5894 SHA512 733bb28cd21c30454b7e0f62ab91f88d6b4df6694eee70d9854336421d905c5babfb7e1d169849ca5109253a16c8fe5c8b7482c65cb1de1bbae038024c2934f0 WHIRLPOOL b0c1e2cec23643938a224a3d74ea85576f672fe2251dc1d1cd769c547c84bf4790561db89407fe4a8cdc88338ffb4c71dbc134cd13502ae01880b44c4e50eef1
diff --git a/media-gfx/exact-image/exact-image-0.8.1-r3.ebuild b/media-gfx/exact-image/exact-image-0.8.1-r3.ebuild
new file mode 100644
index 000000000000..7aae44b93438
--- /dev/null
+++ b/media-gfx/exact-image/exact-image-0.8.1-r3.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils multilib python-single-r1 toolchain-funcs
+
+DESCRIPTION="A fast, modern and generic image processing library"
+HOMEPAGE="http://www.exactcode.de/site/open_source/exactimage/"
+SRC_URI="http://dl.exactcode.de/oss/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="expat jpeg jpeg2k lua openexr php perl png python ruby swig tiff truetype X"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="x11-libs/agg[truetype]
+ sys-libs/zlib
+ expat? ( dev-libs/expat )
+ jpeg2k? ( media-libs/jasper )
+ jpeg? ( virtual/jpeg )
+ lua? ( dev-lang/lua )
+ openexr? ( media-libs/openexr )
+ php? ( dev-lang/php )
+ perl? ( dev-lang/perl )
+ png? ( >=media-libs/libpng-1.2.43 )
+ python? ( ${PYTHON_DEPS} )
+ ruby? ( dev-lang/ruby )
+ tiff? ( media-libs/tiff )
+ truetype? ( >=media-libs/freetype-2 )
+ X? (
+ x11-libs/libXext
+ x11-libs/libXt
+ x11-libs/libICE
+ x11-libs/libSM
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ swig? ( dev-lang/swig )"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ eapply \
+ "${FILESDIR}"/${PN}-0.7.5-libpng14.patch \
+ "${FILESDIR}"/${P}-libpng15.patch \
+ "${FILESDIR}"/${P}-gcc6.patch
+ eapply_user
+
+ # fix python hardcoded path wrt bug #327171
+ sed -i -e "s:python2.5:${EPYTHON}:" \
+ -e "s:\$(libdir):usr/$(get_libdir):" \
+ "${S}"/api/python/Makefile || die
+
+ # Respect user CFLAGS/CXXFLAGS.
+ sed -i \
+ -e '/C\(XX\)\?FLAGS =/s/-O2//' \
+ -e "\$aCFLAGS += ${CFLAGS}\nCXXFLAGS += ${CXXFLAGS}" \
+ Makefile || die
+
+ # Show commands. Use qualified CC/CXX.
+ sed -i \
+ -e '/^Q =/d' \
+ -e '/^\t@echo /d' \
+ -e "\$aCC:=$(tc-getCC)\nCXX:=$(tc-getCXX)" \
+ build/bottom.make || die
+
+ # The copied string fits exactly. Use memcpy to reflect that a null
+ # terminator is not needed.
+ sed -i \
+ -e 's/strcpy(\([^,]*\)\(,["a-zA-Z -]*\))/memcpy(\1\2, sizeof(\1))/' \
+ codecs/tga.cc || die
+}
+
+src_configure() {
+ # evas -> enlightenment overlay
+ # bardecode -> protected by custom license
+ # libungif -> not supported anymore
+
+ ./configure \
+ --prefix=/usr \
+ --libdir=/usr/$(get_libdir) \
+ $(use_with X x11) \
+ $(use_with truetype freetype) \
+ --without-evas \
+ $(use_with jpeg libjpeg) \
+ $(use_with tiff libtiff) \
+ $(use_with png libpng) \
+ --without-libungif \
+ $(use_with jpeg2k jasper) \
+ $(use_with openexr) \
+ $(use_with expat) \
+ --without-lcms \
+ --without-bardecode \
+ $(use_with lua) \
+ $(use_with swig) \
+ $(use_with perl) \
+ $(use_with python) \
+ $(use_with php) \
+ $(use_with ruby) || die
+}
diff --git a/media-gfx/exact-image/files/exact-image-0.7.5-libpng14.patch b/media-gfx/exact-image/files/exact-image-0.7.5-libpng14.patch
new file mode 100644
index 000000000000..7c62a6cbd726
--- /dev/null
+++ b/media-gfx/exact-image/files/exact-image-0.7.5-libpng14.patch
@@ -0,0 +1,69 @@
+--- a/codecs/png.cc
++++ b/codecs/png.cc
+@@ -71,7 +71,7 @@
+ /* Allocate/initialize the memory for image information. REQUIRED. */
+ info_ptr = png_create_info_struct(png_ptr);
+ if (info_ptr == NULL) {
+- png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);
++ png_destroy_read_struct(&png_ptr, NULL, NULL);
+ return 0;
+ }
+
+@@ -82,7 +82,7 @@
+
+ if (setjmp(png_jmpbuf(png_ptr))) {
+ /* Free all of the memory associated with the png_ptr and info_ptr */
+- png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
++ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+ /* If we get here, we had a problem reading the file */
+ return 0;
+ }
+@@ -99,7 +99,7 @@
+ png_read_info (png_ptr, info_ptr);
+
+ png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
+- &interlace_type, int_p_NULL, int_p_NULL);
++ &interlace_type, NULL, NULL);
+
+ image.w = width;
+ image.h = height;
+@@ -132,7 +132,7 @@
+ #if 0 // no longer needed
+ /* Expand grayscale images to the full 8 bits from 2, or 4 bits/pixel */
+ if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth > 1 && bit_depth < 8) {
+- png_set_gray_1_2_4_to_8(png_ptr);
++ png_set_expand_gray_1_2_4_to_8(png_ptr);
+ image.bps = 8;
+ }
+ #endif
+@@ -196,11 +196,11 @@
+ for (int pass = 0; pass < number_passes; ++pass)
+ for (unsigned int y = 0; y < height; ++y) {
+ row_pointers[0] = image.getRawData() + y * stride;
+- png_read_rows(png_ptr, row_pointers, png_bytepp_NULL, 1);
++ png_read_rows(png_ptr, row_pointers, NULL, 1);
+ }
+
+ /* clean up after the read, and free any memory allocated - REQUIRED */
+- png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
++ png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
+
+ /* that's it */
+ return true;
+@@ -224,7 +224,7 @@
+ /* Allocate/initialize the memory for image information. REQUIRED. */
+ info_ptr = png_create_info_struct(png_ptr);
+ if (info_ptr == NULL) {
+- png_destroy_write_struct(&png_ptr, png_infopp_NULL);
++ png_destroy_write_struct(&png_ptr, NULL);
+ return false;
+ }
+
+@@ -244,7 +244,6 @@
+ else if (quality > Z_BEST_COMPRESSION) quality = Z_BEST_COMPRESSION;
+ png_set_compression_level(png_ptr, quality);
+
+- png_info_init (info_ptr);
+
+ /* Set up our STL stream output control */
+ png_set_write_fn (png_ptr, stream, &stdstream_write_data, &stdstream_flush_data);
diff --git a/media-gfx/exact-image/files/exact-image-0.8.1-gcc6.patch b/media-gfx/exact-image/files/exact-image-0.8.1-gcc6.patch
new file mode 100644
index 000000000000..4871c99205a2
--- /dev/null
+++ b/media-gfx/exact-image/files/exact-image-0.8.1-gcc6.patch
@@ -0,0 +1,139 @@
+Bug: https://bugs.gentoo.org/600380
+
+--- a/bardecode/code25i.hh
++++ b/bardecode/code25i.hh
+@@ -20,6 +20,12 @@
+
+ #include "scanner_utils.hh"
+
++#if __cplusplus >= 201103L
++#define STATIC_CONST_DOUBLE static constexpr double
++#else
++#define STATIC_CONST_DOUBLE static const double
++#endif
++
+ namespace BarDecode
+ {
+ struct code25i_t
+@@ -37,11 +43,11 @@
+ #define w_hq 1.5
+ #define tol 0.2
+ #else
+- static const double n_lq = 15;
+- static const double n_hq = 5.3;
+- static const double w_lq = 5.2;
+- static const double w_hq = 1.5;
+- static const double tol = 0.2;
++ STATIC_CONST_DOUBLE n_lq = 15;
++ STATIC_CONST_DOUBLE n_hq = 5.3;
++ STATIC_CONST_DOUBLE w_lq = 5.2;
++ STATIC_CONST_DOUBLE w_hq = 1.5;
++ STATIC_CONST_DOUBLE tol = 0.2;
+ #endif
+ static const usize_t min_quiet_usize = 5;
+ //static const usize_t min_quiet_usize = 10;
+--- a/codecs/bmp.cc
++++ b/codecs/bmp.cc
+@@ -473,7 +473,7 @@
+ std::cerr << "scanline " << row << " Seek error: " << stream->tellg() << " vs " << offset << std::endl;
+ }
+
+- if (stream->read ((char*)row_data, file_stride) < 0) {
++ if (!static_cast<bool>(stream->read ((char*)row_data, file_stride))) {
+ std::cerr << "scanline " << row << ": Read error\n";
+ }
+
+--- a/codecs/dcraw.h
++++ b/codecs/dcraw.h
+@@ -3958,22 +3958,22 @@
+ -2,+0,+0,-1,0,0x06, -2,+0,+0,+0,1,0x02, -2,+0,+0,+1,0,0x03,
+ -2,+1,-1,+0,0,0x04, -2,+1,+0,-1,1,0x04, -2,+1,+0,+0,0,0x06,
+ -2,+1,+0,+1,0,0x02, -2,+2,+0,+0,1,0x04, -2,+2,+0,+1,0,0x04,
+- -1,-2,-1,+0,0,0x80, -1,-2,+0,-1,0,0x01, -1,-2,+1,-1,0,0x01,
+- -1,-2,+1,+0,1,0x01, -1,-1,-1,+1,0,0x88, -1,-1,+1,-2,0,0x40,
++ -1,-2,-1,+0,0,(signed char) 0x80, -1,-2,+0,-1,0,0x01, -1,-2,+1,-1,0,0x01,
++ -1,-2,+1,+0,1,0x01, -1,-1,-1,+1,0,(signed char) 0x88, -1,-1,+1,-2,0,0x40,
+ -1,-1,+1,-1,0,0x22, -1,-1,+1,+0,0,0x33, -1,-1,+1,+1,1,0x11,
+ -1,+0,-1,+2,0,0x08, -1,+0,+0,-1,0,0x44, -1,+0,+0,+1,0,0x11,
+ -1,+0,+1,-2,1,0x40, -1,+0,+1,-1,0,0x66, -1,+0,+1,+0,1,0x22,
+ -1,+0,+1,+1,0,0x33, -1,+0,+1,+2,1,0x10, -1,+1,+1,-1,1,0x44,
+ -1,+1,+1,+0,0,0x66, -1,+1,+1,+1,0,0x22, -1,+1,+1,+2,0,0x10,
+ -1,+2,+0,+1,0,0x04, -1,+2,+1,+0,1,0x04, -1,+2,+1,+1,0,0x04,
+- +0,-2,+0,+0,1,0x80, +0,-1,+0,+1,1,0x88, +0,-1,+1,-2,0,0x40,
++ +0,-2,+0,+0,1,(signed char) 0x80, +0,-1,+0,+1,1,(signed char) 0x88, +0,-1,+1,-2,0,0x40,
+ +0,-1,+1,+0,0,0x11, +0,-1,+2,-2,0,0x40, +0,-1,+2,-1,0,0x20,
+ +0,-1,+2,+0,0,0x30, +0,-1,+2,+1,1,0x10, +0,+0,+0,+2,1,0x08,
+ +0,+0,+2,-2,1,0x40, +0,+0,+2,-1,0,0x60, +0,+0,+2,+0,1,0x20,
+ +0,+0,+2,+1,0,0x30, +0,+0,+2,+2,1,0x10, +0,+1,+1,+0,0,0x44,
+ +0,+1,+1,+2,0,0x10, +0,+1,+2,-1,1,0x40, +0,+1,+2,+0,0,0x60,
+- +0,+1,+2,+1,0,0x20, +0,+1,+2,+2,0,0x10, +1,-2,+1,+0,0,0x80,
+- +1,-1,+1,+1,0,0x88, +1,+0,+1,+2,0,0x08, +1,+0,+2,-1,0,0x40,
++ +0,+1,+2,+1,0,0x20, +0,+1,+2,+2,0,0x10, +1,-2,+1,+0,0,(signed char) 0x80,
++ +1,-1,+1,+1,0,(signed char) 0x88, +1,+0,+1,+2,0,0x08, +1,+0,+2,-1,0,0x40,
+ +1,+0,+2,+1,0,0x10
+ }, chood[] = { -1,-1, -1,0, -1,+1, 0,+1, +1,+1, +1,0, +1,-1, 0,-1 };
+ ushort (*brow[5])[4], *pix;
+@@ -6341,11 +6341,11 @@
+ { 10793,-3791,-1146,-7498,15177,2488,-1390,1577,7321 } },
+ { "OLYMPUS C80", 0, 0,
+ { 8606,-2509,-1014,-8238,15714,2703,-942,979,7760 } },
+- { "OLYMPUS E-10", 0, 0xffc0,
++ { "OLYMPUS E-10", 0, (short) 0xffc0,
+ { 12745,-4500,-1416,-6062,14542,1580,-1934,2256,6603 } },
+- { "OLYMPUS E-1", 0, 0xfff0,
++ { "OLYMPUS E-1", 0, (short) 0xfff0,
+ { 11846,-4767,-945,-7027,15878,1089,-2699,4122,8311 } },
+- { "OLYMPUS E-20", 0, 0xffc0,
++ { "OLYMPUS E-20", 0, (short) 0xffc0,
+ { 13173,-4732,-1499,-5807,14036,1895,-2045,2452,7142 } },
+ { "OLYMPUS E-300", 0, 0,
+ { 7828,-1761,-348,-5788,14071,1830,-2853,4518,6557 } },
+@@ -6353,7 +6353,7 @@
+ { 8961,-2473,-1084,-7979,15990,2067,-2319,3035,8249 } },
+ { "OLYMPUS E-3", 0, 0xf99,
+ { 9487,-2875,-1115,-7533,15606,2010,-1618,2100,7389 } },
+- { "OLYMPUS E-400", 0, 0xfff0,
++ { "OLYMPUS E-400", 0, (short) 0xfff0,
+ { 6169,-1483,-21,-7107,14761,2536,-2904,3580,8568 } },
+ { "OLYMPUS E-410", 0, 0xf6a,
+ { 8856,-2582,-1026,-7761,15766,2082,-2009,2575,7469 } },
+@@ -6399,23 +6399,23 @@
+ { 9186,-2678,-907,-8693,16517,2260,-1129,1094,8524 } },
+ { "PENTAX K2000", 0, 0,
+ { 11057,-3604,-1155,-5152,13046,2329,-282,375,8104 } },
+- { "Panasonic DMC-FZ8", 0, 0xf7f0,
++ { "Panasonic DMC-FZ8", 0, (short) 0xf7f0,
+ { 8986,-2755,-802,-6341,13575,3077,-1476,2144,6379 } },
+ { "Panasonic DMC-FZ18", 0, 0,
+ { 9932,-3060,-935,-5809,13331,2753,-1267,2155,5575 } },
+ { "Panasonic DMC-FZ28", 15, 0xfff,
+ { 10109,-3488,-993,-5412,12812,2916,-1305,2140,5543 } },
+- { "Panasonic DMC-FZ30", 0, 0xf94c,
++ { "Panasonic DMC-FZ30", 0, (short) 0xf94c,
+ { 10976,-4029,-1141,-7918,15491,2600,-1670,2071,8246 } },
+- { "Panasonic DMC-FZ50", 0, 0xfff0, /* aka "LEICA V-LUX1" */
++ { "Panasonic DMC-FZ50", 0, (short) 0xfff0, /* aka "LEICA V-LUX1" */
+ { 7906,-2709,-594,-6231,13351,3220,-1922,2631,6537 } },
+ { "Panasonic DMC-L10", 15, 0xf96,
+ { 8025,-1942,-1050,-7920,15904,2100,-2456,3005,7039 } },
+- { "Panasonic DMC-L1", 0, 0xf7fc, /* aka "LEICA DIGILUX 3" */
++ { "Panasonic DMC-L1", 0, (short) 0xf7fc, /* aka "LEICA DIGILUX 3" */
+ { 8054,-1885,-1025,-8349,16367,2040,-2805,3542,7629 } },
+ { "Panasonic DMC-LC1", 0, 0, /* aka "LEICA DIGILUX 2" */
+ { 11340,-4069,-1275,-7555,15266,2448,-2960,3426,7685 } },
+- { "Panasonic DMC-LX1", 0, 0xf7f0, /* aka "LEICA D-LUX2" */
++ { "Panasonic DMC-LX1", 0, (short) 0xf7f0, /* aka "LEICA D-LUX2" */
+ { 10704,-4187,-1230,-8314,15952,2501,-920,945,8927 } },
+ { "Panasonic DMC-LX2", 0, 0, /* aka "LEICA D-LUX3" */
+ { 8048,-2810,-623,-6450,13519,3272,-1700,2146,7049 } },
+--- a/codecs/raw.cc
++++ b/codecs/raw.cc
+@@ -66,7 +66,7 @@
+ if (!image.getRawData())
+ return false;
+
+- return stream->write ((char*)image.getRawData(), image.stride()*image.h)
++ return static_cast<bool>(stream->write ((char*)image.getRawData(), image.stride()*image.h))
+ /* ==
+ (size_t) image.stride()*image.h*/;
+ }
diff --git a/media-gfx/exact-image/files/exact-image-0.8.1-libpng15.patch b/media-gfx/exact-image/files/exact-image-0.8.1-libpng15.patch
new file mode 100644
index 000000000000..94c8906a874a
--- /dev/null
+++ b/media-gfx/exact-image/files/exact-image-0.8.1-libpng15.patch
@@ -0,0 +1,34 @@
+--- a/codecs/png.cc
++++ b/codecs/png.cc
+@@ -16,6 +16,7 @@
+ */
+
+ #include <stdlib.h>
++#include <zlib.h>
+ #include <png.h>
+
+ #include <iostream>
+@@ -104,7 +105,7 @@
+ image.w = width;
+ image.h = height;
+ image.bps = bit_depth;
+- image.spp = info_ptr->channels;
++ image.spp = png_get_channels(png_ptr, info_ptr);
+
+ png_uint_32 res_x, res_y;
+ res_x = png_get_x_pixels_per_meter(png_ptr, info_ptr);
+@@ -120,10 +121,13 @@
+ // png_set_packswap(png_ptr);
+
+ /* Expand paletted colors into true RGB triplets */
++
++ int num_trans;
++
+ if (color_type == PNG_COLOR_TYPE_PALETTE) {
+ png_set_palette_to_rgb(png_ptr);
+ image.bps = 8;
+- if (info_ptr->num_trans)
++ if (num_trans)
+ image.spp = 4;
+ else
+ image.spp = 3;
diff --git a/media-gfx/exact-image/metadata.xml b/media-gfx/exact-image/metadata.xml
new file mode 100644
index 000000000000..24dec3e96522
--- /dev/null
+++ b/media-gfx/exact-image/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>graphics@gentoo.org</email>
+ <name>Gentoo Graphics Project</name>
+</maintainer>
+<use>
+ <flag name="swig">Adds Swig support <pkg>dev-lang/swig</pkg></flag>
+</use>
+</pkgmetadata>