/[gentoo-x86]/media-gfx/dcraw/dcraw-9.17.ebuild
Gentoo

Contents of /media-gfx/dcraw/dcraw-9.17.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Thu Jan 24 09:57:21 2013 UTC (21 months, 4 weeks ago) by xmw
Branch: MAIN
Version bump (bug 450482), maintainer timeout.

(Portage version: 2.2.0_alpha159/cvs/Linux x86_64, signed Manifest commit with key 62EEF090)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-gfx/dcraw/dcraw-9.12.ebuild,v 1.1 2012/06/11 08:56:10 xmw Exp $
4
5 EAPI="2"
6
7 inherit eutils toolchain-funcs
8
9 DESCRIPTION="Converts the native (RAW) format of various digital cameras into netpbm portable pixmap (.ppm) image"
10 HOMEPAGE="http://www.cybercom.net/~dcoffin/dcraw/"
11 SRC_URI="http://www.cybercom.net/~dcoffin/dcraw/archive/${P}.tar.gz
12 mirror://gentoo/parse-1.73.tar.bz2
13 gimp? ( mirror://gentoo/rawphoto-1.32.tar.bz2 )"
14
15 LICENSE="GPL-2"
16 SLOT="0"
17 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-solaris"
18 IUSE="nls gimp jpeg jpeg2k lcms"
19
20 COMMON_DEPEND="jpeg? ( virtual/jpeg )
21 lcms? ( =media-libs/lcms-1* )
22 jpeg2k? ( media-libs/jasper )
23 gimp? ( media-gfx/gimp )"
24 DEPEND="${COMMON_DEPEND}
25 nls? ( sys-devel/gettext )
26 gimp? ( virtual/pkgconfig )"
27 RDEPEND="${COMMON_DEPEND}
28 media-libs/netpbm"
29
30 S=${WORKDIR}/dcraw
31
32 LANGS="ca cs de da eo es fr hu it nl pl pt ru sv zh_CN zh_TW"
33
34 for lng in ${LANGS}; do
35 IUSE+=" linguas_${lng}"
36 done
37
38 # Helper function to list only langs listed in LANGS or
39 linguas_list() {
40 local nolangs=true
41 for lng in ${LANGS}; do
42 if use linguas_${lng}; then
43 nolangs=false
44 echo " ${lng}"
45 fi
46 done
47 if ${nolangs}; then
48 echo ${LANGS}
49 fi
50 }
51
52 run_build() {
53 einfo "${@}"
54 ${@} || die
55 }
56
57 src_prepare() {
58 rename dcraw_ dcraw. dcraw_*.1 || die "Failed to rename"
59 }
60
61 src_compile() {
62 local ECFLAGS="-O2" # Without optimisation build fails
63 local ELIBS="-lm"
64
65 use lcms && ELIBS="-llcms ${ELIBS}" || ECFLAGS+=" -DNO_LCMS=yes"
66 use jpeg && ELIBS="-ljpeg ${ELIBS}" || ECFLAGS+=" -DNO_JPEG=yes"
67 use jpeg2k && ELIBS="-ljasper ${ELIBS}" || ECFLAGS+=" -DNO_JASPER=yes"
68 use nls && ECFLAGS+=" -DLOCALEDIR=\"/usr/share/locale/\""
69
70 run_build $(tc-getCC) ${ECFLAGS} ${CFLAGS} ${LDFLAGS} \
71 -o dcraw dcraw.c ${ELIBS}
72
73 run_build $(tc-getCC) -O2 ${CFLAGS} ${LDFLAGS} \
74 -o dcparse parse.c
75
76 # rawphoto gimp plugin
77 if use gimp; then
78 run_build $(tc-getCC) ${CFLAGS} ${LDFLAGS} \
79 $(pkg-config --cflags gimpui-2.0) rawphoto.c -o rawphoto \
80 $(pkg-config --libs gimpui-2.0)
81 fi
82
83 if use nls; then
84 for lng in $(linguas_list); do
85 run_build msgfmt -c -o dcraw_${lng}.mo dcraw_${lng}.po
86 done
87 fi
88 }
89
90 src_install() {
91 dobin dcraw dcparse || die
92 dodoc "${FILESDIR}"/{conversion-examples.txt,dcwrap} || die
93
94 # rawphoto gimp plugin
95 if use gimp; then
96 insinto "$(pkg-config --variable=gimplibdir gimp-2.0)/plug-ins"
97 insopts -m0755
98 doins rawphoto || die
99 fi
100
101 doman dcraw.1 || die
102 if use nls; then
103 for lng in $(linguas_list); do
104 [[ -f dcraw.${lng}.1 ]] && doman dcraw.${lng}.1
105 insinto /usr/share/locale/${lng}/LC_MESSAGES
106 newins dcraw_${lng}.mo dcraw.mo || die "failed to install dcraw_${lng}.mo"
107 done
108 fi
109 }
110
111 pkg_postinst() {
112 elog ""
113 elog "See conversion-examples.txt.gz on how to convert"
114 elog "the PPM files produced by dcraw to other image formats."
115 elog ""
116 ewarn "The functionality of the external program 'fujiturn' was"
117 ewarn "incorporated into dcraw and is automatically used now."
118 elog ""
119 elog "There's an example wrapper script included called 'dcwrap'."
120 elog ""
121 elog "This package also includes 'dcparse', which extracts"
122 elog "thumbnail images (preferably JPEGs) from any raw digital"
123 elog "camera formats that have them, and shows table contents."
124 elog ""
125 }

  ViewVC Help
Powered by ViewVC 1.1.20