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