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