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