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