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.01.1532.ebuild
Date: Wed, 01 Aug 2012 13:54:48
Message-Id: 20120801135438.01AF72004B@flycatcher.gentoo.org
1 jer 12/08/01 13:54:37
2
3 Modified: ChangeLog
4 Added: opera-12.01.1532.ebuild
5 Log:
6 http://my.opera.com/desktopteam/blog/2012/08/01/12-01-rc2
7
8 (Portage version: 2.2.0_alpha120/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.732 www-client/opera/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/ChangeLog?rev=1.732&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/ChangeLog?rev=1.732&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/ChangeLog?r1=1.731&r2=1.732
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-client/opera/ChangeLog,v
20 retrieving revision 1.731
21 retrieving revision 1.732
22 diff -u -r1.731 -r1.732
23 --- ChangeLog 27 Jul 2012 13:14:57 -0000 1.731
24 +++ ChangeLog 1 Aug 2012 13:54:37 -0000 1.732
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.731 2012/07/27 13:14:57 jer Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/www-client/opera/ChangeLog,v 1.732 2012/08/01 13:54:37 jer Exp $
30 +
31 +*opera-12.01.1532 (01 Aug 2012)
32 +
33 + 01 Aug 2012; Jeroen Roovers <jer@g.o> +opera-12.01.1532.ebuild:
34 + http://my.opera.com/desktopteam/blog/2012/08/01/12-01-rc2
35
36 27 Jul 2012; Jeroen Roovers <jer@g.o> -opera-12.01.1517.ebuild,
37 -opera-12.01.1520.ebuild:
38
39
40
41 1.1 www-client/opera/opera-12.01.1532.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/opera-12.01.1532.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/opera-12.01.1532.ebuild?rev=1.1&content-type=text/plain
45
46 Index: opera-12.01.1532.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.01.1532.ebuild,v 1.1 2012/08/01 13:54:37 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-11 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="20787_${O_V}-${O_B}"
67 O_P="${PN}-${O_V}-${O_B}"
68 O_U="http://snapshot.opera.com/unix/"
69
70 SRC_URI="
71 amd64? ( ${O_U}${O_D}/${O_P}.x86_64.linux.tar.xz )
72 x86? ( ${O_U}${O_D}/${O_P}.i386.linux.tar.xz )
73 x86-fbsd? ( ${O_U}${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 me mk ms nb nl nn pa pl pt pt-BR ro ru sk sr
79 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="${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_DT_HASH="${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 einfo "Keeping these locales (linguas): ${LINGUAS}."
150 for LINGUA in ${O_LINGUAS}; do
151 if ! use linguas_${LINGUA/-/_}; then
152 LINGUA=$(find "${LNGDIR}" -maxdepth 1 -type d -iname ${LINGUA/_/-})
153 rm -r "${LINGUA}" || die "The list of linguas needs to be fixed"
154 fi
155 done
156
157 # Remove doc directory but keep the LICENSE under another name (bug #315473)
158 mv share/doc/${PN}/LICENSE share/${PN}/defaults/license.txt
159 rm -rf share/doc
160 for locale in share/${PN}/locale/*; do
161 rm -f "${locale}/license.txt"
162 ln -sn /usr/share/${PN}/defaults/license.txt "${locale}/license.txt" \
163 || die
164 done
165
166 # Remove package directory
167 rm -rf share/${PN}/package
168
169 # Optional libraries
170 if ! use gtk; then
171 rm lib/${PN}/liboperagtk2.so || die
172 rm lib/${PN}/liboperagtk3.so || die
173 fi
174 if ! use kde; then
175 rm lib/${PN}/liboperakde4.so || die
176 fi
177 if ! use gstreamer; then
178 rm -r lib/${PN}/gstreamer || die
179 fi
180 if use amd64 && ! use multilib; then
181 rm lib/${PN}/pluginwrapper/operapluginwrapper-ia32-linux || die
182 fi
183
184 # Unzip the man pages before sedding
185 gunzip share/man/man1/* || die
186
187 local OPERA_SUFFIX= OPERA__SUFFIX= OPERAU_SUFFIX=
188 if [[ ${PN} = opera-next ]]; then
189 OPERA_SUFFIX="-next"
190 OPERA__SUFFIX=" Next"
191 OPERA_USUFFIX="-NEXT"
192 fi
193
194 # Replace PREFIX, SUFFIX and PN in various files
195 sed -i \
196 -e "s:@@{PREFIX}:/usr:g" \
197 -e "s:@@{SUFFIX}:${OPERA_SUFFIX}:g" \
198 -e "s:@@{_SUFFIX}:${OPERA__SUFFIX}:g" \
199 -e "s:@@{USUFFIX}:${OPERA_USUFFIX}:g" \
200 share/man/man1/* \
201 share/mime/packages/* \
202 share/applications/${PN}-*.desktop \
203 || die
204
205 # Create /usr/bin/opera wrapper
206 echo '#!/bin/sh' > ${PN}
207 echo 'export OPERA_DIR="/usr/share/'"${PN}"'"' >> ${PN}
208 echo 'export OPERA_PERSONALDIR=${OPERA_PERSONALDIR:-"${HOME}/.'${PN}'"}' \
209 >> ${PN}
210 echo 'exec '"${OPREFIX}/${PN}/${PN}"' "$@"' >> ${PN}
211
212 # Change libz.so.3 to libz.so.1 for gentoo/freebsd
213 if use elibc_FreeBSD; then
214 scanelf -qR -N libz.so.3 -F "#N" lib/${PN}/ | \
215 while read i; do
216 if [[ $(strings "$i" | fgrep -c libz.so.3) -ne 1 ]];
217 then
218 export SANITY_CHECK_LIBZ_FAILED=1
219 break
220 fi
221 sed -i \
222 "$i" \
223 -e 's/libz\.so\.3/libz.so.1/g'
224 done
225 [[ "$SANITY_CHECK_LIBZ_FAILED" = "1" ]] && die
226 fi
227 }
228
229 src_install() {
230 # We install into usr instead of opt as Opera does not support the latter
231 dodir /usr
232 mv lib/ "${D}/${OPREFIX}" || die
233 mv share/ "${D}/usr/" || die
234
235 # Install startup scripts
236 dobin ${PN}
237
238 # Stop revdep-rebuild from checking opera binaries
239 dodir /etc/revdep-rebuild
240 echo "SEARCH_DIRS_MASK=\"${OPREFIX}/${PN}\"" \
241 > "${D}"/etc/revdep-rebuild/90${PN}
242
243 # Set PaX markings for hardened/PaX (bug #344267)
244 pax-mark m $( list-paxables $( find "${D}"/${OPREFIX}/${PN}/ ) )
245 }
246
247 pkg_preinst() {
248 gnome2_icon_savelist
249 }
250
251 pkg_postinst() {
252 if use elibc_FreeBSD; then
253 elog
254 elog "To improve shared memory usage please set:"
255 elog "$ sysctl kern.ipc.shm_allow_removed=1"
256 fi
257
258 # Update desktop file database and gtk icon cache (bug #334993)
259 gnome2_icon_cache_update
260 fdo-mime_desktop_database_update
261 }
262
263 pkg_postrm() {
264 # Update desktop file database and gtk icon cache (bug #334993)
265 gnome2_icon_cache_update
266 fdo-mime_desktop_database_update
267 }