public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-libs/iulib/, media-libs/iulib/files/
@ 2016-01-24 22:08 David Seifert
  0 siblings, 0 replies; only message in thread
From: David Seifert @ 2016-01-24 22:08 UTC (permalink / raw
  To: gentoo-commits

commit:     d401688e98ab5bf83c95eccf313c9bacc6a0ccb5
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 24 22:08:10 2016 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Jan 24 22:08:47 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d401688e

media-libs/iulib: Fix wrong declaration of default arguments

Gentoo-Bug: 570102
* EAPI=6
* Make patch -p1 compatible

Package-Manager: portage-2.2.27

 .../iulib-0.4-default-arguments-declaration.patch  | 25 ++++++++++
 .../iulib/files/iulib-0.4-scons-build-env.patch    |  4 +-
 media-libs/iulib/iulib-0.4-r1.ebuild               | 58 ++++++++++++++++++++++
 3 files changed, 85 insertions(+), 2 deletions(-)

diff --git a/media-libs/iulib/files/iulib-0.4-default-arguments-declaration.patch b/media-libs/iulib/files/iulib-0.4-default-arguments-declaration.patch
new file mode 100644
index 0000000..cbffdee
--- /dev/null
+++ b/media-libs/iulib/files/iulib-0.4-default-arguments-declaration.patch
@@ -0,0 +1,25 @@
+Default arguments need to be specified in the class declaration and cannot be redeclared.
+https://bugs.gentoo.org/show_bug.cgi?id=570102
+
+--- iulib-0.4/imglib/imgops.cc
++++ iulib-0.4/imglib/imgops.cc
+@@ -133,7 +133,7 @@
+ 
+     template<class T,class V>
+     void addscaled(narray<T> &dest,narray<T> &src,
+-            V scale=1,int dx=0,int dy=0) {
++            V scale,int dx,int dy) {
+         for (int i=0; i<dest.dim(0); i++)
+             for (int j=0; j<dest.dim(1); j++)
+                 dest.unsafe_at(i,j) += (T)(scale*xref(src,i+dx,j+dy));
+--- iulib-0.4/imglib/imgops.h
++++ iulib-0.4/imglib/imgops.h
+@@ -67,7 +67,7 @@
+     }
+ 
+     template<class T, class V>
+-    void addscaled(colib::narray<T> &, colib::narray<T> &, V, int, int);
++    void addscaled(colib::narray<T> &dest, colib::narray<T> &src, V scale=1, int dx=0, int dy=0);
+     template<class T>
+     void tighten(colib::narray<T> &image);
+     template<class T>

diff --git a/media-libs/iulib/files/iulib-0.4-scons-build-env.patch b/media-libs/iulib/files/iulib-0.4-scons-build-env.patch
index 3983d9c..766795c 100644
--- a/media-libs/iulib/files/iulib-0.4-scons-build-env.patch
+++ b/media-libs/iulib/files/iulib-0.4-scons-build-env.patch
@@ -1,5 +1,5 @@
---- SConstruct
-+++ SConstruct
+--- iulib-0.4/SConstruct
++++ iulib-0.4/SConstruct
 @@ -36,12 +36,25 @@
  
  ### Options exposed via SCons

diff --git a/media-libs/iulib/iulib-0.4-r1.ebuild b/media-libs/iulib/iulib-0.4-r1.ebuild
new file mode 100644
index 0000000..2d57f63
--- /dev/null
+++ b/media-libs/iulib/iulib-0.4-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit scons-utils toolchain-funcs
+
+DESCRIPTION="easy-to-use image and video I/O functions"
+HOMEPAGE="https://github.com/tmbdev/iulib"
+SRC_URI="https://iulib.googlecode.com/files/${P}.tgz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="sdl"
+
+RDEPEND="sys-libs/zlib
+	media-libs/libpng:0=
+	virtual/jpeg:0
+	media-libs/tiff:0
+	sdl? (
+		media-libs/libsdl
+		media-libs/sdl-gfx
+	)"
+DEPEND="${RDEPEND}
+	dev-util/scons"
+
+PATCHES=(
+	"${FILESDIR}/${P}-scons-build-env.patch"
+	"${FILESDIR}/${P}-default-arguments-declaration.patch"
+)
+
+src_prepare() {
+	default
+	sed -i \
+		-e "/^have_sdl = 1/s:1:$(usex sdl 1 0):" \
+		-e '/tiff/s:inflate:TIFFOpen:' \
+		-e '/progs.Append(LIBS=libiulib)/s:Append:Prepend:' \
+		-e "/^libdir/s:/lib:/$(get_libdir):" \
+		SConstruct || die #297326 #308955 #310439
+	sed -i '/SDL.SDL_image.h/d' utils/dgraphics.cc || die #310443
+	tc-export AR CC CXX RANLIB
+}
+
+src_configure() {
+	# Avoid configure as we build/install with scons
+	:
+}
+
+src_compile() {
+	escons prefix=/usr
+}
+
+src_install() {
+	escons prefix="${D}"/usr install
+	dodoc CHANGES README TODO
+}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-01-24 22:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-24 22:08 [gentoo-commits] repo/gentoo:master commit in: media-libs/iulib/, media-libs/iulib/files/ David Seifert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox