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: opera-11.60.1181.ebuild ChangeLog opera-11.60.1180.ebuild
Date: Fri, 02 Dec 2011 15:57:48
Message-Id: 20111202155733.AAE072004B@flycatcher.gentoo.org
1 jer 11/12/02 15:57:33
2
3 Modified: ChangeLog
4 Added: opera-11.60.1181.ebuild
5 Removed: opera-11.60.1180.ebuild
6 Log:
7 http://my.opera.com/desktopteam/blog/2011/12/02/tunny-rc
8
9 (Portage version: 2.2.0_alpha79/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.673 www-client/opera/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/ChangeLog?rev=1.673&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/ChangeLog?rev=1.673&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/ChangeLog?r1=1.672&r2=1.673
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/www-client/opera/ChangeLog,v
21 retrieving revision 1.672
22 retrieving revision 1.673
23 diff -u -r1.672 -r1.673
24 --- ChangeLog 1 Dec 2011 17:08:54 -0000 1.672
25 +++ ChangeLog 2 Dec 2011 15:57:33 -0000 1.673
26 @@ -1,6 +1,12 @@
27 # ChangeLog for www-client/opera
28 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/www-client/opera/ChangeLog,v 1.672 2011/12/01 17:08:54 jer Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/www-client/opera/ChangeLog,v 1.673 2011/12/02 15:57:33 jer Exp $
31 +
32 +*opera-11.60.1181 (02 Dec 2011)
33 +
34 + 02 Dec 2011; Jeroen Roovers <jer@g.o> -opera-11.60.1180.ebuild,
35 + +opera-11.60.1181.ebuild:
36 + http://my.opera.com/desktopteam/blog/2011/12/02/tunny-rc
37
38 *opera-11.60.1180 (01 Dec 2011)
39
40
41
42
43 1.1 www-client/opera/opera-11.60.1181.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/opera-11.60.1181.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/opera-11.60.1181.ebuild?rev=1.1&content-type=text/plain
47
48 Index: opera-11.60.1181.ebuild
49 ===================================================================
50 # Copyright 1999-2011 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/www-client/opera/opera-11.60.1181.ebuild,v 1.1 2011/12/02 15:57:33 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="earthmother_${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="af az be bg bn cs da de el en-GB es-ES es-LA et fi fr fr-CA fy gd hi
85 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
86 th tl tr uk uz vi zh-CN zh-TW zu"
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
137 pkg_setup() {
138 echo -e \
139 " ${GOOD}****************************************************${NORMAL}"
140 elog "If you seek support, please file a bug report at"
141 elog "https://bugs.gentoo.org and post the output of"
142 elog " \`emerge --info =${CATEGORY}/${P}'"
143 echo -e \
144 " ${GOOD}****************************************************${NORMAL}"
145 }
146
147 src_unpack() {
148 unpack ${A}
149 mv -v ${PN}* "${S}" || die
150 }
151
152 src_prepare() {
153 local LNGDIR="share/${PN}/locale"
154
155 # Count linguas
156 count() { echo ${#}; }
157 local lingua_count=$(count ${O_LINGUAS} en)
158 local locale_count=$(count ${LNGDIR}/*)
159 [[ ${lingua_count} = ${locale_count} ]] \
160 || die "Number of LINGUAS does not match number of locales"
161 unset count
162
163 # Remove unwanted linguas
164 einfo "Keeping these locales (linguas): ${LINGUAS}."
165 for LINGUA in ${O_LINGUAS}; do
166 if ! use linguas_${LINGUA/-/_}; then
167 LINGUA=$(find "${LNGDIR}" -maxdepth 1 -type d -iname ${LINGUA/_/-})
168 rm -r "${LINGUA}" || die "The list of linguas needs to be fixed"
169 fi
170 done
171
172 # Remove doc directory but keep the LICENSE under another name (bug #315473)
173 mv share/doc/${PN}/LICENSE share/${PN}/defaults/license.txt
174 rm -rf share/doc
175 for locale in share/${PN}/locale/*; do
176 rm -f "${locale}/license.txt"
177 ln -sn /usr/share/${PN}/defaults/license.txt "${locale}/license.txt" \
178 || die
179 done
180
181 # Remove package directory
182 rm -rf share/${PN}/package
183
184 # Optional libraries
185 if ! use gtk; then
186 rm lib/${PN}/liboperagtk2.so || die
187 fi
188 if ! use gtk3; then
189 rm lib/${PN}/liboperagtk3.so || die
190 fi
191 if ! use kde; then
192 rm lib/${PN}/liboperakde4.so || die
193 fi
194 if ! use gstreamer; then
195 rm -r lib/${PN}/gstreamer || die
196 fi
197
198 # Unzip the man pages before sedding
199 gunzip share/man/man1/* || die
200
201 # Replace PREFIX, SUFFIX and PN in various files
202 sed -i \
203 -e "s:@@{PREFIX}:/usr:g" \
204 -e "s:@@{SUFFIX}::g" \
205 -e "s:@@{_SUFFIX}::g" \
206 -e "s:@@{USUFFIX}::g" \
207 -e "s:opera:${PN}:g" \
208 share/man/man1/* \
209 share/applications/${PN}-*.desktop \
210 || die
211
212 # Replace "Opera" with "Opera Next"
213 if [[ ${PN} = opera-next ]]; then
214 sed -i share/applications/${PN}-*.desktop \
215 -e "/^Name=Opera\|^ Next/s:Opera:& Next:" || die
216 fi
217
218 # Create /usr/bin/opera wrapper
219 echo '#!/bin/sh' > ${PN}
220 echo 'export OPERA_DIR="/usr/share/'"${PN}"'"' >> ${PN}
221 echo 'export OPERA_PERSONALDIR=${OPERA_PERSONALDIR:-"${HOME}/.'${PN}'"}' \
222 >> ${PN}
223 echo 'export LD_PRELOAD="/usr/'$(get_libdir)'/libgtk-x11-2.0.so"' >> ${PN}
224 echo 'exec '"${OPREFIX}/${PN}/${PN}"' "$@"' >> ${PN}
225
226 # Change libz.so.3 to libz.so.1 for gentoo/freebsd
227 if use elibc_FreeBSD; then
228 scanelf -qR -N libz.so.3 -F "#N" lib/${PN}/ | \
229 while read i; do
230 if [[ $(strings "$i" | fgrep -c libz.so.3) -ne 1 ]];
231 then
232 export SANITY_CHECK_LIBZ_FAILED=1
233 break
234 fi
235 sed -i \
236 "$i" \
237 -e 's/libz\.so\.3/libz.so.1/g'
238 done
239 [[ "$SANITY_CHECK_LIBZ_FAILED" = "1" ]] && die
240 fi
241 }
242
243 src_install() {
244 # We install into usr instead of opt as Opera does not support the latter
245 dodir /usr
246 mv lib/ "${D}/${OPREFIX}" || die
247 mv share/ "${D}/usr/" || die
248
249 # Install startup scripts
250 dobin ${PN}
251
252 # Stop revdep-rebuild from checking opera binaries
253 dodir /etc/revdep-rebuild
254 echo "SEARCH_DIRS_MASK=\"${OPREFIX}/${PN}\"" \
255 > "${D}"/etc/revdep-rebuild/90${PN}
256
257 # Set PaX markings for hardened/PaX (bug #344267)
258 pax-mark m \
259 "${D}/${OPREFIX}/${PN}/${PN}" \
260 "${D}/${OPREFIX}/${PN}/operaplugincleaner" \
261 "${D}/${OPREFIX}/${PN}/operapluginwrapper"
262 }
263
264 pkg_preinst() {
265 gnome2_icon_savelist
266 }
267
268 pkg_postinst() {
269 if use elibc_FreeBSD; then
270 elog
271 elog "To improve shared memory usage please set:"
272 elog "$ sysctl kern.ipc.shm_allow_removed=1"
273 fi
274
275 # Update desktop file database and gtk icon cache (bug #334993)
276 gnome2_icon_cache_update
277 fdo-mime_desktop_database_update
278 }
279
280 pkg_postrm() {
281 # Update desktop file database and gtk icon cache (bug #334993)
282 gnome2_icon_cache_update
283 fdo-mime_desktop_database_update
284 }