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.1076.ebuild
Date: Wed, 28 Sep 2011 15:41:34
Message-Id: 20110928154123.B7F6320036@flycatcher.gentoo.org
1 jer 11/09/28 15:41:23
2
3 Modified: ChangeLog
4 Added: opera-next-12.00.1076.ebuild
5 Log:
6 http://my.opera.com/desktopteam/blog/2011/09/28/core-bookmark-star
7
8 (Portage version: 2.2.0_alpha59/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.43 www-client/opera-next/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera-next/ChangeLog?rev=1.43&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera-next/ChangeLog?rev=1.43&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera-next/ChangeLog?r1=1.42&r2=1.43
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-client/opera-next/ChangeLog,v
20 retrieving revision 1.42
21 retrieving revision 1.43
22 diff -u -r1.42 -r1.43
23 --- ChangeLog 14 Sep 2011 00:39:34 -0000 1.42
24 +++ ChangeLog 28 Sep 2011 15:41:23 -0000 1.43
25 @@ -1,6 +1,11 @@
26 # ChangeLog for www-client/opera-next
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/www-client/opera-next/ChangeLog,v 1.42 2011/09/14 00:39:34 jer Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/www-client/opera-next/ChangeLog,v 1.43 2011/09/28 15:41:23 jer Exp $
30 +
31 +*opera-next-12.00.1076 (28 Sep 2011)
32 +
33 + 28 Sep 2011; Jeroen Roovers <jer@g.o> +opera-next-12.00.1076.ebuild:
34 + http://my.opera.com/desktopteam/blog/2011/09/28/core-bookmark-star
35
36 *opera-next-12.00.1065 (14 Sep 2011)
37
38
39
40
41 1.1 www-client/opera-next/opera-next-12.00.1076.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera-next/opera-next-12.00.1076.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera-next/opera-next-12.00.1076.ebuild?rev=1.1&content-type=text/plain
45
46 Index: opera-next-12.00.1076.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-next/opera-next-12.00.1076.ebuild,v 1.1 2011/09/28 15:41:23 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 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="turret_${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 x11-libs/gtk+:2
100 x11-libs/pango
101 x11-libs/pixman
102 "
103 KDERDEPEND="
104 kde-base/kdelibs
105 x11-libs/qt-core
106 x11-libs/qt-gui
107 "
108 GSTRDEPEND="
109 dev-libs/glib
110 dev-libs/libxml2
111 media-plugins/gst-plugins-meta
112 media-libs/gstreamer
113 "
114 RDEPEND="
115 media-libs/fontconfig
116 media-libs/freetype
117 sys-apps/util-linux
118 sys-libs/zlib
119 virtual/opengl
120 x11-libs/libICE
121 x11-libs/libSM
122 x11-libs/libX11
123 x11-libs/libXext
124 x11-libs/libXft
125 x11-libs/libXrender
126 gtk? ( ${GTKRDEPEND} )
127 kde? ( ${KDERDEPEND} )
128 gstreamer? ( ${GSTRDEPEND} )
129 "
130
131 pkg_setup() {
132 echo -e \
133 " ${GOOD}****************************************************${NORMAL}"
134 elog "If you seek support, please file a bug report at"
135 elog "https://bugs.gentoo.org and post the output of"
136 elog " \`emerge --info =${CATEGORY}/${P}'"
137 echo -e \
138 " ${GOOD}****************************************************${NORMAL}"
139 }
140
141 src_unpack() {
142 unpack ${A}
143 mv -v ${PN}* "${S}" || die
144 }
145
146 src_prepare() {
147 local LNGDIR="share/${PN}/locale"
148
149 # Count linguas
150 count() { echo ${#}; }
151 local lingua_count=$(count ${O_LINGUAS} en)
152 local locale_count=$(count ${LNGDIR}/*)
153 [[ ${lingua_count} = ${locale_count} ]] \
154 || die "Number of LINGUAS does not match number of locales"
155 unset count
156
157 # Remove unwanted linguas
158 einfo "Keeping these locales (linguas): ${LINGUAS}."
159 for LINGUA in ${O_LINGUAS}; do
160 if ! use linguas_${LINGUA/-/_}; then
161 LINGUA=$(find "${LNGDIR}" -maxdepth 1 -type d -iname ${LINGUA/_/-})
162 rm -r "${LINGUA}" || die "The list of linguas needs to be fixed"
163 fi
164 done
165
166 # Remove doc directory but keep the LICENSE under another name (bug #315473)
167 mv share/doc/${PN}/LICENSE share/${PN}/defaults/license.txt
168 rm -rf share/doc
169 for locale in share/${PN}/locale/*; do
170 rm -f "${locale}/license.txt"
171 ln -sn /usr/share/${PN}/defaults/license.txt "${locale}/license.txt" \
172 || die "ln -sn license.txt"
173 done
174
175 # Remove package directory
176 rm -rf share/${PN}/package
177
178 # Leave libopera*.so only if the user chooses
179 if ! use gtk; then
180 rm lib/${PN}/liboperagtk2.so || die "rm liboperagtk.so failed"
181 fi
182 if ! use kde; then
183 rm lib/${PN}/liboperakde4.so || die "rm liboperakde4.so failed"
184 fi
185
186 # Unzip the man pages before sedding
187 gunzip share/man/man1/* || die "gunzip failed"
188
189 # Replace PREFIX, SUFFIX and PN in various files
190 sed -i \
191 -e "s:@@{PREFIX}:/usr:g" \
192 -e "s:@@{SUFFIX}::g" \
193 -e "s:@@{_SUFFIX}::g" \
194 -e "s:@@{USUFFIX}::g" \
195 -e "s:opera:${PN}:g" \
196 share/man/man1/* \
197 share/applications/${PN}-*.desktop \
198 || die "sed failed"
199
200 # Replace "Opera" with "Opera Next"
201 if [[ ${PN} = opera-next ]]; then
202 sed -i share/applications/${PN}-*.desktop \
203 -e "/^Name=Opera\|^ Next/s:Opera:& Next:" || die
204 fi
205
206 # Create /usr/bin/opera wrapper
207 echo '#!/bin/sh' > ${PN}
208 echo 'export OPERA_DIR=/usr/share/'"${PN}" >> ${PN}
209 echo 'export OPERA_PERSONALDIR=${OPERA_PERSONALDIR:-"${HOME}/.'${PN}'"}' \
210 >> ${PN}
211 echo 'exec '"${OPREFIX}/${PN}/${PN}"' "$@"' >> ${PN}
212
213 # Fix libdir in defaults/pluginpath.ini
214 sed -i \
215 share/${PN}/defaults/pluginpath.ini \
216 -e "s|/usr/lib32|${OPREFIX}|g" \
217 -e '/netscape/{s|[0-1]|2|g}' \
218 || die "sed pluginpath.ini failed"
219
220 # Change libz.so.3 to libz.so.1 for gentoo/freebsd
221 if use elibc_FreeBSD; then
222 scanelf -qR -N libz.so.3 -F "#N" lib/${PN}/ | \
223 while read i; do
224 if [[ $(strings "$i" | fgrep -c libz.so.3) -ne 1 ]];
225 then
226 export SANITY_CHECK_LIBZ_FAILED=1
227 break
228 fi
229 sed -i \
230 "$i" \
231 -e 's/libz\.so\.3/libz.so.1/g'
232 done
233 [[ "$SANITY_CHECK_LIBZ_FAILED" = "1" ]] \
234 && die "failed to change libz.so.3 to libz.so.1"
235 fi
236 }
237
238 src_install() {
239 # We install into usr instead of opt as Opera does not support the latter
240 dodir /usr
241 mv lib/ "${D}/${OPREFIX}" || die "mv lib/ failed"
242 mv share/ "${D}/usr/" || die "mv share/ failed"
243
244 # Install startup scripts
245 dobin ${PN}
246
247 # Stop revdep-rebuild from checking opera binaries
248 dodir /etc/revdep-rebuild
249 echo "SEARCH_DIRS_MASK=\"${OPREFIX}/${PN}\"" \
250 > "${D}"/etc/revdep-rebuild/90${PN}
251
252 # Set PaX markings for hardened/PaX (bug #344267)
253 pax-mark m \
254 "${D}/${OPREFIX}/${PN}/${PN}" \
255 "${D}/${OPREFIX}/${PN}/operaplugincleaner" \
256 "${D}/${OPREFIX}/${PN}/operapluginwrapper"
257 }
258
259 pkg_preinst() {
260 gnome2_icon_savelist
261 }
262
263 pkg_postinst() {
264 if use elibc_FreeBSD; then
265 elog
266 elog "To improve shared memory usage please set:"
267 elog "$ sysctl kern.ipc.shm_allow_removed=1"
268 fi
269
270 # Update desktop file database and gtk icon cache (bug #334993)
271 gnome2_icon_cache_update
272 fdo-mime_desktop_database_update
273 }
274
275 pkg_postrm() {
276 # Update desktop file database and gtk icon cache (bug #334993)
277 gnome2_icon_cache_update
278 fdo-mime_desktop_database_update
279 }