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