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