From e714d8a5c64dac59bdf704e8996106016af70b45 Mon Sep 17 00:00:00 2001
From: Tomas Chvatal <scarabeus@gentoo.org>
Date: Mon, 25 May 2009 14:52:05 +0000
Subject: Fix build issue per bug #271057. Remove old. (Portage version:
 2.2_rc33/cvs/Linux x86_64)

---
 media-plugins/kipi-plugins/ChangeLog               |   7 +-
 .../kipi-plugins/files/0.2.0-picasa.patch          |  14 --
 .../files/kipi-plugins-libgpod-0.7.patch           | 148 +++++++++++++++++++++
 .../kipi-plugins/kipi-plugins-0.1.7.ebuild         |   8 +-
 .../kipi-plugins/kipi-plugins-0.2.0-r1.ebuild      |  79 -----------
 5 files changed, 159 insertions(+), 97 deletions(-)
 delete mode 100644 media-plugins/kipi-plugins/files/0.2.0-picasa.patch
 create mode 100644 media-plugins/kipi-plugins/files/kipi-plugins-libgpod-0.7.patch
 delete mode 100644 media-plugins/kipi-plugins/kipi-plugins-0.2.0-r1.ebuild

diff --git a/media-plugins/kipi-plugins/ChangeLog b/media-plugins/kipi-plugins/ChangeLog
index 425c43368eff..7221e6bf0fe8 100644
--- a/media-plugins/kipi-plugins/ChangeLog
+++ b/media-plugins/kipi-plugins/ChangeLog
@@ -1,6 +1,11 @@
 # ChangeLog for media-plugins/kipi-plugins
 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-plugins/kipi-plugins/ChangeLog,v 1.49 2009/05/22 16:17:57 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-plugins/kipi-plugins/ChangeLog,v 1.50 2009/05/25 14:52:05 scarabeus Exp $
+
+  25 May 2009; Tomas Chvatal <scarabeus@gentoo.org>
+  -files/0.2.0-picasa.patch, kipi-plugins-0.1.7.ebuild,
+  -kipi-plugins-0.2.0-r1.ebuild, +files/kipi-plugins-libgpod-0.7.patch:
+  Fix build issue per bug #271057. Remove old.
 
 *kipi-plugins-0.3.0 (22 May 2009)
 
