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: libgphoto2-2.5.0.ebuild ChangeLog libgphoto2-2.4.12.ebuild
Date: Thu, 22 Nov 2012 08:39:27
Message-Id: 20121122083916.68A3720C65@flycatcher.gentoo.org
1 eva 12/11/22 08:39:16
2
3 Modified: libgphoto2-2.5.0.ebuild ChangeLog
4 Removed: libgphoto2-2.4.12.ebuild
5 Log:
6 Add preserved_old_lib calls. Move some checks to pkg_pretend and make better use of EAPI 4. Clean up ebuild and old revision.
7
8 (Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key C6085806)
9
10 Revision Changes Path
11 1.5 media-libs/libgphoto2/libgphoto2-2.5.0.ebuild
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.5.0.ebuild?rev=1.5&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.5.0.ebuild?rev=1.5&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.5.0.ebuild?r1=1.4&r2=1.5
16
17 Index: libgphoto2-2.5.0.ebuild
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.5.0.ebuild,v
20 retrieving revision 1.4
21 retrieving revision 1.5
22 diff -u -r1.4 -r1.5
23 --- libgphoto2-2.5.0.ebuild 4 Sep 2012 15:42:46 -0000 1.4
24 +++ libgphoto2-2.5.0.ebuild 22 Nov 2012 08:39:16 -0000 1.5
25 @@ -1,6 +1,6 @@
26 # Copyright 1999-2012 Gentoo Foundation
27 # Distributed under the terms of the GNU General Public License v2
28 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.5.0.ebuild,v 1.4 2012/09/04 15:42:46 ssuominen Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.5.0.ebuild,v 1.5 2012/11/22 08:39:16 eva Exp $
30
31 # TODO
32 # 1. Track upstream bug --disable-docs does not work.
33 @@ -8,7 +8,7 @@
34
35 EAPI="4"
36
37 -inherit autotools eutils multilib user toolchain-funcs
38 +inherit autotools eutils multilib udev user toolchain-funcs
39
40 DESCRIPTION="Library that implements support for numerous digital cameras"
41 HOMEPAGE="http://www.gphoto.org/"
42 @@ -67,7 +67,7 @@
43 RDEPEND="${RDEPEND}
44 !<sys-fs/udev-136"
45
46 -pkg_setup() {
47 +pkg_pretend() {
48 if ! echo "${USE}" | grep "cameras_" > /dev/null 2>&1; then
49 einfo "No camera drivers will be built since you did not specify any."
50 fi
51 @@ -75,7 +75,9 @@
52 if use cameras_template || use cameras_sipix_blink; then
53 einfo "Upstream considers sipix_blink & template driver as obsolete"
54 fi
55 +}
56
57 +pkg_setup() {
58 enewgroup plugdev
59 }
60
61 @@ -92,9 +94,6 @@
62 # Fix USE=zeroconf, bug #283332
63 epatch "${FILESDIR}/${PN}-2.4.7-respect-bonjour.patch"
64
65 - # Do not build test if not running make check, bug #226241
66 -# epatch "${FILESDIR}/${PN}-2.4.7-no-test-build.patch"
67 -
68 eautoreconf
69 }
70
71 @@ -119,9 +118,6 @@
72 einfo "Enabled camera drivers: all"
73 fi
74
75 - local udevdir=/lib/udev
76 - has_version sys-fs/udev && udevdir="$($(tc-getPKG_CONFIG) --variable=udevdir udev)"
77 -
78 local myconf
79 use doc || myconf="ac_cv_path_DOXYGEN=false"
80 econf \
81 @@ -138,7 +134,7 @@
82 --with-html-dir="${EPREFIX}"/usr/share/doc/${PF}/html \
83 --with-hotplug-doc-dir="${EPREFIX}"/usr/share/doc/${PF}/hotplug \
84 --with-rpmbuild=$(type -P true) \
85 - udevscriptdir="${EPREFIX}/${udevdir}" \
86 + udevscriptdir="$(udev_get_udevdir)" \
87 ${myconf}
88
89 # FIXME: gtk-doc is currently broken
90 @@ -146,7 +142,7 @@
91 }
92
93 src_compile() {
94 - emake
95 + default
96
97 if use doc; then
98 doxygen doc/Doxyfile || die "Documentation generation failed"
99 @@ -154,7 +150,7 @@
100 }
101
102 src_install() {
103 - emake DESTDIR="${D}" install
104 + default
105
106 # Empty dependency_libs in .la files, bug #386665
107 find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} +
108 @@ -174,38 +170,46 @@
109 fi
110 # end fixup
111
112 - local udevdir=/lib/udev
113 - has_version sys-fs/udev && udevdir="$($(tc-getPKG_CONFIG) --variable=udevdir udev)"
114 + local udev_rules cam_list
115 + udev_rules="$(udev_get_udevdir)/rules.d/70-libgphoto2.rules"
116 + cam_list="/usr/$(get_libdir)/libgphoto2/print-camera-list"
117
118 - UDEV_RULES="${udevdir}/rules.d/70-libgphoto2.rules"
119 - CAM_LIST="/usr/$(get_libdir)/libgphoto2/print-camera-list"
120 -
121 - if [ -x "${ED}"${CAM_LIST} ]; then
122 + if [ -x "${ED}"${cam_list} ]; then
123 # Let print-camera-list find libgphoto2.so
124 export LD_LIBRARY_PATH="${ED}/usr/$(get_libdir)"
125 # Let libgphoto2 find its camera-modules
126 export CAMLIBS="${ED}/usr/$(get_libdir)/libgphoto2/${PV}"
127
128 einfo "Generating UDEV-rules ..."
129 - mkdir -p "${ED}"/${UDEV_RULES%/*}
130 + mkdir -p "${ED}"/${udev_rules%/*}
131 echo -e "# do not edit this file, it will be overwritten on update\n#" \
132 - > "${ED}"/${UDEV_RULES}
133 - "${ED}"${CAM_LIST} udev-rules version 136 group plugdev >> "${ED}"/${UDEV_RULES} \
134 + > "${ED}"/${udev_rules}
135 + "${ED}"${cam_list} udev-rules version 136 group plugdev >> "${ED}"/${udev_rules} \
136 || die "failed to create udev-rules"
137 else
138 eerror "Unable to find print-camera-list"
139 eerror "and therefore unable to generate hotplug usermap."
140 eerror "You will have to manually generate it by running:"
141 - eerror " ${CAM_LIST} udev-rules version 136 group plugdev > ${UDEV_RULES}"
142 + eerror " ${cam_list} udev-rules version 136 group plugdev > ${udev_rules}"
143 fi
144
145 }
146
147 +pkg_preinst() {
148 + preserve_old_lib \
149 + /usr/$(get_libdir)/libgphoto2.so.2.4.0 \
150 + /usr/$(get_libdir)/libgphoto2_port.so.0.8.0
151 +}
152 +
153 pkg_postinst() {
154 elog "Don't forget to add yourself to the plugdev group "
155 elog "if you want to be able to access your camera."
156 - local OLD_UDEV_RULES="${EROOT}"etc/udev/rules.d/99-libgphoto2.rules
157 - if [[ -f ${OLD_UDEV_RULES} ]]; then
158 - rm -f "${OLD_UDEV_RULES}"
159 + local old_udev_rules="${EROOT}"etc/udev/rules.d/99-libgphoto2.rules
160 + if [[ -f ${old_udev_rules} ]]; then
161 + rm -f "${old_udev_rules}"
162 fi
163 +
164 + preserve_old_lib_notify \
165 + /usr/$(get_libdir)/libgphoto2.so.2.4.0 \
166 + /usr/$(get_libdir)/libgphoto2_port.so.0.8.0
167 }
168
169
170
171 1.222 media-libs/libgphoto2/ChangeLog
172
173 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/libgphoto2/ChangeLog?rev=1.222&view=markup
174 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/libgphoto2/ChangeLog?rev=1.222&content-type=text/plain
175 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/libgphoto2/ChangeLog?r1=1.221&r2=1.222
176
177 Index: ChangeLog
178 ===================================================================
179 RCS file: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/ChangeLog,v
180 retrieving revision 1.221
181 retrieving revision 1.222
182 diff -u -r1.221 -r1.222
183 --- ChangeLog 28 Oct 2012 16:01:48 -0000 1.221
184 +++ ChangeLog 22 Nov 2012 08:39:16 -0000 1.222
185 @@ -1,6 +1,11 @@
186 # ChangeLog for media-libs/libgphoto2
187 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
188 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/ChangeLog,v 1.221 2012/10/28 16:01:48 armin76 Exp $
189 +# $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/ChangeLog,v 1.222 2012/11/22 08:39:16 eva Exp $
190 +
191 + 22 Nov 2012; Gilles Dartiguelongue <eva@g.o>
192 + -libgphoto2-2.4.12.ebuild, libgphoto2-2.5.0.ebuild:
193 + Add preserved_old_lib calls. Move some checks to pkg_pretend and make better
194 + use of EAPI 4. Clean up ebuild and old revision.
195
196 28 Oct 2012; Raúl Porcel <armin76@g.o> libgphoto2-2.4.14.ebuild:
197 ia64/sparc stable wrt #427544