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