Gentoo Archives: gentoo-commits

From: "Jeroen Roovers (jer)" <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-client/opera: opera-11.62.1324.ebuild ChangeLog opera-11.62.1302.ebuild opera-11.62.1305.ebuild opera-11.62.1304.ebuild
Date: Thu, 01 Mar 2012 15:11:54
Message-Id: 20120301151143.911122004B@flycatcher.gentoo.org
1 jer 12/03/01 15:11:43
2
3 Modified: ChangeLog
4 Added: opera-11.62.1324.ebuild
5 Removed: opera-11.62.1302.ebuild opera-11.62.1305.ebuild
6 opera-11.62.1304.ebuild
7 Log:
8 http://my.opera.com/desktopteam/blog/2012/03/01/a-bit-of-awesomeness-to-11-62
9
10 (Portage version: 2.2.0_alpha89/cvs/Linux x86_64)
11
12 Revision Changes Path
13 1.698 www-client/opera/ChangeLog
14
15 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/ChangeLog?rev=1.698&view=markup
16 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/ChangeLog?rev=1.698&content-type=text/plain
17 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/ChangeLog?r1=1.697&r2=1.698
18
19 Index: ChangeLog
20 ===================================================================
21 RCS file: /var/cvsroot/gentoo-x86/www-client/opera/ChangeLog,v
22 retrieving revision 1.697
23 retrieving revision 1.698
24 diff -u -r1.697 -r1.698
25 --- ChangeLog 23 Feb 2012 15:29:34 -0000 1.697
26 +++ ChangeLog 1 Mar 2012 15:11:43 -0000 1.698
27 @@ -1,6 +1,12 @@
28 # ChangeLog for www-client/opera
29 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
30 -# $Header: /var/cvsroot/gentoo-x86/www-client/opera/ChangeLog,v 1.697 2012/02/23 15:29:34 jer Exp $
31 +# $Header: /var/cvsroot/gentoo-x86/www-client/opera/ChangeLog,v 1.698 2012/03/01 15:11:43 jer Exp $
32 +
33 +*opera-11.62.1324 (01 Mar 2012)
34 +
35 + 01 Mar 2012; Jeroen Roovers <jer@g.o> -opera-11.62.1302.ebuild,
36 + -opera-11.62.1304.ebuild, -opera-11.62.1305.ebuild, +opera-11.62.1324.ebuild:
37 + http://my.opera.com/desktopteam/blog/2012/03/01/a-bit-of-awesomeness-to-11-62
38
39 *opera-11.62.1309 (23 Feb 2012)
40 *opera-11.62.1307 (23 Feb 2012)
41
42
43
44 1.1 www-client/opera/opera-11.62.1324.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/opera-11.62.1324.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/opera-11.62.1324.ebuild?rev=1.1&content-type=text/plain
48
49 Index: opera-11.62.1324.ebuild
50 ===================================================================
51 # Copyright 1999-2012 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/www-client/opera/opera-11.62.1324.ebuild,v 1.1 2012/03/01 15:11:43 jer Exp $
54
55 EAPI="4"
56
57 inherit eutils fdo-mime gnome2-utils multilib pax-utils versionator
58
59 DESCRIPTION="A fast and secure web browser and Internet suite"
60 HOMEPAGE="http://www.opera.com/"
61
62 SLOT="0"
63 LICENSE="OPERA-11 LGPL-2 LGPL-3"
64 KEYWORDS="~amd64 ~x86 ~x86-fbsd"
65 IUSE="elibc_FreeBSD gtk gtk3 kde +gstreamer"
66
67 O_V="$(get_version_component_range 1-2)" # Major version, i.e. 11.00
68 O_B="$(get_version_component_range 3)" # Build version, i.e. 1156
69
70 O_D="awesome_${O_V}-${O_B}"
71 O_P="${PN}-${O_V}-${O_B}"
72 O_U="http://snapshot.opera.com/unix/"
73
74 SRC_URI="
75 amd64? ( ${O_U}${O_D}/${O_P}.x86_64.linux.tar.xz )
76 x86? ( ${O_U}${O_D}/${O_P}.i386.linux.tar.xz )
77 x86-fbsd? ( ${O_U}${O_D}/${O_P}.i386.freebsd.tar.xz )
78 "
79
80 OPREFIX="/usr/$(get_libdir)"
81
82 QA_DT_HASH="${OPREFIX}/${PN}/.*"
83 QA_PRESTRIPPED="${OPREFIX}/${PN}/.*"
84
85 O_LINGUAS="af az be bg bn cs da de el en-GB es-ES es-LA et fi fr fr-CA fy gd hi
86 hr hu id it ja ka ko lt me mk ms nb nl nn pa pl pt pt-BR ro ru sk sr sv sw ta te
87 th tl tr uk uz vi zh-CN zh-TW zu"
88
89 for O_LINGUA in ${O_LINGUAS}; do
90 IUSE="${IUSE} linguas_${O_LINGUA/-/_}"
91 done
92
93 DEPEND="
94 >=sys-apps/sed-4
95 app-arch/xz-utils
96 "
97 GTKRDEPEND="
98 dev-libs/atk
99 dev-libs/glib:2
100 x11-libs/cairo
101 x11-libs/gdk-pixbuf
102 gtk? ( x11-libs/gtk+:2 )
103 gtk3? ( x11-libs/gtk+:3 )
104 x11-libs/pango
105 x11-libs/pixman
106 "
107 KDERDEPEND="
108 kde-base/kdelibs
109 x11-libs/qt-core
110 x11-libs/qt-gui
111 "
112 GSTRDEPEND="
113 dev-libs/glib:2
114 dev-libs/libxml2
115 media-libs/gst-plugins-base
116 media-libs/gstreamer
117 media-plugins/gst-plugins-meta
118 "
119 RDEPEND="
120 media-libs/fontconfig
121 media-libs/freetype
122 sys-apps/util-linux
123 sys-libs/zlib
124 virtual/opengl
125 x11-libs/libICE
126 x11-libs/libSM
127 x11-libs/libX11
128 x11-libs/libXext
129 x11-libs/libXft
130 x11-libs/libXrender
131 x11-libs/libXt
132 gtk? ( ${GTKRDEPEND} )
133 gtk3? ( ${GTKRDEPEND} )
134 kde? ( ${KDERDEPEND} )
135 gstreamer? ( ${GSTRDEPEND} )
136 "
137 src_unpack() {
138 unpack ${A}
139 mv -v ${PN}* "${S}" || die
140 }
141
142 src_prepare() {
143 local LNGDIR="share/${PN}/locale"
144
145 # Count linguas
146 count() { echo ${#}; }
147 local lingua_count=$(count ${O_LINGUAS} en)
148 local locale_count=$(count ${LNGDIR}/*)
149 [[ ${lingua_count} = ${locale_count} ]] \
150 || die "Number of LINGUAS does not match number of locales"
151 unset count
152
153 # Remove unwanted linguas
154 einfo "Keeping these locales (linguas): ${LINGUAS}."
155 for LINGUA in ${O_LINGUAS}; do
156 if ! use linguas_${LINGUA/-/_}; then
157 LINGUA=$(find "${LNGDIR}" -maxdepth 1 -type d -iname ${LINGUA/_/-})
158 rm -r "${LINGUA}" || die "The list of linguas needs to be fixed"
159 fi
160 done
161
162 # Remove doc directory but keep the LICENSE under another name (bug #315473)
163 mv share/doc/${PN}/LICENSE share/${PN}/defaults/license.txt
164 rm -rf share/doc
165 for locale in share/${PN}/locale/*; do
166 rm -f "${locale}/license.txt"
167 ln -sn /usr/share/${PN}/defaults/license.txt "${locale}/license.txt" \
168 || die
169 done
170
171 # Remove package directory
172 rm -rf share/${PN}/package
173
174 # Optional libraries
175 if ! use gtk; then
176 rm lib/${PN}/liboperagtk2.so || die
177 fi
178 if ! use gtk3; then
179 rm lib/${PN}/liboperagtk3.so || die
180 fi
181 if ! use kde; then
182 rm lib/${PN}/liboperakde4.so || die
183 fi
184 if ! use gstreamer; then
185 rm -r lib/${PN}/gstreamer || die
186 fi
187
188 # Unzip the man pages before sedding
189 gunzip share/man/man1/* || die
190
191 # Replace PREFIX, SUFFIX and PN in various files
192 sed -i \
193 -e "s:@@{PREFIX}:/usr:g" \
194 -e "s:@@{SUFFIX}::g" \
195 -e "s:@@{_SUFFIX}::g" \
196 -e "s:@@{USUFFIX}::g" \
197 -e "s:opera:${PN}:g" \
198 share/man/man1/* \
199 share/applications/${PN}-*.desktop \
200 || die
201
202 # Replace "Opera" with "Opera Next"
203 if [[ ${PN} = opera-next ]]; then
204 sed -i share/applications/${PN}-*.desktop \
205 -e "/^Name=Opera\|^ Next/s:Opera:& Next:" || die
206 fi
207
208 # Create /usr/bin/opera wrapper
209 echo '#!/bin/sh' > ${PN}
210 echo 'export OPERA_DIR="/usr/share/'"${PN}"'"' >> ${PN}
211 echo 'export OPERA_PERSONALDIR=${OPERA_PERSONALDIR:-"${HOME}/.'${PN}'"}' \
212 >> ${PN}
213 echo 'exec '"${OPREFIX}/${PN}/${PN}"' "$@"' >> ${PN}
214
215 # Change libz.so.3 to libz.so.1 for gentoo/freebsd
216 if use elibc_FreeBSD; then
217 scanelf -qR -N libz.so.3 -F "#N" lib/${PN}/ | \
218 while read i; do
219 if [[ $(strings "$i" | fgrep -c libz.so.3) -ne 1 ]];
220 then
221 export SANITY_CHECK_LIBZ_FAILED=1
222 break
223 fi
224 sed -i \
225 "$i" \
226 -e 's/libz\.so\.3/libz.so.1/g'
227 done
228 [[ "$SANITY_CHECK_LIBZ_FAILED" = "1" ]] && die
229 fi
230 }
231
232 src_install() {
233 # We install into usr instead of opt as Opera does not support the latter
234 dodir /usr
235 mv lib/ "${D}/${OPREFIX}" || die
236 mv share/ "${D}/usr/" || die
237
238 # Install startup scripts
239 dobin ${PN}
240
241 # Stop revdep-rebuild from checking opera binaries
242 dodir /etc/revdep-rebuild
243 echo "SEARCH_DIRS_MASK=\"${OPREFIX}/${PN}\"" \
244 > "${D}"/etc/revdep-rebuild/90${PN}
245
246 # Set PaX markings for hardened/PaX (bug #344267)
247 pax-mark m "${D}"/${OPREFIX}/${PN}/opera*
248 }
249
250 pkg_preinst() {
251 gnome2_icon_savelist
252 }
253
254 pkg_postinst() {
255 if use elibc_FreeBSD; then
256 elog
257 elog "To improve shared memory usage please set:"
258 elog "$ sysctl kern.ipc.shm_allow_removed=1"
259 fi
260
261 # Update desktop file database and gtk icon cache (bug #334993)
262 gnome2_icon_cache_update
263 fdo-mime_desktop_database_update
264 }
265
266 pkg_postrm() {
267 # Update desktop file database and gtk icon cache (bug #334993)
268 gnome2_icon_cache_update
269 fdo-mime_desktop_database_update
270 }