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