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.00.1438.ebuild
Date: Wed, 30 May 2012 14:40:01
Message-Id: 20120530143950.50E252004B@flycatcher.gentoo.org
1 jer 12/05/30 14:39:50
2
3 Modified: ChangeLog
4 Added: opera-next-12.00.1438.ebuild
5 Log:
6 http://my.opera.com/desktopteam/blog/2012/05/30/oopp-improvements
7
8 (Portage version: 2.2.0_alpha108/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.90 www-client/opera-next/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera-next/ChangeLog?rev=1.90&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera-next/ChangeLog?rev=1.90&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera-next/ChangeLog?r1=1.89&r2=1.90
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-client/opera-next/ChangeLog,v
20 retrieving revision 1.89
21 retrieving revision 1.90
22 diff -u -r1.89 -r1.90
23 --- ChangeLog 28 May 2012 18:35:23 -0000 1.89
24 +++ ChangeLog 30 May 2012 14:39:50 -0000 1.90
25 @@ -1,6 +1,11 @@
26 # ChangeLog for www-client/opera-next
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/www-client/opera-next/ChangeLog,v 1.89 2012/05/28 18:35:23 jer Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/www-client/opera-next/ChangeLog,v 1.90 2012/05/30 14:39:50 jer Exp $
30 +
31 +*opera-next-12.00.1438 (30 May 2012)
32 +
33 + 30 May 2012; Jeroen Roovers <jer@g.o> +opera-next-12.00.1438.ebuild:
34 + http://my.opera.com/desktopteam/blog/2012/05/30/oopp-improvements
35
36 *opera-next-12.00.1433 (28 May 2012)
37
38
39
40
41 1.1 www-client/opera-next/opera-next-12.00.1438.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera-next/opera-next-12.00.1438.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera-next/opera-next-12.00.1438.ebuild?rev=1.1&content-type=text/plain
45
46 Index: opera-next-12.00.1438.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-next/opera-next-12.00.1438.ebuild,v 1.1 2012/05/30 14:39:50 jer Exp $
51
52 EAPI="4"
53
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-11 LGPL-2 LGPL-3"
61 KEYWORDS="~amd64 ~x86 ~x86-fbsd"
62 IUSE="elibc_FreeBSD gtk gtk3 kde +gstreamer"
63
64 O_V="$(get_version_component_range 1-2)" # Major version, i.e. 11.00
65 O_B="$(get_version_component_range 3)" # Build version, i.e. 1156
66
67 O_D="4958_${O_V}-${O_B}"
68 O_P="${PN}-${O_V}-${O_B}"
69 O_U="http://snapshot.opera.com/unix/"
70
71 SRC_URI="
72 amd64? ( ${O_U}${O_D}/${O_P}.x86_64.linux.tar.xz )
73 x86? ( ${O_U}${O_D}/${O_P}.i386.linux.tar.xz )
74 x86-fbsd? ( ${O_U}${O_D}/${O_P}.i386.freebsd.tar.xz )
75 "
76
77 OPREFIX="/usr/$(get_libdir)"
78
79 QA_DT_HASH="${OPREFIX}/${PN}/.*"
80 QA_PRESTRIPPED="${OPREFIX}/${PN}/.*"
81
82 O_LINGUAS="
83 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
84 hi hr hu id it ja ka ko lt me mk ms nb nl nn pa pl pt pt-BR ro ru sk sr sv
85 sw ta te th tl tr uk ur uz vi zh-CN zh-TW zu
86 "
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 local OPERA_SUFFIX= OPERA__SUFFIX= OPERAU_SUFFIX=
191 if [[ ${PN} = opera-next ]]; then
192 OPERA_SUFFIX="-next"
193 OPERA__SUFFIX=" Next"
194 OPERA_USUFFIX="-NEXT"
195 fi
196
197 # Replace PREFIX, SUFFIX and PN in various files
198 sed -i \
199 -e "s:@@{PREFIX}:/usr:g" \
200 -e "s:@@{SUFFIX}:${OPERA_SUFFIX}:g" \
201 -e "s:@@{_SUFFIX}:${OPERA__SUFFIX}:g" \
202 -e "s:@@{USUFFIX}:${OPERA_USUFFIX}:g" \
203 share/man/man1/* \
204 share/mime/packages/* \
205 share/applications/${PN}-*.desktop \
206 || die
207
208 # Create /usr/bin/opera wrapper
209 echo '#!/bin/sh' > ${PN}
210 echo 'export OPERA_DIR="/usr/share/'"${PN}"'"' >> ${PN}
211 echo 'export OPERA_PERSONALDIR=${OPERA_PERSONALDIR:-"${HOME}/.'${PN}'"}' \
212 >> ${PN}
213 echo 'exec '"${OPREFIX}/${PN}/${PN}"' "$@"' >> ${PN}
214
215 # Change libz.so.3 to libz.so.1 for gentoo/freebsd
216 if use elibc_FreeBSD; then
217 scanelf -qR -N libz.so.3 -F "#N" lib/${PN}/ | \
218 while read i; do
219 if [[ $(strings "$i" | fgrep -c libz.so.3) -ne 1 ]];
220 then
221 export SANITY_CHECK_LIBZ_FAILED=1
222 break
223 fi
224 sed -i \
225 "$i" \
226 -e 's/libz\.so\.3/libz.so.1/g'
227 done
228 [[ "$SANITY_CHECK_LIBZ_FAILED" = "1" ]] && die
229 fi
230 }
231
232 src_install() {
233 # We install into usr instead of opt as Opera does not support the latter
234 dodir /usr
235 mv lib/ "${D}/${OPREFIX}" || die
236 mv share/ "${D}/usr/" || die
237
238 # Install startup scripts
239 dobin ${PN}
240
241 # Stop revdep-rebuild from checking opera binaries
242 dodir /etc/revdep-rebuild
243 echo "SEARCH_DIRS_MASK=\"${OPREFIX}/${PN}\"" \
244 > "${D}"/etc/revdep-rebuild/90${PN}
245
246 # Set PaX markings for hardened/PaX (bug #344267)
247 pax-mark m "${D}"/${OPREFIX}/${PN}/opera*
248 }
249
250 pkg_preinst() {
251 gnome2_icon_savelist
252 }
253
254 pkg_postinst() {
255 if use elibc_FreeBSD; then
256 elog
257 elog "To improve shared memory usage please set:"
258 elog "$ sysctl kern.ipc.shm_allow_removed=1"
259 fi
260
261 # Update desktop file database and gtk icon cache (bug #334993)
262 gnome2_icon_cache_update
263 fdo-mime_desktop_database_update
264 }
265
266 pkg_postrm() {
267 # Update desktop file database and gtk icon cache (bug #334993)
268 gnome2_icon_cache_update
269 fdo-mime_desktop_database_update
270 }