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