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.13_pre1733.ebuild
Date: Mon, 28 Jan 2013 12:00:15
Message-Id: 20130128120010.A76BB2171D@flycatcher.gentoo.org
1 jer 13/01/28 12:00:10
2
3 Modified: ChangeLog
4 Added: opera-next-12.13_pre1733.ebuild
5 Log:
6 http://my.opera.com/desktopteam/blog/2013/01/28/opera-12-13-rc2
7
8 (Portage version: 2.2.0_alpha161/cvs/Linux x86_64, signed Manifest commit with key A792A613)
9
10 Revision Changes Path
11 1.168 www-client/opera-next/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera-next/ChangeLog?rev=1.168&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera-next/ChangeLog?rev=1.168&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera-next/ChangeLog?r1=1.167&r2=1.168
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-client/opera-next/ChangeLog,v
20 retrieving revision 1.167
21 retrieving revision 1.168
22 diff -u -r1.167 -r1.168
23 --- ChangeLog 25 Jan 2013 18:21:19 -0000 1.167
24 +++ ChangeLog 28 Jan 2013 12:00:10 -0000 1.168
25 @@ -1,6 +1,12 @@
26 # ChangeLog for www-client/opera-next
27 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/www-client/opera-next/ChangeLog,v 1.167 2013/01/25 18:21:19 jer Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/www-client/opera-next/ChangeLog,v 1.168 2013/01/28 12:00:10 jer Exp $
30 +
31 +*opera-next-12.13_pre1733 (28 Jan 2013)
32 +
33 + 28 Jan 2013; Jeroen Roovers <jer@g.o>
34 + +opera-next-12.13_pre1733.ebuild:
35 + http://my.opera.com/desktopteam/blog/2013/01/28/opera-12-13-rc2
36
37 *opera-next-12.13_pre1725 (25 Jan 2013)
38
39
40
41
42 1.1 www-client/opera-next/opera-next-12.13_pre1733.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera-next/opera-next-12.13_pre1733.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera-next/opera-next-12.13_pre1733.ebuild?rev=1.1&content-type=text/plain
46
47 Index: opera-next-12.13_pre1733.ebuild
48 ===================================================================
49 # Copyright 1999-2013 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/www-client/opera-next/opera-next-12.13_pre1733.ebuild,v 1.1 2013/01/28 12:00:10 jer Exp $
52
53 EAPI=4
54 inherit eutils fdo-mime gnome2-utils multilib pax-utils versionator
55
56 DESCRIPTION="A fast and secure web browser and Internet suite"
57 HOMEPAGE="http://www.opera.com/"
58
59 SLOT="0"
60 LICENSE="OPERA-12 LGPL-2 LGPL-3"
61 KEYWORDS="~amd64 ~x86 ~x86-fbsd"
62 IUSE="elibc_FreeBSD gtk kde +gstreamer multilib"
63
64 O_V="$(get_version_component_range 1-2)" # Version, i.e. 11.00
65 O_B="$(get_version_component_range 3)" # Build number, i.e. 1156
66
67 # == Variables that often change ==
68 # All other variables should be accounted for by _pre/_p
69
70 O_K="fac3" # The key to the snapshot URL
71
72 O_LINGUAS="
73 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
74 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
75 sr sv sw ta te th tl tr uk ur uz vi zh-CN zh-TW zu
76 " # Supported linguas
77
78 # == End of variables that often change ==
79
80 if [[ "pre${O_B/pre/}" = "${O_B}" ]]; then # snapshot: _pre
81 O_D="${O_K}_${O_V}-${O_B/pre}" # directory string
82 O_P="${PN}-${O_V}-${O_B/pre}" # package string
83 O_U="http://snapshot.opera.com/unix/" # base URI
84
85 SRC_URI="
86 amd64? ( ${O_U}${O_D}/${O_P}.x86_64.linux.tar.xz )
87 x86? ( ${O_U}${O_D}/${O_P}.i386.linux.tar.xz )
88 x86-fbsd? ( ${O_U}${O_D}/${O_P}.i386.freebsd.tar.xz )
89 "
90 else # release: _p
91 O_D="${O_V/./}" # directory string
92 O_P="${PN}-${O_V}-${O_B/p}" # package string
93 O_U="mirror://opera/" # base URI
94
95 SRC_URI="
96 amd64? ( ${O_U}linux/${O_D}/${O_P}.x86_64.linux.tar.xz )
97 x86? ( ${O_U}linux/${O_D}/${O_P}.i386.linux.tar.xz )
98 x86-fbsd? ( ${O_U}unix/${O_D}/${O_P}.i386.freebsd.tar.xz )
99 "
100 fi
101
102 for O_LINGUA in ${O_LINGUAS}; do
103 IUSE+=" linguas_${O_LINGUA/-/_}"
104 done
105
106 DEPEND="
107 >=sys-apps/sed-4
108 app-arch/xz-utils
109 "
110 GTKRDEPEND="
111 dev-libs/atk
112 dev-libs/glib:2
113 x11-libs/cairo
114 x11-libs/gdk-pixbuf
115 gtk? ( || ( x11-libs/gtk+:3 x11-libs/gtk+:2 ) )
116 x11-libs/pango
117 x11-libs/pixman
118 "
119 KDERDEPEND="
120 kde-base/kdelibs
121 x11-libs/qt-core:4
122 x11-libs/qt-gui:4
123 "
124 GSTRDEPEND="
125 dev-libs/glib:2
126 dev-libs/libxml2
127 media-libs/gst-plugins-base:0.10
128 media-libs/gstreamer:0.10
129 media-plugins/gst-plugins-meta:0.10
130 "
131 RDEPEND="
132 media-libs/fontconfig
133 media-libs/freetype
134 sys-apps/util-linux
135 sys-libs/zlib
136 virtual/opengl
137 x11-libs/libICE
138 x11-libs/libSM
139 x11-libs/libX11
140 x11-libs/libXext
141 x11-libs/libXft
142 x11-libs/libXrender
143 x11-libs/libXt
144 gtk? ( ${GTKRDEPEND} )
145 kde? ( ${KDERDEPEND} )
146 gstreamer? ( ${GSTRDEPEND} )
147 "
148
149 OPREFIX="/usr/$(get_libdir)"
150 QA_PREBUILT="*"
151
152 src_unpack() {
153 unpack ${A}
154 mv -v ${PN}* "${S}" || die
155 }
156
157 src_prepare() {
158 local LNGDIR="share/${PN}/locale"
159
160 # Count linguas
161 count() { echo ${#}; }
162 local lingua_count=$(count ${O_LINGUAS} en)
163 local locale_count=$(count ${LNGDIR}/*)
164 [[ ${lingua_count} = ${locale_count} ]] \
165 || die "Number of LINGUAS does not match number of locales"
166 unset count
167
168 # Remove unwanted linguas
169 for LINGUA in ${O_LINGUAS}; do
170 if ! use linguas_${LINGUA/-/_}; then
171 LINGUA=$(find "${LNGDIR}" -maxdepth 1 -type d -iname ${LINGUA/_/-})
172 rm -r "${LINGUA}" || die "The list of linguas needs to be fixed"
173 fi
174 done
175
176 # Remove doc directory but keep the LICENSE under another name (bug #315473)
177 mv share/doc/${PN}/LICENSE share/${PN}/defaults/license.txt
178 rm -rf share/doc
179 for locale in share/${PN}/locale/*; do
180 rm -f "${locale}/license.txt"
181 ln -sn /usr/share/${PN}/defaults/license.txt "${locale}/license.txt" \
182 || die
183 done
184
185 # Remove package directory
186 rm -rf share/${PN}/package
187
188 # Optional libraries
189 if ! use gtk; then
190 rm lib/${PN}/liboperagtk2.so || die
191 rm lib/${PN}/liboperagtk3.so || die
192 fi
193 if ! use kde; then
194 rm lib/${PN}/liboperakde4.so || die
195 fi
196 if ! use gstreamer; then
197 rm -r lib/${PN}/gstreamer || die
198 fi
199 if use amd64 && ! use multilib; then
200 rm lib/${PN}/pluginwrapper/operapluginwrapper-ia32-linux || die
201 fi
202
203 # Unzip the man pages before sedding
204 gunzip share/man/man1/* || die
205
206 local OPERA_SUFFIX= OPERA__SUFFIX= OPERAU_SUFFIX=
207 if [[ ${PN} = opera-next ]]; then
208 OPERA_SUFFIX="-next"
209 OPERA__SUFFIX=" Next"
210 OPERA_USUFFIX="-NEXT"
211 fi
212
213 # Replace PREFIX, SUFFIX and PN in various files
214 sed -i \
215 -e "s:@@{PREFIX}:/usr:g" \
216 -e "s:@@{SUFFIX}:${OPERA_SUFFIX}:g" \
217 -e "s:@@{_SUFFIX}:${OPERA__SUFFIX}:g" \
218 -e "s:@@{USUFFIX}:${OPERA_USUFFIX}:g" \
219 share/man/man1/* \
220 share/mime/packages/* \
221 share/applications/${PN}-*.desktop \
222 || die
223
224 # Create /usr/bin/opera wrapper
225 echo '#!/bin/sh' > ${PN}
226 echo 'export OPERA_DIR="/usr/share/'"${PN}"'"' >> ${PN}
227 echo 'export OPERA_PERSONALDIR=${OPERA_PERSONALDIR:-"${HOME}/.'${PN}'"}' \
228 >> ${PN}
229 echo 'exec '"${OPREFIX}/${PN}/${PN}"' "$@"' >> ${PN}
230
231 # Change libz.so.3 to libz.so.1 for gentoo/freebsd
232 if use elibc_FreeBSD; then
233 scanelf -qR -N libz.so.3 -F "#N" lib/${PN}/ | \
234 while read i; do
235 if [[ $(strings "$i" | fgrep -c libz.so.3) -ne 1 ]];
236 then
237 export SANITY_CHECK_LIBZ_FAILED=1
238 break
239 fi
240 sed -i \
241 "$i" \
242 -e 's/libz\.so\.3/libz.so.1/g'
243 done
244 [[ "$SANITY_CHECK_LIBZ_FAILED" = "1" ]] && die
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
252 mv share/ "${D}/usr/" || die
253
254 # Install startup scripts
255 dobin ${PN}
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 $( list-paxables $( find "${D}"/${OPREFIX}/${PN}/ ) )
264 }
265
266 pkg_preinst() {
267 gnome2_icon_savelist
268 }
269
270 pkg_postinst() {
271 if use elibc_FreeBSD; then
272 elog
273 elog "To improve shared memory usage please set:"
274 elog "$ sysctl kern.ipc.shm_allow_removed=1"
275 fi
276
277 # Update desktop file database and gtk icon cache (bug #334993)
278 gnome2_icon_cache_update
279 fdo-mime_desktop_database_update
280 }
281
282 pkg_postrm() {
283 # Update desktop file database and gtk icon cache (bug #334993)
284 gnome2_icon_cache_update
285 fdo-mime_desktop_database_update
286 }