Using local USE flag 'gimp' (see bug #104592), printing xsane.rc-warning only when...
authorPatrick Kursawe <phosphan@gentoo.org>
Mon, 5 Sep 2005 12:58:18 +0000 (12:58 +0000)
committerPatrick Kursawe <phosphan@gentoo.org>
Mon, 5 Sep 2005 12:58:18 +0000 (12:58 +0000)
Package-Manager: portage-2.0.51.22-r2

media-gfx/xsane/ChangeLog
media-gfx/xsane/Manifest
media-gfx/xsane/files/digest-xsane-0.96-r1 [deleted file]
media-gfx/xsane/files/doublefree.patch [deleted file]
media-gfx/xsane/xsane-0.96-r1.ebuild [deleted file]
media-gfx/xsane/xsane-0.97.ebuild

index db28d7922893c229c201a4896e10d9ce83c7438a..43cbbe284a7f14f9b8b7cbf891b47029f31a0078 100644 (file)
@@ -1,6 +1,11 @@
 # ChangeLog for media-gfx/xsane
 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/xsane/ChangeLog,v 1.38 2005/08/28 01:09:34 cryos Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/xsane/ChangeLog,v 1.39 2005/09/05 12:58:18 phosphan Exp $
+
+  05 Sep 2005; Patrick Kursawe <phosphan@gentoo.org> -files/doublefree.patch,
+  -xsane-0.96-r1.ebuild, xsane-0.97.ebuild:
+  Using local USE flag 'gimp' (see bug #104592), printing xsane.rc-warning only
+  when the previous version actually was <=0.93
 
   28 Aug 2005; Marcus D. Hanwell <cryos@gentoo.org> xsane-0.97.ebuild:
   Stable on amd64.
index ec62866910d6d7e493b3f58ec14bd6d9c4feffcc..1868b96097d8b17662d753d3906c5b9baebd78af 100644 (file)
@@ -1,17 +1,4 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-MD5 9661a829f78266e953c098ba2f779410 xsane-0.97.ebuild 1361
-MD5 2d56ff877a9151b4b49db002d9766ba3 xsane-0.96-r1.ebuild 1443
-MD5 90032cf1ae42f6d69dcb3cbacce8e12b ChangeLog 4613
+MD5 c0be70b907befaa970bab6098f98764d xsane-0.97.ebuild 1678
+MD5 e6184e2efcad5348fd725b305420591d ChangeLog 4867
 MD5 1f00d52c238ab654e46144b458cb8090 metadata.xml 347
 MD5 918ef3f00d812af7c8417080ff4b8f75 files/digest-xsane-0.97 63
-MD5 c24003808e1c9ca9b7869f81db36d288 files/doublefree.patch 455
-MD5 ea4d74ef911486be99ff2905dbc5597f files/digest-xsane-0.96-r1 63
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.1 (GNU/Linux)
-
-iD8DBQFDEQ7cntT9W3vfTuoRAhlOAJ9jD40ZfnIx8UwuM+tJ/zLaQvO+1gCeLb2C
-jAoosCHRbYSjdQaecKaP6PM=
-=UYA9
------END PGP SIGNATURE-----
diff --git a/media-gfx/xsane/files/digest-xsane-0.96-r1 b/media-gfx/xsane/files/digest-xsane-0.96-r1
deleted file mode 100644 (file)
index e0b42d7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-MD5 32e4693c207d0380436c76096f8c157c xsane-0.96.tar.gz 3173665
diff --git a/media-gfx/xsane/files/doublefree.patch b/media-gfx/xsane/files/doublefree.patch
deleted file mode 100644 (file)
index 4db6cb3..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
---- src/xsane-save.c   2004-09-06 19:08:00.000000000 +0200
-+++ src/xsane-save.c.new       2004-12-10 09:49:03.592387322 +0100
-@@ -718,9 +718,6 @@
- 
-   fflush(outfile);
- 
--  fclose(infile);
--  fclose(outfile);
--
-   if (size != bytes_sum)
-   {
-     DBG(DBG_info, "copy errro, not complete, %d bytes of %d bytes copied\n", bytes_sum, size);
-@@ -775,6 +772,9 @@
-     gtk_main_iteration();
-   }
- 
-+  fclose(infile);
-+  fclose(outfile);
-+
-  return (*cancel_save);
- }
- 
diff --git a/media-gfx/xsane/xsane-0.96-r1.ebuild b/media-gfx/xsane/xsane-0.96-r1.ebuild
deleted file mode 100644 (file)
index e074f5b..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/xsane/xsane-0.96-r1.ebuild,v 1.6 2005/06/29 19:04:50 gustavoz Exp $
-
-inherit eutils
-
-DESCRIPTION="graphical scanning frontend"
-SRC_URI="http://www.xsane.org/download/${P}.tar.gz"
-HOMEPAGE="http://www.xsane.org/"
-
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS="x86 ppc amd64 sparc ppc64"
-IUSE="gtk2 nls jpeg png tiff"
-
-DEPEND="media-gfx/sane-backends
-       || (
-               gtk2? ( >=x11-libs/gtk+-2.0 )
-               =x11-libs/gtk+-1.2*
-       )
-       jpeg? ( media-libs/jpeg )
-       png? ( media-libs/libpng )
-       tiff? ( media-libs/tiff )"
-
-
-src_unpack() {
-       unpack ${A}
-       cd ${S}
-       epatch ${FILESDIR}/doublefree.patch
-}
-
-src_compile() {
-       econf \
-               `use_enable nls` \
-               `use_enable jpeg` \
-               `use_enable png` \
-               `use_enable tiff` \
-               `use_enable gtk2` \
-               || die
-       emake || die
-}
-
-src_install() {
-       einstall || die
-       dodoc xsane.[A-Z]*
-       dohtml -r doc
-
-       # link xsane so it is seen as a plugin in gimp
-       if [ -d /usr/lib/gimp/1.2 ]; then
-               dodir /usr/lib/gimp/1.2/plug-ins
-               dosym /usr/bin/xsane /usr/lib/gimp/1.2/plug-ins
-       fi
-       if [ -d /usr/lib/gimp/2.0 ]; then
-               dodir /usr/lib/gimp/2.0/plug-ins
-               dosym /usr/bin/xsane /usr/lib/gimp/2.0/plug-ins
-       fi
-}
-
-pkg_postinst() {
-       einfo ""
-       ewarn "If you are upgrading from <=xsane-0.93, please make sure to"
-       ewarn "remove ~/.sane/xsane/xsane.rc _before_ you start xsane for"
-       ewarn "the first time."
-       einfo ""
-}
index 40c472b009fb3a20cd40700a5aea0d2a150ac468..aa105d83d1798fcc909aad21f6c9fd43d2c7ece0 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-gfx/xsane/xsane-0.97.ebuild,v 1.9 2005/08/28 01:09:34 cryos Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/xsane/xsane-0.97.ebuild,v 1.10 2005/09/05 12:58:18 phosphan Exp $
 
 DESCRIPTION="graphical scanning frontend"
 HOMEPAGE="http://www.xsane.org/"
@@ -9,15 +9,24 @@ SRC_URI="http://www.xsane.org/download/${P}.tar.gz"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~alpha amd64 ia64 ppc ppc64 sparc x86"
-IUSE="gtk2 nls jpeg png tiff"
+IUSE="gtk2 nls jpeg png tiff gimp"
 
 DEPEND="media-gfx/sane-backends
        gtk2? ( >=x11-libs/gtk+-2.0 )
        !gtk2? ( =x11-libs/gtk+-1.2* )
        jpeg? ( media-libs/jpeg )
        png? ( media-libs/libpng )
-       tiff? ( media-libs/tiff )"
+       tiff? ( media-libs/tiff )
+       gimp? ( media-gfx/gimp )"
 
+pkg_setup() {
+       export OLDXSANE
+       if has_version '<=media-gfx/xsane-0.93'; then
+               OLDXSANE="yes"
+       else
+               OLDXSANE="no"
+       fi
+}
 
 src_compile() {
        econf \
@@ -26,6 +35,7 @@ src_compile() {
                $(use_enable png) \
                $(use_enable tiff) \
                $(use_enable gtk2) \
+               $(use_enable gimp) \
                || die
        emake || die
 }
@@ -36,20 +46,26 @@ src_install() {
        dohtml -r doc
 
        # link xsane so it is seen as a plugin in gimp
-       if [ -d /usr/lib/gimp/1.2 ]; then
-               dodir /usr/lib/gimp/1.2/plug-ins
-               dosym /usr/bin/xsane /usr/lib/gimp/1.2/plug-ins
-       fi
-       if [ -d /usr/lib/gimp/2.0 ]; then
-               dodir /usr/lib/gimp/2.0/plug-ins
-               dosym /usr/bin/xsane /usr/lib/gimp/2.0/plug-ins
+       if use gimp; then
+               local plugindir
+               if [ -x /usr/bin/gimptool ]; then
+                       plugindir="$(gimptool --gimpplugindir)/plug-ins"
+               elif [ -x /usr/bin/gimptool-2.0 ]; then
+                       plugindir="$(gimptool-2.0 --gimpplugindir)/plug-ins"
+               else
+                       die "Can't find GIMP plugin directory."
+               fi
+               dodir "${plugindir}"
+               dosym /usr/bin/xsane "${plugindir}"
        fi
 }
 
 pkg_postinst() {
-       einfo ""
-       ewarn "If you are upgrading from <=xsane-0.93, please make sure to"
-       ewarn "remove ~/.sane/xsane/xsane.rc _before_ you start xsane for"
-       ewarn "the first time."
-       einfo ""
+       if [ $OLDXSANE = 'yes' ]; then
+               einfo ""
+               ewarn "If you are upgrading from <=xsane-0.93, please make sure to"
+               ewarn "remove ~/.sane/xsane/xsane.rc _before_ you start xsane for"
+               ewarn "the first time."
+               einfo ""
+       fi
 }