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