Gentoo Archives: gentoo-commits

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