dev-java/portecle-1.7
[anomen-overlay.git] / media-gfx / dcraw / dcraw-8.73-r1.ebuild
blobb866f3bf4c6aeee1823ce211c17df183084923c7
1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-gfx/dcraw/dcraw-8.73.ebuild,v 1.9 2007/07/26 18:09:41 corsair Exp $
5 inherit eutils toolchain-funcs
7 DESCRIPTION="Converts the native (RAW) format of various digital cameras into netpbm portable pixmap (.ppm) image"
8 HOMEPAGE="http://www.cybercom.net/~dcoffin/dcraw/"
9 SRC_URI="http://dev.gentoo.org/~wschlich/src/media-gfx/dcraw/${P}.tar.bz2"
10 LICENSE="freedist GPL-2"
11 SLOT="0"
12 KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86"
13 IUSE="gimp"
15 DEPEND="virtual/libc
16 >=media-libs/jpeg-6b
17 media-libs/lcms
18 gimp? ( media-gfx/gimp )"
20 RDEPEND="${DEPEND}
21 media-libs/netpbm"
23 src_compile() {
24 emake CC=$(tc-getCC) || die "make failed"
26 # rawphoto gimp plugin
27 if use gimp; then
29 # find gimptool (ugly!)
30 local gimptool=/usr/bin/gimptool
31 if [ ! -x ${gimptool} ]; then
32 gimptool=${gimptool}-2.0
33 if [ ! -x ${gimptool} ]; then
34 die "Couldn't find gimptool. Please reinstall gimp."
38 # build plugin
39 ${gimptool} --build rawphoto.c || die "gimptool failed"
44 src_install() {
45 emake DESTDIR="${D}" install || die "make install failed"
46 dodoc doc/conversion-examples.txt doc/dcwrap
48 # rawphoto gimp plugin
49 if use gimp; then
51 # find gimptool (ugly!)
52 local gimptool=/usr/bin/gimptool
53 if [ ! -x ${gimptool} ]; then
54 gimptool=${gimptool}-2.0
55 if [ ! -x ${gimptool} ]; then
56 die "Couldn't find gimptool. Please reinstall gimp."
60 # install plugin
61 exeinto $(${gimptool} --gimpplugindir)/plug-ins || die "gimptool failed"
62 doexe rawphoto || die "Installation failed"
66 pkg_postinst() {
67 elog ""
68 elog "See conversion-examples.txt.gz on how to convert"
69 elog "the PPM files produced by dcraw to other image formats."
70 elog ""
71 ewarn "The functionality of the external program 'fujiturn' was"
72 ewarn "incoporated into dcraw and is automatically used now."
73 elog ""
74 elog "There's an example wrapper script included called 'dcwrap'."
75 elog ""
76 elog "This package also includes 'dcparse', which extracts"
77 elog "thumbnail images (preferably JPEGs) from any raw digital"
78 elog "camera formats that have them, and shows table contents."
79 elog ""