Gentoo Archives: gentoo-commits

From: "Gilles Dartiguelongue (eva)" <eva@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-libs/libgphoto2: libgphoto2-2.4.7-r2.ebuild ChangeLog libgphoto2-2.4.3.ebuild libgphoto2-2.4.4.ebuild libgphoto2-2.4.5.ebuild
Date: Thu, 07 Jan 2010 00:28:45
Message-Id: E1NSgF0-0005Ac-Vd@stork.gentoo.org
1 eva 10/01/07 00:28:42
2
3 Modified: ChangeLog libgphoto2-2.4.3.ebuild
4 Added: libgphoto2-2.4.7-r2.ebuild
5 Removed: libgphoto2-2.4.4.ebuild libgphoto2-2.4.5.ebuild
6 Log:
7 Fix USE=bonjour behavior, bug #283332. Do not build tests if not needed, bug #226241. Add examples USE flag. Remove unwanted files for /usr/share/doc. Clean up old revisions.
8 (Portage version: 2.2_rc61/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.160 media-libs/libgphoto2/ChangeLog
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/libgphoto2/ChangeLog?rev=1.160&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/libgphoto2/ChangeLog?rev=1.160&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/libgphoto2/ChangeLog?r1=1.159&r2=1.160
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/ChangeLog,v
20 retrieving revision 1.159
21 retrieving revision 1.160
22 diff -u -r1.159 -r1.160
23 --- ChangeLog 27 Dec 2009 02:37:02 -0000 1.159
24 +++ ChangeLog 7 Jan 2010 00:28:42 -0000 1.160
25 @@ -1,6 +1,18 @@
26 # ChangeLog for media-libs/libgphoto2
27 -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/ChangeLog,v 1.159 2009/12/27 02:37:02 nirbheek Exp $
29 +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
30 +# $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/ChangeLog,v 1.160 2010/01/07 00:28:42 eva Exp $
31 +
32 +*libgphoto2-2.4.7-r2 (07 Jan 2010)
33 +
34 + 07 Jan 2010; Gilles Dartiguelongue <eva@g.o>
35 + libgphoto2-2.4.3.ebuild, -libgphoto2-2.4.4.ebuild,
36 + -libgphoto2-2.4.5.ebuild, +libgphoto2-2.4.7-r2.ebuild,
37 + +files/libgphoto2-2.4.7-extra-dist.patch,
38 + +files/libgphoto2-2.4.7-no-test-build.patch,
39 + +files/libgphoto2-2.4.7-respect-bonjour.patch:
40 + Fix USE=bonjour behavior, bug #283332. Do not build tests if not needed,
41 + bug #226241. Add examples USE flag. Remove unwanted files for
42 + /usr/share/doc. Clean up old revisions.
43
44 *libgphoto2-2.4.7-r1 (27 Dec 2009)
45
46
47
48
49 1.10 media-libs/libgphoto2/libgphoto2-2.4.3.ebuild
50
51 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.4.3.ebuild?rev=1.10&view=markup
52 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.4.3.ebuild?rev=1.10&content-type=text/plain
53 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.4.3.ebuild?r1=1.9&r2=1.10
54
55 Index: libgphoto2-2.4.3.ebuild
56 ===================================================================
57 RCS file: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.4.3.ebuild,v
58 retrieving revision 1.9
59 retrieving revision 1.10
60 diff -u -r1.9 -r1.10
61 --- libgphoto2-2.4.3.ebuild 16 May 2009 08:03:02 -0000 1.9
62 +++ libgphoto2-2.4.3.ebuild 7 Jan 2010 00:28:42 -0000 1.10
63 @@ -1,6 +1,6 @@
64 -# Copyright 1999-2009 Gentoo Foundation
65 +# Copyright 1999-2010 Gentoo Foundation
66 # Distributed under the terms of the GNU General Public License v2
67 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.4.3.ebuild,v 1.9 2009/05/16 08:03:02 robbat2 Exp $
68 +# $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.4.3.ebuild,v 1.10 2010/01/07 00:28:42 eva Exp $
69
70 # TODO
71 # 1. Track upstream bug --disable-docs does not work.
72 @@ -18,7 +18,7 @@
73
74 LICENSE="GPL-2"
75 SLOT="0"
76 -KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86"
77 +KEYWORDS="hppa"
78
79 IUSE="bonjour doc exif hal nls kernel_linux"
80 RESTRICT="test"
81
82
83
84 1.1 media-libs/libgphoto2/libgphoto2-2.4.7-r2.ebuild
85
86 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.4.7-r2.ebuild?rev=1.1&view=markup
87 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.4.7-r2.ebuild?rev=1.1&content-type=text/plain
88
89 Index: libgphoto2-2.4.7-r2.ebuild
90 ===================================================================
91 # Copyright 1999-2010 Gentoo Foundation
92 # Distributed under the terms of the GNU General Public License v2
93 # $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.4.7-r2.ebuild,v 1.1 2010/01/07 00:28:42 eva Exp $
94
95 # TODO
96 # 1. Track upstream bug --disable-docs does not work.
97 # http://sourceforge.net/tracker/index.php?func=detail&aid=1643870&group_id=8874&atid=108874
98
99 EAPI="2"
100
101 inherit autotools eutils multilib
102
103 DESCRIPTION="Library that implements support for numerous digital cameras"
104 HOMEPAGE="http://www.gphoto.org/"
105 SRC_URI="mirror://sourceforge/gphoto/${P}.tar.bz2"
106
107 LICENSE="GPL-2"
108 SLOT="0"
109 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
110 IUSE="bonjour doc examples exif hal nls kernel_linux"
111
112 # ???
113 RESTRICT="test"
114
115 # By default, drivers for all supported cameras will be compiled.
116 # If you want to only compile for specific camera(s), set CAMERAS
117 # environment to a space-separated list (no commas) of drivers that
118 # you want to build.
119 IUSE_CAMERAS="adc65 agfa_cl20 aox barbie canon casio_qv clicksmart310
120 digigr8 digita dimera3500 directory enigma13 fuji gsmart300 hp215 iclick
121 jamcam jd11 jl2005a kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200
122 konica konica_qm150 largan lg_gsm mars dimagev mustek panasonic_coolshot
123 panasonic_l859 panasonic_dc1000 panasonic_dc1580 pccam300 pccam600
124 polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ptp2 ricoh ricoh_g3 samsung
125 sierra sipix_blink sipix_blink2 sipix_web2 smal sonix sony_dscf1 sony_dscf55
126 soundvision spca50x sq905 stv0674 stv0680 sx330z template toshiba_pdrm11
127 topfield"
128
129 # jl2005c is still experimental -> not enabled
130
131 for camera in ${IUSE_CAMERAS}; do
132 IUSE="${IUSE} cameras_${camera}"
133 done
134
135 # libgphoto2 actually links to libtool
136 RDEPEND="virtual/libusb:0
137 bonjour? ( || (
138 net-dns/avahi[mdnsresponder-compat]
139 net-misc/mDNSResponder ) )
140 exif? ( >=media-libs/libexif-0.5.9 )
141 hal? (
142 >=sys-apps/hal-0.5
143 >=sys-apps/dbus-1 )"
144 DEPEND="${RDEPEND}
145 dev-util/pkgconfig
146 sys-devel/flex
147 >=sys-devel/gettext-0.14.1
148 doc? ( app-doc/doxygen )"
149 # FIXME: gtk-doc is broken
150 # >=dev-util/gtk-doc-1.10 )"
151
152 RDEPEND="${RDEPEND}
153 !<sys-fs/udev-136"
154
155 pkg_setup() {
156 if ! echo "${USE}" | grep "cameras_" > /dev/null 2>&1; then
157 einfo "libgphoto2 supports: all ${IUSE_CAMERAS}"
158 einfo "All camera drivers will be built since you did not specify"
159 einfo "via the CAMERAS variable what camera you use."
160 einfo "NOTICE: Upstream will not support you if you do not compile all camera drivers first"
161 fi
162
163 if use cameras_template || use cameras_sipix_blink; then
164 einfo "Upstream considers sipix_blink & template driver as obsolete"
165 fi
166
167 enewgroup plugdev
168 }
169
170 src_prepare() {
171 # Handle examples ourselves
172 sed 's/^\(SUBDIRS =.*\)examples\(.*\)$/\1\2/' -i Makefile.am Makefile.in \
173 || die "examples sed failed"
174
175 # Fix pkgconfig file when USE="-exif"
176 if ! use exif; then
177 sed -i "s/, @REQUIREMENTS_FOR_LIBEXIF@//" libgphoto2.pc.in || die " libgphoto2.pc sed failed"
178 fi
179
180 # Fix USE=bonjour, bug #283332
181 epatch "${FILESDIR}/${PN}-2.4.7-respect-bonjour.patch"
182
183 # Fix a typo in automake rules
184 epatch "${FILESDIR}/${PN}-2.4.7-extra-dist.patch"
185
186 # Do not build test if not running make check, bug #226241
187 epatch "${FILESDIR}/${PN}-2.4.7-no-test-build.patch"
188
189 cd "${S}/libgphoto2_port"
190 intltoolize --force --copy --automake || die "intltoolize failed"
191 cd "${S}"
192 intltoolize --force --copy --automake || die "intltoolize failed"
193 eautoreconf
194
195 # Fix bug #216206, libusb detection
196 sed -i "s:usb_busses:usb_find_busses:g" libgphoto2_port/configure || die "libusb sed failed"
197 }
198
199 src_configure() {
200 local cameras
201 local cam
202 for cam in ${IUSE_CAMERAS} ; do
203 use "cameras_${cam}" && cameras="${cameras},${cam}"
204 done
205
206 [ -z "${cameras}" ] \
207 && cameras="all" \
208 || cameras="${cameras:1}"
209
210 einfo "Enabled camera drivers: ${cameras}"
211 [ "${cameras}" != "all" ] && \
212 ewarn "Upstream will not support you if you do not compile all camera drivers first"
213
214 econf \
215 --disable-docs \
216 --disable-gp2ddb \
217 $(use_with bonjour) \
218 $(use_with hal) \
219 $(use_enable nls) \
220 $(use_with exif libexif auto) \
221 --with-drivers=${cameras} \
222 --with-doc-dir=/usr/share/doc/${PF} \
223 --with-html-dir=/usr/share/doc/${PF}/html \
224 --with-hotplug-doc-dir=/usr/share/doc/${PF}/hotplug \
225 --with-rpmbuild=$(type -P true) \
226 udevscriptdir=/$(get_libdir)/udev
227
228 # FIXME: gtk-doc is currently broken
229 # $(use_enable doc docs)
230 }
231
232 src_compile() {
233 emake || die "make failed"
234
235 if use doc; then
236 doxygen doc/Doxyfile || die "Documentation generation failed"
237 fi
238 }
239
240 src_install() {
241 emake DESTDIR="${D}" install || die "install failed"
242
243 # Clean up unwanted files
244 rm "${D}/usr/share/doc/${PF}/"{ABOUT-NLS,COPYING} || die "rm failed"
245 dodoc ChangeLog NEWS* README* AUTHORS TESTERS MAINTAINERS HACKING || die "dodoc failed"
246
247 if use examples; then
248 insinto /usr/share/doc/${PF}/examples
249 doins examples/README examples/*.c examples/*.h || die "examples installation failed"
250 fi
251
252 # FIXME: fixup autoconf bug
253 if ! use doc && [ -d "${D}/usr/share/doc/${PF}/apidocs.html" ]; then
254 rm -fr "${D}/usr/share/doc/${PF}/apidocs.html"
255 fi
256 # end fixup
257
258 HAL_FDI="/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi"
259 UDEV_RULES="/etc/udev/rules.d/70-libgphoto2.rules"
260 CAM_LIST="/usr/$(get_libdir)/libgphoto2/print-camera-list"
261
262 if [ -x "${D}"${CAM_LIST} ]; then
263 # Let print-camera-list find libgphoto2.so
264 export LD_LIBRARY_PATH="${D}/usr/$(get_libdir)"
265 # Let libgphoto2 find its camera-modules
266 export CAMLIBS="${D}/usr/$(get_libdir)/libgphoto2/${PV}"
267
268 if use hal && [ -n "$("${D}"${CAM_LIST} idlist)" ]; then
269 einfo "Generating HAL FDI files ..."
270 mkdir -p "${D}"/${HAL_FDI%/*}
271 "${D}"${CAM_LIST} hal-fdi >> "${D}"/${HAL_FDI} \
272 || die "failed to create hal-fdi"
273 elif use hal; then
274 ewarn "No HAL FDI file generated because no real camera driver enabled"
275 fi
276
277 einfo "Generating UDEV-rules ..."
278 mkdir -p "${D}"/${UDEV_RULES%/*}
279 echo -e "# do not edit this file, it will be overwritten on update\n#" \
280 > "${D}"/${UDEV_RULES}
281 "${D}"${CAM_LIST} udev-rules version 136 group plugdev >> "${D}"/${UDEV_RULES} \
282 || die "failed to create udev-rules"
283 else
284 eerror "Unable to find print-camera-list"
285 eerror "and therefore unable to generate hotplug usermap or HAL FDI files."
286 eerror "You will have to manually generate it by running:"
287 eerror " ${CAM_LIST} udev-rules version 136 group plugdev > ${UDEV_RULES}"
288 eerror " ${CAM_LIST} hal-fdi > ${HAL_FDI}"
289 fi
290
291 }
292
293 pkg_postinst() {
294 elog "Don't forget to add yourself to the plugdev group "
295 elog "if you want to be able to access your camera."
296 local OLD_UDEV_RULES="${ROOT}"etc/udev/rules.d/99-libgphoto2.rules
297 if [[ -f ${OLD_UDEV_RULES} ]]; then
298 rm -f "${OLD_UDEV_RULES}"
299 fi
300 }