media-gfx/exact-image: python-single-r1, EAPI=6
authorMichał Górny <mgorny@gentoo.org>
Sat, 18 Feb 2017 18:51:48 +0000 (19:51 +0100)
committerMichał Górny <mgorny@gentoo.org>
Sat, 18 Feb 2017 18:52:21 +0000 (19:52 +0100)
media-gfx/exact-image/exact-image-0.8.1-r2.ebuild [moved from media-gfx/exact-image/exact-image-0.8.1-r1.ebuild with 88% similarity]
media-gfx/exact-image/files/exact-image-0.7.5-libpng14.patch
media-gfx/exact-image/files/exact-image-0.8.1-libpng15.patch

similarity index 88%
rename from media-gfx/exact-image/exact-image-0.8.1-r1.ebuild
rename to media-gfx/exact-image/exact-image-0.8.1-r2.ebuild
index c12812e5a8c0f1285016f24cc56249312fe3a4ac..3b83d0e6502dff5144cf99fbc81878baa38f30f5 100644 (file)
@@ -1,11 +1,11 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI=4
-PYTHON_DEPEND="python? 2:2.5"
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
 
-inherit eutils multilib python toolchain-funcs
+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/"
@@ -26,6 +26,7 @@ RDEPEND="x11-libs/agg[truetype]
        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 )
@@ -40,21 +41,19 @@ DEPEND="${RDEPEND}
        swig? ( dev-lang/swig )"
 
 pkg_setup() {
-       if use python; then
-               python_set_active_version 2
-       fi
-       python_pkg_setup
+       use python && python-single-r1_pkg_setup
 }
 
 src_prepare() {
-       epatch \
+       eapply \
                "${FILESDIR}"/${PN}-0.7.5-libpng14.patch \
                "${FILESDIR}"/${P}-libpng15.patch
+       eapply_user
 
        # fix python hardcoded path wrt bug #327171
-       sed -i -e "s:python2.5:python$(python_get_version):" \
+       sed -i -e "s:python2.5:${EPYTHON}:" \
                -e "s:\$(libdir):usr/$(get_libdir):" \
-               "${S}"/api/python/Makefile
+               "${S}"/api/python/Makefile || die
 
        # Respect user CFLAGS/CXXFLAGS.
        sed -i \
index f25b9af02da9b9e998dfe57bc59baef06ed6f8de..7c62a6cbd726b895f46dd0d15d2fc66fd9560dd0 100644 (file)
@@ -1,5 +1,5 @@
---- codecs/png.cc
-+++ codecs/png.cc
+--- 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);
index 44c94726e35c2b06c75fa0c407d1007153fcccaa..94c8906a874a55dccc1b36b5432196d022e96281 100644 (file)
@@ -1,5 +1,5 @@
---- codecs/png.cc
-+++ codecs/png.cc
+--- a/codecs/png.cc
++++ b/codecs/png.cc
 @@ -16,6 +16,7 @@
   */