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.10.1646.ebuild opera-next-12.10.1633.ebuild opera-next-12.10.1639.ebuild
Date: Wed, 31 Oct 2012 18:03:54
Message-Id: 20121031180338.9745421600@flycatcher.gentoo.org
1 jer 12/10/31 18:03:38
2
3 Modified: ChangeLog
4 Added: opera-next-12.10.1646.ebuild
5 Removed: opera-next-12.10.1633.ebuild
6 opera-next-12.10.1639.ebuild
7 Log:
8 http://my.opera.com/desktopteam/blog/2012/10/31/almost-rc
9
10 (Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key A792A613)
11
12 Revision Changes Path
13 1.141 www-client/opera-next/ChangeLog
14
15 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera-next/ChangeLog?rev=1.141&view=markup
16 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera-next/ChangeLog?rev=1.141&content-type=text/plain
17 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera-next/ChangeLog?r1=1.140&r2=1.141
18
19 Index: ChangeLog
20 ===================================================================
21 RCS file: /var/cvsroot/gentoo-x86/www-client/opera-next/ChangeLog,v
22 retrieving revision 1.140
23 retrieving revision 1.141
24 diff -u -r1.140 -r1.141
25 --- ChangeLog 30 Oct 2012 15:40:44 -0000 1.140
26 +++ ChangeLog 31 Oct 2012 18:03:38 -0000 1.141
27 @@ -1,6 +1,12 @@
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.140 2012/10/30 15:40:44 jer Exp $
31 +# $Header: /var/cvsroot/gentoo-x86/www-client/opera-next/ChangeLog,v 1.141 2012/10/31 18:03:38 jer Exp $
32 +
33 +*opera-next-12.10.1646 (31 Oct 2012)
34 +
35 + 31 Oct 2012; Jeroen Roovers <jer@g.o> -opera-next-12.10.1633.ebuild,
36 + -opera-next-12.10.1639.ebuild, +opera-next-12.10.1646.ebuild:
37 + http://my.opera.com/desktopteam/blog/2012/10/31/almost-rc
38
39 *opera-next-12.10.1644 (30 Oct 2012)
40
41
42
43
44 1.1 www-client/opera-next/opera-next-12.10.1646.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera-next/opera-next-12.10.1646.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera-next/opera-next-12.10.1646.ebuild?rev=1.1&content-type=text/plain
48
49 Index: opera-next-12.10.1646.ebuild
50 ===================================================================
51 # Copyright 1999-2012 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/www-client/opera-next/opera-next-12.10.1646.ebuild,v 1.1 2012/10/31 18:03:38 jer Exp $
54
55 EAPI=4
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-12 LGPL-2 LGPL-3"
63 KEYWORDS="~amd64 ~x86 ~x86-fbsd"
64 IUSE="elibc_FreeBSD gtk kde +gstreamer multilib"
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="4810_${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 O_LINGUAS="
80 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
81 hi hr hu id it ja ka kk ko lt lv me mk ms nb nl nn pa pl pt pt-BR ro ru sk
82 sr sv sw ta te th tl tr uk ur uz vi zh-CN zh-TW zu
83 "
84
85 for O_LINGUA in ${O_LINGUAS}; do
86 IUSE+=" linguas_${O_LINGUA/-/_}"
87 done
88
89 DEPEND="
90 >=sys-apps/sed-4
91 app-arch/xz-utils
92 "
93 GTKRDEPEND="
94 dev-libs/atk
95 dev-libs/glib:2
96 x11-libs/cairo
97 x11-libs/gdk-pixbuf
98 gtk? ( || ( x11-libs/gtk+:3 x11-libs/gtk+:2 ) )
99 x11-libs/pango
100 x11-libs/pixman
101 "
102 KDERDEPEND="
103 kde-base/kdelibs
104 x11-libs/qt-core:4
105 x11-libs/qt-gui:4
106 "
107 GSTRDEPEND="
108 dev-libs/glib:2
109 dev-libs/libxml2
110 media-libs/gst-plugins-base
111 media-libs/gstreamer
112 media-plugins/gst-plugins-meta
113 "
114 RDEPEND="
115 media-libs/fontconfig
116 media-libs/freetype
117 sys-apps/util-linux
118 sys-libs/zlib
119 virtual/opengl
120 x11-libs/libICE
121 x11-libs/libSM
122 x11-libs/libX11
123 x11-libs/libXext
124 x11-libs/libXft
125 x11-libs/libXrender
126 x11-libs/libXt
127 gtk? ( ${GTKRDEPEND} )
128 kde? ( ${KDERDEPEND} )
129 gstreamer? ( ${GSTRDEPEND} )
130 "
131 src_unpack() {
132 unpack ${A}
133 mv -v ${PN}* "${S}" || die
134 }
135
136 src_prepare() {
137 export OPREFIX="/usr/$(get_libdir)"
138 export QA_FLAGS_IGNORED="${OPREFIX}/${PN}/.*"
139 export QA_PRESTRIPPED="${OPREFIX}/${PN}/.*"
140
141 local LNGDIR="share/${PN}/locale"
142
143 # Count linguas
144 count() { echo ${#}; }
145 local lingua_count=$(count ${O_LINGUAS} en)
146 local locale_count=$(count ${LNGDIR}/*)
147 [[ ${lingua_count} = ${locale_count} ]] \
148 || die "Number of LINGUAS does not match number of locales"
149 unset count
150
151 # Remove unwanted linguas
152 for LINGUA in ${O_LINGUAS}; do
153 if ! use linguas_${LINGUA/-/_}; then
154 LINGUA=$(find "${LNGDIR}" -maxdepth 1 -type d -iname ${LINGUA/_/-})
155 rm -r "${LINGUA}" || die "The list of linguas needs to be fixed"
156 fi
157 done
158
159 # Remove doc directory but keep the LICENSE under another name (bug #315473)
160 mv share/doc/${PN}/LICENSE share/${PN}/defaults/license.txt
161 rm -rf share/doc
162 for locale in share/${PN}/locale/*; do
163 rm -f "${locale}/license.txt"
164 ln -sn /usr/share/${PN}/defaults/license.txt "${locale}/license.txt" \
165 || die
166 done
167
168 # Remove package directory
169 rm -rf share/${PN}/package
170
171 # Optional libraries
172 if ! use gtk; then
173 rm lib/${PN}/liboperagtk2.so || die
174 rm lib/${PN}/liboperagtk3.so || die
175 fi
176 if ! use kde; then
177 rm lib/${PN}/liboperakde4.so || die
178 fi
179 if ! use gstreamer; then
180 rm -r lib/${PN}/gstreamer || die
181 fi
182 if use amd64 && ! use multilib; then
183 rm lib/${PN}/pluginwrapper/operapluginwrapper-ia32-linux || die
184 fi
185
186 # Unzip the man pages before sedding
187 gunzip share/man/man1/* || die
188
189 local OPERA_SUFFIX= OPERA__SUFFIX= OPERAU_SUFFIX=
190 if [[ ${PN} = opera-next ]]; then
191 OPERA_SUFFIX="-next"
192 OPERA__SUFFIX=" Next"
193 OPERA_USUFFIX="-NEXT"
194 fi
195
196 # Replace PREFIX, SUFFIX and PN in various files
197 sed -i \
198 -e "s:@@{PREFIX}:/usr:g" \
199 -e "s:@@{SUFFIX}:${OPERA_SUFFIX}:g" \
200 -e "s:@@{_SUFFIX}:${OPERA__SUFFIX}:g" \
201 -e "s:@@{USUFFIX}:${OPERA_USUFFIX}:g" \
202 share/man/man1/* \
203 share/mime/packages/* \
204 share/applications/${PN}-*.desktop \
205 || die
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 $( list-paxables $( find "${D}"/${OPREFIX}/${PN}/ ) )
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 }