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-12.12_pre1662.ebuild opera-12.12.1662.ebuild
Date: Wed, 28 Nov 2012 17:26:27
Message-Id: 20121128172614.B0DB320C65@flycatcher.gentoo.org
1 jer 12/11/28 17:26:14
2
3 Modified: ChangeLog
4 Added: opera-12.12_pre1662.ebuild
5 Removed: opera-12.12.1662.ebuild
6 Log:
7 Fix the difference between snapshot and release builds in the version string.
8
9 (Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key A792A613)
10
11 Revision Changes Path
12 1.776 www-client/opera/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/ChangeLog?rev=1.776&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/ChangeLog?rev=1.776&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/ChangeLog?r1=1.775&r2=1.776
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/www-client/opera/ChangeLog,v
21 retrieving revision 1.775
22 retrieving revision 1.776
23 diff -u -r1.775 -r1.776
24 --- ChangeLog 26 Nov 2012 18:06:51 -0000 1.775
25 +++ ChangeLog 28 Nov 2012 17:26:14 -0000 1.776
26 @@ -1,6 +1,12 @@
27 # ChangeLog for www-client/opera
28 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/www-client/opera/ChangeLog,v 1.775 2012/11/26 18:06:51 jer Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/www-client/opera/ChangeLog,v 1.776 2012/11/28 17:26:14 jer Exp $
31 +
32 +*opera-12.12_pre1662 (28 Nov 2012)
33 +
34 + 28 Nov 2012; Jeroen Roovers <jer@g.o> +opera-12.12_pre1662.ebuild,
35 + -opera-12.12.1662.ebuild:
36 + Fix the difference between snapshot and release builds in the version string.
37
38 *opera-12.12.1662 (26 Nov 2012)
39
40
41
42
43 1.1 www-client/opera/opera-12.12_pre1662.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/opera-12.12_pre1662.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/opera/opera-12.12_pre1662.ebuild?rev=1.1&content-type=text/plain
47
48 Index: opera-12.12_pre1662.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/opera-12.12_pre1662.ebuild,v 1.1 2012/11/28 17:26:14 jer Exp $
53
54 EAPI=4
55 inherit eutils fdo-mime gnome2-utils multilib pax-utils versionator
56
57 DESCRIPTION="A fast and secure web browser and Internet suite"
58 HOMEPAGE="http://www.opera.com/"
59
60 SLOT="0"
61 LICENSE="OPERA-12 LGPL-2 LGPL-3"
62 KEYWORDS="~amd64 ~x86 ~x86-fbsd"
63 IUSE="elibc_FreeBSD gtk kde +gstreamer multilib"
64
65 O_V="$(get_version_component_range 1-2)" # Version, i.e. 11.00
66 O_B="$(get_version_component_range 3)" # Build number, i.e. 1156
67
68 # == Variables that often change ==
69 # All other variables should be accounted for by _pre/_p
70
71 O_K="mantismech" # The key to the snapshot URL
72
73 O_LINGUAS="
74 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
75 hi hr hu id it ja ka kk ko lt lv me mk ms nb nl nn pa pl pt pt-BR ro ru sk
76 sr sv sw ta te th tl tr uk ur uz vi zh-CN zh-TW zu
77 " # Supported linguas
78
79 # == End of variables that often change ==
80
81 if [[ "pre${O_B/pre/}" = "${O_B}" ]]; then # snapshot: _pre
82 O_B="${O_B/pre}" # remove _pre
83 O_D="${O_K}_${O_V}-${O_B}" # directory string
84 O_P="${PN}-${O_V}-${O_B}" # package string
85 O_U="http://snapshot.opera.com/unix/" # base URI
86
87 SRC_URI="
88 amd64? ( ${O_U}${O_D}/${O_P}.x86_64.linux.tar.xz )
89 x86? ( ${O_U}${O_D}/${O_P}.i386.linux.tar.xz )
90 x86-fbsd? ( ${O_U}${O_D}/${O_P}.i386.freebsd.tar.xz )
91 "
92 else # release: _p
93 O_B="${O_B/p}" # remove _p
94 O_D="${O_V/./}" # directory string
95 O_P="${PN}-${O_V}-${O_B}" # package string
96 O_U="mirror://opera/" # base URI
97
98 SRC_URI="
99 amd64? ( ${O_U}linux/${O_D}/${O_P}.x86_64.linux.tar.xz )
100 x86? ( ${O_U}linux/${O_D}/${O_P}.i386.linux.tar.xz )
101 x86-fbsd? ( ${O_U}unix/${O_D}/${O_P}.i386.freebsd.tar.xz )
102 "
103 fi
104
105 for O_LINGUA in ${O_LINGUAS}; do
106 IUSE+=" linguas_${O_LINGUA/-/_}"
107 done
108
109 DEPEND="
110 >=sys-apps/sed-4
111 app-arch/xz-utils
112 "
113 GTKRDEPEND="
114 dev-libs/atk
115 dev-libs/glib:2
116 x11-libs/cairo
117 x11-libs/gdk-pixbuf
118 gtk? ( || ( x11-libs/gtk+:3 x11-libs/gtk+:2 ) )
119 x11-libs/pango
120 x11-libs/pixman
121 "
122 KDERDEPEND="
123 kde-base/kdelibs
124 x11-libs/qt-core:4
125 x11-libs/qt-gui:4
126 "
127 GSTRDEPEND="
128 dev-libs/glib:2
129 dev-libs/libxml2
130 media-libs/gst-plugins-base
131 media-libs/gstreamer
132 media-plugins/gst-plugins-meta
133 "
134 RDEPEND="
135 media-libs/fontconfig
136 media-libs/freetype
137 sys-apps/util-linux
138 sys-libs/zlib
139 virtual/opengl
140 x11-libs/libICE
141 x11-libs/libSM
142 x11-libs/libX11
143 x11-libs/libXext
144 x11-libs/libXft
145 x11-libs/libXrender
146 x11-libs/libXt
147 gtk? ( ${GTKRDEPEND} )
148 kde? ( ${KDERDEPEND} )
149 gstreamer? ( ${GSTRDEPEND} )
150 "
151 src_unpack() {
152 unpack ${A}
153 mv -v ${PN}* "${S}" || die
154 }
155
156 src_prepare() {
157 export OPREFIX="/usr/$(get_libdir)"
158 export QA_PREBUILT="${OPREFIX}/${PN}/.*"
159 export QA_PRESTRIPPED="${OPREFIX}/${PN}/.*"
160
161 local LNGDIR="share/${PN}/locale"
162
163 # Count linguas
164 count() { echo ${#}; }
165 local lingua_count=$(count ${O_LINGUAS} en)
166 local locale_count=$(count ${LNGDIR}/*)
167 [[ ${lingua_count} = ${locale_count} ]] \
168 || die "Number of LINGUAS does not match number of locales"
169 unset count
170
171 # Remove unwanted linguas
172 for LINGUA in ${O_LINGUAS}; do
173 if ! use linguas_${LINGUA/-/_}; then
174 LINGUA=$(find "${LNGDIR}" -maxdepth 1 -type d -iname ${LINGUA/_/-})
175 rm -r "${LINGUA}" || die "The list of linguas needs to be fixed"
176 fi
177 done
178
179 # Remove doc directory but keep the LICENSE under another name (bug #315473)
180 mv share/doc/${PN}/LICENSE share/${PN}/defaults/license.txt
181 rm -rf share/doc
182 for locale in share/${PN}/locale/*; do
183 rm -f "${locale}/license.txt"
184 ln -sn /usr/share/${PN}/defaults/license.txt "${locale}/license.txt" \
185 || die
186 done
187
188 # Remove package directory
189 rm -rf share/${PN}/package
190
191 # Optional libraries
192 if ! use gtk; then
193 rm lib/${PN}/liboperagtk2.so || die
194 rm lib/${PN}/liboperagtk3.so || die
195 fi
196 if ! use kde; then
197 rm lib/${PN}/liboperakde4.so || die
198 fi
199 if ! use gstreamer; then
200 rm -r lib/${PN}/gstreamer || die
201 fi
202 if use amd64 && ! use multilib; then
203 rm lib/${PN}/pluginwrapper/operapluginwrapper-ia32-linux || die
204 fi
205
206 # Unzip the man pages before sedding
207 gunzip share/man/man1/* || die
208
209 local OPERA_SUFFIX= OPERA__SUFFIX= OPERAU_SUFFIX=
210 if [[ ${PN} = opera-next ]]; then
211 OPERA_SUFFIX="-next"
212 OPERA__SUFFIX=" Next"
213 OPERA_USUFFIX="-NEXT"
214 fi
215
216 # Replace PREFIX, SUFFIX and PN in various files
217 sed -i \
218 -e "s:@@{PREFIX}:/usr:g" \
219 -e "s:@@{SUFFIX}:${OPERA_SUFFIX}:g" \
220 -e "s:@@{_SUFFIX}:${OPERA__SUFFIX}:g" \
221 -e "s:@@{USUFFIX}:${OPERA_USUFFIX}:g" \
222 share/man/man1/* \
223 share/mime/packages/* \
224 share/applications/${PN}-*.desktop \
225 || die
226
227 # Create /usr/bin/opera wrapper
228 echo '#!/bin/sh' > ${PN}
229 echo 'export OPERA_DIR="/usr/share/'"${PN}"'"' >> ${PN}
230 echo 'export OPERA_PERSONALDIR=${OPERA_PERSONALDIR:-"${HOME}/.'${PN}'"}' \
231 >> ${PN}
232 echo 'exec '"${OPREFIX}/${PN}/${PN}"' "$@"' >> ${PN}
233
234 # Change libz.so.3 to libz.so.1 for gentoo/freebsd
235 if use elibc_FreeBSD; then
236 scanelf -qR -N libz.so.3 -F "#N" lib/${PN}/ | \
237 while read i; do
238 if [[ $(strings "$i" | fgrep -c libz.so.3) -ne 1 ]];
239 then
240 export SANITY_CHECK_LIBZ_FAILED=1
241 break
242 fi
243 sed -i \
244 "$i" \
245 -e 's/libz\.so\.3/libz.so.1/g'
246 done
247 [[ "$SANITY_CHECK_LIBZ_FAILED" = "1" ]] && die
248 fi
249 }
250
251 src_install() {
252 # We install into usr instead of opt as Opera does not support the latter
253 dodir /usr
254 mv lib/ "${D}/${OPREFIX}" || die
255 mv share/ "${D}/usr/" || die
256
257 # Install startup scripts
258 dobin ${PN}
259
260 # Stop revdep-rebuild from checking opera binaries
261 dodir /etc/revdep-rebuild
262 echo "SEARCH_DIRS_MASK=\"${OPREFIX}/${PN}\"" \
263 > "${D}"/etc/revdep-rebuild/90${PN}
264
265 # Set PaX markings for hardened/PaX (bug #344267)
266 pax-mark m $( list-paxables $( find "${D}"/${OPREFIX}/${PN}/ ) )
267 }
268
269 pkg_preinst() {
270 gnome2_icon_savelist
271 }
272
273 pkg_postinst() {
274 if use elibc_FreeBSD; then
275 elog
276 elog "To improve shared memory usage please set:"
277 elog "$ sysctl kern.ipc.shm_allow_removed=1"
278 fi
279
280 # Update desktop file database and gtk icon cache (bug #334993)
281 gnome2_icon_cache_update
282 fdo-mime_desktop_database_update
283 }
284
285 pkg_postrm() {
286 # Update desktop file database and gtk icon cache (bug #334993)
287 gnome2_icon_cache_update
288 fdo-mime_desktop_database_update
289 }