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.4.14.ebuild ChangeLog
Date: Sat, 30 Jun 2012 12:34:16
Message-Id: 20120630123343.471182004B@flycatcher.gentoo.org
1 pacho 12/06/30 12:33:43
2
3 Modified: ChangeLog
4 Added: libgphoto2-2.4.14.ebuild
5 Log:
6 Version bump.
7
8 (Portage version: 2.1.11.3/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.210 media-libs/libgphoto2/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/libgphoto2/ChangeLog?rev=1.210&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/libgphoto2/ChangeLog?rev=1.210&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/libgphoto2/ChangeLog?r1=1.209&r2=1.210
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/ChangeLog,v
20 retrieving revision 1.209
21 retrieving revision 1.210
22 diff -u -r1.209 -r1.210
23 --- ChangeLog 9 Jun 2012 00:00:57 -0000 1.209
24 +++ ChangeLog 30 Jun 2012 12:33:43 -0000 1.210
25 @@ -1,6 +1,11 @@
26 # ChangeLog for media-libs/libgphoto2
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/ChangeLog,v 1.209 2012/06/09 00:00:57 zmedico Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/media-libs/libgphoto2/ChangeLog,v 1.210 2012/06/30 12:33:43 pacho Exp $
30 +
31 +*libgphoto2-2.4.14 (30 Jun 2012)
32 +
33 + 30 Jun 2012; Pacho Ramos <pacho@g.o> +libgphoto2-2.4.14.ebuild:
34 + Version bump.
35
36 09 Jun 2012; Zac Medico <zmedico@g.o> libgphoto2-2.4.11-r1.ebuild,
37 libgphoto2-2.4.12.ebuild:
38
39
40
41 1.1 media-libs/libgphoto2/libgphoto2-2.4.14.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.4.14.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/libgphoto2/libgphoto2-2.4.14.ebuild?rev=1.1&content-type=text/plain
45
46 Index: libgphoto2-2.4.14.ebuild
47 ===================================================================
48 # Copyright 1999-2012 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.4.14.ebuild,v 1.1 2012/06/30 12:33:43 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="4"
57
58 inherit autotools eutils multilib 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"
66 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
67 IUSE="doc examples exif gd jpeg nls kernel_linux zeroconf"
68
69 # By default, drivers for all supported cameras will be compiled.
70 # If you want to only compile for specific camera(s), set CAMERAS
71 # environment to a space-separated list (no commas) of drivers that
72 # you want to build.
73 IUSE_CAMERAS="
74 adc65 agfa_cl20 aox ax203
75 barbie
76 canon casio_qv clicksmart310
77 digigr8 digita dimagev dimera3500 directory
78 enigma13
79 fuji
80 gsmart300
81 hp215
82 iclick
83 jamcam jd11 jl2005a jl2005c
84 kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica konica_qm150
85 largan lg_gsm
86 mars mustek
87 panasonic_coolshot panasonic_l859 panasonic_dc1000 panasonic_dc1580 pccam300 pccam600 polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ptp2
88 ricoh ricoh_g3
89 samsung sierra sipix_blink sipix_blink2 sipix_web2 smal sonix sony_dscf1 sony_dscf55 soundvision spca50x sq905 st2205 stv0674 stv0680 sx330z
90 template toshiba_pdrm11 topfield tp6801
91 "
92
93 for camera in ${IUSE_CAMERAS}; do
94 IUSE="${IUSE} cameras_${camera}"
95 done
96
97 # libgphoto2 actually links to libtool
98 RDEPEND="virtual/libusb:0
99 cameras_ax203? ( media-libs/gd )
100 cameras_st2205? ( media-libs/gd )
101 zeroconf? ( net-dns/avahi[mdnsresponder-compat] )
102 exif? ( >=media-libs/libexif-0.5.9 )
103 gd? ( media-libs/gd[jpeg=] )
104 jpeg? ( virtual/jpeg )
105 sys-devel/libtool"
106 DEPEND="${RDEPEND}
107 virtual/pkgconfig
108 sys-devel/flex
109 >=sys-devel/gettext-0.18.1
110 doc? ( app-doc/doxygen )"
111 # FIXME: gtk-doc is broken
112 # >=dev-util/gtk-doc-1.10 )"
113
114 RDEPEND="${RDEPEND}
115 !<sys-fs/udev-136"
116
117 pkg_setup() {
118 if ! echo "${USE}" | grep "cameras_" > /dev/null 2>&1; then
119 einfo "No camera drivers will be built since you did not specify any."
120 fi
121
122 if use cameras_template || use cameras_sipix_blink; then
123 einfo "Upstream considers sipix_blink & template driver as obsolete"
124 fi
125
126 enewgroup plugdev
127 }
128
129 src_prepare() {
130 # Handle examples ourselves
131 sed 's/^\(SUBDIRS =.*\)examples\(.*\)$/\1\2/' -i Makefile.am Makefile.in \
132 || die "examples sed failed"
133
134 # Fix pkgconfig file when USE="-exif"
135 if ! use exif; then
136 sed -i "s/, @REQUIREMENTS_FOR_LIBEXIF@//" libgphoto2.pc.in || die " libgphoto2.pc sed failed"
137 fi
138
139 # Fix USE=zeroconf, bug #283332
140 epatch "${FILESDIR}/${PN}-2.4.7-respect-bonjour.patch"
141
142 # Do not build test if not running make check, bug #226241
143 epatch "${FILESDIR}/${PN}-2.4.7-no-test-build.patch"
144
145 # Increase max entries from 1024 to 8192 to fix bug #291049
146 epatch "${FILESDIR}/${PN}-2.4.8-increase_max_entries.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 econf \
175 --disable-docs \
176 --disable-gp2ddb \
177 $(use_with zeroconf bonjour) \
178 --without-hal \
179 $(use_enable nls) \
180 $(use_with exif libexif auto) \
181 $(use_with gd) \
182 $(use_with jpeg) \
183 --with-drivers=${cameras} \
184 --with-doc-dir=/usr/share/doc/${PF} \
185 --with-html-dir=/usr/share/doc/${PF}/html \
186 --with-hotplug-doc-dir=/usr/share/doc/${PF}/hotplug \
187 --with-rpmbuild=$(type -P true) \
188 udevscriptdir=/lib/udev \
189 ${myconf}
190
191 # FIXME: gtk-doc is currently broken
192 # $(use_enable doc docs)
193 }
194
195 src_compile() {
196 emake
197
198 if use doc; then
199 doxygen doc/Doxyfile || die "Documentation generation failed"
200 fi
201 }
202
203 src_install() {
204 emake DESTDIR="${D}" install
205
206 # Empty dependency_libs in .la files, bug #386665
207 find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} +
208
209 # Clean up unwanted files
210 rm "${D}/usr/share/doc/${PF}/"{ABOUT-NLS,COPYING} || die "rm failed"
211 dodoc ChangeLog NEWS* README* AUTHORS TESTERS MAINTAINERS HACKING
212
213 if use examples; then
214 insinto /usr/share/doc/${PF}/examples
215 doins examples/README examples/*.c examples/*.h
216 fi
217
218 # FIXME: fixup autoconf bug
219 if ! use doc && [ -d "${D}/usr/share/doc/${PF}/apidocs.html" ]; then
220 rm -fr "${D}/usr/share/doc/${PF}/apidocs.html"
221 fi
222 # end fixup
223
224 UDEV_RULES="/lib/udev/rules.d/70-libgphoto2.rules"
225 CAM_LIST="/usr/$(get_libdir)/libgphoto2/print-camera-list"
226
227 if [ -x "${D}"${CAM_LIST} ]; then
228 # Let print-camera-list find libgphoto2.so
229 export LD_LIBRARY_PATH="${D}/usr/$(get_libdir)"
230 # Let libgphoto2 find its camera-modules
231 export CAMLIBS="${D}/usr/$(get_libdir)/libgphoto2/${PV}"
232
233 einfo "Generating UDEV-rules ..."
234 mkdir -p "${D}"/${UDEV_RULES%/*}
235 echo -e "# do not edit this file, it will be overwritten on update\n#" \
236 > "${D}"/${UDEV_RULES}
237 "${D}"${CAM_LIST} udev-rules version 136 group plugdev >> "${D}"/${UDEV_RULES} \
238 || die "failed to create udev-rules"
239 else
240 eerror "Unable to find print-camera-list"
241 eerror "and therefore unable to generate hotplug usermap."
242 eerror "You will have to manually generate it by running:"
243 eerror " ${CAM_LIST} udev-rules version 136 group plugdev > ${UDEV_RULES}"
244 fi
245
246 }
247
248 pkg_postinst() {
249 elog "Don't forget to add yourself to the plugdev group "
250 elog "if you want to be able to access your camera."
251 local OLD_UDEV_RULES="${ROOT}"etc/udev/rules.d/99-libgphoto2.rules
252 if [[ -f ${OLD_UDEV_RULES} ]]; then
253 rm -f "${OLD_UDEV_RULES}"
254 fi
255 }