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