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: ChangeLog opera-11.10.2014.ebuild
Date: Thu, 24 Feb 2011 17:01:10
Message-Id: 20110224170100.9EA7020054@flycatcher.gentoo.org
1 jer 11/02/24 17:01:00
2
3 Modified: ChangeLog
4 Added: opera-11.10.2014.ebuild
5 Log:
6 http://my.opera.com/desktopteam/blog/2011/02/24/barracuda-gets-some-teeth
7
8 (Portage version: 2.2.0_alpha25/cvs/Linux i686)
9
10 Revision Changes Path
11 1.597 www-client/opera/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/ChangeLog?rev=1.597&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/ChangeLog?rev=1.597&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/ChangeLog?r1=1.596&r2=1.597
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-client/opera/ChangeLog,v
20 retrieving revision 1.596
21 retrieving revision 1.597
22 diff -u -r1.596 -r1.597
23 --- ChangeLog 17 Feb 2011 18:16:05 -0000 1.596
24 +++ ChangeLog 24 Feb 2011 17:01:00 -0000 1.597
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.596 2011/02/17 18:16:05 jer Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/www-client/opera/ChangeLog,v 1.597 2011/02/24 17:01:00 jer Exp $
30 +
31 +*opera-11.10.2014 (24 Feb 2011)
32 +
33 + 24 Feb 2011; Jeroen Roovers <jer@g.o> +opera-11.10.2014.ebuild:
34 + http://my.opera.com/desktopteam/blog/2011/02/24/barracuda-gets-some-teeth
35
36 *opera-11.10.2005 (17 Feb 2011)
37
38
39
40
41 1.1 www-client/opera/opera-11.10.2014.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/opera-11.10.2014.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/opera-11.10.2014.ebuild?rev=1.1&content-type=text/plain
45
46 Index: opera-11.10.2014.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.10.2014.ebuild,v 1.1 2011/02/24 17:01:00 jer Exp $
51
52 EAPI="3"
53
54 inherit eutils fdo-mime gnome2-utils multilib pax-utils versionator
55
56 DESCRIPTION="A standards-compliant graphical Web browser"
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 kde +gstreamer"
63
64 RESTRICT="test"
65
66 # http://snapshot.opera.com/unix/minor_11.01-1160/opera-11.01-1160.i386.linux.tar.xz
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="seahorse_${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="
86 be bg cs da de el en-GB es-ES es-LA et fi fr fr-CA fy gd hi hr hu id it ja
87 ka ko lt mk nb nl nn pl pt pt-BR ro ru sk sr sv ta te tr uk vi zh-CN zh-TW
88 "
89
90 for O_LINGUA in ${O_LINGUAS}; do
91 IUSE="${IUSE} linguas_${O_LINGUA/-/_}"
92 done
93
94 DEPEND="
95 >=sys-apps/sed-4
96 app-arch/xz-utils
97 "
98 RDEPEND="
99 gtk? (
100 =x11-libs/gtk+-2*
101 dev-libs/atk
102 dev-libs/glib
103 x11-libs/cairo
104 x11-libs/pango
105 x11-libs/pixman
106 )
107 kde? (
108 kde-base/kdelibs
109 )
110 dev-libs/expat
111 media-libs/fontconfig
112 media-libs/freetype
113 gstreamer? ( media-plugins/gst-plugins-meta )
114 sys-apps/util-linux
115 sys-libs/zlib
116 virtual/opengl
117 x11-libs/libICE
118 x11-libs/libSM
119 x11-libs/libX11
120 x11-libs/libXau
121 x11-libs/libXcomposite
122 x11-libs/libXcursor
123 x11-libs/libXdamage
124 x11-libs/libXdmcp
125 x11-libs/libXext
126 x11-libs/libXfixes
127 x11-libs/libXi
128 x11-libs/libXmu
129 x11-libs/libXrandr
130 x11-libs/libXrender
131 x11-libs/libXt
132 x11-libs/libxcb
133 x11-libs/xcb-util
134 "
135
136 pkg_setup() {
137 echo -e \
138 " ${GOOD}****************************************************${NORMAL}"
139 elog "If you seek support, please file a bug report at"
140 elog "https://bugs.gentoo.org and post the output of"
141 elog " \`emerge --info =${CATEGORY}/${P}'"
142 echo -e \
143 " ${GOOD}****************************************************${NORMAL}"
144 }
145
146 src_unpack() {
147 unpack ${A}
148 mv -v ${PN}* "${S}" || die
149 }
150
151 src_prepare() {
152 # Remove unwanted linguas
153 LNGDIR="share/${PN}/locale"
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}"
159 fi
160 done
161
162 # Remove doc directory but keep the LICENSE under another name (bug #315473)
163 mv share/doc/opera/LICENSE share/opera/defaults/license.txt
164 rm -rf share/doc
165 for locale in share/opera/locale/*; do
166 rm -f "${locale}/license.txt"
167 ln -sn /usr/share/opera/defaults/license.txt "${locale}/license.txt" \
168 || die "ln -sn license.txt"
169 done
170
171 # Remove package directory
172 rm -rf share/opera/package
173
174 # Leave libopera*.so only if the user chooses
175 if ! use gtk; then
176 rm lib/opera/liboperagtk.so || die "rm liboperagtk.so failed"
177 fi
178 if ! use kde; then
179 rm lib/opera/liboperakde4.so || die "rm liboperakde4.so failed"
180 fi
181
182 # Unzip the man pages before sedding
183 gunzip share/man/man1/* || die "gunzip failed"
184
185 # Replace PREFIX and SUFFIX in various files
186 sed -i \
187 -e "s:@@{PREFIX}:/usr:g" \
188 -e "s:@@{SUFFIX}::g" \
189 -e "s:@@{_SUFFIX}::g" \
190 -e "s:@@{USUFFIX}::g" \
191 share/mime/packages/opera-widget.xml \
192 share/man/man1/* \
193 share/applications/opera-browser.desktop \
194 share/applications/opera-widget-manager.desktop \
195 || die "sed failed"
196
197 # Create /usr/bin/opera wrapper
198 echo '#!/bin/bash' > opera
199 echo 'export OPERA_DIR=/usr/share/opera' >> opera
200 echo 'exec '"${OPREFIX}"'/opera/opera "$@"' >> opera
201
202 # Fix libdir in defaults/pluginpath.ini
203 sed -i \
204 share/opera/defaults/pluginpath.ini \
205 -e "s|/usr/lib32|${OPREFIX}|g" \
206 -e '/netscape/{s|[0-1]|2|g}' \
207 || die "sed pluginpath.ini failed"
208
209 # Change libz.so.3 to libz.so.1 for gentoo/freebsd
210 if use elibc_FreeBSD; then
211 scanelf -qR -N libz.so.3 -F "#N" lib/${PN}/ | \
212 while read i; do
213 if [[ $(strings "$i" | fgrep -c libz.so.3) -ne 1 ]];
214 then
215 export SANITY_CHECK_LIBZ_FAILED=1
216 break
217 fi
218 sed -i \
219 "$i" \
220 -e 's/libz\.so\.3/libz.so.1/g'
221 done
222 [[ "$SANITY_CHECK_LIBZ_FAILED" = "1" ]] \
223 && die "failed to change libz.so.3 to libz.so.1"
224 fi
225 }
226
227 src_install() {
228 # We install into usr instead of opt as Opera does not support the latter
229 dodir /usr
230 mv lib/ "${D}/${OPREFIX}" || die "mv lib/ failed"
231 mv share/ "${D}/usr/" || die "mv share/ failed"
232
233 # Install startup scripts
234 dobin ${PN} ${PN}-widget-manager || die "dobin failed"
235
236 # Stop revdep-rebuild from checking opera binaries
237 dodir /etc/revdep-rebuild
238 echo "SEARCH_DIRS_MASK=\"${OPREFIX}/${PN}\"" > "${D}"/etc/revdep-rebuild/90opera
239
240 # Set PaX markings for hardened/PaX (bug #344267)
241 pax-mark m \
242 "${D}/${OPREFIX}/opera/opera" \
243 "${D}/${OPREFIX}/opera/operaplugincleaner" \
244 "${D}/${OPREFIX}/opera/operapluginwrapper"
245 }
246
247 pkg_preinst() {
248 gnome2_icon_savelist
249 }
250
251 pkg_postinst() {
252 elog "To change the UI language, choose [Tools] -> [Preferences], open the"
253 elog "[General] tab, click on [Details...] then [Choose...] and point the"
254 elog "file chooser at /usr/share/opera/locale/, then enter the"
255 elog "directory for the language you want and [Open] the .lng file."
256
257 if use elibc_FreeBSD; then
258 elog
259 elog "To improve shared memory usage please set:"
260 elog "$ sysctl kern.ipc.shm_allow_removed=1"
261 fi
262
263 # Update desktop file database and gtk icon cache (bug #334993)
264 gnome2_icon_cache_update
265 fdo-mime_desktop_database_update
266 }
267
268 pkg_postrm() {
269 # Update desktop file database and gtk icon cache (bug #334993)
270 gnome2_icon_cache_update
271 fdo-mime_desktop_database_update
272 }