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-11.61.1222.ebuild
Date: Fri, 23 Dec 2011 15:54:25
Message-Id: 20111223155416.063862004B@flycatcher.gentoo.org
1 jer 11/12/23 15:54:16
2
3 Modified: ChangeLog
4 Added: opera-11.61.1222.ebuild
5 Log:
6 http://my.opera.com/desktopteam/blog/2011/12/23/lillejulaften
7
8 (Portage version: 2.2.0_alpha81/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.680 www-client/opera/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/ChangeLog?rev=1.680&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/ChangeLog?rev=1.680&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/ChangeLog?r1=1.679&r2=1.680
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-client/opera/ChangeLog,v
20 retrieving revision 1.679
21 retrieving revision 1.680
22 diff -u -r1.679 -r1.680
23 --- ChangeLog 17 Dec 2011 13:52:31 -0000 1.679
24 +++ ChangeLog 23 Dec 2011 15:54:15 -0000 1.680
25 @@ -1,6 +1,11 @@
26 # ChangeLog for www-client/opera
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/www-client/opera/ChangeLog,v 1.679 2011/12/17 13:52:31 jer Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/www-client/opera/ChangeLog,v 1.680 2011/12/23 15:54:15 jer Exp $
30 +
31 +*opera-11.61.1222 (23 Dec 2011)
32 +
33 + 23 Dec 2011; Jeroen Roovers <jer@g.o> +opera-11.61.1222.ebuild:
34 + http://my.opera.com/desktopteam/blog/2011/12/23/lillejulaften
35
36 17 Dec 2011; Jeroen Roovers <jer@g.o> opera-11.60.1185.ebuild:
37 Revert LD_PRELOAD hack (bug #394963).
38
39
40
41 1.1 www-client/opera/opera-11.61.1222.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/opera-11.61.1222.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/opera-11.61.1222.ebuild?rev=1.1&content-type=text/plain
45
46 Index: opera-11.61.1222.ebuild
47 ===================================================================
48 # Copyright 1999-2011 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/www-client/opera/opera-11.61.1222.ebuild,v 1.1 2011/12/23 15:54:15 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="lillejulaften_${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="af az be bg bn cs da de el en-GB es-ES es-LA et fi fr fr-CA fy gd hi
83 hr hu id it ja ka ko lt me mk ms nb nl nn pa pl pt pt-BR ro ru sk sr sv sw ta te
84 th tl tr uk uz vi zh-CN zh-TW zu"
85
86 for O_LINGUA in ${O_LINGUAS}; do
87 IUSE="${IUSE} linguas_${O_LINGUA/-/_}"
88 done
89
90 DEPEND="
91 >=sys-apps/sed-4
92 app-arch/xz-utils
93 "
94 GTKRDEPEND="
95 dev-libs/atk
96 dev-libs/glib:2
97 x11-libs/cairo
98 x11-libs/gdk-pixbuf
99 gtk? ( x11-libs/gtk+:2 )
100 gtk3? ( x11-libs/gtk+:3 )
101 x11-libs/pango
102 x11-libs/pixman
103 "
104 KDERDEPEND="
105 kde-base/kdelibs
106 x11-libs/qt-core
107 x11-libs/qt-gui
108 "
109 GSTRDEPEND="
110 dev-libs/glib:2
111 dev-libs/libxml2
112 media-libs/gst-plugins-base
113 media-libs/gstreamer
114 media-plugins/gst-plugins-meta
115 "
116 RDEPEND="
117 media-libs/fontconfig
118 media-libs/freetype
119 sys-apps/util-linux
120 sys-libs/zlib
121 virtual/opengl
122 x11-libs/libICE
123 x11-libs/libSM
124 x11-libs/libX11
125 x11-libs/libXext
126 x11-libs/libXft
127 x11-libs/libXrender
128 x11-libs/libXt
129 gtk? ( ${GTKRDEPEND} )
130 gtk3? ( ${GTKRDEPEND} )
131 kde? ( ${KDERDEPEND} )
132 gstreamer? ( ${GSTRDEPEND} )
133 "
134 src_unpack() {
135 unpack ${A}
136 mv -v ${PN}* "${S}" || die
137 }
138
139 src_prepare() {
140 local LNGDIR="share/${PN}/locale"
141
142 # Count linguas
143 count() { echo ${#}; }
144 local lingua_count=$(count ${O_LINGUAS} en)
145 local locale_count=$(count ${LNGDIR}/*)
146 [[ ${lingua_count} = ${locale_count} ]] \
147 || die "Number of LINGUAS does not match number of locales"
148 unset count
149
150 # Remove unwanted linguas
151 einfo "Keeping these locales (linguas): ${LINGUAS}."
152 for LINGUA in ${O_LINGUAS}; do
153 if ! use linguas_${LINGUA/-/_}; then
154 LINGUA=$(find "${LNGDIR}" -maxdepth 1 -type d -iname ${LINGUA/_/-})
155 rm -r "${LINGUA}" || die "The list of linguas needs to be fixed"
156 fi
157 done
158
159 # Remove doc directory but keep the LICENSE under another name (bug #315473)
160 mv share/doc/${PN}/LICENSE share/${PN}/defaults/license.txt
161 rm -rf share/doc
162 for locale in share/${PN}/locale/*; do
163 rm -f "${locale}/license.txt"
164 ln -sn /usr/share/${PN}/defaults/license.txt "${locale}/license.txt" \
165 || die
166 done
167
168 # Remove package directory
169 rm -rf share/${PN}/package
170
171 # Optional libraries
172 if ! use gtk; then
173 rm lib/${PN}/liboperagtk2.so || die
174 fi
175 if ! use gtk3; then
176 rm lib/${PN}/liboperagtk3.so || die
177 fi
178 if ! use kde; then
179 rm lib/${PN}/liboperakde4.so || die
180 fi
181 if ! use gstreamer; then
182 rm -r lib/${PN}/gstreamer || die
183 fi
184
185 # Unzip the man pages before sedding
186 gunzip share/man/man1/* || die
187
188 # Replace PREFIX, SUFFIX and PN in various files
189 sed -i \
190 -e "s:@@{PREFIX}:/usr:g" \
191 -e "s:@@{SUFFIX}::g" \
192 -e "s:@@{_SUFFIX}::g" \
193 -e "s:@@{USUFFIX}::g" \
194 -e "s:opera:${PN}:g" \
195 share/man/man1/* \
196 share/applications/${PN}-*.desktop \
197 || die
198
199 # Replace "Opera" with "Opera Next"
200 if [[ ${PN} = opera-next ]]; then
201 sed -i share/applications/${PN}-*.desktop \
202 -e "/^Name=Opera\|^ Next/s:Opera:& Next:" || die
203 fi
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 \
245 "${D}/${OPREFIX}/${PN}/${PN}" \
246 "${D}/${OPREFIX}/${PN}/operaplugincleaner" \
247 "${D}/${OPREFIX}/${PN}/operapluginwrapper"
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 }