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