Gentoo Archives: gentoo-commits

From: "Pacho Ramos (pacho)" <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-libs/libgphoto2: libgphoto2-2.5.2-r3.ebuild ChangeLog libgphoto2-2.5.2-r2.ebuild
Date: Fri, 03 Jan 2014 10:57:16
Message-Id: 20140103105711.97CAC2004E@flycatcher.gentoo.org
1 pacho 14/01/03 10:57:11
2
3 Modified: ChangeLog
4 Added: libgphoto2-2.5.2-r3.ebuild
5 Removed: libgphoto2-2.5.2-r2.ebuild
6 Log:
7 Fix Canon S100 detection, bug #496754 by Nikolay Kichukov, drop old
8
9 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
10
11 Revision Changes Path
12 1.245 media-libs/libgphoto2/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/libgphoto2/ChangeLog?rev=1.245&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/libgphoto2/ChangeLog?rev=1.245&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/libgphoto2/ChangeLog?r1=1.244&r2=1.245
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/ChangeLog,v
21 retrieving revision 1.244
22 retrieving revision 1.245
23 diff -u -r1.244 -r1.245
24 --- ChangeLog 22 Dec 2013 16:09:05 -0000 1.244
25 +++ ChangeLog 3 Jan 2014 10:57:11 -0000 1.245
26 @@ -1,6 +1,13 @@
27 # ChangeLog for media-libs/libgphoto2
28 -# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/ChangeLog,v 1.244 2013/12/22 16:09:05 jer Exp $
30 +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
31 +# $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/ChangeLog,v 1.245 2014/01/03 10:57:11 pacho Exp $
32 +
33 +*libgphoto2-2.5.2-r3 (03 Jan 2014)
34 +
35 + 03 Jan 2014; Pacho Ramos <pacho@g.o>
36 + +files/libgphoto2-2.5.2-canon-s100.patch, +libgphoto2-2.5.2-r3.ebuild,
37 + -libgphoto2-2.5.2-r2.ebuild:
38 + Fix Canon S100 detection, bug #496754 by Nikolay Kichukov, drop old
39
40 22 Dec 2013; Jeroen Roovers <jer@g.o> libgphoto2-2.5.2-r1.ebuild:
41 Stable for HPPA (bug #478252).
42
43
44
45 1.1 media-libs/libgphoto2/libgphoto2-2.5.2-r3.ebuild
46
47 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.5.2-r3.ebuild?rev=1.1&view=markup
48 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.5.2-r3.ebuild?rev=1.1&content-type=text/plain
49
50 Index: libgphoto2-2.5.2-r3.ebuild
51 ===================================================================
52 # Copyright 1999-2014 Gentoo Foundation
53 # Distributed under the terms of the GNU General Public License v2
54 # $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.5.2-r3.ebuild,v 1.1 2014/01/03 10:57:11 pacho Exp $
55
56 # TODO
57 # 1. Track upstream bug --disable-docs does not work.
58 # http://sourceforge.net/tracker/index.php?func=detail&aid=1643870&group_id=8874&atid=108874
59
60 EAPI="5"
61
62 inherit autotools eutils multilib udev user
63
64 DESCRIPTION="Library that implements support for numerous digital cameras"
65 HOMEPAGE="http://www.gphoto.org/"
66 SRC_URI="mirror://sourceforge/gphoto/${P}.tar.bz2"
67
68 LICENSE="GPL-2"
69 SLOT="0/6" # libgphoto2.so soname version
70
71 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ia64-linux ~x86-linux"
72 IUSE="doc examples exif gd jpeg nls serial zeroconf"
73
74 # By default, drivers for all supported cameras will be compiled.
75 # If you want to only compile for specific camera(s), set CAMERAS
76 # environment to a space-separated list (no commas) of drivers that
77 # you want to build.
78 IUSE_CAMERAS="
79 adc65 agfa_cl20 aox ax203
80 barbie
81 canon casio_qv clicksmart310
82 digigr8 digita dimagev dimera3500 directory
83 enigma13
84 fuji
85 gsmart300
86 hp215
87 iclick
88 jamcam jd11 jl2005a jl2005c
89 kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica konica_qm150
90 largan lg_gsm
91 mars mustek
92 panasonic_coolshot panasonic_l859 panasonic_dc1000 panasonic_dc1580 pccam300 pccam600 pentax polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ptp2
93 ricoh ricoh_g3
94 samsung sierra sipix_blink2 sipix_web2 smal sonix sony_dscf1 sony_dscf55 soundvision spca50x sq905 st2205 stv0674 stv0680 sx330z
95 toshiba_pdrm11 topfield tp6801
96 "
97
98 for camera in ${IUSE_CAMERAS}; do
99 IUSE="${IUSE} cameras_${camera}"
100 done
101
102 # libgphoto2 actually links to libtool
103 RDEPEND="
104 dev-libs/libxml2:2
105 sys-devel/libtool
106 virtual/libusb:0
107 cameras_ax203? ( media-libs/gd:= )
108 cameras_st2205? ( media-libs/gd:= )
109 exif? ( >=media-libs/libexif-0.5.9:= )
110 gd? ( media-libs/gd[jpeg=] )
111 jpeg? ( virtual/jpeg )
112 serial? ( dev-libs/lockdev )
113 zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
114 "
115 DEPEND="${RDEPEND}
116 sys-devel/flex
117 >=sys-devel/gettext-0.14.1
118 virtual/pkgconfig
119 doc? ( app-doc/doxygen )
120 "
121 # FIXME: gtk-doc is broken
122 # >=dev-util/gtk-doc-1.10 )"
123
124 RDEPEND="${RDEPEND}
125 !<sys-fs/udev-175"
126
127 pkg_pretend() {
128 if ! echo "${USE}" | grep "cameras_" > /dev/null 2>&1; then
129 einfo "No camera drivers will be built since you did not specify any."
130 fi
131 }
132
133 pkg_setup() {
134 enewgroup plugdev
135 }
136
137 src_prepare() {
138 # Handle examples ourselves
139 sed 's/^\(SUBDIRS =.*\)examples\(.*\)$/\1\2/' -i Makefile.am Makefile.in \
140 || die "examples sed failed"
141
142 # Fix pkgconfig file when USE="-exif"
143 if ! use exif; then
144 sed -i "s/, @REQUIREMENTS_FOR_LIBEXIF@//" libgphoto2.pc.in || die " libgphoto2.pc sed failed"
145 fi
146
147 # Leave GCC debug builds under user control
148 sed -r '/(C|LD)FLAGS/ s/ -g( |")/\1/' \
149 -i configure.ac libgphoto2_port/configure.ac || die
150
151 sed -e 's/sleep 2//' -i m4m/gp-camlibs.m4 || die
152
153 # Fix USE=zeroconf, bug #283332
154 epatch "${FILESDIR}/${PN}-2.4.7-respect-bonjour.patch"
155
156 # Fix libxml2 detection, bug #491782
157 epatch "${FILESDIR}"/${PN}-2.5.2-libxml2-detection{,2}.patch
158
159 # Fix Canon S100 detection, bug #496754 (fixed in 2.5.3)
160 epatch "${FILESDIR}"/${P}-canon-s100.patch
161
162 eautoreconf
163 }
164
165 src_configure() {
166 local cameras
167 local cam
168 local cam_warn=no
169 for cam in ${IUSE_CAMERAS} ; do
170 if use "cameras_${cam}"; then
171 cameras="${cameras},${cam}"
172 else
173 cam_warn=yes
174 fi
175 done
176
177 if [ "${cam_warn}" = "yes" ]; then
178 [ -z "${cameras}" ] || cameras="${cameras:1}"
179 einfo "Enabled camera drivers: ${cameras:-none}"
180 ewarn "Upstream will not support you if you do not compile all camera drivers first"
181 else
182 cameras="all"
183 einfo "Enabled camera drivers: all"
184 fi
185
186 local myconf
187 use doc || myconf="ac_cv_path_DOXYGEN=false"
188
189 # Upstream doesn't default to --enable-option-checking due having another
190 # configure in libgphoto2_port/ that also needs to be checked on every bump
191 #
192 # Serial port uses either lockdev or ttylock, but we don't have ttylock
193 econf \
194 --disable-docs \
195 --disable-gp2ddb \
196 $(use_with zeroconf bonjour) \
197 $(use_enable nls) \
198 $(use_with exif libexif auto) \
199 $(use_with gd) \
200 $(use_with jpeg) \
201 $(use_enable serial) \
202 $(use_enable serial lockdev) \
203 --disable-ttylock \
204 --with-camlibs=${cameras} \
205 --with-doc-dir="${EPREFIX}"/usr/share/doc/${PF} \
206 --with-html-dir="${EPREFIX}"/usr/share/doc/${PF}/html \
207 --with-hotplug-doc-dir="${EPREFIX}"/usr/share/doc/${PF}/hotplug \
208 --with-rpmbuild=$(type -P true) \
209 udevscriptdir="$(udev_get_udevdir)" \
210 ${myconf}
211
212 # FIXME: gtk-doc is currently broken
213 # $(use_enable doc docs)
214 }
215
216 src_compile() {
217 default
218
219 if use doc; then
220 doxygen doc/Doxyfile || die "Documentation generation failed"
221 fi
222 }
223
224 src_install() {
225 default
226
227 # Empty dependency_libs in .la files, bug #386665
228 find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} +
229
230 # Clean up unwanted files
231 rm "${ED}/usr/share/doc/${PF}/"{ABOUT-NLS,COPYING} || die "rm failed"
232 dodoc ChangeLog NEWS* README* AUTHORS TESTERS MAINTAINERS HACKING
233
234 if use examples; then
235 insinto /usr/share/doc/${PF}/examples
236 doins examples/README examples/*.c examples/*.h
237 fi
238
239 # FIXME: fixup autoconf bug
240 if ! use doc && [ -d "${ED}/usr/share/doc/${PF}/apidocs.html" ]; then
241 rm -fr "${ED}/usr/share/doc/${PF}/apidocs.html"
242 fi
243 # end fixup
244
245 local udev_rules cam_list
246 udev_rules="$(udev_get_udevdir)/rules.d/70-libgphoto2.rules"
247 cam_list="/usr/$(get_libdir)/libgphoto2/print-camera-list"
248
249 if [ -x "${ED}"${cam_list} ]; then
250 # Let print-camera-list find libgphoto2.so
251 export LD_LIBRARY_PATH="${ED}/usr/$(get_libdir)"
252 # Let libgphoto2 find its camera-modules
253 export CAMLIBS="${ED}/usr/$(get_libdir)/libgphoto2/${PV}"
254
255 einfo "Generating UDEV-rules ..."
256 mkdir -p "${ED}"/${udev_rules%/*}
257 echo -e "# do not edit this file, it will be overwritten on update\n#" \
258 > "${ED}"/${udev_rules}
259 "${ED}"${cam_list} udev-rules version 175 group plugdev >> "${ED}"/${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."
264 eerror "You will have to manually generate it by running:"
265 eerror " ${cam_list} udev-rules version 175 group plugdev > ${udev_rules}"
266 fi
267
268 }
269
270 pkg_postinst() {
271 if ! has_version "sys-auth/consolekit[acl]" && ! has_version "sys-apps/systemd[acl]" ; then
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 fi
275
276 local old_udev_rules="${EROOT}"etc/udev/rules.d/99-libgphoto2.rules
277 if [[ -f ${old_udev_rules} ]]; then
278 rm -f "${old_udev_rules}"
279 fi
280 }