diff --git a/media-plugins/kipi-plugins/files/0.2.0-picasa.patch b/media-plugins/kipi-plugins/files/0.2.0-picasa.patch
deleted file mode 100644
index 60dd4970ce3d..000000000000
--- a/media-plugins/kipi-plugins/files/0.2.0-picasa.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- trunk/extragear/graphics/kipi-plugins/picasawebexport/picasawebtalker.cpp	2009/03/21 20:09:51	942469
-+++ trunk/extragear/graphics/kipi-plugins/picasawebexport/picasawebtalker.cpp	2009/03/21 20:11:49	942470
-@@ -758,10 +758,7 @@
- 
-                     if(detailsNode.nodeName() == "title")
-                     {
--                        album_title = "Not fetched";
--
--                        if(detailsNode.toElement().attribute("type")=="text")
--                            album_title = detailsNode.toElement().text();
-+                        album_title = detailsNode.toElement().text();
- 
-                         //this is what is obtained from data.
-                         fps.title = album_title;
diff --git a/media-plugins/kipi-plugins/files/kipi-plugins-libgpod-0.7.patch b/media-plugins/kipi-plugins/files/kipi-plugins-libgpod-0.7.patch
new file mode 100644
index 000000000000..9c5df951cf99
--- /dev/null
+++ b/media-plugins/kipi-plugins/files/kipi-plugins-libgpod-0.7.patch
@@ -0,0 +1,148 @@
+--- branches/extragear/kde3/libs/kipi-plugins/configure.in.bot	2009/01/31 14:25:40	919106
++++ branches/extragear/kde3/libs/kipi-plugins/configure.in.bot	2009/01/31 14:27:58	919107
+@@ -124,7 +124,7 @@
+   if test "x$have_libgpod" != "xyes"; then
+     echo "-- libgpod found.................. NO"
+     echo ""
+-    echo "iPodExport plugin needs the libgpod library, version 0.4.2 or greater. This plugin will not be compiled!"
++    echo "iPodExport plugin needs the libgpod library, version 0.7.0 or greater. This plugin will not be compiled!"
+     echo "To complile this plugin, please install libgpod development package."
+     echo "libgpod website is at http://gtkpod.org/libgpod.html"
+     echo ""
+@@ -132,8 +132,18 @@
+   else
+     echo "-- libgpod found.................. YES"
+   fi
++  if test "x$have_gdk" != "xyes"; then
++    echo "-- gdk found...................... NO"
++    echo ""
++    echo "iPodExport plugin needs the GDK (GTK+ Drawing Kit) library, the part of GTK2. This plugin will not be compiled!"
++    echo "To complile this plugin, please install GDK development package."
++    echo ""
++    all_tests=bad
++  else
++    echo "-- GDK found...................... YES"
++  fi
+ else
+-  echo "-- libgpod library......... NOT NEEDED"
++  echo "-- libgpod and gdk library......... NOT NEEDED"
+ fi
+ 
+ echo ""
+
+--- branches/extragear/kde3/libs/kipi-plugins/configure.in.in	2009/01/31 14:25:40	919106
++++ branches/extragear/kde3/libs/kipi-plugins/configure.in.in	2009/01/31 14:27:58	919107
+@@ -234,7 +234,7 @@
+ KIPI_PLUGIN_PRE([htmlexport], [HTML Gallery], [xslt])
+ #KIPI_PLUGIN_PRE([imagesgallery], [Images Gallery])      # ???
+ KIPI_PLUGIN_PRE([imageviewer], [Viewer], [opengl])
+-KIPI_PLUGIN_PRE([ipodexport], [iPod Export], [libgpod])
++KIPI_PLUGIN_PRE([ipodexport], [iPod Export], [libgpod] [gdk])
+ KIPI_PLUGIN_PRE([jpeglossless], [JPEG Lossless]) # Does it depend on tiff?
+ KIPI_PLUGIN_PRE([kameraklient], [Kamera Klient], [gphoto])
+ KIPI_PLUGIN_PRE([metadataedit], [Metadata Editor])
+@@ -329,7 +329,7 @@
+ if test "x$build_libgpod" != "xno"; then
+     if test "$PKGCONFIGFOUND" = "yes" ; then
+ 
+-        KDE_PKG_CHECK_MODULES(LIBGPOD, libgpod-1.0 >= 0.4.2 gobject-2.0, have_libgpod=yes,have_libgpod=no)
++        KDE_PKG_CHECK_MODULES(LIBGPOD, libgpod-1.0 >= 0.7.0 gobject-2.0, have_libgpod=yes,have_libgpod=no)
+ 
+         if test "x$have_libgpod" = "xyes"; then
+             AC_DEFINE(HAVE_LIBGPOD, 1, [have libgpod])
+@@ -343,6 +343,36 @@
+         else
+             AC_MSG_WARN([libgpod is required for the iPod export plugin.])
+         fi
++
++    fi
++fi
++
++#------------------------------------------------------------------
++#
++# Check for GDK - ipod export plugin
++#
++#------------------------------------------------------------------
++
++have_gdk=no
++
++if test "x$build_libgpod" != "xno"; then
++    if test "$PKGCONFIGFOUND" = "yes" ; then
++
++        KDE_PKG_CHECK_MODULES(GDK, gdk-2.0 >= 2.10.0, have_gdk=yes,have_gdk=no)
++
++        if test "x$have_gdk" = "xyes"; then
++            AC_DEFINE(HAVE_GDK, 1, [have gdk])
++            ac_cppflags_save=$CPPFLAGS
++            ac_cflags_save=$CFLAGS
++            ac_ldflags_save=$LDFLAGS
++
++            CPPFLAGS="$CPPFLAGS $GDK_INCLUDES"
++            CFLAGS="$CFLAGS $GDK_CFLAGS"
++            LDFLAGS="$LDFLAGS $GDK_LIBS"
++        else
++            AC_MSG_WARN([GDK is required for the iPod export plugin.])
++        fi
++
+     fi
+ fi
+
+--- branches/extragear/kde3/libs/kipi-plugins/ipodexport/Makefile.am	2009/01/31 14:25:40	919106
++++ branches/extragear/kde3/libs/kipi-plugins/ipodexport/Makefile.am	2009/01/31 14:27:58	919107
+@@ -2,6 +2,7 @@
+ INCLUDES    = $(KIPI_PLUGINS_COMMON_INCLUDE) \
+               $(LIBKIPI_CFLAGS) \
+               $(LIBGPOD_CFLAGS) \
++              $(GDK_CFLAGS) \
+               $(all_includes)
+ 
+ METASOURCES = AUTO
+@@ -17,7 +18,7 @@
+ 
+ kipiplugin_ipodexport_la_LIBADD  = $(LIBKIPI_LIBS) $(LIB_KIO) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_QT)
+ 
+-kipiplugin_ipodexport_la_LDFLAGS = -module $(KDE_PLUGIN) $(LIBGPOD_LIBS) $(all_libraries)
++kipiplugin_ipodexport_la_LDFLAGS = -module $(KDE_PLUGIN) $(LIBGPOD_LIBS) $(GDK_LIBS) $(all_libraries)
+ 
+ kde_services_DATA = kipiplugin_ipodexport.desktop
+ 
+--- branches/extragear/kde3/libs/kipi-plugins/ipodexport/ipodexportdialog.cpp	2009/01/31 14:25:40	919106
++++ branches/extragear/kde3/libs/kipi-plugins/ipodexport/ipodexportdialog.cpp	2009/01/31 14:27:58	919107
+@@ -47,6 +47,10 @@
+ #include <libkipi/imagedialog.h>
+ #endif
+ 
++extern "C" {
++#include <gdk-pixbuf/gdk-pixbuf.h>
++}
++
+ #define debug() kdDebug()
+ 
+ using namespace IpodExport;
+@@ -344,9 +348,13 @@
+         return;
+ 
+     Itdb_Artwork *artwork = item->artwork();
+-    Itdb_Thumb *thumb = itdb_artwork_get_thumb_by_type( artwork, ITDB_THUMB_PHOTO_SMALL );
++    GdkPixbuf *gpixbuf = NULL;
++    
++    // First arg in itdb_artwork_get_pixbuf(...) is pointer to Itdb_Device struct,
++    // in kipiplugin-ipodexport it is m_itdb->device. i hope it _is_ initialiezed
++    gpixbuf = (GdkPixbuf*) itdb_artwork_get_pixbuf( m_itdb->device, artwork, -1, -1 );
+ 
+-    if( !thumb )
++    if( !gpixbuf )
+     {
+         debug() << "no thumb was found" << endl;
+         return;
+@@ -361,6 +369,9 @@
+ //     QPixmap pix;
+ //     pix.convertFromImage( image );
+ //     m_ipodPreview->setPixmap( pix );
++
++    // memory release
++    gdk_pixbuf_unref ( gpixbuf );
+ }
+ 
+ void
+
diff --git a/media-plugins/kipi-plugins/kipi-plugins-0.1.7.ebuild b/media-plugins/kipi-plugins/kipi-plugins-0.1.7.ebuild
index f1f8659e9555..3528ac824fc4 100644
--- a/media-plugins/kipi-plugins/kipi-plugins-0.1.7.ebuild
+++ b/media-plugins/kipi-plugins/kipi-plugins-0.1.7.ebuild
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-plugins/kipi-plugins/kipi-plugins-0.1.7.ebuild,v 1.2 2009/02/12 01:51:19 carlo Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-plugins/kipi-plugins/kipi-plugins-0.1.7.ebuild,v 1.3 2009/05/25 14:52:05 scarabeus Exp $
 
 EAPI=2
 
