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: metadata.xml ChangeLog opera-next-11.50.1009.ebuild
Date: Tue, 03 May 2011 19:42:56
Message-Id: 20110503194243.3FE1820054@flycatcher.gentoo.org
1 jer 11/05/03 19:42:43
2
3 Added: metadata.xml ChangeLog opera-next-11.50.1009.ebuild
4 Log:
5 Initial commit <http://my.opera.com/desktopteam/blog/swordfish-and-opera-next>.
6
7 (Portage version: 2.2.0_alpha30/cvs/Linux i686)
8
9 Revision Changes Path
10 1.1 www-client/opera-next/metadata.xml
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera-next/metadata.xml?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera-next/metadata.xml?rev=1.1&content-type=text/plain
14
15 Index: metadata.xml
16 ===================================================================
17 <?xml version="1.0" encoding="UTF-8"?>
18 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
19 <pkgmetadata>
20 <herd>no-herd</herd>
21 <maintainer>
22 <email>jer@g.o</email>
23 <name>Jeroen Roovers</name>
24 </maintainer>
25 <longdescription>
26 Opera is a graphical Web browser available on several platforms. The desktop
27 version runs on GNU/Linux and FreeBSD. Versions for Macintosh and
28 Windows are also available.
29
30 Opera Next is a stand-alone installation of the Opera desktop browser intended for testing the development of new features, technologies, and improvements. It is automatically updated to include the latest changes as they become available. As such, it may be unstable and include known issues, such as crashes or data loss situations. The 11.50 alpha is the first release for this product.
31
32 Opera Next is an entirely separate product to the official <pkg>www-client/opera</pkg> browser product, which is the stable product intended for day-to-day use. There is no connection or interaction between them unless you manually configure this; all preferences and settings are saved for each product individually. For example, a bookmark saved in Opera Next will not display in your primary Opera browser. This ensures that your valuable data and settings remain untouched when you try out our latest changes.
33 </longdescription>
34 <use>
35 <flag name='gtk'>Set runtime dependencies to support GTK+/GNOME desktop integration</flag>
36 <flag name='kde'>Set runtime dependencies to support KDE desktop integration</flag>
37 </use>
38 </pkgmetadata>
39
40
41
42 1.1 www-client/opera-next/ChangeLog
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera-next/ChangeLog?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera-next/ChangeLog?rev=1.1&content-type=text/plain
46
47 Index: ChangeLog
48 ===================================================================
49 # ChangeLog for www-client/opera-next
50 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
51 # $Header: /var/cvsroot/gentoo-x86/www-client/opera-next/ChangeLog,v 1.1 2011/05/03 19:42:43 jer Exp $
52
53 *opera-next-11.50.1009 (03 May 2011)
54
55 03 May 2011; Jeroen Roovers <jer@g.o> +opera-next-11.50.1009.ebuild,
56 +metadata.xml:
57 Initial commit
58 <http://my.opera.com/desktopteam/blog/swordfish-and-opera-next>.
59
60
61
62
63 1.1 www-client/opera-next/opera-next-11.50.1009.ebuild
64
65 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera-next/opera-next-11.50.1009.ebuild?rev=1.1&view=markup
66 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera-next/opera-next-11.50.1009.ebuild?rev=1.1&content-type=text/plain
67
68 Index: opera-next-11.50.1009.ebuild
69 ===================================================================
70 # Copyright 1999-2011 Gentoo Foundation
71 # Distributed under the terms of the GNU General Public License v2
72 # $Header: /var/cvsroot/gentoo-x86/www-client/opera-next/opera-next-11.50.1009.ebuild,v 1.1 2011/05/03 19:42:43 jer Exp $
73
74 EAPI="3"
75
76 inherit eutils fdo-mime gnome2-utils multilib pax-utils versionator
77
78 DESCRIPTION="A fast and secure web browser and Internet suite"
79 HOMEPAGE="http://www.opera.com/"
80
81 SLOT="0"
82 LICENSE="OPERA-11 LGPL-2 LGPL-3"
83 KEYWORDS="~amd64 ~x86 ~x86-fbsd"
84 IUSE="elibc_FreeBSD gtk kde +gstreamer"
85
86 RESTRICT="test"
87
88 O_V="$(get_version_component_range 1-2)" # Major version, i.e. 11.00
89 O_B="$(get_version_component_range 3)" # Build version, i.e. 1156
90
91 O_D="alpha_${O_V}-${O_B}"
92 O_P="${PN}-${O_V}-${O_B}"
93 O_U="http://snapshot.opera.com/unix/"
94
95 SRC_URI="
96 amd64? ( ${O_U}${O_D}/${O_P}.x86_64.linux.tar.xz )
97 x86? ( ${O_U}${O_D}/${O_P}.i386.linux.tar.xz )
98 x86-fbsd? ( ${O_U}${O_D}/${O_P}.i386.freebsd.tar.xz )
99 "
100
101 OPREFIX="/usr/$(get_libdir)"
102
103 QA_DT_HASH="${OPREFIX}/${PN}/.*"
104 QA_PRESTRIPPED="${OPREFIX}/${PN}/.*"
105
106 O_LINGUAS="
107 af az be bg cs da de el en-GB es-ES es-LA et fi fr fr-CA fy gd hi hr hu id
108 it ja ka ko lt me mk ms nb nl nn pl pt pt-BR ro ru sk sr sv ta te th tl tr
109 uk uz vi zh-CN zh-TW
110 "
111
112 for O_LINGUA in ${O_LINGUAS}; do
113 IUSE="${IUSE} linguas_${O_LINGUA/-/_}"
114 done
115
116 DEPEND="
117 >=sys-apps/sed-4
118 app-arch/xz-utils
119 "
120 GTKRDEPEND="
121 dev-libs/atk
122 dev-libs/glib:2
123 x11-libs/cairo
124 x11-libs/gdk-pixbuf
125 x11-libs/gtk+:2
126 x11-libs/pango
127 x11-libs/pixman
128 "
129 KDERDEPEND="
130 kde-base/kdelibs
131 x11-libs/qt-core
132 x11-libs/qt-gui
133 "
134 GSTRDEPEND="
135 dev-libs/glib
136 dev-libs/libxml2
137 media-plugins/gst-plugins-meta
138 media-libs/gstreamer
139 "
140 RDEPEND="
141 media-libs/fontconfig
142 media-libs/freetype
143 sys-apps/util-linux
144 sys-libs/zlib
145 virtual/opengl
146 x11-libs/libICE
147 x11-libs/libSM
148 x11-libs/libX11
149 x11-libs/libXext
150 x11-libs/libXft
151 x11-libs/libXrender
152 gtk? ( ${GTKRDEPEND} )
153 kde? ( ${KDERDEPEND} )
154 gstreamer? ( ${GSTRDEPEND} )
155 "
156
157 pkg_setup() {
158 echo -e \
159 " ${GOOD}****************************************************${NORMAL}"
160 elog "If you seek support, please file a bug report at"
161 elog "https://bugs.gentoo.org and post the output of"
162 elog " \`emerge --info =${CATEGORY}/${P}'"
163 echo -e \
164 " ${GOOD}****************************************************${NORMAL}"
165 }
166
167 src_unpack() {
168 unpack ${A}
169 mv -v ${PN}* "${S}" || die
170 }
171
172 src_prepare() {
173 # Remove unwanted linguas
174 LNGDIR="share/${PN}/locale"
175 einfo "Keeping these locales (linguas): ${LINGUAS}."
176 for LINGUA in ${O_LINGUAS}; do
177 if ! use linguas_${LINGUA/-/_}; then
178 LINGUA=$(find "${LNGDIR}" -maxdepth 1 -type d -iname ${LINGUA/_/-})
179 rm -r "${LINGUA}"
180 fi
181 done
182
183 # Remove doc directory but keep the LICENSE under another name (bug #315473)
184 mv share/doc/${PN}/LICENSE share/${PN}/defaults/license.txt
185 rm -rf share/doc
186 for locale in share/${PN}/locale/*; do
187 rm -f "${locale}/license.txt"
188 ln -sn /usr/share/${PN}/defaults/license.txt "${locale}/license.txt" \
189 || die "ln -sn license.txt"
190 done
191
192 # Remove package directory
193 rm -rf share/${PN}/package
194
195 # Leave libopera*.so only if the user chooses
196 if ! use gtk; then
197 rm lib/${PN}/liboperagtk.so || die "rm liboperagtk.so failed"
198 fi
199 if ! use kde; then
200 rm lib/${PN}/liboperakde4.so || die "rm liboperakde4.so failed"
201 fi
202
203 # Unzip the man pages before sedding
204 gunzip share/man/man1/* || die "gunzip failed"
205
206 # Replace PREFIX and SUFFIX in various files
207 sed -i \
208 -e "s:@@{PREFIX}:/usr:g" \
209 -e "s:@@{SUFFIX}::g" \
210 -e "s:@@{_SUFFIX}::g" \
211 -e "s:@@{USUFFIX}::g" \
212 share/man/man1/* \
213 share/applications/${PN}-browser.desktop \
214 || die "sed failed"
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 'exec '"${OPREFIX}/${PN}/${PN}"' "$@"' >> ${PN}
222
223 # Fix libdir in defaults/pluginpath.ini
224 sed -i \
225 share/${PN}/defaults/pluginpath.ini \
226 -e "s|/usr/lib32|${OPREFIX}|g" \
227 -e '/netscape/{s|[0-1]|2|g}' \
228 || die "sed pluginpath.ini failed"
229
230 # Change libz.so.3 to libz.so.1 for gentoo/freebsd
231 if use elibc_FreeBSD; then
232 scanelf -qR -N libz.so.3 -F "#N" lib/${PN}/ | \
233 while read i; do
234 if [[ $(strings "$i" | fgrep -c libz.so.3) -ne 1 ]];
235 then
236 export SANITY_CHECK_LIBZ_FAILED=1
237 break
238 fi
239 sed -i \
240 "$i" \
241 -e 's/libz\.so\.3/libz.so.1/g'
242 done
243 [[ "$SANITY_CHECK_LIBZ_FAILED" = "1" ]] \
244 && die "failed to change libz.so.3 to libz.so.1"
245 fi
246 }
247
248 src_install() {
249 # We install into usr instead of opt as Opera does not support the latter
250 dodir /usr
251 mv lib/ "${D}/${OPREFIX}" || die "mv lib/ failed"
252 mv share/ "${D}/usr/" || die "mv share/ failed"
253
254 # Install startup scripts
255 dobin ${PN} || die "dobin failed"
256
257 # Stop revdep-rebuild from checking opera binaries
258 dodir /etc/revdep-rebuild
259 echo "SEARCH_DIRS_MASK=\"${OPREFIX}/${PN}\"" \
260 > "${D}"/etc/revdep-rebuild/90${PN}
261
262 # Set PaX markings for hardened/PaX (bug #344267)
263 pax-mark m \
264 "${D}/${OPREFIX}/${PN}/${PN}" \
265 "${D}/${OPREFIX}/${PN}/operaplugincleaner" \
266 "${D}/${OPREFIX}/${PN}/operapluginwrapper"
267 }
268
269 pkg_preinst() {
270 gnome2_icon_savelist
271 }
272
273 pkg_postinst() {
274 elog "To change the UI language, choose [Tools] -> [Preferences], open the"
275 elog "[General] tab, click on [Details...] then [Choose...] and point the"
276 elog "file chooser at /usr/share/${PN}/locale/, then enter the"
277 elog "directory for the language you want and [Open] the .lng file."
278
279 if use elibc_FreeBSD; then
280 elog
281 elog "To improve shared memory usage please set:"
282 elog "$ sysctl kern.ipc.shm_allow_removed=1"
283 fi
284
285 # Update desktop file database and gtk icon cache (bug #334993)
286 gnome2_icon_cache_update
287 fdo-mime_desktop_database_update
288 }
289
290 pkg_postrm() {
291 # Update desktop file database and gtk icon cache (bug #334993)
292 gnome2_icon_cache_update
293 fdo-mime_desktop_database_update
294 }