@@ -29,7 +29,7 @@ DEPEND="calendar? ( || ( kde-base/libkcal:3.5 kde-base/kdepim:3.5 ) )
 		opengl? ( x11-libs/qt:3[opengl] )
 		tiff? ( >=media-libs/tiff-3.6 )
 		>=dev-libs/libxslt-1.1
-		ipod? ( >=media-libs/libgpod-0.6.0 )"
+		ipod? ( >=media-libs/libgpod-0.7.0[gtk] )"
 RDEPEND="${DEPEND}
 		>=media-gfx/imagemagick-6.2.4
 		>=media-video/mjpegtools-1.6.0
@@ -53,7 +53,9 @@ src_unpack() {
 	rm -f "${S}"/configure
 
 	# Set default for the -S option for images2mpeg to work correctly, bug #208133
-	epatch "${FILESDIR}/${PN}-default_chroma_opt.patch"
+	epatch \
+		"${FILESDIR}/${PN}-default_chroma_opt.patch" \
+		"${FILESDIR}/${PN}-libgpod-0.7.patch"
 
 	cd "${WORKDIR}/${P}/po"
 	for X in ${LANGS} ; do
diff --git a/media-plugins/kipi-plugins/kipi-plugins-0.2.0-r1.ebuild b/media-plugins/kipi-plugins/kipi-plugins-0.2.0-r1.ebuild
deleted file mode 100644
index 83c8de942363..000000000000
--- a/media-plugins/kipi-plugins/kipi-plugins-0.2.0-r1.ebuild
+++ /dev/null
@@ -1,79 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-plugins/kipi-plugins/kipi-plugins-0.2.0-r1.ebuild,v 1.2 2009/04/06 12:02:02 scarabeus Exp $
-
-EAPI="2"
-
-KDE_MINIMAL="4.2"
-OPENGL_REQUIRED="optional"
-KDE_LINGUAS="ar be ca cs da de el es et fr ga gl hi is it ja km lt lv ms nb nds nl
-nn oc pa pl pt pt_BR ro ru se sk sv th tr uk zn_CN"
-inherit kde4-base
-
-MY_P="${P/_/-}"
-
-DESCRIPTION="Plugins for the KDE Image Plugin Interface (libkipi)."
-HOMEPAGE="http://www.kipi-plugins.org"
-SRC_URI="mirror://sourceforge/kipi/${MY_P}.tar.bz2"
-
-LICENSE="GPL-2"
-KEYWORDS="~amd64 ~x86"
-IUSE="cdr calendar debug +imagemagick ipod mjpeg redeyes scanner"
-SLOT="2"
-
-DEPEND="
-	>=dev-libs/expat-2.0.1
-	dev-libs/libxml2
-	dev-libs/libxslt
-	>=kde-base/libkdcraw-${KDE_MINIMAL}
-	>=kde-base/libkexiv2-${KDE_MINIMAL}
-	>=kde-base/libkipi-${KDE_MINIMAL}
-	media-libs/jpeg
-	media-libs/libpng
-	>=media-libs/tiff-3.5
-	calendar? ( >=kde-base/kdepimlibs-${KDE_MINIMAL} )
-	ipod? ( media-libs/libgpod )
-	opengl? ( virtual/opengl )
-	redeyes? ( media-libs/opencv )
-	scanner? (
-		media-gfx/sane-backends
-		>=kde-base/libksane-${KDE_MINIMAL}
-	)
-"
-RDEPEND="${DEPEND}
-	cdr? ( app-cdr/k3b )
-	imagemagick? ( media-gfx/imagemagick )
-	mjpeg? ( media-video/mjpegtools )
-"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=( "${FILESDIR}/${PV}-picasa.patch" )
-
-src_configure() {
-	# This Plugin hard depends on libksane, deactivate it if use flag scanner is
-	# not set.
-	if ! use scanner; then
-		sed -i \
-			-e '/acquireimages/ s:^:#DONOTCOMPILE :' \
-			"${S}"/CMakeLists.txt || die "Sed deactivating scanner support failed."
-	fi
-
-	# Fix linking
-	sed -i \
-		-e '/KDE4_KDEUI_LIBS/ c\\${KDE4_KIO_LIBS}'\
-		"${S}"/common/libkipiplugins/CMakeLists.txt \
-		|| die "Sed fixing kipi linking failed."
-
-	mycmakeargs="${mycmakeargs}
-		$(cmake-utils_use_with calendar KdepimLibs)
-		$(cmake-utils_use_with opengl OpenGL)
-		$(cmake-utils_use_with scanner KSane)
-		$(cmake-utils_use_with scanner Sane)
-		$(cmake-utils_use_with ipod Gpod)
-		$(cmake-utils_use_with ipod GLIB2)
-		$(cmake-utils_use_with ipod GObject)
-		$(cmake-utils_use_with redeyes OpenCV)"
-
-	kde4-base_src_configure
-}
-- 
cgit v1.2.3-65-gdbad